org.biojava.bio.structure
Class StructureTools

java.lang.Object
  extended by org.biojava.bio.structure.StructureTools

public class StructureTools
extends Object

A class that provides some tool methods.

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

Field Summary
static String[] backboneAtomNames
          The names of the Atoms that form the backbone.
static String caAtomName
          The Atom name of C-alpha atoms.
 
Constructor Summary
StructureTools()
           
 
Method Summary
static Atom[] getAtomArray(Structure s, String[] atomNames)
          Returns an array of the requested Atoms from the Structure object.
static Atom[] getAtomCAArray(Structure s)
          Returns an Atom array of the CA atoms.
static Atom[] getBackboneAtomArray(Structure s)
          Returns an Atom array of the MainChain atoms.
static int getNrAtoms(Structure s)
          Count how many number of Atoms are contained within a Structure object.
static int getNrGroups(Structure s)
          Count how many groups are contained within a structure object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

caAtomName

public static final String caAtomName
The Atom name of C-alpha atoms.

See Also:
Constant Field Values

backboneAtomNames

public static final String[] backboneAtomNames
The names of the Atoms that form the backbone.

Constructor Detail

StructureTools

public StructureTools()
Method Detail

getNrAtoms

public static int getNrAtoms(Structure s)
Count how many number of Atoms are contained within a Structure object.

Parameters:
s - the structure object
Returns:
the number of Atoms in this Structure

getNrGroups

public static int getNrGroups(Structure s)
Count how many groups are contained within a structure object.

Parameters:
s - the structure object
Returns:
the number of groups in the structure

getAtomArray

public static Atom[] getAtomArray(Structure s,
                                  String[] atomNames)
Returns an array of the requested Atoms from the Structure object. Iterates over all groups and checks if the requested atoms are in this group, no matter if this is a AminoAcid or Hetatom group.

Parameters:
s - the structure to get the atoms from
atomNames - contains the atom names to be used.
Returns:
an Atom[] array

getAtomCAArray

public static Atom[] getAtomCAArray(Structure s)
Returns an Atom array of the CA atoms.

Parameters:
s - the structure object
Returns:
an Atom[] array

getBackboneAtomArray

public static Atom[] getBackboneAtomArray(Structure s)
Returns an Atom array of the MainChain atoms.

Parameters:
s - the structure object
Returns:
an Atom[] array