astex
Class Residue

java.lang.Object
  extended by astex.generic.Generic
      extended by astex.Residue
All Implemented Interfaces:
GenericInterface, Selectable

public class Residue
extends Generic
implements Selectable

A class for storing a group of atoms that form part of a protein residue.


Field Summary
 DynamicArray atoms
          Dynmamic array of atoms.
static int Coil
          Sheet secondary structure type.
static int Helix
          Helix secondary structure type.
static int Helix310
          Helix secondary structure type.
static java.lang.String ResidueColor
           
static int Sheet
          Sheet secondary structure type.
static java.lang.String TorsionFormat
           
static java.lang.String TorsionGreek
           
static java.lang.String TorsionRadius
           
static java.lang.String Torsions
           
static int Turn
          Sheet secondary structure type.
static int Undefined
          Sheet secondary structure type.
static java.lang.String undefinedResidueName
          Undefined resiude name.
static int undefinedResidueNumber
          Undefined residue number.
 
Fields inherited from class astex.generic.Generic
ClassName
 
Fields inherited from interface astex.generic.GenericInterface
Name
 
Method Summary
 void addAtom(Atom atom)
          Add an atom to the list.
static Residue create()
          Public interface for creating residues.
 void delete()
          Remove this residue.
 Atom findAtom(java.lang.String name)
          Default to alternate location 'A'.
 Atom findAtom(java.lang.String name, char code)
          Similar to getAtom(String name) but will search in the previous residue if the name ends with '-' or the next residue if the name ends with '+'.
 Atom getAtom(int index)
          Return the specified atom.
 Atom getAtom(java.lang.String nm)
          Return the atom with the given name.
 Atom getAtom(java.lang.String nm, char code)
          Return the atom with the given name.
 int getAtomCount()
          Return the number of atoms in the molecule.
 DynamicArray getAtoms()
          Return the DynamicArray of atoms.
 char getInsertionCode()
          Get the insertion code.
 java.lang.String getName()
          Get the residue name.
 int getNumber()
          Get the residue number.
 Chain getParent()
          Get the parent.
 java.util.Enumeration getProperties()
          Return an enumeration of our properties.
 int getSecondaryStructure()
          Get the value of secondaryStructure.
 int getSequentialNumber()
          Get the sequential residue number.
 boolean hasSelectedAtoms()
           
 boolean isIon()
          Is this residue an ion.
 boolean isIsolated()
          Does this residue contain bonds to atoms in any other residues.
 boolean isNucleicAcid()
          Is this a solvent residue.
 boolean isSolvent()
          Is this a solvent residue.
 boolean isStandardAminoAcid()
          Is this residue a standard amino acid.
 void removeAtom(Atom atom)
          Remove an atom from the residue.
 int select(int state)
          Apply a selection recursively.
 java.lang.String selectStatement()
           
 void setInsertionCode(char code)
          Set the insertion code.
 void setName(java.lang.String newName)
          Set the residue name.
 void setNumber(int newNumber)
          Set the residue number.
 void setParent(Chain chain)
          Set the parent chain.
 void setSecondaryStructure(int v)
          Set the value of secondaryStructure.
 void setSequentialNumber(int sNumber)
           
 java.lang.String toString()
          Print out a residue.
 
Methods inherited from class astex.generic.Generic
addChild, addListener, addParent, get, getBoolean, getChildren, getClassname, getDouble, getInteger, getParents, getString, main, removeChild, removeListener, removeParent, set, setBoolean, setClassname, setDouble, setInteger, setString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

atoms

public DynamicArray atoms
Dynmamic array of atoms.


undefinedResidueNumber

public static int undefinedResidueNumber
Undefined residue number.


undefinedResidueName

public static java.lang.String undefinedResidueName
Undefined resiude name.


Undefined

public static final int Undefined
Sheet secondary structure type.

See Also:
Constant Field Values

Sheet

public static final int Sheet
Sheet secondary structure type.

