public interface Chain
Defines the interface for a Chain. A Chain corresponds to a Chain in a PDB file.
A chain consists out of a list of Group
objects. A Group can either be
an AminoAcid
, Hetatom
or Nucleotide
.
The BioJava API provides access to both the ATOM and SEQRES records in a PDB file.
During parsing of a PDB file it aligns the ATOM and SEQRES groups and joins them.
The SEQRES sequence can be accessed via getSeqResGroups()
and the
ATOM groups via getAtomGroups()
. Groups that have been observed
(i.e. they are in the ATOM records) can be detected by Group
.has3D()
Modifier and Type | Method and Description |
---|---|
void |
addGroup(Group group)
add a group to the list of ATOM record group of this chain.
|
java.lang.Object |
clone()
returns an identical copy of this Chain.
|
Group |
getAtomGroup(int position)
Return the Group at given position,
from within Groups with observed density in the chain, i.e.
|
java.util.List<Group> |
getAtomGroups()
Return all Groups with observed density in the chain, i.e.
|
java.util.List<Group> |
getAtomGroups(GroupType type)
Return a List of all (observed) Groups of a special type, one of:
GroupType.AMINOACID ,
GroupType.HETATM or GroupType.NUCLEOTIDE . |
int |
getAtomLength()
Return the number of Groups with observed density in the chain, i.e.
|
java.util.List<Group> |
getAtomLigands()
Gets all groups that are not polymer groups and that are not solvent groups.
|
java.lang.String |
getAtomSequence()
Return the sequence of amino acids as it has been provided in the ATOM records.
|
Sequence<?> |
getBJSequence()
Converts the SEQRES groups of a Chain to a Biojava Sequence object.
|
java.lang.String |
getChainID()
Gets the name of this chain (Chain id in PDB file ).
|
Compound |
getCompound()
Return the Compound for this chain.
|
Group |
getGroupByPDB(ResidueNumber resNum)
Get a group by its PDB residue numbering.
|
Group[] |
getGroupsByPDB(ResidueNumber pdbresnumStart,
ResidueNumber pdbresnumEnd)
Get all groups that are located between two PDB residue numbers.
|
Group[] |
getGroupsByPDB(ResidueNumber pdbresnumStart,
ResidueNumber pdbresnumEnd,
boolean ignoreMissing)
Get all groups that are located between two PDB residue numbers.
|
java.lang.Long |
getId()
Get the ID used by Hibernate.
|
java.lang.String |
getInternalChainID()
If available, returns the internal chain ID that is used in mmCIF files (asym_id), otherwise null
|
Structure |
getParent()
Returns the parent Structure of this chain.
|
Group |
getSeqResGroup(int position)
Return the Group at given position,
from within groups in the SEQRES records of the chain, i.e.
|
java.util.List<Group> |
getSeqResGroups()
Returns a list of all groups in SEQRES records of the chain, i.e.
|
java.util.List<Group> |
getSeqResGroups(GroupType type)
Returns a List of all SEQRES groups of a special type, one of:
GroupType.AMINOACID ,
GroupType.HETATM or GroupType.NUCLEOTIDE . |
int |
getSeqResLength()
Return the number of groups in the SEQRES records of the chain, i.e.
|
java.lang.String |
getSeqResSequence()
Returns the PDB SEQRES sequence as a one-letter sequence string.
|
java.lang.String |
getSwissprotId()
Get the Swissprot id of this chain.
|
void |
setAtomGroups(java.util.List<Group> groups)
Set all Groups with observed density in the chain, i.e.
|
void |
setChainID(java.lang.String name)
Sets the name of this chain (Chain id in PDB file ).
|
void |
setCompound(Compound compound)
Set the Compound
|
void |
setId(java.lang.Long id)
Set the ID used by Hibernate.
|
void |
setInternalChainID(java.lang.String internalChainID)
Sets the internal chain ID that is used in mmCif files
|
void |
setParent(Structure parent)
Sets the back-reference to its parent Structure.
|
void |
setSeqResGroups(java.util.List<Group> seqResGroups)
Sets the list of SeqResGroups for this chain.
|
void |
setSwissprotId(java.lang.String sp_id)
Sets the Swissprot id of this chain.
|
java.lang.String |
toMMCIF()
Convert this Chain to a String in mmCIF format
|
java.lang.String |
toPDB()
Convert this Chain to a String in PDB format
|
java.lang.String |
toString() |
java.lang.Object clone()
void addGroup(Group group)
group
- a Group objectjava.lang.Long getId()
setId(Long)
void setId(java.lang.Long id)
id
- assigned by HibernategetId()
Group getAtomGroup(int position)
position
- an intgetAtomLength()
,
getAtomGroups()
,
getSeqResGroup(int)
Group getSeqResGroup(int position)
position
- an intgetSeqResLength()
,
getSeqResGroups()
,
getAtomGroup(int)
java.util.List<Group> getAtomGroups()
setAtomGroups(List)
,
getAtomLength()
,
getSeqResGroups()
void setAtomGroups(java.util.List<Group> groups)
groups
- a List object representing the Groups of this Chain.getAtomGroups()
java.util.List<Group> getAtomGroups(GroupType type)
GroupType.AMINOACID
,
GroupType.HETATM
or GroupType.NUCLEOTIDE
.
Note that if a standard aminoacid appears as a HETATM (because it is part of a ligand) then
it is still considered as GroupType.AMINOACID
and not as GroupType.HETATM
.type
- GroupTypesetAtomGroups(List)
Group getGroupByPDB(ResidueNumber resNum) throws StructureException
resNum
- the PDB residue number of the groupStructureException
Group[] getGroupsByPDB(ResidueNumber pdbresnumStart, ResidueNumber pdbresnumEnd) throws StructureException
pdbresnumStart
- PDB residue number of startpdbresnumEnd
- PDB residue number of endStructureException
Group[] getGroupsByPDB(ResidueNumber pdbresnumStart, ResidueNumber pdbresnumEnd, boolean ignoreMissing) throws StructureException
pdbresnumStart
- PDB residue number of startpdbresnumEnd
- PDB residue number of endignoreMissing
- ignore missing groups in this range.StructureException
int getAtomLength()
getAtomGroup(int)
,
getAtomGroups()
,
#getSeqResLength())
int getSeqResLength()
getSeqResGroup(int)
,
getSeqResGroups()
,
getAtomLength()
void setCompound(Compound compound)
compound
- the CompoundgetCompound()
Compound getCompound()
setCompound(Compound)
void setChainID(java.lang.String name)
name
- a String specifying the name valuegetChainID()
java.lang.String getChainID()
setChainID(String)
java.lang.String getInternalChainID()
void setInternalChainID(java.lang.String internalChainID)
internalChainID
- java.lang.String toString()
toString
in class java.lang.Object
Sequence<?> getBJSequence()
java.lang.String getAtomSequence()
getSeqResSequence()
java.lang.String getSeqResSequence()
getAtomSequence()
void setSwissprotId(java.lang.String sp_id)
sp_id
- a String specifying the swissprot id valuegetSwissprotId()
java.lang.String getSwissprotId()
setSwissprotId(String sp_id)
java.util.List<Group> getSeqResGroups(GroupType type)
GroupType.AMINOACID
,
GroupType.HETATM
or GroupType.NUCLEOTIDE
.type
- a GroupTypesetSeqResGroups(List)
java.util.List<Group> getSeqResGroups()
setSeqResGroups(List)
,
getSeqResLength()
,
getAtomGroups()
void setSeqResGroups(java.util.List<Group> seqResGroups)
seqResGroups
- a List of Group objects that from the SEQRES groups of this chain.getSeqResGroups()
void setParent(Structure parent)
parent
- the parent Structure object for this ChaingetParent()
Structure getParent()
setParent(Structure)
java.util.List<Group> getAtomLigands()
FileParsingParameters.setLoadChemCompInfo(boolean)
has not been set to true.
Otherwise the Ligands could not correctly be identified.java.lang.String toPDB()
java.lang.String toMMCIF()