public class SubstructureIdentifier extends Object implements Serializable, StructureIdentifier
The current syntax allows the specification of a set of residues from the first model of a structure. Future versions may be extended to represent additional properties.
Identifiers should adhere to the following specification, although some additional forms may be tolerated where unambiguous for backwards compatibility.
name := pdbID | pdbID '.' chainID | pdbID '.' range range := range (',' range)? | chainID | chainID '_' resNum '-' resNum pdbID := [0-9][a-zA-Z0-9]{3} chainID := [a-zA-Z0-9]+ resNum := [-+]?[0-9]+[A-Za-z]?For example:
1TIM #whole structure 1tim #same as above 4HHB.C #single chain 3AA0.A,B #two chains 4GCR.A_1-40 #substructure 3iek.A_17-28,A_56-294,A_320-377 #substructure of 3 disjoint partsMore options may be added to the specification at a future time.
Constructor and Description |
---|
SubstructureIdentifier(String id)
Create a new identifier from a string.
|
SubstructureIdentifier(String pdbId,
List<ResidueRange> ranges)
Create a new identifier based on a set of ranges.
|
Modifier and Type | Method and Description |
---|---|
String |
getIdentifier()
Get the String form of this identifier.
|
String |
getPdbId() |
List<ResidueRange> |
getResidueRanges() |
Structure |
loadStructure(AtomCache cache)
Loads the complete structure based on
getPdbId() . |
Structure |
reduce(Structure s)
Takes a complete structure as input and reduces it to residues present in
the specified ranges
|
SubstructureIdentifier |
toCanonical()
Return itself.
|
String |
toString() |
public SubstructureIdentifier(String id)
id
- public SubstructureIdentifier(String pdbId, List<ResidueRange> ranges)
pdbId
- ranges
- public String getIdentifier()
getIdentifier
in interface StructureIdentifier
public String getPdbId()
public List<ResidueRange> getResidueRanges()
public SubstructureIdentifier toCanonical()
toCanonical
in interface StructureIdentifier
public Structure reduce(Structure s) throws StructureException
The returned structure will be a shallow copy of the input, with shared Chains, Residues, etc.
reduce
in interface StructureIdentifier
input
- A full structure, e.g. as loaded from the PDB. The structure
ID should match that returned by getPdbId().StructureException
StructureTools.getReducedStructure(Structure, String)
public Structure loadStructure(AtomCache cache) throws IOException, StructureException
getPdbId()
.loadStructure
in interface StructureIdentifier
AtomCache
- A source of structuresStructureException
- For errors loading and parsing the structureIOException
- Errors reading the structure from diskCopyright © 2000–2016 BioJava. All rights reserved.