Class PDPDomain
- java.lang.Object
-
- org.biojava.nbio.structure.domain.PDPDomain
-
- All Implemented Interfaces:
java.io.Serializable,StructureIdentifier
public class PDPDomain extends java.lang.Object implements StructureIdentifier
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.regex.PatternPDP_NAME_PATTERN
-
Constructor Summary
Constructors Constructor Description PDPDomain(java.lang.String pdpDomainName, java.util.List<ResidueRange> ranges)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetIdentifier()Get the String form of this identifier.java.lang.StringgetPdbId()StructureloadStructure(AtomCache cache)Loads a structure encompassing the structure identified.Structurereduce(Structure input)Takes a complete structure as input and reduces it to the substructure represented by this StructureIdentifier.SubstructureIdentifiertoCanonical()Convert to a canonical SubstructureIdentifier.java.lang.StringtoString()
-
-
-
Constructor Detail
-
PDPDomain
public PDPDomain(java.lang.String pdpDomainName, java.util.List<ResidueRange> ranges)
-
-
Method Detail
-
getIdentifier
public java.lang.String getIdentifier()
Description copied from interface:StructureIdentifierGet the String form of this identifier. It is recommended that the#toString()method also return the identifier, for consistency during serialization.- Specified by:
getIdentifierin interfaceStructureIdentifier- Returns:
- The String form of this identifier
-
getPdbId
public java.lang.String getPdbId()
-
toCanonical
public SubstructureIdentifier toCanonical()
Description copied from interface:StructureIdentifierConvert to a canonical SubstructureIdentifier.This allows all domains to be converted to a standard format String.
- Specified by:
toCanonicalin interfaceStructureIdentifier- Returns:
- A SubstructureIdentifier equivalent to this
-
reduce
public Structure reduce(Structure input) throws StructureException
Description copied from interface:StructureIdentifierTakes 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.
- Specified by:
reducein interfaceStructureIdentifier- 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- See Also:
StructureTools.getReducedStructure(Structure, String)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
loadStructure
public Structure loadStructure(AtomCache cache) throws StructureException, java.io.IOException
Description copied from interface:StructureIdentifierLoads a structure encompassing the structure identified. The Structure returned should be suitable for passing as the input toStructureIdentifier.reduce(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.- Specified by:
loadStructurein interfaceStructureIdentifier- 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 structurejava.io.IOException- Errors reading the structure from disk
-
-