meshi.molecularElements
Class Residue

java.lang.Object
  extended by meshi.molecularElements.Residue
All Implemented Interfaces:
java.lang.Comparable, ResidueCreator, MeshiPotential, Attributable, MeshiAttribute
Direct Known Subclasses:
CaResidue, ImageResidue, Pdb2Fasta.MyResidue, ResidueExtendedAtoms

public class Residue
extends java.lang.Object
implements ResidueCreator, java.lang.Comparable, MeshiPotential, MeshiAttribute, Attributable

A generic residue.


Field Summary
private  java.lang.String accessibility
           
protected  AtomList atoms
          Atoms of this residue;
private  java.util.HashMap attributes
           
protected  AtomPairList bonds
          Co-valiant bonds in the residue.
protected  Atom head
          First atom of the residue (typicaly N).
private  ResidueIdentifier ID
          A unique identifier.
 ResidueMode mode
           
 java.lang.String name
          Residue name.
private static StringList names1
          A list of Residue names1 (one letter code).
private static StringList names3
          A list of Residue names3 (three letter code).
private static boolean namesDone
          The list of residue names is done.
protected  Atom nextAtom
           
protected  Atom prevAtom
           
private  double reliability
           
private  SecondaryStructure secondaryStructure
          HELIX, SHEET ect.
protected  Atom tail
          last atom of the residue (typicaly C).
 ResidueType type
          which of the 20 possible it is.
 
Fields inherited from interface meshi.parameters.MeshiPotential
ACCESSIBLE, ALPHA_ANGLE_PARAMETERS, ALPHA_TORSION_PARAMETERS, ANGLE_PARAMETERS, ATOMIC_PAIRWISE_PMF_SUMMA_PARAMETERS, BOND_PARAMETERS, BURIED, COIL, COMPOSITE_PROPENSITY_2D_PARAMETERS, COMPOSITE_PROPENSITY_2D_WITH_PP_PARAMETERS, COMPOSITE_PROPENSITY_PARAMETERS, COMPOSITE_TORSIONS_PARAMETERS, CONTACTS_ENVIRONMENT_PARAMETERS, CONTACTS_PARAMETERS, COOPERATIVE_ATOMIC_PAIRWISE_PMF_SUMMA_PARAMETERS, COOPERATIVE_PROPENSITY_PARAMETERS, COOPERATIVE_RAMACHANDRAN_PARAMETERS, ELECTROSTATICS_PARAMETERS, EXCLUDED_VOL_PARAMETERS, FLAT_RAMACH_PARAMETERS, HELIX, HELIX_OR_COIL, HYDROGEN_BONDS_PAIRS_BETA_PARAMETERS, HYDROGEN_BONDS_PAIRS_HELIX_PARAMETERS, HYDROGEN_BONDS_PAIRS_PARAMETERS_SURFACE, LENNARD_JONES_PARAMETERS, LENNARD_JONES_PARAMETERS_BACKBONE, LENNARD_JONES_PARAMETERS_CA, LJ_ENVIRONMENT_PARAMETERS, LJ_ENVIRONMENT_PARAMETERS_BACKBONE, LJ_ENVIRONMENT_PARAMETERS_CA, ONE_ANGLE_PARAMETERS, OUT_OF_PLANE_PARAMETERS, PLANE_PARAMETERS, PROPENSITY_ANGLE_PARAMETERS, PROPENSITY_TORSION_PARAMETERS, SHEET, SHEET_OR_COIL, SOLVATE_LONG_HB_PARAMETERS, SOLVATE_MINIMIZE_HB_PARAMETERS, SOLVATE_NOHB_PARAMETERS, SOLVATE_PARAMETERS, SOLVATE_SC_PARAMETERS, TWO_ANGLES_PARAMETERS, TWO_TORSIONS_PARAMETERS
 
