ffe.lang
Class FGroup

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

public abstract class FGroup
extends FNode

The FGroup class has one subnode containing atoms, and one that contains molecular mechanics/geometry terms.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class javax.swing.tree.DefaultMutableTreeNode
 
Field Summary
 
Fields inherited from class ffe.lang.FNode
selected
 
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
 
Constructor Summary
FGroup()
          Default Constructor initializes a FGroup and a few of its subnodes.
FGroup(java.lang.String n, boolean bk)
          Constructs a FGroup object with name n.
FGroup(java.lang.String n, FNode tnode, boolean bk)
          Constructs a FGroup object with name n and sets its tgroup child node equals to tnode.
 
Method Summary
abstract  void addFNode(FNode m)
          Abstract method that should specify how to add various FNode subclasses (such as Atoms, Residues and Polymers) to the FGroup
 void collectBonds()
           
 void ConstructGeometry()
           
 void destroy()
           
abstract  void finalize(boolean finalizeGroups)
          Abstact method that should specify how to finalize a FGroup
 double[] findCenter(boolean w)
          This method finds the Geometrical center of this FGroup, or the mass-weighted center if w is set to true, and returns it as a double[3].
 void findDangelingAtoms()
          This method constructs an ArrayList of atoms which are under-constrained.
 FNode getAngles()
          Returns the FGroup's angles FNode.
 Bond getBond(int index)
          Returns the Bond at the supplied index.
 Bond getBond(java.lang.String id)
          Returns the Bond with the given id.
 FNode getBonds()
          Returns the FGroup's bonds FNode.
 boolean getBondsKnown()
           
 double[] getCenter()
          Returns the FGroup's center as a double[3].
 java.util.ArrayList getDangelingAtoms()
          Returns the FGroup's dangelingatoms list.
 FNode getDihedrals()
          Returns the FGroup's dihedrals FNode.
 java.util.ArrayList getFGroupList()
          Returns an ArrayList of the FGroup's moieties FNode's children.
 FNode getFGroups()
          Returns the FGroup's moieties FNode.
 FNode getFNode(int index)
          Returns the FNode at the given index.
 FNode getFNode(java.lang.String n)
          Returns the FNode specified by the String n.
 FNode getTerms()
          Returns the FGroup's terms FNode.
 boolean isFinalized()
          Returns true if the FGroup is finalized.
 Joint joiner(Bond bond)
          Joiner joins
 Joint joiner(FGroup m1, FGroup m2)
          Joiner joins Moieties m1 and m2 and returns the Geometry objects formed in a Joint.
 void print()
          Prints the FGroup Term Node's children and Moieties Node children.
 void reInit(java.lang.String n)
           
protected  void removeLeaves()
           
 void setAngles(FNode t)
          Sets the FGroup's angles node to t.
 void setBonds(FNode t)
          Sets the FGroup's bonds node to t.
 void setBondsKnown(boolean b)
          Sets the BondsKnown Variable
 void setCenter(double[] d)
          Set the value of Center to d.
 void setDangelingAtoms(java.util.ArrayList a)
          Sets the FGroup's dangelingatoms member to a.
 void setDihedrals(FNode t)
          Sets the FGroup's dihedrals node to t.
 void setFGroups(FNode t)
          Sets the FGroup's moieties node to t.
 void setFinalized(boolean t)
          Specifies whether the FGroup has been finalized.
 void setTerms(FNode t)
          Sets the FGroup's terms node to t.
 void switchColor(int colortype, javax.vecmath.Color3f color, javax.media.j3d.Material mat)
           
 java.lang.String toString()
          Returns the Moieties name.
 void updateAtoms()
           
 void updateBonds()
           
 
Methods inherited from class ffe.lang.FNode
drawLabel, equals, 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
 

Constructor Detail

FGroup

public FGroup()
Default Constructor initializes a FGroup and a few of its subnodes.


FGroup

public FGroup(java.lang.String n,
              boolean bk)
Constructs a FGroup object with name n.


FGroup

public FGroup(java.lang.String n,
              FNode tnode,
              boolean bk)
Constructs a FGroup object with name n and sets its tgroup child node equals to tnode.

Method Detail

reInit

public void reInit(java.lang.String n)

destroy

public void destroy()
Overrides:
destroy in class FNode

addFNode

public abstract void addFNode(FNode m)
Abstract method that should specify how to add various FNode subclasses (such as Atoms, Residues and Polymers) to the FGroup


finalize

public abstract void finalize(boolean finalizeGroups)
Abstact method that should specify how to finalize a FGroup


removeLeaves

protected void removeLeaves()

updateBonds

public void updateBonds()

updateAtoms

public void updateAtoms()

toString

public java.lang.String toString()
Returns the Moieties name.

Overrides:
toString in class FNode

print

public void print()
Prints the FGroup Term Node's children and Moieties Node children.

Overrides:
print in class FNode

ConstructGeometry

public void ConstructGeometry()

collectBonds

public void collectBonds()

joiner

public Joint joiner(FGroup m1,
                    FGroup m2)
Joiner joins Moieties m1 and m2 and returns the Geometry objects formed in a Joint.


joiner

public Joint joiner(Bond bond)
Joiner joins

Parameters:
bond - Bond
Returns:
Joint

findDangelingAtoms

public void findDangelingAtoms()
This method constructs an ArrayList of atoms which are under-constrained. (ie They can except more bonds)


findCenter

public double[] findCenter(boolean w)
This method finds the Geometrical center of this FGroup, or the mass-weighted center if w is set to true, and returns it as a double[3].

Overrides:
findCenter in class FNode

setFinalized

public void setFinalized(boolean t)
Specifies whether the FGroup has been finalized.


setTerms

public void setTerms(FNode t)
Sets the FGroup's terms node to t.


setBonds

public void setBonds(FNode t)
Sets the FGroup's bonds node to t.


setBondsKnown

public void setBondsKnown(boolean b)
Sets the BondsKnown Variable


setAngles

public void setAngles(FNode t)
Sets the FGroup's angles node to t.


setDihedrals

public void setDihedrals(FNode t)
Sets the FGroup's dihedrals node to t.


setDangelingAtoms

public void setDangelingAtoms(java.util.ArrayList a)
Sets the FGroup's dangelingatoms member to a.


setCenter

public void setCenter(double[] d)
Set the value of Center to d.


setFGroups

public void setFGroups(FNode t)
Sets the FGroup's moieties node to t.


switchColor

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

isFinalized

public boolean isFinalized()
Returns true if the FGroup is finalized.


getBondsKnown

public boolean getBondsKnown()

getFGroups

public FNode getFGroups()
Returns the FGroup's moieties FNode.


getTerms

public FNode getTerms()
Returns the FGroup's terms FNode.


getBonds

public FNode getBonds()
Returns the FGroup's bonds FNode.


getAngles

public FNode getAngles()
Returns the FGroup's angles FNode.


getDihedrals

public FNode getDihedrals()
Returns the FGroup's dihedrals FNode.


getDangelingAtoms

public java.util.ArrayList getDangelingAtoms()
Returns the FGroup's dangelingatoms list.


getCenter

public double[] getCenter()
Returns the FGroup's center as a double[3].


getFGroupList

public java.util.ArrayList getFGroupList()
Returns an ArrayList of the FGroup's moieties FNode's children.


getBond

public Bond getBond(int index)
Returns the Bond at the supplied index.


getBond

public Bond getBond(java.lang.String id)
Returns the Bond with the given id.


getFNode

public FNode getFNode(int index)
Returns the FNode at the given index.


getFNode

public FNode getFNode(java.lang.String n)
Returns the FNode specified by the String n.