org.biojava.bio.structure
Interface Group

All Known Implementing Classes:
Hetatom

public interface Group

This is the datastructure for a single Group of atoms. A protein sequence (Chain in PDB file) is represented as a list of this kind of objects. Groups can be of type "amino","hetatm","nucleotide". There are corresponding classes for each of this type which implement interface Group.

See Also:
Hetatom, AminoAcid, Nucleotide

Method Summary
 void addAtom(Atom atom)
          add an atom to this group
 Atom getAtom(int position)
          get at atom by position
 Atom getAtom(String name)
          get an atom throws StructureException if atom not found
 ArrayList getAtoms()
          get list of atoms
 String getPDBCode()
          return the PDBcode of this amino acid
 String getPDBName()
          set the PDB 3 character name for this group
 HashMap getProperties()
          return properties.
 Object getProperty(String key)
          get a single property
 String getType()
          get Type of group, e.g.
 boolean has3D()
          returns true or false, depending if this group has 3D coordinates or not.
 boolean hasAminoAtoms()
          calculate if a groups has all atoms required for an amino acid this allows to include chemically modified amino acids that are labeled hetatoms into some computations ...
 boolean hasAtom(String name)
          returns flag whether a particular atom is existing within this group
 void setPDBCode(String pdbcode)
           
 void setPDBFlag(boolean flag)
          flag if group has 3D data
 void setPDBName(String s)
          get the PDB 3 character name for this group
 void setProperties(HashMap properties)
          properties of this amino acid.
 void setProperty(String key, Object value)
          set a single property
 int size()
          getnumber of atoms
 

Method Detail

getPDBCode

public String getPDBCode()
return the PDBcode of this amino acid


setPDBCode

public void setPDBCode(String pdbcode)

size

public int size()
getnumber of atoms


has3D

public boolean has3D()
returns true or false, depending if this group has 3D coordinates or not.


setPDBFlag

public void setPDBFlag(boolean flag)
flag if group has 3D data


getType

public String getType()
get Type of group, e.g. amino, hetatom, nucleotide


addAtom

public void addAtom(Atom atom)
add an atom to this group


getAtoms

public ArrayList getAtoms()
get list of atoms


getAtom

public Atom getAtom(String name)
             throws StructureException
get an atom throws StructureException if atom not found

Throws:
StructureException

getAtom

public Atom getAtom(int position)
             throws StructureException
get at atom by position

Throws:
StructureException

hasAtom

public boolean hasAtom(String name)
returns flag whether a particular atom is existing within this group


getPDBName

public String getPDBName()
set the PDB 3 character name for this group


setPDBName

public void setPDBName(String s)
                throws PDBParseException
get the PDB 3 character name for this group

Throws:
PDBParseException

hasAminoAtoms

public boolean hasAminoAtoms()
calculate if a groups has all atoms required for an amino acid this allows to include chemically modified amino acids that are labeled hetatoms into some computations ... the usual way to identify if a group is an amino acid is getType() !

See Also:
getType()

setProperties

public void setProperties(HashMap properties)
properties of this amino acid. currerntly available properties are: phi psi


getProperties

public HashMap getProperties()
return properties. @see setProperties()


setProperty

public void setProperty(String key,
                        Object value)
set a single property


getProperty

public Object getProperty(String key)
get a single property