org.biojava.bio.structure
Class ChainImpl

java.lang.Object
  extended byorg.biojava.bio.structure.ChainImpl
All Implemented Interfaces:
Chain

public class ChainImpl
extends Object
implements Chain

A Chain in a PDB file. It contains several groups which can be of type "amino", "hetatm", "nucleotide".


Constructor Summary
ChainImpl()
           
 
Method Summary
 void addGroup(Group group)
          add a group to this chain
 Group getGroup(int position)
          return the amino acid at position
 ArrayList getGroups(String type)
          return an array of all groups of a special type (e.g.
 int getLength()
          get total length of chain, including HETATMs.
 int getLengthAminos()
          returns the length of the AminoAcids in chain, without HETATMs.
 String getName()
           
 String getSequence()
          get amino acid sequence
 String getSwissprotId()
          get the Swissprot id of this chains
 void setName(String nam)
          get and set the name of this chain (Chain id in PDB file )
 void setSwissprotId(String sp_id)
          this class also knows about the swissprot link ...
 String toString()
          string representation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChainImpl

public ChainImpl()
Method Detail

setSwissprotId

public void setSwissprotId(String sp_id)
this class also knows about the swissprot link ...

Specified by:
setSwissprotId in interface Chain

getSwissprotId

public String getSwissprotId()
Description copied from interface: Chain
get the Swissprot id of this chains

Specified by:
getSwissprotId in interface Chain

addGroup

public void addGroup(Group group)
Description copied from interface: Chain
add a group to this chain

Specified by:
addGroup in interface Chain

getGroup

public Group getGroup(int position)
return the amino acid at position

Specified by:
getGroup in interface Chain

getGroups

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

Specified by:
getGroups in interface Chain

getLength

public int getLength()
Description copied from interface: Chain
get total length of chain, including HETATMs.

Specified by:
getLength in interface Chain

getLengthAminos

public int getLengthAminos()
Description copied from interface: Chain
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

Specified by:
getLengthAminos in interface Chain

setName

public void setName(String nam)
Description copied from interface: Chain
get and set the name of this chain (Chain id in PDB file )

Specified by:
setName in interface Chain

getName

public String getName()
Specified by:
getName in interface Chain

toString

public String toString()
string representation

Specified by:
toString in interface Chain

getSequence

public String getSequence()
get amino acid sequence

Specified by:
getSequence in interface Chain