Fields inherited from interface meshi.util.MeshiAttribute
BEAUTIFY_ATTRIBUTE, CN_ATTRIBUTE, DISTANCE_FROM_CATALYTIC_ATTRIBUTE, EXCLUDED_VOLUME_ELEMENT_ATTRIBUTE, GAUSSIAN_ALPHA, GAUSSIAN_ATTRIBUTE, HYDROGEN_BONDS_ATTRIBUTE, LENNARD_JONES_ELEMENT_ATTRIBUTE, LOOP_RESIDUE, ORIGINAL_ATOM, RESIDUE_ATTRIBUTE, RESIDUE_TORSIONS_ATTRIBUTE, SECONDARY_STRUCTURE_ATTRIBUTE, SEQUENCE_ALIGNMENT_COLUMN_ATTRIBUTE, SIDE_CHAIN_SOLVATE_ALL_ATOM_ATTRIBUTE, SOLVATE_ALL_ATOM_ATTRIBUTE, SOLVATE_CA_ATTRIBUTE, SOLVATE_ROT1_ATTRIBUTE, SUMMA_ATTRIBUTE
 
Constructor Summary
Residue(ResidueIdentifier id)
           
Residue(ResidueIdentifier id, java.lang.String name)
           
Residue(java.lang.String name)
           Use this constructor to instantiate a creator object..
Residue(java.lang.String name, ResidueType type, ResidueIdentifier id, AtomList atomList, ResidueMode mode)
           
 
Method Summary
 java.lang.String accessibility()
           
 void addAttribute(MeshiAttribute attribute)
           
 Atom amideH()
           
 Atom amideN()
           
 AtomList atoms()
          Returns a list of the residue atoms.
 AtomPairList bonds()
          Returns a list of the residue bonds.
 Atom ca()
           
 Atom carbonylC()
           
 Atom carbonylO()
           
 Atom cb()
           
 Atom cg()
           
 java.lang.String chain()
           
 java.lang.String comment()
           
 int compareTo(java.lang.Object obj)
          Compares this residue with the given residue according to the order of their ResidueIdentifiers.
 Residue create(AtomList atoms, ResidueIdentifier id, ResidueMode mode)
          create a residue based on an atoms list.
 void defrost()
           
 boolean dummy()
           
 boolean equals(java.lang.Object other)
           
static Atom find(AtomList atomList, BBatom bbAtom)
           
static Atom find(AtomList atomList, java.lang.String name)
           
 Atom get(java.lang.String name)
          Fetches an atom by its name.
 Atom getAtom(java.lang.String atomName)
           
 MeshiAttribute getAttribute(int key)
           
 ResidueMode getMode()
           
 Atom head()
           
 ResidueIdentifier ID()
          Returns the ResidueIdentifier of this Residue or throws an exception if (this != ID.RESIDUE).
 void initiateAtoms()
           
 int key()
           
 Atom nextAtom()
           
 int number()
           
 int position()
          residue number - 1.
 Atom prevAtom()
           
 double reliability()
           
 SecondaryStructure secondaryStructure()
           
 void setAccessibility(char ac)
           
 void setAccessibility(java.lang.String accessibility)
           
 void setNextAtom(Atom atom)
           
 void setPrevAtom(Atom atom)
           
 void setPrevNextAtomsToNull()
           
 void setReliability(double reliability)
           
 void setResidueInAtoms(AtomList atoms)
           
 void setSecondaryStructure(char ss)
           
 void setSecondaryStructure(SecondaryStructure secondaryStructure)
           
 Atom tail()
           
 java.lang.String test()
           
 java.lang.String toString()
           
 ResidueType type()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public final java.lang.String name
Residue name.


ID

private final ResidueIdentifier ID
A unique identifier. Replaces field number and also includes this residue's chain.


type

public final ResidueType type
which of the 20 possible it is.


atoms

protected AtomList atoms
Atoms of this residue;


bonds

protected AtomPairList bonds
Co-valiant bonds in the residue.


head

protected Atom head
First atom of the residue (typicaly N). The one conncted to the previous residue.


tail

