ffe.lang
Class Residue

java.lang.Object
  extended byjavax.swing.tree.DefaultMutableTreeNode
      extended byffe.lang.FNode
          extended byffe.lang.FGroup
              extended byffe.lang.Residue
All Implemented Interfaces:
java.lang.Cloneable, javax.swing.tree.MutableTreeNode, java.io.Serializable, javax.swing.tree.TreeNode

public final class Residue
extends FGroup

The Residue class represents individual amino acids or nucleic acid bases.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.tree.DefaultMutableTreeNode
 
Field Summary
static int HELIX
           
static int NONE
           
(package private) static java.lang.StringBuffer s
           
static int SHEET
           
static javax.vecmath.Color3f[] ssColors
           
static int TURN
           
 
Fields inherited from class ffe.lang.FNode
selected
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
Residue(int num)
          Default Constructor where num is this Residue's position in the Polymer.
Residue(java.lang.String name, boolean bk)
           
Residue(java.lang.String name, int num, boolean bk)
          Name is the residue's 3 letter abbreviation and num is its position in the Polymer.
Residue(java.lang.String name, int num, FNode atoms, boolean bk)
          As above, with atoms being a FNode with this Residue's atoms as child nodes
 
Method Summary
 void addFNode(FNode o)
          Allows adding Atom FNodes to the Residue.
 void drawLabel(Graphics3D graphics, javax.media.j3d.J3DGraphics2D g2d, javax.media.j3d.Node node, boolean labelAtoms, boolean labelResidues)
           
 boolean equals(java.lang.Object object)
          Overidden equals method that return true if object is not equals to this, is of the same class, has the same parent Polymer and the same sequence number.
 void finalize(boolean finalizeGeometry)
          The Finalize method should be called once all atoms have been added to the Residue.
 javax.vecmath.Vector3d getAlpha3d()
          Returns the position of this Residue's Alpha Carbon (if it is an amino acid).
 double getHydrophobicity()
          Returns this Residue's Hydrophobicity value.
static double getHydrophobicity(java.lang.String aa)
          Returns the Hydrophobicity of the Residue provided as an arguement.
 java.lang.String getPolymer()
          Returns this Residues Parent Polymer name.
 int getResidueNumber()
          Returns this Residue's sequence number.
static int parseSSType(java.lang.String ss)
           
 void print()
          Prints "Residue Number: x" to stdout.
 void printSidePolymerCOM()
           
 void setNumber(int n)
           
 void setPolymer(java.lang.String n)
           
 void setSSType(int i)
           
 void switchColor(int colortype, javax.vecmath.Color3f color, javax.media.j3d.Material mat)
           
 java.lang.String toString()
          Returns the Moieties name.
 
Methods inherited from class ffe.lang.FGroup
collectBonds, ConstructGeometry, destroy, findCenter, findDangelingAtoms, getAngles, getBond, getBond, getBonds, getBondsKnown, getCenter, getDangelingAtoms, getDihedrals, getFGroupList, getFGroups, getFNode, getFNode, getTerms, isFinalized, joiner, joiner, reInit, removeLeaves, setAngles, setBonds, setBondsKnown, setCenter, setDangelingAtoms, setDihedrals, setFGroups, setFinalized, setTerms, updateAtoms, updateBonds
 
Methods inherited from class ffe.lang.FNode
getAtomList, getBondList, getFSystemNode, getList, getListIterator, getMoleculeNode, getMW, getName, getPolymerNode, getResidueNode, getTermList, isSelected, setName, setSelected, switchView
 
Methods inherited from class javax.swing.tree.DefaultMutableTreeNode
add, breadthFirstEnumeration, children, clone, depthFirstEnumeration, getAllowsChildren, getChildAfter, getChildAt, getChildBefore, getChildCount, getDepth, getFirstChild, getFirstLeaf, getIndex, getLastChild, getLastLeaf, getLeafCount, getLevel, getNextLeaf, getNextNode, getNextSibling, getParent, getPath, getPathToRoot, getPreviousLeaf, getPreviousNode, getPreviousSibling, getRoot, getSharedAncestor, getSiblingCount, getUserObject, getUserObjectPath, insert, isLeaf, isNodeAncestor, isNodeChild, isNodeDescendant, isNodeRelated, isNodeSibling, isRoot, pathFromAncestorEnumeration, postorderEnumeration, preorderEnumeration, remove, remove, removeAllChildren, removeFromParent, setAllowsChildren, setParent, setUserObject
 
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

s

static java.lang.StringBuffer s

NONE

public static int NONE

HELIX

public static int HELIX

TURN

public static int TURN

SHEET

public static int SHEET

ssColors

public static javax.vecmath.Color3f[] ssColors
Constructor Detail

Residue

public Residue(int num)
Default Constructor where num is this Residue's position in the Polymer.


Residue

public Residue(java.lang.String name,
               boolean bk)

Residue

public Residue(java.lang.String name,
               int num,
               boolean bk)
Name is the residue's 3 letter abbreviation and num is its position in the Polymer.


Residue

public Residue(java.lang.String name,
               int num,
               FNode atoms,
               boolean bk)
As above, with atoms being a FNode with this Residue's atoms as child nodes

Method Detail

equals

public boolean equals(java.lang.Object object)
Overidden equals method that return true if object is not equals to this, is of the same class, has the same parent Polymer and the same sequence number.

Overrides:
equals in class FNode

addFNode

public void addFNode(FNode o)
Allows adding Atom FNodes to the Residue.

Specified by:
addFNode in class FGroup

toString

public java.lang.String toString()
Description copied from class: FGroup
Returns the Moieties name.

Overrides:
toString in class FGroup

print

public void print()
Prints "Residue Number: x" to stdout.

Overrides:
print in class FGroup

drawLabel

public void drawLabel(Graphics3D graphics,
                      javax.media.j3d.J3DGraphics2D g2d,
                      javax.media.j3d.Node node,
                      boolean labelAtoms,
                      boolean labelResidues)
Overrides:
drawLabel in class FNode

switchColor

public void switchColor(int colortype,
                        javax.vecmath.Color3f color,
                        javax.media.j3d.Material mat)
Overrides:
switchColor in class FGroup

printSidePolymerCOM

public void printSidePolymerCOM()

finalize

public void finalize(boolean finalizeGeometry)
The Finalize method should be called once all atoms have been added to the Residue. Geometry objects (Bonds, Angles, etc) are then formed, followed by a determination of under-constrained (Dangeling) atoms.

Specified by:
finalize in class FGroup

getResidueNumber

public int getResidueNumber()
Returns this Residue's sequence number.


getPolymer

public java.lang.String getPolymer()
Returns this Residues Parent Polymer name.


getAlpha3d

public javax.vecmath.Vector3d getAlpha3d()
Returns the position of this Residue's Alpha Carbon (if it is an amino acid).


getHydrophobicity

public double getHydrophobicity()
Returns this Residue's Hydrophobicity value.


getHydrophobicity

public static double getHydrophobicity(java.lang.String aa)
Returns the Hydrophobicity of the Residue provided as an arguement. (Must be the 3-letter abreviation)


setNumber

public void setNumber(int n)

setPolymer

public void setPolymer(java.lang.String n)

setSSType

public void setSSType(int i)

parseSSType

public static int parseSSType(java.lang.String ss)