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 position X.
|
java.util.List<Group> |
getAtomGroups()
Return all groups that have been specified in the ATOM section of this chain .
|
java.util.List<Group> |
getAtomGroups(java.lang.String type)
Return a List of all groups of a special type (e.g.
|
int |
getAtomLength()
Return the number of Groups in the ATOM records of the chain.
|
java.util.List<Group> |
getAtomLigands()
Get 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()
Convert the SEQRES groups of a Chain to a Biojava Sequence object.
|
java.lang.String |
getChainID()
get and set the name of this chain (Chain id in PDB file ).
|
Group |
getGroup(int position)
Deprecated.
use getAtomGroup or getSeqResGroup instead
|
Group |
getGroupByPDB(ResidueNumber resNum)
Get a group by its PDB residue numbering.
|
Group |
getGroupByPDB(java.lang.String pdbresnum)
Deprecated.
replaced by
getGroupByPDB(ResidueNumber) |
java.util.List<Group> |
getGroups()
Deprecated.
use getAtomGroups or getSeqResGroups instead
|
java.util.List<Group> |
getGroups(java.lang.String type)
Deprecated.
use getAtomGroups or getSeqResGroups instead
|
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.
|
Group[] |
getGroupsByPDB(java.lang.String pdbresnumStart,
java.lang.String pdbresnumEnd)
Deprecated.
replaced by
getGroupsByPDB(ResidueNumber, ResidueNumber) |
Group[] |
getGroupsByPDB(java.lang.String pdbresnumStart,
java.lang.String pdbresnumEnd,
boolean ignoreMissing)
Deprecated.
|
Compound |
getHeader()
Returns the Header ( a Compound object) for this chain.
|
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, otherwise null
|
int |
getLength()
Deprecated.
please use getAtomLength or getLengthSeqRes instead
|
int |
getLengthAminos()
Deprecated.
use getAtomGroups("amino").size() instead.
|
java.lang.String |
getName()
Deprecated.
replaced by
getChainID() |
Structure |
getParent()
Returns the parent Structure of this chain.
|
Group |
getSeqResGroup(int position)
return the Group at position X.
|
java.util.List<Group> |
getSeqResGroups()
Return all groups of this chain.
|
java.util.List<Group> |
getSeqResGroups(java.lang.String type)
Return a List of all groups of a special type (e.g.
|
int |
getSeqResLength()
Returns the number of groups in the SEQRES records of the chain.
|
java.lang.String |
getSeqResSequence()
Get the sequence for all amino acids as it is specified in the SEQRES residues.
|
java.lang.String |
getSequence()
Deprecated.
use getAtomSequence instead
|
java.lang.String |
getSwissprotId()
Get the Swissprot id of this chain.
|
void |
setAtomGroups(java.util.List<Group> groups)
Set all groups that have been specified in the ATOM section of this chain .
|
void |
setChainID(java.lang.String name)
get and set the name of this chain (Chain id in PDB file ).
|
void |
setHeader(Compound molId)
Set the Header from the PDB file.
|
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 |
setName(java.lang.String name)
Deprecated.
replaced by
setChainID(String) |
void |
setParent(Structure parent)
Set the back-reference to its parent Structure.
|
void |
setSeqResGroups(java.util.List<Group> seqResGroups)
Set the list of SeqResGroups for this chain.
|
void |
setSwissprotId(java.lang.String sp_id)
Set the Swissprot id of this chain.
|
java.lang.String |
toString()
string representation.
|
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 getGroup(int position)
position
- an intgetAtomGroup(int)
,
getSeqResGroup(int)
Group getAtomGroup(int position)
position
- an intGroup getSeqResGroup(int position)
position
- an intjava.util.List<Group> getGroups(java.lang.String type)
type
- a Stringjava.util.List<Group> getGroups()
java.util.List<Group> getAtomGroups()
setAtomGroups(List)
void setAtomGroups(java.util.List<Group> groups)
groups
- a List object representing the Groups of this Chain.getAtomGroups()
java.util.List<Group> getAtomGroups(java.lang.String type)
type
- a StringsetAtomGroups(List)
@Deprecated Group getGroupByPDB(java.lang.String pdbresnum) throws StructureException
getGroupByPDB(ResidueNumber)
pdbresnum
- the PDB residue number of the groupStructureException
Group getGroupByPDB(ResidueNumber resNum) throws StructureException
resNum
- the PDB residue number of the groupStructureException
@Deprecated Group[] getGroupsByPDB(java.lang.String pdbresnumStart, java.lang.String pdbresnumEnd) throws StructureException
getGroupsByPDB(ResidueNumber, ResidueNumber)
pdbresnumStart
- PDB residue number of startpdbresnumEnd
- PDB residue number of endStructureException
Group[] getGroupsByPDB(ResidueNumber pdbresnumStart, ResidueNumber pdbresnumEnd) throws StructureException
pdbresnumStart
- PDB residue number of startpdbresnumEnd
- PDB residue number of endStructureException
@Deprecated Group[] getGroupsByPDB(java.lang.String pdbresnumStart, java.lang.String pdbresnumEnd, boolean ignoreMissing) throws StructureException
getGroupsByPDB(ResidueNumber, ResidueNumber, boolean)
pdbresnumStart
- PDB residue number of startpdbresnumEnd
- PDB residue number of endignoreMissing
- ignore missing groups in this range.StructureException
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 getLength()
getAtomLength()
,
getSeqResLength()
int getAtomLength()
int getSeqResLength()
int getLengthAminos()
void setHeader(Compound molId)
molId
- the Compound that contains the header information for this chaingetHeader()
Compound getHeader()
setHeader(Compound)
void setName(java.lang.String name)
setChainID(String)
name
- a String specifying the name valuegetName()
java.lang.String getName()
getChainID()
setName(java.lang.String)
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()
IllegalSymbolException
java.lang.String getSequence()
getAtomSequence()
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(java.lang.String type)
type
- a StringsetSeqResGroups(List)
java.util.List<Group> getSeqResGroups()
setSeqResGroups(List)
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()