protected Atom tail
last atom of the residue (typicaly C). The one conncted to the next residue.


prevAtom

protected Atom prevAtom

nextAtom

protected Atom nextAtom

names3

private static StringList names3
A list of Residue names3 (three letter code).


names1

private static StringList names1
A list of Residue names1 (one letter code).


namesDone

private static boolean namesDone
The list of residue names is done.


secondaryStructure

private SecondaryStructure secondaryStructure
HELIX, SHEET ect. Acceptable values may be found in meshi/parameters/MeshiPotential.


accessibility

private java.lang.String accessibility

mode

public final ResidueMode mode

reliability

private double reliability

attributes

private java.util.HashMap attributes
Constructor Detail

Residue

public Residue(java.lang.String name)
 Use this constructor to instantiate a creator object..


Residue

public Residue(java.lang.String name,
               ResidueType type,
               ResidueIdentifier id,
               AtomList atomList,
               ResidueMode mode)

Residue

public Residue(ResidueIdentifier id)

Residue

public Residue(ResidueIdentifier id,
               java.lang.String name)
Method Detail

type

public final ResidueType type()

reliability

public double reliability()

setReliability

public void setReliability(double reliability)

atoms

public AtomList atoms()
Returns a list of the residue atoms.


bonds

public AtomPairList bonds()
Returns a list of the residue bonds.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getMode

public ResidueMode getMode()

test

public java.lang.String test()

head

public Atom head()

tail

public Atom tail()

prevAtom

public Atom prevAtom()

nextAtom

public Atom nextAtom()

setPrevAtom

public void setPrevAtom(Atom atom)

setNextAtom

public void setNextAtom(Atom atom)

comment

public java.lang.String comment()

position

public int position()
residue number - 1.


create

public Residue create(AtomList atoms,
                      ResidueIdentifier id,
                      ResidueMode mode)
create a residue based on an atoms list. creates a dummyResidue if the list is null or empty.

Specified by:
create in interface ResidueCreator

compareTo

public int compareTo(java.lang.Object obj)
Compares this residue with the given residue according to the order of their ResidueIdentifiers.

Specified by:
compareTo in interface java.lang.Comparable
Throws:
java.lang.ClassCastException - if the given object is not a residue.
See Also:
ResidueIdentifier.compareTo(Object)

get

public Atom get(java.lang.String name)
Fetches an atom by its name.


secondaryStructure

public final SecondaryStructure secondaryStructure()

setSecondaryStructure

public void setSecondaryStructure(SecondaryStructure secondaryStructure)

accessibility

public final java.lang.String accessibility()

setAccessibility

public void setAccessibility(java.lang.String accessibility)

getAtom

public Atom getAtom(java.lang.String atomName)

ca

public Atom ca()

cb

public Atom cb()

cg

public Atom cg()

carbonylC

public Atom carbonylC()

carbonylO

public Atom carbonylO()

amideN

public Atom amideN()

amideH

public Atom amideH()

dummy

public boolean dummy()

find

public static Atom find(AtomList atomList,
                        BBatom bbAtom)

find

public static Atom find(AtomList atomList,
                        java.lang.String name)

setPrevNextAtomsToNull

public void setPrevNextAtomsToNull()

initiateAtoms

public void initiateAtoms()

setSecondaryStructure

public void setSecondaryStructure(char ss)

setAccessibility

public void setAccessibility(char ac)

defrost

public void defrost()

ID

public ResidueIdentifier ID()
Returns the ResidueIdentifier of this Residue or throws an exception if (this != ID.RESIDUE).


chain

public java.lang.String chain()

number

public int number()

setResidueInAtoms

public void setResidueInAtoms(AtomList atoms)

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

key

public int key()
Specified by:
key in interface MeshiAttribute

addAttribute

public final void addAttribute(MeshiAttribute attribute)
Specified by:
addAttribute in interface Attributable

getAttribute

public final MeshiAttribute getAttribute(int key)
Specified by:
getAttribute in interface Attributable