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.
|
Object |
clone()
returns an identical copy of this Chain.
|
Annotation |
getAnnotation()
get/set the Annotation of a Chain.
|
Group |
getAtomGroup(int position)
return the Group at position X.
|
List<Group> |
getAtomGroups()
Return all groups that have been specified in the ATOM section of this chain .
|
List<Group> |
getAtomGroups(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.
|
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.
|
Group |
getGroup(int position)
Deprecated.
use getAtomGroup or getSeqResGroup instead
|
Group |
getGroupByPDB(String pdbresnum)
get a group by its PDB residue numbering.
|
List<Group> |
getGroups()
Deprecated.
use getAtomGroups or getSeqResGroups instead
|
List<Group> |
getGroups(String type)
Deprecated.
use getAtomGroups or getSeqResGroups instead
|
Group[] |
getGroupsByPDB(String pdbresnumStart,
String pdbresnumEnd)
Get all groups that are located between two PDB residue numbers.
|
Group[] |
getGroupsByPDB(String pdbresnumStart,
String pdbresnumEnd,
boolean ignoreMissing)
Get all groups that are located between two PDB residue numbers.
|
Compound |
getHeader()
Returns the Header ( a Compound object) for this chain.
|
Long |
getId()
Get the ID used by Hibernate.
|
int |
getLength()
Deprecated.
please use getAtomLength or getLengthSeqRes instead
|
int |
getLengthAminos()
Deprecated.
use getAtomGroups("amino").size() instead.
|
String |
getName()
get and set the name of this chain (Chain id in PDB file ).
|
Structure |
getParent()
Returns the parent Structure of this chain.
|
Group |
getSeqResGroup(int position)
return the Group at position X.
|
List<Group> |
getSeqResGroups()
Return all groups of this chain.
|
List<Group> |
getSeqResGroups(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.
|
String |
getSeqResSequence()
Get the sequence for all amino acids as it is specified in the SEQRES residues.
|
String |
getSequence()
Deprecated.
use getAtomSequence instead
|
String |
getSwissprotId()
Get the Swissprot id of this chain.
|
void |
setAnnotation(Annotation anno)
get/set the Annotation of a Chain.
|
void |
setAtomGroups(List<Group> groups)
Set all groups that have been specified in the ATOM section of this chain .
|
void |
setHeader(Compound molId)
Set the Header from the PDB file.
|
void |
setId(Long id)
Set the ID used by Hibernate.
|
void |
setName(String name)
get and set the name of this chain (Chain id in PDB file ).
|
void |
setParent(Structure parent)
Set the back-reference to its parent Structure.
|
void |
setSeqResGroups(List<Group> seqResGroups)
Set the list of SeqResGroups for this chain.
|
void |
setSwissprotId(String sp_id)
Set the Swissprot id of this chain.
|
String |
toString()
string representation.
|
Object clone()
void addGroup(Group group)
group
- a Group objectLong getId()
setId(Long)
void setId(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 intList<Group> getGroups(String type)
type
- a StringList<Group> getGroups()
List<Group> getAtomGroups()
setAtomGroups(List)
void setAtomGroups(List<Group> groups)
groups
- a List object representing the Groups of this Chain.getAtomGroups()
List<Group> getAtomGroups(String type)
type
- a StringsetAtomGroups(List)
Group getGroupByPDB(String pdbresnum) throws StructureException
pdbresnum
- the PDB residue number of the groupStructureException
Group[] getGroupsByPDB(String pdbresnumStart, String pdbresnumEnd) throws StructureException
pdbresnumStart
- PDB residue number of startpdbresnumEnd
- PDB residue number of endStructureException
Group[] getGroupsByPDB(String pdbresnumStart, String 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 setAnnotation(Annotation anno)
anno
- the Annotation to be provided.getAnnotation()
Annotation getAnnotation()
setAnnotation(Annotation)
void setHeader(Compound molId)
molId
- the Compound that contains the header information for this chaingetHeader()
Compound getHeader()
setHeader(Compound)
void setName(String name)
name
- a String specifying the name valuegetName()
String getName()
setName(java.lang.String)
Sequence getBJSequence() throws IllegalSymbolException
IllegalSymbolException
String getSequence()
getAtomSequence()
String getAtomSequence()
getSeqResSequence()
String getSeqResSequence()
getAtomSequence()
void setSwissprotId(String sp_id)
sp_id
- a String specifying the swissprot id valuegetSwissprotId()
String getSwissprotId()
setSwissprotId(String sp_id)
List<Group> getSeqResGroups(String type)
type
- a StringsetSeqResGroups(List)
List<Group> getSeqResGroups()
setSeqResGroups(List)
void setSeqResGroups(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)