Class Bond

    • Field Detail

      • bondType

        public BondType bondType
        The force field BondType for this bond.
    • Constructor Detail

      • Bond

        public Bond​(String n)
        Simple Bond constructor that is intended to be used with the equals method.
        Parameters:
        n - Bond id
      • Bond

        public Bond​(Atom a1,
                    Atom a2)
        Bond constructor.
        Parameters:
        a1 - Atom number 1.
        a2 - Atom number 2.
    • Method Detail

      • logNoBondType

        public static void logNoBondType​(Atom a1,
                                         Atom a2,
                                         ForceField forceField)
        Log that no BondType exists.
        Parameters:
        a1 - Atom 1.
        a2 - Atom 2.
        forceField - The force field in use.
      • get1_2

        public Atom get1_2​(Atom a)
        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 a is 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.
      • setBondType

        public void setBondType​(BondType bondType)
        Set a reference to the force field parameters.
        Parameters:
        bondType - a BondType object.
      • getBondType

        public BondType getBondType()
        Return the BondType for this Bond.
        Returns:
        Returns the BondType.
      • setColor

        public void setColor​(Atom a)
        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 field rigidScale.
        Parameters:
        rigidScale - a double.
      • setWire

        public void setWire​(org.jogamp.java3d.LineArray l,
                            int i)
        setWire
        Parameters:
        l - a LineArray object.
        i - a int.
      • update

        public void update()
        update

        Update recomputes the bonds length, Wireframe vertices, and Cylinder Transforms

        Specified by:
        update in interface BondedEnergy
        Specified by:
        update in interface ROLS
        Overrides:
        update in class MSNode