org.biojava.bio.structure
Interface Chain

All Known Implementing Classes:
ChainImpl

public interface Chain

Defines the interface for a Chain.

Since:
1.4
Version:
%I% %G%
Author:
Andreas Prlic

Method Summary
 void addGroup(Group group)
          add a group to this chain.
 Object clone()
          returns an identical copy of this Chain.
 Annotation getAnnotation()
          get/set the Annotation of a Chain.
 Group getGroup(int position)
          return the amino acid at position X.
 Group getGroupByPDB(String pdbresnum)
          get a group by its PDB residue numbering.
 List getGroups()
          return all groups of this chain.
 List getGroups(String type)
          return an ArrayList of all groups of a special type (e.g.
 Group[] getGroupsByPDB(String pdbresnumStart, String pdbresnumEnd)
          get all groups that are located between two PDB residue numbers
 int getLength()
          get total length of chain, including HETATMs..
 int getLengthAminos()
          returns the length of the AminoAcids in chain, without HETATMs.
 String getName()
          get and set the name of this chain (Chain id in PDB file ).
 String getSequence()
          return the amino acid sequqence of this chain ( all aminos even if they do not have 3D data ...).
 String getSwissprotId()
          get the Swissprot id of this chains .
 void setAnnotation(Annotation anno)
          get/set the Annotation of a Chain.
 void setName(String name)
          get and set the name of this chain (Chain id in PDB file ).
 void setSwissprotId(String sp_id)
          set the Swissprot id of this chains .
 String toString()
          string representation.
 

Method Detail

clone

Object clone()
returns an identical copy of this Chain.

Returns:
an identical copy of this Chain

addGroup

void addGroup(Group group)
add a group to this chain.

Parameters:
group - a Group object

getGroup

Group getGroup(int position)
return the amino acid at position X.

Parameters:
position - an int
Returns:
a Group object

getGroups

List getGroups(String type)
return an ArrayList of all groups of a special type (e.g. amino, hetatm, nucleotide).

Parameters:
type - a String
Returns:
an ArrayList object

getGroups

List getGroups()
return all groups of this chain.

Returns:
an ArrayList of all Group objects of this chain

getGroupByPDB

Group getGroupByPDB(String pdbresnum)
                    throws StructureException
get a group by its PDB residue numbering. if the PDB residue number is not know, throws a StructureException.

Parameters:
pdbresnum - the PDB residue number of the group
Returns:
the matching group
Throws:
StructureException

getGroupsByPDB

Group[] getGroupsByPDB(String pdbresnumStart,
                       String pdbresnumEnd)
                       throws StructureException
get all groups that are located between two PDB residue numbers

Parameters:
pdbresnumStart - PDB residue number of start
pdbresnumEnd - PDB residue number of end
Returns:
Groups in between. or throws a StructureException if either start or end can not be found,
Throws:
StructureException

getLength

int getLength()
get total length of chain, including HETATMs..

Returns:
an int representing the length of the whole chain including HETATMs

getLengthAminos

int getLengthAminos()
returns the length of the AminoAcids in chain, without HETATMs. note: not all amino acids need to have 3D coords, in fact in could be that none has! so length always corresponds to Sequence ( = uniprot,swissprot) length.

Returns:
an int representing the length of the AminoAcids in chain, without HETATMs.

setAnnotation

void setAnnotation(Annotation anno)
get/set the Annotation of a Chain. allows to annotate a protein chain, e.g. molecule description "AZURIN" for pdb 1a4a.A

Parameters:
anno - the Annotation to be provided.

getAnnotation

Annotation getAnnotation()
get/set the Annotation of a Chain. allows to annotate a protein chain, e.g. molecule description "AZURIN" for pdb 1a4a.A

Returns:
the Annotation of this chain

setName

void setName(String name)
get and set the name of this chain (Chain id in PDB file ).

Parameters:
name - a String specifying the name value
See Also:
getName()

getName

String getName()
get and set the name of this chain (Chain id in PDB file ).

Returns:
a String representing the name value
See Also:
setName(java.lang.String)

toString

String toString()
string representation.

Overrides:
toString in class Object

getSequence

String getSequence()
return the amino acid sequqence of this chain ( all aminos even if they do not have 3D data ...).

Returns:
the sequence as a string

setSwissprotId

void setSwissprotId(String sp_id)
set the Swissprot id of this chains .

Parameters:
sp_id - a String specifying the swissprot id value
See Also:
getSwissprotId()

getSwissprotId

String getSwissprotId()
get the Swissprot id of this chains .

Returns:
a String representing the swissprot id value
See Also:
setSwissprotId(java.lang.String)