ChainImpl (BioJava-1.5-beta API)
Keywords: org.biojava.bio.structure.ChainImpl class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.biojava.bio.structure
Class ChainImpl

    java.lang.Object
      org.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".

Since:
  1.4
Author:
  Andreas Prlic

Field Summary
`static String` | `DEFAULT_CHAIN_ID`

Constructor Summary
`ChainImpl()` Constructs a ChainImpl object.

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 .
`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 array 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()` get amino acid sequence.
`String` | `getSwissprotId()` get the Swissprot id of this chains .
`void` | `setAnnotation(Annotation anno)` get/set the Annotation of a Chain.
`void` | `setName(String nam)` 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.

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### DEFAULT_CHAIN_ID

    public static String DEFAULT_CHAIN_ID

Constructor Detail

### ChainImpl

    public ChainImpl()

  Constructs a ChainImpl object.

Method Detail

### clone

    public Object clone()

  returns an identical copy of this Chain .

  Specified by:
    `clone` in interface `Chain`
  Overrides:
    `clone` in class `Object`
  Returns:
    an identical copy of this Chain

### setAnnotation

    public void setAnnotation(Annotation anno)

  Description copied from interface: `Chain`
  get/set the Annotation of a Chain. allows to annotate a protein chain, e.g. molecule description "AZURIN" for pdb 1a4a.A

  Specified by:
    `setAnnotation` in interface `Chain`
  Parameters:
    `anno` - the Annotation to be provided.

### getAnnotation

    public Annotation getAnnotation()

  Description copied from interface: `Chain`
  get/set the Annotation of a Chain. allows to annotate a protein chain, e.g. molecule description "AZURIN" for pdb 1a4a.A

  Specified by:
    `getAnnotation` in interface `Chain`
  Returns:
    the Annotation of this chain

### setSwissprotId

    public void setSwissprotId(String sp_id)

  set the Swissprot id of this chains .

  Specified by:
    `setSwissprotId` in interface `Chain`
  Parameters:
    `sp_id` - a String specifying the swissprot id value
  See Also:
    `getSwissprotId()`

### getSwissprotId

    public String getSwissprotId()

  get the Swissprot id of this chains .

  Specified by:
    `getSwissprotId` in interface `Chain`
  Returns:
    a String representing the swissprot id value
  See Also:
    `setSwissprotId(java.lang.String)`

### addGroup

    public void addGroup(Group group)

  Description copied from interface: `Chain`
  add a group to this chain.

  Specified by:
    `addGroup` in interface `Chain`
  Parameters:
    `group` - a Group object

### getGroup

    public Group getGroup(int position)

  return the amino acid at position .

  Specified by:
    `getGroup` in interface `Chain`
  Parameters:
    `position` - an int
  Returns:
    a Group object

### getGroups

    public List getGroups(String type)

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

  Specified by:
    `getGroups` in interface `Chain`
  Parameters:
    `type` - a String
  Returns:
    an List object containing the groups of type...

### getGroups

    public List getGroups()

  return all groups of this chain .

  Specified by:
    `getGroups` in interface `Chain`
  Returns:
    an ArrayList object representing the Groups of this Chain.

### getGroupByPDB

    public Group getGroupByPDB(String pdbresnum)
                        throws StructureException

  Description copied from interface: `Chain`
  get a group by its PDB residue numbering. if the PDB residue number is not know, throws a StructureException.

  Specified by:
    `getGroupByPDB` in interface `Chain`
  Parameters:
    `pdbresnum` - the PDB residue number of the group
  Returns:
    the matching group
  Throws:
    `StructureException`

### getGroupsByPDB

    public Group[] getGroupsByPDB(String pdbresnumStart,
                                  String pdbresnumEnd)
                           throws StructureException

  Description copied from interface: `Chain`
  get all groups that are located between two PDB residue numbers

  Specified by:
    `getGroupsByPDB` in interface `Chain`
  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

    public int getLength()

  Description copied from interface: `Chain`
  get total length of chain, including HETATMs..

  Specified by:
    `getLength` in interface `Chain`
  Returns:
    an int representing the length of the whole chain including HETATMs

### 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`
  Returns:
    an int representing the length of the AminoAcids in chain, without HETATMs.

### setName

    public void setName(String nam)

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

  Specified by:
    `setName` in interface `Chain`
  Parameters:
    `nam` - a String specifying the name value
  See Also:
    `getName()`

### getName

    public String getName()

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

  Specified by:
    `getName` in interface `Chain`
  Returns:
    a String representing the name value
  See Also:
    `setName(java.lang.String)`

### toString

    public String toString()

  string representation.

  Specified by:
    `toString` in interface `Chain`
  Overrides:
    `toString` in class `Object`

### getSequence

    public String getSequence()

  get amino acid sequence.

  Specified by:
    `getSequence` in interface `Chain`
  Returns:
    a String representing the sequence.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD