Class SubstructureIdentifier
- All Implemented Interfaces:
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 := [1-9][a-zA-Z0-9]{3} | PDB_[a-zA-Z0-9]{8} chainID := [a-zA-Z0-9]+ resNum := [-+]?[0-9]+[A-Za-z]?For example:
1TIM #whole structure (short format) 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 parts PDB_00001TIM #whole structure (extended format) pdb_00001tim #same as above PDB_00004HHB.C #single chain PDB_00003AA0.A,B #two chains PDB_00004GCR.A_1-40 #substructure pdb_00003iek.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.
- Author:
- dmyersturnbull, Spencer Bliven
- See Also:
-
Constructor Summary
ConstructorDescriptionCreate a new identifier from a string.SubstructureIdentifier
(String pdbId, List<ResidueRange> ranges) Create a new identifier based on a set of ranges.SubstructureIdentifier
(PdbId pdbId, List<ResidueRange> ranges) Create a new identifier based on a set of ranges. -
Method Summary
Modifier and TypeMethodDescriptionprotected static void
copyLigandsByProximity
(Structure full, Structure reduced) Supplements the reduced structure with ligands from the full structure based on a distance cutoff.protected static void
copyLigandsByProximity
(Structure full, Structure reduced, double cutoff, int fromModel, int toModel) Supplements the reduced structure with ligands from the full structure based on a distance cutoff.Get the String form of this identifier.getPdbId()
Get the PDB identifier part of the SubstructureIdentifierloadStructure
(AtomCache cache) Loads the complete structure based ongetPdbId()
.Takes a complete structure as input and reduces it to residues present in the specified rangesReturn itself.toString()
-
Constructor Details
-
SubstructureIdentifier
Create a new identifier from a string.- Parameters:
id
-
-
SubstructureIdentifier
Create a new identifier based on a set of ranges. If ranges is empty, includes all residues.- Parameters:
pdbId
- a pdb id, can't be nullranges
- the ranges
-
SubstructureIdentifier
Create a new identifier based on a set of ranges. If ranges is empty, includes all residues.- Parameters:
pdbId
-ranges
-
-
-
Method Details
-
toString
-
getIdentifier
Get the String form of this identifier. This provides the canonical form for a StructureIdentifier and has all the information needed to recreate a particular substructure. Example: 3iek.A_17-28,A_56-294- Specified by:
getIdentifier
in interfaceStructureIdentifier
- Returns:
- The String form of this identifier
-
getPdbId
Get the PDB identifier part of the SubstructureIdentifier- Returns:
- the PDB ID
-
getResidueRanges
-
toCanonical
Return itself. SubstructureIdentifiers are canonical!- Specified by:
toCanonical
in interfaceStructureIdentifier
- Returns:
- A SubstructureIdentifier equivalent to this
-
reduce
Takes a complete structure as input and reduces it to residues present in the specified rangesThe returned structure will be a shallow copy of the input, with shared Chains, Residues, etc.
Ligands are handled in a special way. If a full chain is selected (e.g. '1ABC.A') then any waters and ligands with matching chain name are included. If a residue range is present ('1ABC.A:1-100') then any ligands (technically non-water non-polymer atoms) within
StructureTools.DEFAULT_LIGAND_PROXIMITY_CUTOFF
of the selected range are included, regardless of chain.- Specified by:
reduce
in interfaceStructureIdentifier
- Parameters:
s
- A full structure, e.g. as loaded from the PDB. The structure ID should match that returned by getPdbId().- Returns:
- Throws:
StructureException
-
loadStructure
Loads the complete structure based ongetPdbId()
.- Specified by:
loadStructure
in interfaceStructureIdentifier
- Parameters:
cache
- A source of structures- Returns:
- A Structure containing at least the atoms identified by this, or null if no PDB ID is set
- Throws:
StructureException
- For errors loading and parsing the structureIOException
- Errors reading the structure from disk
-
copyLigandsByProximity
Supplements the reduced structure with ligands from the full structure based on a distance cutoff. Ligand groups are moved (destructively) from full to reduced if they fall within the cutoff of any atom in the reduced structure. Thedefault cutoff
is used.- Parameters:
full
- Structure containing all ligandsreduced
- Structure with a subset of the polymer groups from full- See Also:
-
copyLigandsByProximity
protected static void copyLigandsByProximity(Structure full, Structure reduced, double cutoff, int fromModel, int toModel) Supplements the reduced structure with ligands from the full structure based on a distance cutoff. Ligand groups are moved (destructively) from full to reduced if they fall within the cutoff of any atom in the reduced structure.- Parameters:
full
- Structure containing all ligandsreduced
- Structure with a subset of the polymer groups from fullcutoff
- Distance cutoff (Å)fromModel
- source model in fulltoModel
- destination model in reduced- See Also:
-