Package ffx.potential.bonded
Class MSNode
java.lang.Object
javax.swing.tree.DefaultMutableTreeNode
ffx.potential.bonded.MSNode
- All Implemented Interfaces:
ROLS,Serializable,Cloneable,MutableTreeNode,TreeNode
The MSNode class forms the basic unit that all data classes extend.
- Since:
- 1.0
- Author:
- Michael J. Schnieders
- See Also:
-
Field Summary
FieldsFields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObjectFields inherited from interface ffx.potential.bonded.ROLS
MaxLengthScale -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionIfthisMSNode or any MSNode below itequalsthe argument, that MSNode is returned.booleandestroy()destroyvoiddrawLabel(org.jogamp.java3d.Canvas3D graphics, org.jogamp.java3d.J3DGraphics2D g2d, org.jogamp.java3d.Node node) drawLabelbooleanReturns a List of all Angles below the present MSNode.Returns a List of all AngleTorsions below the present MSNode.Returns a List of all Atoms below the present MSNode.getAtomList(boolean originalOrder) getAtomList.Returns a List of all Bonds below the present MSNode.double[]getCenter(boolean w) getCenterReturns a List of the MSNode's Children (instead of using an Enumeration).doublegetExtentReturns the first active heavy atom in the list of atoms for the current structure.Returns a List of all ImproperTorsions below the present MSNode.Returns a List of all MSNodes below the present MSNode.getList<T extends TreeNode>
longgetMSCount(Class<T> c, long count) getMSCount<T extends TreeNode>
TgetMSNodedoublegetMW()getMWgetName()Returns the name of this MSNode.Returns a List of all Out-of-Plane Bends below the present MSNode.Returns a List of all Pi-Orbital Torsions below the present MSNode.Returns a List of all Stretch-Bends below the present MSNode.Returns a List of all StretchTorsions below the present MSNode.Returns a List of all Torsions below the present MSNode.Returns a List of all Torsion-Torsions below the present MSNode.doubleReturns the total mass of all atoms in the MolecularAssembly, calculating the mass if it has not already been done, defaulting to simple addition.Returns a List of all Urey-Bradleys below the present MSNode.inthashCode()booleanisSelectedvoidprint()Prints the MSNode's namevoidremoveChild(MSNode child) removeChild.voidsetColor(RendererCache.ColorModel colorModel, org.jogamp.vecmath.Color3f color, org.jogamp.java3d.Material mat) setColorvoidSets the name of this NodeObject to n.voidsetSelected(boolean b) Setter for the fieldselected.voidsetView(RendererCache.ViewModel viewModel, List<org.jogamp.java3d.BranchGroup> newShapes) setViewtoString()voidupdate()updateMethods 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
-
Field Details
-
selected
protected boolean selectedTrue if this node is selected.
-
-
Constructor Details
-
Method Details
-
contains
IfthisMSNode or any MSNode below itequalsthe argument, that MSNode is returned. -
destroy
public boolean destroy()destroy- Returns:
- a boolean.
-
drawLabel
public void drawLabel(org.jogamp.java3d.Canvas3D graphics, org.jogamp.java3d.J3DGraphics2D g2d, org.jogamp.java3d.Node node) drawLabel -
equals
MSNode equality := same class and same name. Consider replacing with a Comparator<MSNode> for cases where non-reference equality is desired.
-
getAngleList
Returns a List of all Angles below the present MSNode.- Returns:
- a
Listobject.
-
getAngleTorsionList
Returns a List of all AngleTorsions below the present MSNode.- Returns:
- a
Listobject.
-
getAtomList
Returns a List of all Atoms below the present MSNode.- Returns:
- a new
Listobject.
-
getFirstActiveHeavyAtom
Returns the first active heavy atom in the list of atoms for the current structure. Heavy atoms are defined as non-hydrogen atoms.- Returns:
- The first heavy atom found in the structure or null if no active heavy atom is present.
-
getAtomList
getAtomList.- Parameters:
originalOrder- a boolean.- Returns:
- a
Listobject.
-
getBondList
Returns a List of all Bonds below the present MSNode.- Returns:
- a
Listobject.
-
getCenter
public double[] getCenter(boolean w) getCenter -
getChildList
Returns a List of the MSNode's Children (instead of using an Enumeration).- Returns:
- a
Listobject.
-
getExtent
public double getExtent()getExtent- Returns:
- a double.
-
getImproperTorsionList
Returns a List of all ImproperTorsions below the present MSNode.- Returns:
- a
Listobject.
-
getList
Returns a List of all MSNodes below the present MSNode.- Returns:
- a
Listobject.
-
getList
getList -
getMSCount
getMSCount- Specified by:
getMSCountin interfaceROLS- Type Parameters:
T- Node Type to count.- Parameters:
c- aClassobject.count- a long.- Returns:
- a long.
-
getMSNode
getMSNode -
getMW
public double getMW()getMW -
getName
Returns the name of this MSNode.- Returns:
- a
Stringobject.
-
setName
Sets the name of this NodeObject to n.- Parameters:
n- aStringobject.
-
getOutOfPlaneBendList
Returns a List of all Out-of-Plane Bends below the present MSNode.- Returns:
- a
Listobject.
-
getPiOrbitalTorsionList
Returns a List of all Pi-Orbital Torsions below the present MSNode.- Returns:
- a
Listobject.
-
getStretchBendList
Returns a List of all Stretch-Bends below the present MSNode.- Returns:
- a
Listobject.
-
getStretchTorsionList
Returns a List of all StretchTorsions below the present MSNode.- Returns:
- a
Listobject.
-
getTorsionList
Returns a List of all Torsions below the present MSNode.- Returns:
- a
Listobject.
-
getTorsionTorsionList
Returns a List of all Torsion-Torsions below the present MSNode.- Returns:
- a
Listobject.
-
getTotalMass
public double getTotalMass()Returns the total mass of all atoms in the MolecularAssembly, calculating the mass if it has not already been done, defaulting to simple addition.- Returns:
- Total mass of atoms in system.
-
getUreyBradleyList
Returns a List of all Urey-Bradleys below the present MSNode.- Returns:
- a
Listobject.
-
hashCode
public int hashCode() -
isSelected
public boolean isSelected()isSelected- Returns:
- a boolean.
-
setSelected
public void setSelected(boolean b) Setter for the fieldselected.- Parameters:
b- a boolean.
-
print
public void print()Prints the MSNode's name -
removeChild
removeChild.- Parameters:
child- aMSNodeobject.
-
setColor
public void setColor(RendererCache.ColorModel colorModel, org.jogamp.vecmath.Color3f color, org.jogamp.java3d.Material mat) setColor- Specified by:
setColorin interfaceROLS- Parameters:
colorModel- aRendererCache.ColorModelobject.color- aColor3fobject.mat- aMaterialobject.
-
setView
public void setView(RendererCache.ViewModel viewModel, List<org.jogamp.java3d.BranchGroup> newShapes) setView- Specified by:
setViewin interfaceROLS- Parameters:
viewModel- aRendererCache.ViewModelobject.newShapes- aListobject.
-
toString
Overridden toString method returns the MSNode's name
- Overrides:
toStringin classDefaultMutableTreeNode
-
update
public void update()update
-