public class StructureImpl extends Object implements Structure
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 to the first model
|
void |
addChain(Chain chain,
int modelnr)
Add a new chain to the model specified by the given index
|
void |
addEntityInfo(EntityInfo entityInfo)
Add an EntityInfo to this Structure
|
void |
addModel(List<Chain> modelChains)
Add a new model.
|
void |
addSSBond(Bond ssbond)
Adds a single disulfide Bond to this structure
|
Structure |
clone()
returns an identical copy of this structure .
|
Chain |
findChain(String chainId)
Request a particular chain from a structure.
|
Chain |
findChain(String chainName,
int modelnr)
Request a particular chain from a particular model
|
Group |
findGroup(String chainName,
String pdbResnum)
Request a particular group from a structure.
|
Group |
findGroup(String chainName,
String pdbResnum,
int modelnr)
Request a particular group from a structure.
|
Chain |
getChain(String asymId)
Retrieve a Chain (polymeric, non-polymeric or water) based on
the 'internal' chain id (asymId) for the first model
|
Chain |
getChain(String asymId,
int modelnr)
Retrieve a Chain (polymeric, non-polymeric or water) based on
the 'internal' chain id (asymId) for the given model index
|
Chain |
getChainByIndex(int number)
Retrieve a chain by its index within the Structure .
|
Chain |
getChainByIndex(int modelnr,
int number)
Retrieve a chain by its indices within the Structure and model.
|
Chain |
getChainByPDB(String chainId)
Request a chain by its public id (author id) for the first model.
|
Chain |
getChainByPDB(String authId,
int modelnr)
Request a chain by its public id (author id) for the given model index.
|
List<Chain> |
getChains()
Retrieve all chains for the first model.
|
List<Chain> |
getChains(int modelIdx)
Retrieve all chains of a model.
|
EntityInfo |
getCompoundById(int molId)
Request a particular entity by its entity id (mol id in legacy PDB format)
|
PDBCrystallographicInfo |
getCrystallographicInfo()
Gets crystallographic information for this structure
|
List<DBRef> |
getDBRefs()
Get the list of database references
|
EntityInfo |
getEntityById(int entityId)
Request a particular entity by its entity id (mol id in legacy PDB format)
|
List<EntityInfo> |
getEntityInfos()
Get all the EntityInfo for this Structure.
|
Long |
getId()
get the ID used by Hibernate
|
String |
getIdentifier()
Get a string representing this structure's contents.
|
JournalArticle |
getJournalArticle()
get the associated publication as defined by the JRNL records in a PDB
file.
|
List<Chain> |
getModel(int modelnr)
Retrieve all Chains belonging to a model .
|
String |
getName()
Get biological name of Structure.
|
Chain |
getNonPolyChain(String asymId)
Retrieve a non-polymeric Chain based on the 'internal' chain
id (asymId) for the first model
|
Chain |
getNonPolyChain(String asymId,
int modelIdx)
Retrieve a non-polymeric Chain based on the 'internal' chain
id (asymId) for the given model index
|
List<Chain> |
getNonPolyChains()
Return all non-polymeric chains for the first model
|
List<Chain> |
getNonPolyChains(int modelIdx)
Return all non-polymeric chains for the given model index.
|
List<Chain> |
getNonPolyChainsByPDB(String authId)
Retrieve all non-polymeric Chains corresponding to the given 'public' chain
name (authId) for the first model.
|
List<Chain> |
getNonPolyChainsByPDB(String authId,
int modelIdx)
Retrieve all non-polymeric Chains corresponding to the 'public' chain
name (authId) and the given model index.
|
String |
getPDBCode()
Get PDB code of structure.
|
PDBHeader |
getPDBHeader()
Return the header information for this PDB file
|
String |
getPdbId()
Deprecated.
|
Chain |
getPolyChain(String asymId)
Retrieve a polymeric Chain based on the 'internal' chain
id (asymId) for the first model
See
Structure.getPolyChainByPDB(String) for a similar
method using the chain name (authId). |
Chain |
getPolyChain(String asymId,
int modelIdx)
Retrieve a polymeric Chain based on the 'internal' chain
id (asymId) for the given model index
See
Structure.getPolyChainByPDB(String, int) for a similar
method using the chain name (authId). |
Chain |
getPolyChainByPDB(String authId)
Retrieve a polymeric Chain based on the 'public' chain
name (authId) for the first model
See
Structure.getPolyChain(String) for a similar
method using the chain id (asymId). |
Chain |
getPolyChainByPDB(String authId,
int modelIdx)
Retrieve a polymeric Chain based on the 'public' chain
name (authId) for the given model index.
|
List<Chain> |
getPolyChains()
Return all polymeric chains for the first model
|
List<Chain> |
getPolyChains(int modelIdx)
Return all polymeric chains for the given model index.
|
List<String> |
getRanges()
Deprecated.
|
List<ResidueRange> |
getResidueRanges()
Deprecated.
|
List<Site> |
getSites() |
List<Bond> |
getSSBonds()
Get the list of disulfide Bonds as they have been defined in the PDB files
|
StructureIdentifier |
getStructureIdentifier()
Get an identifier corresponding to this structure
|
Chain |
getWaterChain(String asymId)
Retrieve a water Chain based on the 'internal' chain id (asymId)
for the first model
|
Chain |
getWaterChain(String asymId,
int modelIdx)
Retrieve a water chain based on the 'internal' chain id (asymId)
for the given model index
|
Chain |
getWaterChainByPDB(String authId)
Retrieve a water Chain based on the 'public' chain name (authId)
for the first model
|
Chain |
getWaterChainByPDB(String authId,
int modelIdx)
Retrieve a water Chain based on the 'public' chain name (authId)
for the given model index
|
List<Chain> |
getWaterChains()
Return all water chains for the first model
|
List<Chain> |
getWaterChains(int modelIdx)
Return all water chains for the given model index
|
boolean |
hasChain(String authId)
Check if a chain with the chainId aymId is contained in this structure.
|
boolean |
hasJournalArticle()
Return whether or not the entry has an associated journal article
or publication.
|
boolean |
hasNonPolyChain(String asymId)
Check if a non polymeric chain with chainId asymId is contained in the structure.
|
boolean |
hasPdbChain(String authId)
Check if a chain with chain name authId is contained in the structure
|
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,
List<Chain> chains)
Set the chains for a model
|
void |
setChains(List<Chain> chains)
Set the chains of a structure, if this is a NMR structure,
this will only set model 0.
|
void |
setCrystallographicInfo(PDBCrystallographicInfo crystallographicInfo)
Sets crystallographic information for this structure
|
void |
setDBRefs(List<DBRef> dbrefs)
Set the list of database references for this structure
|
void |
setEntityInfos(List<EntityInfo> molList)
Set the EntityInfo
|
void |
setId(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,
List<Chain> modelChains)
A convenience function if one wants to edit and replace the
models in a structure.
|
void |
setName(String nam)
Set biological name of Structure .
|
void |
setPDBCode(String pdb_id_)
Set PDB code of structure .
|
void |
setPDBHeader(PDBHeader pdbHeader)
Set the the header information for this PDB file
|
void |
setSites(List<Site> sites) |
void |
setSSBonds(List<Bond> ssbonds)
Set the list of SSBonds for this structure
|
void |
setStructureIdentifier(StructureIdentifier structureIdentifier)
Set the identifier corresponding to this structure
|
int |
size()
Return number of polymer Chains in this Structure for first model.
|
int |
size(int modelnr)
return number of chains of model.
|
String |
toMMCIF()
Create a String that contains this Structure's contents in MMCIF file format.
|
String |
toPDB()
Create a String that contains this Structure's contents in PDB file format.
|
String |
toString()
String representation.
|
public StructureImpl()
public StructureImpl(Group g)
g
- group objectpublic StructureImpl(Chain c)
c
- chainpublic Group findGroup(String chainName, String pdbResnum, int modelnr) throws StructureException
findGroup
in interface Structure
chainName
- the chain name of the chain to usepdbResnum
- the PDB residue number of the requested groupmodelnr
- the number of the model to useStructureException
public Group findGroup(String chainName, String pdbResnum) throws StructureException
findGroup
in interface Structure
chainName
- the name of the chain to usepdbResnum
- the PDB residue number of the requested groupStructureException
public Chain findChain(String chainName, int modelnr) throws StructureException
findChain
in interface Structure
chainName
- the name of a chain that should be returnedmodelnr
- the number of the model to useStructureException
public Chain findChain(String chainId) throws StructureException
findChain
in interface Structure
chainId
- name of a chain that should be returnedStructureException
public void setPDBCode(String pdb_id_)
setPDBCode
in interface Structure
pdb_id_
- a String specifying the PDBCodeStructure.getPDBCode()
public String getPDBCode()
getPDBCode
in interface Structure
Structure.setPDBCode(java.lang.String)
public void setName(String nam)
setName
in interface Structure
nam
- a String specifying the biological name of the StructureStructure.getName()
public String getName()
getName
in interface Structure
Structure.setName(java.lang.String)
public StructureIdentifier getStructureIdentifier()
Structure
getStructureIdentifier
in interface Structure
public void setStructureIdentifier(StructureIdentifier structureIdentifier)
Structure
setStructureIdentifier
in interface Structure
structureIdentifier
- the structureIdentifier corresponding to this structurepublic void addChain(Chain chain, int modelnr)
public Chain getChainByIndex(int number)
getChainByIndex
in interface Structure
number
- the index of the desired chain in the structurepublic Chain getChainByIndex(int modelnr, int number)
getChainByIndex
in interface Structure
modelnr
- the model the desired chain is innumber
- the index of the desired chain in the structurepublic void setChains(List<Chain> chains)
setChains
in interface Structure
chains
- the list of chains for this structure.Structure.setChains(int, List)
public void setModel(int position, List<Chain> modelChains)
public int size()
Structure
public int size(int modelnr)
public int nrModels()
nrModels
in interface Structure
Structure.isNmr()
public boolean isCrystallographic()
isCrystallographic
in interface Structure
public boolean isNmr()
isNmr
in interface Structure
Structure.nrModels()
public List<Chain> getChains(int modelIdx)
getChains
in interface Structure
modelIdx
- an intStructure.getModel(int)
public List<Chain> getChains()
getChains
in interface Structure
Structure.getModel(int modelnr)
,
Structure.getChains(int modelnr)
public List<Chain> getPolyChains()
Structure
getPolyChains
in interface Structure
public List<Chain> getPolyChains(int modelIdx)
Structure
getPolyChains
in interface Structure
modelIdx
- the model indexpublic List<Chain> getNonPolyChains()
Structure
getNonPolyChains
in interface Structure
public List<Chain> getNonPolyChains(int modelIdx)
Structure
getNonPolyChains
in interface Structure
modelIdx
- the model indexpublic List<Chain> getWaterChains()
Structure
getWaterChains
in interface Structure
public List<Chain> getWaterChains(int modelIdx)
Structure
getWaterChains
in interface Structure
public List<Chain> getModel(int modelnr)
getModel
in interface Structure
modelnr
- an intStructure.getChains(int modelnr)
public Chain getChainByPDB(String authId, int modelnr) throws StructureException
getChainByPDB
in interface Structure
authId
- the author id (chainName, public chain id)modelnr
- the index of the required model (0-based)StructureException
- if chain can't be foundpublic Chain getChain(String asymId, int modelnr)
getChain
in interface Structure
asymId
- the asymId (chainId)modelnr
- the index of the required model (0-based)Structure.getPolyChain(String, int)
,
Structure.getNonPolyChain(String, int)
,
Structure.getWaterChain(String, int)
public Chain getChain(String asymId)
getChain
in interface Structure
asymId
- the asymId (chainId)Structure.getPolyChain(String)
,
Structure.getNonPolyChain(String)
,
Structure.getWaterChain(String)
public Chain getChainByPDB(String chainId) throws StructureException
getChainByPDB
in interface Structure
chainId
- the author id (chainName, public chain id)StructureException
- if chain can't be foundpublic Chain getPolyChain(String asymId)
Structure
See Structure.getPolyChainByPDB(String)
for a similar
method using the chain name (authId).
getPolyChain
in interface Structure
asymId
- the asymId (chainId)public Chain getPolyChain(String asymId, int modelIdx)
Structure
See Structure.getPolyChainByPDB(String, int)
for a similar
method using the chain name (authId).
getPolyChain
in interface Structure
asymId
- the asymId (chainId)modelIdx
- the index of the required model (0-based)public Chain getNonPolyChain(String asymId)
Structure
getNonPolyChain
in interface Structure
asymId
- the asymId (chainId)public Chain getNonPolyChain(String asymId, int modelIdx)
Structure
getNonPolyChain
in interface Structure
asymId
- the asymId (chainId)modelIdx
- the index of the required model (0-based)public Chain getPolyChainByPDB(String authId)
Structure
See Structure.getPolyChain(String)
for a similar
method using the chain id (asymId).
getPolyChainByPDB
in interface Structure
authId
- the author id (chainName, public chain id)public Chain getPolyChainByPDB(String authId, int modelIdx)
Structure
See Structure.getPolyChain(String, int)
for a similar
method using the chain id (asymId).
getPolyChainByPDB
in interface Structure
authId
- the author id (chainName, public chain id)modelIdx
- the index of the required model (0-based)public List<Chain> getNonPolyChainsByPDB(String authId)
Structure
getNonPolyChainsByPDB
in interface Structure
authId
- the author id (chainName, public chain id)public List<Chain> getNonPolyChainsByPDB(String authId, int modelIdx)
Structure
getNonPolyChainsByPDB
in interface Structure
authId
- the author id (chainName, public chain id)modelIdx
- the index of the required model (0-based)public Chain getWaterChain(String asymId)
Structure
getWaterChain
in interface Structure
asymId
- the asymId (chainId)public Chain getWaterChain(String asymId, int modelIdx)
Structure
getWaterChain
in interface Structure
asymId
- the asymId (chainId)modelIdx
- the index of the required model (0-based)public Chain getWaterChainByPDB(String authId)
Structure
getWaterChainByPDB
in interface Structure
authId
- the author id (chainName, public chain id)public Chain getWaterChainByPDB(String authId, int modelIdx)
Structure
getWaterChainByPDB
in interface Structure
authId
- the author id (chainName, public chain id)modelIdx
- the index of the required model (0-based)public String toPDB()
toPDB
in interface Structure
FileConvert
public String toMMCIF()
public boolean hasChain(String authId)
public boolean hasNonPolyChain(String asymId)
hasNonPolyChain
in interface Structure
asymId
- the id of the chainpublic boolean hasPdbChain(String authId)
hasPdbChain
in interface Structure
authId
- the chain namepublic void setEntityInfos(List<EntityInfo> molList)
setEntityInfos
in interface Structure
molList
- list of entityinfo objectspublic void addEntityInfo(EntityInfo entityInfo)
addEntityInfo
in interface Structure
public List<EntityInfo> getEntityInfos()
getEntityInfos
in interface Structure
public EntityInfo getCompoundById(int molId)
getCompoundById
in interface Structure
molId
- the number of the entitypublic EntityInfo getEntityById(int entityId)
getEntityById
in interface Structure
entityId
- the number of the entitypublic void setDBRefs(List<DBRef> dbrefs)
public PDBHeader getPDBHeader()
getPDBHeader
in interface Structure
public void setPDBHeader(PDBHeader pdbHeader)
setPDBHeader
in interface Structure
pdbHeader
- the PDBHeader objectpublic List<Bond> getSSBonds()
getSSBonds
in interface Structure
public void setSSBonds(List<Bond> ssbonds)
setSSBonds
in interface Structure
public boolean hasJournalArticle()
hasJournalArticle
in interface Structure
public JournalArticle getJournalArticle()
getJournalArticle
in interface Structure
public void setJournalArticle(JournalArticle journalArticle)
setJournalArticle
in interface Structure
journalArticle
- the articlepublic void setBiologicalAssembly(boolean biologicalAssembly)
setBiologicalAssembly
in interface Structure
biologicalAssembly
- true if biological assembly, otherwise falsepublic boolean isBiologicalAssembly()
isBiologicalAssembly
in interface Structure
public void setCrystallographicInfo(PDBCrystallographicInfo crystallographicInfo)
setCrystallographicInfo
in interface Structure
crystallographicInfo
- crystallographic informationpublic PDBCrystallographicInfo getCrystallographicInfo()
getCrystallographicInfo
in interface Structure
public String getIdentifier()
Structure.getStructureIdentifier()
.getIdentifier(), which should give
the string originally used to create the structure
Structure.getName()
Structure.getPDBCode()
with a heuristic description
of the residue ranges, in SubstructureIdentifier
format.
getIdentifier
in interface Structure
SubstructureIdentifier
-format string describing the residue ranges in this structure@Deprecated public String getPdbId()
public void resetModels()
resetModels
in interface Structure
@Deprecated public List<ResidueRange> getResidueRanges()
ResidueRanges
that this StructureIdentifier defines.
This is a unique representation.getResidueRanges
in interface Structure
Copyright © 2000–2019 BioJava. All rights reserved.