## org.biojava.bio.structure
Class StructureTools

    java.lang.Object
      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.
`static Logger` `logger`
`static Character` `UNKNOWN_GROUP_LABEL`

Constructor Summary
`StructureTools()`

Method Summary
`static Character` `convert_3code_1code(String code3)` convert three character amino acid codes into single character e.g.
`static Character` `get1LetterCode(String groupCode3)` convert a three letter code into single character.
`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.
`static boolean` `isNucleotide(String groupCode3)`

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.

### UNKNOWN_GROUP_LABEL

    public static final Character UNKNOWN_GROUP_LABEL

### logger

    public static Logger logger

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

### convert_3code_1code

    public static Character convert_3code_1code(String code3)
                                         throws IllegalSymbolException

  convert three character amino acid codes into single character e.g. convert CYS to C

  Parameters:
    `code3` - a three character amino acid representation String
  Returns:
    a character
  Throws:
    `IllegalSymbolException`

### get1LetterCode

    public static Character get1LetterCode(String groupCode3)

  convert a three letter code into single character. catches for unusual characters

  Parameters:
    `groupCode3` - three letter representation
  Returns:
    null if group is a nucleotide code

### isNucleotide

    public static boolean isNucleotide(String groupCode3)