Package ffx.potential.bonded
Class Bond
java.lang.Object
javax.swing.tree.DefaultMutableTreeNode
ffx.potential.bonded.MSNode
ffx.potential.bonded.BondedTerm
ffx.potential.bonded.Bond
- All Implemented Interfaces:
BondedEnergy,ROLS,Serializable,Cloneable,Comparable<BondedTerm>,MutableTreeNode,TreeNode
The Bond class represents a covalent bond formed between two atoms.
- Since:
- 1.0
- Author:
- Michael J. Schnieders
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class ffx.potential.bonded.BondedTerm
BondedTerm.BondedComparator -
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 TypeMethodDescriptionintdoubleenergy(boolean gradient, int threadID, AtomicDoubleArray3D grad, AtomicDoubleArray3D lambdaGrad) energy.Find the other Atom in this Bond.Return the BondType for this Bond.doubleGets the current distance between the two Atoms in this Bond.voidlog()Log details for this Bond energy term.static voidlogNoBondType(Atom a1, Atom a2, ForceField forceField) Log that no BondType exists.voidvoidsetBondType(BondType bondType) Set a reference to the force field parameters.voidSet the color of this Bond's Java3D shapes based on the passed Atom.voidsetRigidScale(double rigidScale) Setter for the fieldrigidScale.voidsetView(RendererCache.ViewModel newViewModel, List<org.jogamp.java3d.BranchGroup> newShapes) setViewvoidsetWire(org.jogamp.java3d.LineArray l, int i) setWirevoidupdate()updateMethods inherited from class ffx.potential.bonded.BondedTerm
applyLambda, containsHydrogen, containsResolution, destroy, equals, getAtom, getAtomArray, getAtomArray, getAtoms, getBond, getID, getUse, getValue, hashCode, isConstrained, isLambdaScaled, isNeuralNetwork, print, removeNeuralNetworkTerms, setAtoms, setBonds, setColor, setConstraint, setID, setID_Key, setSelected, setValue, toStringMethods inherited from class ffx.potential.bonded.MSNode
contains, drawLabel, getAngleList, getAngleTorsionList, getAtomList, getAtomList, getBondList, getCenter, getChildList, getExtent, getImproperTorsionList, getList, getList, getMSCount, getMSNode, getMW, getName, getOutOfPlaneBendList, getPiOrbitalTorsionList, getStretchBendList, getStretchTorsionList, getTorsionList, getTorsionTorsionList, getTotalMass, getUreyBradleyList, isSelected, removeChild, setNameMethods 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, setAllowsChildren, setParent, setUserObjectMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ffx.potential.bonded.BondedEnergy
energy, energy
-
Field Details
-
bondType
The force field BondType for this bond.
-
-
Constructor Details
-
Bond
Simple Bond constructor that is intended to be used with theequalsmethod.- Parameters:
n- Bond id
-
Bond
Bond constructor.- Parameters:
a1- Atom number 1.a2- Atom number 2.
-
-
Method Details
-
logNoBondType
Log that no BondType exists.- Parameters:
a1- Atom 1.a2- Atom 2.forceField- The force field in use.
-
compareTo
- Specified by:
compareToin interfaceComparable<BondedTerm>- Overrides:
compareToin classBondedTerm
-
energy
public double energy(boolean gradient, int threadID, AtomicDoubleArray3D grad, AtomicDoubleArray3D lambdaGrad) energy.Evaluate this Bond energy.
- Parameters:
gradient- If true, compute the gradient.threadID- The thread ID.grad- aAtomicDoubleArray3Dobject.lambdaGrad- aAtomicDoubleArray3Dobject.- Returns:
- a double.
-
get1_2
Find the other Atom in this Bond. These two atoms are said to be 1-2.- Parameters:
a- The known Atom.- Returns:
- The other Atom that makes up this Bond, or Null if Atom
ais not part of this Bond.
-
getCurrentDistance
public double getCurrentDistance()Gets the current distance between the two Atoms in this Bond.- Returns:
- Current distance.
-
log
public void log()Log details for this Bond energy term. -
removeFromParent
public void removeFromParent()- Specified by:
removeFromParentin interfaceMutableTreeNode- Overrides:
removeFromParentin classDefaultMutableTreeNode
-
setBondType
Set a reference to the force field parameters.- Parameters:
bondType- aBondTypeobject.
-
getBondType
Return the BondType for this Bond.- Returns:
- Returns the BondType.
-
setColor
Set the color of this Bond's Java3D shapes based on the passed Atom.- Parameters:
a- Atom
-
setRigidScale
public void setRigidScale(double rigidScale) Setter for the fieldrigidScale.- Parameters:
rigidScale- a double.
-
setView
public void setView(RendererCache.ViewModel newViewModel, List<org.jogamp.java3d.BranchGroup> newShapes) setViewPolymorphic setView method.
- Specified by:
setViewin interfaceROLS- Overrides:
setViewin classBondedTerm- Parameters:
newViewModel- aRendererCache.ViewModelobject.newShapes- aListobject.
-
setWire
public void setWire(org.jogamp.java3d.LineArray l, int i) setWire- Parameters:
l- aLineArrayobject.i- The index of the LineArray to use.
-
update
public void update()updateUpdate recomputes bonds length, Wireframe vertices, and Cylinder Transforms
-