public class StructureName extends Object implements Comparable<StructureName>, Serializable, StructureIdentifier
ScopDomain,
 CathDomain, PDP domains, and SubstructureIdentifier residue
 ranges.
 Where possible, data is extracted from the input string. Otherwise, range
 information may be loaded from one of the factory classes:
 CathFactory,ScopFactory, etc.| Modifier and Type | Class and Description | 
|---|---|
static class  | 
StructureName.Source  | 
| Modifier and Type | Field and Description | 
|---|---|
protected String | 
chainId  | 
protected String | 
name  | 
protected String | 
pdbId  | 
| Constructor and Description | 
|---|
StructureName(String name)
Create a new StructureName from the given identifier, which may be a
 domain name, a substructure identifier, etc. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
int | 
compareTo(StructureName o)
Orders identifiers lexicographically by PDB ID and then full Identifier 
 | 
boolean | 
equals(Object obj)  | 
StructureIdentifier | 
getBaseIdentifier()
StructureName wraps another StructureIdentifier. 
 | 
String | 
getChainId()
Gets the chain ID, for structures where it is unique and well-defined. 
 | 
String | 
getIdentifier()
Get the original form of the identifier 
 | 
String | 
getName()
Deprecated. 
 
use  
getIdentifier() | 
String | 
getPdbId()
Get the PDB ID for this name, if any. 
 | 
StructureName.Source | 
getSource()  | 
static ScopDomain | 
guessScopDomain(String name,
               ScopDatabase scopDB)
 Guess a scop domain. 
 | 
int | 
hashCode()  | 
boolean | 
isBioAssembly()  | 
boolean | 
isCathID()  | 
boolean | 
isEcodDomain()  | 
boolean | 
isFile()
Indicates that the identifier was determined to correspond to a file. 
 | 
boolean | 
isPdbId()  | 
boolean | 
isPDPDomain()  | 
boolean | 
isScopName()  | 
boolean | 
isURL()  | 
Structure | 
loadStructure(AtomCache cache)
Loads a structure encompassing the structure identified. 
 | 
Structure | 
reduce(Structure input)
Takes a complete structure as input and reduces it to the substructure
 represented by this StructureIdentifier. 
 | 
SubstructureIdentifier | 
toCanonical()
Convert to a canonical SubstructureIdentifier. 
 | 
String | 
toString()  | 
protected String name
protected String pdbId
protected String chainId
public StructureName(String name)
The source and PDB-Id are extracted at compile time, but fully interpreting the ID, which may require additional parsing or remote calls, is done lazily.
The following sources are supported. Any may be prefixed by the source name followed by a colon (e.g. PDB:4HHB). In this case, that source will be used unequivocally. If no source is specified, StructureName will make a (usually reliable) guess as to which source was intended.
SubstructureIdentifier;
     see that class for the full format specification.
     Examples: 4hhb, 4hhb.A, 4hhb.A:1-50.
 ScopFactory.getSCOP() version). Example: d1h6w.2
 URLIdentifier
     after path expansion. Example: ~/custom_protein.pdb
 name - An identifier stringIllegalArgumentException - if the name has a recognizable source but is semantically invalidpublic String getPdbId() throws StructureException
toCanonical().getPdbId()StructureException - Wraps errors which occur when converting to canonical formpublic String getChainId()
This method should only be used casually. For precise chainIds, it
 is better to use toCanonical() and iterate through the
 residue ranges.
@Deprecated public String getName()
getIdentifier()public String getIdentifier()
getIdentifier in interface StructureIdentifierpublic boolean isScopName()
public boolean isPDPDomain()
public boolean isCathID()
public boolean isPdbId()
public boolean isURL()
public boolean isFile()
public boolean isEcodDomain()
public boolean isBioAssembly()
public StructureName.Source getSource()
public StructureIdentifier getBaseIdentifier() throws StructureException
source. Most StructureName
 methods deligate to the base identifier.
 It is possible that future versions of StructureName might change the return type. Except for some specialized uses, it is probably better to create the correct type of identifier directly, rather than creating a StructureName and casting the result of this method.
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.public SubstructureIdentifier toCanonical() throws StructureException
StructureIdentifierThis allows all domains to be converted to a standard format String.
toCanonical in interface StructureIdentifierStructureException - Wraps exceptions that may be thrown by individual
  implementations. For example, a SCOP identifier may require that the
  domain definitions be available for download.public Structure reduce(Structure input) throws StructureException
StructureIdentifierThe returned structure may be a shallow copy of the input, with shared Chains, Residues, etc.
reduce in interface StructureIdentifierinput - A full structure, e.g. as loaded from the PDB. The structure
 ID should match that returned by getPdbId(), if applicable.StructureExceptionStructureTools.getReducedStructure(Structure, String)public Structure loadStructure(AtomCache cache) throws StructureException, IOException
StructureIdentifierStructureIdentifier.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.loadStructure in interface StructureIdentifierStructureException - For errors loading and parsing the structureIOException - Errors reading the structure from diskpublic int compareTo(StructureName o)
compareTo in interface Comparable<StructureName>public static ScopDomain guessScopDomain(String name, ScopDatabase scopDB)
Guess a scop domain. If an exact match is found, return that.
Otherwise, return the first scop domain found for the specified protein such that
name - SCOP domain name, or a guess thereofscopDB - SCOP domain providerCopyright © 2000–2016 BioJava. All rights reserved.