See Also:
Constant Field Values

Helix

public static final int Helix
Helix secondary structure type.

See Also:
Constant Field Values

Helix310

public static final int Helix310
Helix secondary structure type.

See Also:
Constant Field Values

Turn

public static final int Turn
Sheet secondary structure type.

See Also:
Constant Field Values

Coil

public static final int Coil
Sheet secondary structure type.

See Also:
Constant Field Values

ResidueColor

public static final java.lang.String ResidueColor
See Also:
Constant Field Values

Torsions

public static final java.lang.String Torsions
See Also:
Constant Field Values

TorsionRadius

public static final java.lang.String TorsionRadius
See Also:
Constant Field Values

TorsionGreek

public static final java.lang.String TorsionGreek
See Also:
Constant Field Values

TorsionFormat

public static final java.lang.String TorsionFormat
See Also:
Constant Field Values
Method Detail

create

public static Residue create()
Public interface for creating residues.


setParent

public void setParent(Chain chain)
Set the parent chain.


getParent

public Chain getParent()
Get the parent.


setInsertionCode

public void setInsertionCode(char code)
Set the insertion code.


getInsertionCode

public char getInsertionCode()
Get the insertion code.


setName

public void setName(java.lang.String newName)
Set the residue name.


hasSelectedAtoms

public boolean hasSelectedAtoms()

getName

public java.lang.String getName()
Get the residue name.


getSecondaryStructure

public int getSecondaryStructure()
Get the value of secondaryStructure.

Returns:
value of secondaryStructure.

setSecondaryStructure

public void setSecondaryStructure(int v)
Set the value of secondaryStructure.

Parameters:
v - Value to assign to secondaryStructure.

setSequentialNumber

public void setSequentialNumber(int sNumber)

setNumber

public void setNumber(int newNumber)
Set the residue number.


getSequentialNumber

public int getSequentialNumber()
Get the sequential residue number.


getNumber

public int getNumber()
Get the residue number.


addAtom

public void addAtom(Atom atom)
Add an atom to the list.


removeAtom

public void removeAtom(Atom atom)
Remove an atom from the residue.


delete

public void delete()
Remove this residue.


getAtomCount

public int getAtomCount()
Return the number of atoms in the molecule.


getAtom

public Atom getAtom(int index)
Return the specified atom.


getAtom

public Atom getAtom(java.lang.String nm)
Return the atom with the given name.


getAtom

public Atom getAtom(java.lang.String nm,
                    char code)
Return the atom with the given name.


findAtom

public Atom findAtom(java.lang.String name)
Default to alternate location 'A'.


findAtom

public Atom findAtom(java.lang.String name,
                     char code)
Similar to getAtom(String name) but will search in the previous residue if the name ends with '-' or the next residue if the name ends with '+'. Maybe this should be rolled into one function but prefer this way in case names genuinely end with + or -. This method is only used by torsion angle search functions.


getAtoms

public DynamicArray getAtoms()
Return the DynamicArray of atoms.


isStandardAminoAcid

public boolean isStandardAminoAcid()
Is this residue a standard amino acid.


isIon

public boolean isIon()
Is this residue an ion.


isSolvent

public boolean isSolvent()
Is this a solvent residue.


isNucleicAcid

public boolean isNucleicAcid()
Is this a solvent residue.


isIsolated

public boolean isIsolated()
Does this residue contain bonds to atoms in any other residues.


selectStatement

public java.lang.String selectStatement()
Specified by:
selectStatement in interface Selectable

select

public int select(int state)
Apply a selection recursively.

Specified by:
select in interface Selectable

toString

public java.lang.String toString()
Print out a residue.

Overrides:
toString in class java.lang.Object

getProperties

public java.util.Enumeration getProperties()
Description copied from interface: GenericInterface
Return an enumeration of our properties.

Specified by:
getProperties in interface GenericInterface
Overrides:
getProperties in class Generic