public class StructureImpl extends java.lang.Object implements Structure, java.io.Serializable
| Constructor and Description |
|---|
StructureImpl()
Constructs a StructureImpl object.
|
StructureImpl(Chain c)
construct a Structure object that contains a particular chain
|
StructureImpl(Group g)
construct a Structure object that only contains a single group
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChain(Chain chain)
Add a new chain.
|
void |
addChain(Chain chain,
int modelnr)
Add a new chain, if several models are available.
|
void |
addCompound(Compound compound)
Add a Compound to this Structure
|
void |
addModel(java.util.List<Chain> model)
Add a new model.
|
void |
addSSBond(SSBond ssbond)
add a single SSBond to this structure
|
Structure |
clone()
returns an identical copy of this structure .
|
Chain |
findChain(java.lang.String chainId)
Request a particular chain from a structure.
|
Chain |
findChain(java.lang.String chainId,
int modelnr)
Request a particular chain from a particular model
|
Group |
findGroup(java.lang.String chainName,
java.lang.String pdbResnum)
Request a particular group from a structure.
|
Group |
findGroup(java.lang.String chainId,
java.lang.String pdbResnum,
int modelnr)
Request a particular group from a structure.
|
Chain |
getChain(int number)
Retrieve a chain by its position within the Structure .
|
Chain |
getChain(int modelnr,
int number)
Retrieve a chain by its position within the Structure and model number.
|
Chain |
getChainByPDB(java.lang.String chainId)
Request a chain by its PDB code
by default takes only the first model
|
Chain |
getChainByPDB(java.lang.String chainId,
int modelnr)
Request a chain by its PDB code
by default takes only the first model
|
java.util.List<Chain> |
getChains()
Retrieve all chains - if it is a NMR structure will return the chains of the first model.
|
java.util.List<Chain> |
getChains(int modelnr)
retrieve all chains of a model.
|
Compound |
getCompoundById(int molId)
Request a particular compound by its molId (entity_id in mmCIF dictionary)
|
java.util.List<Compound> |
getCompounds()
Get all the Compounds for this Structure.
|
java.util.List<java.util.Map<java.lang.String,java.lang.Integer>> |
getConnections()
Return the connections value.
|
PDBCrystallographicInfo |
getCrystallographicInfo()
Gets crystallographic information for this structure
|
java.util.List<DBRef> |
getDBRefs()
Get the list of database references
|
java.util.List<Group> |
getHetGroups()
Caution: we should probably remove this to avoid confusion.
|
java.lang.Long |
getId()
get the ID used by Hibernate
|
java.lang.String |
getIdentifier()
The unique identifier, using the following formal specification:
|
JournalArticle |
getJournalArticle()
get the associated publication as defined by the JRNL records in a PDB
file.
|
java.util.List<Chain> |
getModel(int modelnr)
retrieve all Chains belonging to a model .
|
java.lang.String |
getName()
Get biological name of Structure.
|
java.lang.String |
getPDBCode()
Get PDB code of structure.
|
PDBHeader |
getPDBHeader()
Return the header information for this PDB file
|
java.lang.String |
getPdbId()
Returns the PDB identifier associated with this StructureIdentifier.
|
java.util.List<java.lang.String> |
getRanges()
Returns a list of ranges of the form described in
StructureIdentifier.getIdentifier(). |
java.util.List<ResidueRange> |
getResidueRanges()
Returns the list of
ResidueRanges that this StructureIdentifier defines. |
java.util.List<Site> |
getSites() |
java.util.List<SSBond> |
getSSBonds()
get the list of SSBonds as they have been defined in the PDB files
|
boolean |
hasChain(java.lang.String chainId)
Check if a chain with the id chainId is contained in this structure.
|
boolean |
hasJournalArticle()
Return whether or not the entry has an associated journal article
or publication.
|
boolean |
isBiologicalAssembly()
Gets flag that indicates if this structure is a biological assembly
|
boolean |
isCrystallographic()
Whether this Structure is a crystallographic structure or not.
|
boolean |
isNmr()
Whether this Structure is a NMR structure or not.
|
int |
nrModels()
return number of models.
|
void |
resetModels()
Resets all models of this Structure
|
void |
setBiologicalAssembly(boolean biologicalAssembly)
Sets a flag to indicate if this structure is a biological assembly
|
void |
setChains(int modelnr,
java.util.List<Chain> chains)
Set the chains for a model
|
void |
setChains(java.util.List<Chain> chains)
Set the chains of a structure, if this is a NMR structure,
this will only set model 0.
|
void |
setCompounds(java.util.List<Compound> molList)
Set the Compounds
|
void |
setConnections(java.util.List<java.util.Map<java.lang.String,java.lang.Integer>> conns)
sets/gets an List of Maps which corresponds to the CONECT lines in the PDB file:
|
void |
setCrystallographicInfo(PDBCrystallographicInfo crystallographicInfo)
Sets crystallographic information for this structure
|
void |
setDBRefs(java.util.List<DBRef> dbrefs)
Set the list of database references for this structure
|
void |
setId(java.lang.Long id)
set the ID used by Hibernate
|
void |
setJournalArticle(JournalArticle journalArticle)
set the associated publication as defined by the JRNL records in a PDB
file.
|
void |
setModel(int position,
java.util.List<Chain> model)
A convenience function if one wants to edit and replace the
models in a structure.
|
void |
setName(java.lang.String nam)
Set biological name of Structure .
|
void |
setNmr(boolean nmr)
Deprecated.
|
void |
setPDBCode(java.lang.String pdb_id_)
Set PDB code of structure .
|
void |
setPDBHeader(PDBHeader pdbHeader)
Set the the header information for this PDB file
|
void |
setSites(java.util.List<Site> sites) |
void |
setSSBonds(java.util.List<SSBond> ssbonds)
set the list of SSBonds for this structure
|
int |
size()
return number of chains , if NMR return number of chains of first model .
|
int |
size(int modelnr)
return number of chains of model.
|
java.lang.String |
toMMCIF()
Create a String that contains this Structure's contents in MMCIF file format.
|
java.lang.String |
toPDB()
Create a String that contains this Structure's contents in PDB file format.
|
java.lang.String |
toString()
string representation.
|
public StructureImpl()
public StructureImpl(Group g)
g - public StructureImpl(Chain c)
c - public java.lang.Long getId()
public void setId(java.lang.Long id)
public Structure clone()
public Group findGroup(java.lang.String chainId, java.lang.String pdbResnum, int modelnr) throws StructureException
StructurefindGroup in interface StructurechainId - the ID of the chain to usepdbResnum - the PDB residue number of the requested groupmodelnr - the number of the model to useStructureExceptionpublic Group findGroup(java.lang.String chainName, java.lang.String pdbResnum) throws StructureException
StructurefindGroup in interface StructurechainName - the ID of the chain to usepdbResnum - the PDB residue number of the requested groupStructureExceptionpublic Chain findChain(java.lang.String chainId, int modelnr) throws StructureException
StructurefindChain in interface StructurechainId - the ID of a chain that should be returnedmodelnr - the number of the model to useStructureExceptionpublic Chain findChain(java.lang.String chainId) throws StructureException
StructurefindChain in interface StructurechainId - the ID of a chain that should be returnedStructureExceptionpublic void setPDBCode(java.lang.String pdb_id_)
StructuresetPDBCode in interface Structurepdb_id_ - a String specifying the PDBCodeStructure.getPDBCode()public java.lang.String getPDBCode()
StructuregetPDBCode in interface StructureStructure.setPDBCode(java.lang.String)public void setName(java.lang.String nam)
StructuresetName in interface Structurenam - a String specifying the biological name of the StructureStructure.getName()public java.lang.String getName()
StructuregetName in interface StructureStructure.setName(java.lang.String)public void setConnections(java.util.List<java.util.Map<java.lang.String,java.lang.Integer>> conns)
Structure
COLUMNS DATA TYPE FIELD DEFINITION
---------------------------------------------------------------------------------
1 - 6 Record name "CONECT"
7 - 11 Integer serial Atom serial number
12 - 16 Integer serial Serial number of bonded atom
17 - 21 Integer serial Serial number of bonded atom
22 - 26 Integer serial Serial number of bonded atom
27 - 31 Integer serial Serial number of bonded atom
32 - 36 Integer serial Serial number of hydrogen bonded
atom
37 - 41 Integer serial Serial number of hydrogen bonded
atom
42 - 46 Integer serial Serial number of salt bridged
atom
47 - 51 Integer serial Serial number of hydrogen bonded
atom
52 - 56 Integer serial Serial number of hydrogen bonded
atom
57 - 61 Integer serial Serial number of salt bridged
atom
the HashMap for a single CONECT line contains the following fields:
setConnections in interface Structureconns - a List object specifying the connectionsStructure.getConnections()public java.util.List<java.util.Map<java.lang.String,java.lang.Integer>> getConnections()
getConnections in interface Structureinterface,
setConnections(java.util.List<java.util.Map<java.lang.String, java.lang.Integer>>)public void addChain(Chain chain)
Structurepublic void addChain(Chain chain, int modelnr)
Structurepublic Chain getChain(int number)
Structurepublic Chain getChain(int modelnr, int number)
Structurepublic void addModel(java.util.List<Chain> model)
Structurepublic void setChains(java.util.List<Chain> chains)
StructuresetChains in interface Structurechains - the list of chains for this structure.Structure.setChains(int, List)public void setModel(int position,
java.util.List<Chain> model)
Structurepublic java.lang.String toString()
public int size()
public int size(int modelnr)
public int nrModels()
nrModels in interface StructureStructure.isNmr()public boolean isCrystallographic()
isCrystallographic in interface Structurepublic boolean isNmr()
isNmr in interface StructureStructure.nrModels()@Deprecated public void setNmr(boolean nmr)
public java.util.List<Chain> getChains(int modelnr)
getChains in interface Structuremodelnr - an intStructure.getModel(int)public java.util.List<Chain> getChains()
StructuregetChains in interface StructureStructure.getModel(int modelnr),
Structure.getChains(int modelnr)public void setChains(int modelnr,
java.util.List<Chain> chains)
Structurepublic java.util.List<Chain> getModel(int modelnr)
getModel in interface Structuremodelnr - an intStructure.getChains(int modelnr)public Chain getChainByPDB(java.lang.String chainId, int modelnr) throws StructureException
StructuregetChainByPDB in interface StructurechainId - the chain identifiermodelnr - request a particular model;StructureExceptionpublic Chain getChainByPDB(java.lang.String chainId) throws StructureException
StructuregetChainByPDB in interface StructurechainId - the chain identifierStructureExceptionpublic java.lang.String toPDB()
StructuretoPDB in interface StructureFileConvertpublic java.lang.String toMMCIF()
Structurepublic boolean hasChain(java.lang.String chainId)
Structurepublic void setCompounds(java.util.List<Compound> molList)
StructuresetCompounds in interface Structurepublic void addCompound(Compound compound)
StructureaddCompound in interface Structurepublic java.util.List<Compound> getCompounds()
StructuregetCompounds in interface Structurepublic Compound getCompoundById(int molId)
StructuregetCompoundById in interface Structurepublic java.util.List<DBRef> getDBRefs()
Structurepublic void setDBRefs(java.util.List<DBRef> dbrefs)
Structurepublic PDBHeader getPDBHeader()
StructuregetPDBHeader in interface Structurepublic void setPDBHeader(PDBHeader pdbHeader)
StructuresetPDBHeader in interface StructurepdbHeader - the PDBHeader objectpublic java.util.List<SSBond> getSSBonds()
getSSBonds in interface Structurepublic void setSSBonds(java.util.List<SSBond> ssbonds)
setSSBonds in interface Structuressbonds - public void addSSBond(SSBond ssbond)
public boolean hasJournalArticle()
hasJournalArticle in interface Structurepublic JournalArticle getJournalArticle()
getJournalArticle in interface Structurepublic void setJournalArticle(JournalArticle journalArticle)
setJournalArticle in interface StructurejournalArticle - the articlepublic java.util.List<Site> getSites()
public void setSites(java.util.List<Site> sites)
public java.util.List<Group> getHetGroups()
getHetGroups in interface Structurepublic void setBiologicalAssembly(boolean biologicalAssembly)
setBiologicalAssembly in interface StructurebiologicalAssembly - true if biological assembly, otherwise falsepublic boolean isBiologicalAssembly()
isBiologicalAssembly in interface Structurepublic void setCrystallographicInfo(PDBCrystallographicInfo crystallographicInfo)
setCrystallographicInfo in interface StructurecrystallographicInfo - crystallographic informationpublic PDBCrystallographicInfo getCrystallographicInfo()
getCrystallographicInfo in interface Structurepublic java.lang.String getIdentifier()
StructureIdentifier
name := pdbID
| pdbID '.' chainID
| pdbID '.' range
| scopID
range := '('? range (',' range)? ')'?
| chainID
| chainID '_' resNum '-' resNum
pdbID := [0-9][a-zA-Z0-9]{3}
chainID := [a-zA-Z0-9]
scopID := 'd' pdbID [a-z_][0-9_]
cathID := pdbID [A-Z][0-9]{2}
resNum := [-+]?[0-9]+[A-Za-z]?
For example:
1TIM #whole structure
1tim #same as above
4HHB.C #single chain
3AA0.A,B #two chains
d2bq6a1 #SCOP domain
1cukA01 #CATH domain
4GCR.A_1-40 #substructure
3iek.A_17-28,A_56-294,A_320-377 #substructure of 3 disjoint parts
More options may be added to the specification at a future time.getIdentifier in interface StructureIdentifierpublic java.lang.String getPdbId()
StructureIdentifiergetPdbId in interface StructureIdentifierpublic java.util.List<ResidueRange> getResidueRanges()
StructureIdentifierResidueRanges that this StructureIdentifier defines.
This is a unique representation.getResidueRanges in interface StructureIdentifierpublic java.util.List<java.lang.String> getRanges()
StructureIdentifierStructureIdentifier.getIdentifier(). For example:
getRanges().get(0): 'A' getRanges().get(1): 'B_5-100'This is a unique representation.
getRanges in interface StructureIdentifierpublic void resetModels()
StructureresetModels in interface Structure