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
Fields inherited from class javax.swing.tree.DefaultMutableTreeNode
allowsChildren, children, EMPTY_ENUMERATION, parent, userObject
Fields inherited from interface ffx.potential.bonded.ROLS
MaxLengthScale
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionIfthis
MSNode or any MSNode below itequals
the argument, that MSNode is returned.boolean
destroy()
destroyvoid
drawLabel
(org.jogamp.java3d.Canvas3D graphics, org.jogamp.java3d.J3DGraphics2D g2d, org.jogamp.java3d.Node node) drawLabelboolean
Returns 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).double
getExtentReturns a List of all ImproperTorsions below the present MSNode.getList<T extends TreeNode>
longgetMSCount
(Class<T> c, long count) getMSCount<T extends TreeNode>
TgetMSNodedouble
getMW()
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.double
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 a List of all Urey-Bradleys below the present MSNode.int
hashCode()
boolean
isSelectedvoid
print()
Prints the MSNode's namevoid
removeChild
(MSNode child) removeChild.void
setColor
(RendererCache.ColorModel colorModel, org.jogamp.vecmath.Color3f color, org.jogamp.java3d.Material mat) setColorvoid
Sets the name of this NodeObject to n.void
setSelected
(boolean b) Setter for the fieldselected
.void
setView
(RendererCache.ViewModel viewModel, List<org.jogamp.java3d.BranchGroup> newShapes) setViewtoString()
void
update()
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
Ifthis
MSNode or any MSNode below itequals
the 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
List
object.
-
getAngleTorsionList
Returns a List of all AngleTorsions below the present MSNode.- Returns:
- a
List
object.
-
getAtomList
Returns a List of all Atoms below the present MSNode.- Returns:
- a new
List
object.
-
getAtomList
getAtomList.- Parameters:
originalOrder
- a boolean.- Returns:
- a
List
object.
-
getBondList
Returns a List of all Bonds below the present MSNode.- Returns:
- a
List
object.
-
getCenter
public double[] getCenter(boolean w) getCenter -
getChildList
Returns a List of the MSNode's Children (instead of using an Enumeration).- Returns:
- a
List
object.
-
getExtent
public double getExtent()getExtent- Returns:
- a double.
-
getImproperTorsionList
Returns a List of all ImproperTorsions below the present MSNode.- Returns:
- a
List
object.
-
getList
-
getList
getList -
getMSCount
getMSCount- Specified by:
getMSCount
in interfaceROLS
- Type Parameters:
T
- Node Type to count.- Parameters:
c
- aClass
object.count
- a long.- Returns:
- a long.
-
getMSNode
getMSNode -
getMW
public double getMW()getMW -
getName
Returns the name of this MSNode.- Returns:
- a
String
object.
-
setName
Sets the name of this NodeObject to n.- Parameters:
n
- aString
object.
-
getOutOfPlaneBendList
Returns a List of all Out-of-Plane Bends below the present MSNode.- Returns:
- a
List
object.
-
getPiOrbitalTorsionList
Returns a List of all Pi-Orbital Torsions below the present MSNode.- Returns:
- a
List
object.
-
getStretchBendList
Returns a List of all Stretch-Bends below the present MSNode.- Returns:
- a
List
object.
-
getStretchTorsionList
Returns a List of all StretchTorsions below the present MSNode.- Returns:
- a
List
object.
-
getTorsionList
Returns a List of all Torsions below the present MSNode.- Returns:
- a
List
object.
-
getTorsionTorsionList
Returns a List of all Torsion-Torsions below the present MSNode.- Returns:
- a
List
object.
-
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
List
object.
-
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
- aMSNode
object.
-
setColor
public void setColor(RendererCache.ColorModel colorModel, org.jogamp.vecmath.Color3f color, org.jogamp.java3d.Material mat) setColor- Specified by:
setColor
in interfaceROLS
- Parameters:
colorModel
- aRendererCache.ColorModel
object.color
- aColor3f
object.mat
- aMaterial
object.
-
setView
public void setView(RendererCache.ViewModel viewModel, List<org.jogamp.java3d.BranchGroup> newShapes) setView- Specified by:
setView
in interfaceROLS
- Parameters:
viewModel
- aRendererCache.ViewModel
object.newShapes
- aList
object.
-
toString
Overridden toString method returns the MSNode's name
- Overrides:
toString
in classDefaultMutableTreeNode
-
update
public void update()update
-