|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.bio.structure.StructureImpl
public class StructureImpl
Implementation of a PDB Structure. This class provides the data contained in a PDB file. to get structure objects from different sources see io package.
Constructor Summary | |
---|---|
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 |
Method Summary | |
---|---|
void |
addChain(Chain chain)
add a new chain. |
void |
addChain(Chain chain,
int modelnr)
add a new chain, if several models are available. |
void |
addModel(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(String chainId)
request a particular chain from a structure. |
Chain |
findChain(String chainId,
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 chainId,
String pdbResnum,
int modelnr)
request a particular group from a structure. |
Chain |
getChain(int number)
retrieve a chain by it's position within the Structure. |
Chain |
getChain(int modelnr,
int number)
retrieve a chain by it's position within the Structure and model number. |
Chain |
getChainByPDB(String chainId)
request a chain by it's PDB code by default takes only the first model |
Chain |
getChainByPDB(String chainId,
int modelnr)
request a chain by it's PDB code by default takes only the first model |
List<Chain> |
getChains()
retrieve all chains - if it is a NMR structure will return the chains of the first model. |
List<Chain> |
getChains(int modelnr)
retrieve all chains of a model. |
Compound |
getCompoundById(String molId)
request a particular compound by its id |
List<Compound> |
getCompounds()
get all the Compounds that are defined in the PDB Header |
List<Map<String,Integer>> |
getConnections()
Returns the connections value. |
List<DBRef> |
getDBRefs()
get the list of database references |
Map<String,Object> |
getHeader()
get Header data. |
Long |
getId()
get the ID used by Hibernate |
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. |
String |
getPDBCode()
get PDB code of structure . |
PDBHeader |
getPDBHeader()
return the header information for this PDB file |
List<SSBond> |
getSSBonds()
get the list of SSBonds as they have been defined in the PDB files |
boolean |
hasChain(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 |
isNmr()
is this structure an nmr structure ? |
int |
nrModels()
return number of models. |
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 |
setCompounds(List<Compound> molList)
set the compounts |
void |
setConnections(List<Map<String,Integer>> conns)
sets/gets an List of Maps which corresponds to the CONECT lines in the PDB file: |
void |
setDBRefs(List<DBRef> dbrefs)
set the list of database references for this structure |
void |
setHeader(Map<String,Object> h)
set the Header data. |
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> model)
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 |
setNmr(boolean nmr)
set NMR flag. |
void |
setPDBCode(String pdb_id_)
set PDB code of structure . |
void |
setPDBHeader(PDBHeader pdbHeader)
the the header information for this PDB file |
void |
setSSBonds(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. |
String |
toPDB()
create a String that contains the contents of a PDB file. |
String |
toString()
string representation. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StructureImpl()
public StructureImpl(Group g)
g
- public StructureImpl(Chain c)
c
- Method Detail |
---|
public Long getId()
getId
in interface Structure
public void setId(Long id)
setId
in interface Structure
id
- public Structure clone()
clone
in interface Structure
clone
in class Object
public Group findGroup(String chainId, String pdbResnum, int modelnr) throws StructureException
Structure
findGroup
in interface Structure
chainId
- the ID of the chain to usepdbResnum
- the PDB residue number of the requested groupmodelnr
- the number of the model to use
StructureException
public Group findGroup(String chainName, String pdbResnum) throws StructureException
Structure
findGroup
in interface Structure
chainName
- the ID of the chain to usepdbResnum
- the PDB residue number of the requested group
StructureException
public Chain findChain(String chainId, int modelnr) throws StructureException
Structure
findChain
in interface Structure
chainId
- the ID of a chain that should be returnedmodelnr
- the number of the model to use
StructureException
public Chain findChain(String chainId) throws StructureException
Structure
findChain
in interface Structure
chainId
- the ID of a chain that should be returned
StructureException
public void setPDBCode(String pdb_id_)
setPDBCode
in interface Structure
pdb_id_
- a String specifying the PDBCodegetPDBCode()
public String getPDBCode()
getPDBCode
in interface Structure
setPDBCode(java.lang.String)
public void setName(String nam)
setName
in interface Structure
nam
- a String specifying the biological name of the StructuregetName()
public String getName()
getName
in interface Structure
setName(java.lang.String)
public void setHeader(Map<String,Object> h)
setHeader
in interface Structure
h
- a Map object specifying the headergetHeader()
public Map<String,Object> getHeader()
getHeader
in interface Structure
setHeader(java.util.Map)
public void setConnections(List<Map<String,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 atomthe HashMap for a single CONECT line contains the following fields:
setConnections
in interface Structure
conns
- a List object specifying the connectionsinterface.
public List<Map<String,Integer>> getConnections()
getConnections
in interface Structure
interface
,
setConnections(java.util.List>)
public void addChain(Chain chain)
addChain
in interface Structure
chain
- a Chain objectpublic void addChain(Chain chain, int modelnr)
addChain
in interface Structure
chain
- a Chain objectmodelnr
- an int specifying to which model the Chain should be addedpublic Chain getChain(int number)
getChain
in interface Structure
number
- an int
public Chain getChain(int modelnr, int number)
getChain
in interface Structure
modelnr
- an intnumber
- an int
public void addModel(List<Chain> model)
addModel
in interface Structure
model
- a List object containing the Chains of the new Modelpublic void setChains(List<Chain> chains)
Structure
setChains
in interface Structure
chains
- the list of chains for this structure.Structure.setChains(int, List)
public void setModel(int position, List<Chain> model)
Structure
setModel
in interface Structure
position
- starting at 0public String toString()
toString
in interface Structure
toString
in class Object
public int size()
size
in interface Structure
public int size(int modelnr)
size
in interface Structure
modelnr
- an int specifying the number of the Model that should be used
public int nrModels()
nrModels
in interface Structure
public boolean isNmr()
isNmr
in interface Structure
public void setNmr(boolean nmr)
Structure
setNmr
in interface Structure
nmr
- true to declare that this Structure has been solved by NMR.public List<Chain> getChains(int modelnr)
getChains
in interface Structure
modelnr
- an int
Structure.getModel(int)
public List<Chain> getChains()
Structure
getChains
in interface Structure
Structure.getModel(int modelnr)
,
Structure.getChains(int modelnr)
public void setChains(int modelnr, List<Chain> chains)
Structure
setChains
in interface Structure
public List<Chain> getModel(int modelnr)
getModel
in interface Structure
modelnr
- an int
Structure.getChains(int modelnr)
public Chain getChainByPDB(String chainId, int modelnr) throws StructureException
Structure
getChainByPDB
in interface Structure
chainId
- the chain identifiermodelnr
- request a particular model;
StructureException
public Chain getChainByPDB(String chainId) throws StructureException
Structure
getChainByPDB
in interface Structure
chainId
- the chain identifier
StructureException
public String toPDB()
toPDB
in interface Structure
FileConvert
public boolean hasChain(String chainId)
Structure
hasChain
in interface Structure
chainId
- the name of the chain
public void setCompounds(List<Compound> molList)
Structure
setCompounds
in interface Structure
public List<Compound> getCompounds()
Structure
getCompounds
in interface Structure
public Compound getCompoundById(String molId)
Structure
getCompoundById
in interface Structure
public List<DBRef> getDBRefs()
Structure
getDBRefs
in interface Structure
public void setDBRefs(List<DBRef> dbrefs)
Structure
setDBRefs
in interface Structure
dbrefs
- list of DBRef objectspublic PDBHeader getPDBHeader()
Structure
getPDBHeader
in interface Structure
public void setPDBHeader(PDBHeader pdbHeader)
Structure
setPDBHeader
in interface Structure
pdbHeader
- the PDBHeader objectpublic List<SSBond> getSSBonds()
getSSBonds
in interface Structure
public void setSSBonds(List<SSBond> ssbonds)
setSSBonds
in interface Structure
ssbonds
- public void addSSBond(SSBond ssbond)
addSSBond
in interface Structure
ssbond
- the SSBond.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 article
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |