Package org.biojava.nbio.structure
Interface StructureIdentifier
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
BioAssemblyIdentifier
,CathDomain
,EcodDomain
,PassthroughIdentifier
,ScopDomain
,StructureName
,SubstructureIdentifier
,URLIdentifier
An identifier that uniquely identifies a whole
Structure
or
arbitrary substructure. Common examples would be reducing a structure to a
single chain, domain, or residue range.
StructureIdentifiers are represented by unique strings. The getId() and fromId() methods convert to and from the string representation.
Implementations should provide a constructor which takes a String. A static
fromId(String)
method is also recommended.
- Author:
- dmyersturnbull, Spencer Bliven
-
Method Summary
Modifier and TypeMethodDescriptionGet the String form of this identifier.loadStructure
(AtomCache cache) Loads a structure encompassing the structure identified.Takes a complete structure as input and reduces it to the substructure represented by this StructureIdentifier.Convert to a canonical SubstructureIdentifier.
-
Method Details
-
getIdentifier
Get the String form of this identifier. It is recommended that the toString() method also return the identifier, for consistency during serialization.- Returns:
- The String form of this identifier
-
loadStructure
Loads a structure encompassing the structure identified. The Structure returned should be suitable for passing as the input toreduce(Structure)
.It is recommended that the most complete structure available be returned (e.g. the full PDB) to allow processing of unselected portions where appropriate.
- Parameters:
cache
- A potential sources of structures- Returns:
- A Structure containing at least the atoms identified by this, or null if Structures are not applicable.
- Throws:
StructureException
- For errors loading and parsing the structureIOException
- Errors reading the structure from disk
-
toCanonical
Convert to a canonical SubstructureIdentifier.This allows all domains to be converted to a standard format String.
- Returns:
- A SubstructureIdentifier equivalent to this
- Throws:
StructureException
- Wraps exceptions that may be thrown by individual implementations. For example, a SCOP identifier may require that the domain definitions be available for download.
-
reduce
Takes a complete structure as input and reduces it to the substructure represented by this StructureIdentifier.The returned structure may be a shallow copy of the input, with shared Chains, Residues, etc.
- Parameters:
input
- A full structure, e.g. as loaded from the PDB. The structure ID should match that returned by getPdbId(), if applicable.- Returns:
- Throws:
StructureException
-