Class DihedralControl


@PublicAPI public class DihedralControl extends Control
This control is to change a dihedral angle that is torsion a GraphicComponent. Dihedral of 4 components is the angle between the 2 planes determinde by the first 3 and the second 3 components. Measuring dihedral has only sense if the 4 elements are 4 atoms of a molecule. In this sense DihedralControl is rotation of a part of a molecule around a bond.
Marvin 4.0.2
  • Field Details

    • atomA

      protected int atomA
    • atomB

      protected int atomB
    • center

      protected int center
    • bond

      protected int bond
  • Constructor Details

    • DihedralControl

      public DihedralControl(DihedralMonitor monitor)
      Creates a new instance of DihedralControl
  • Method Details

    • setAtoms

      public void setAtoms(int atomA, int atomB)
      Sets 2 atoms as the 2 end of the torsion bond.
      atomA - index of one of the atoms in the molecule
      atomB - index of the other atom in the molecule
    • flip

      public void flip()
      Torsion will affect the other part of the component.
    • setComponent

      public void setComponent(GraphicComponent gc)
      Sets the affecting component of the DihedralControl which has to be a MoleculeComponent.
      setComponent in class Control
    • control

      public void control(int v)
      One part of the molecule being in one of the end of the torsion bond will be rotated around the bond.
      Specified by:
      control in class Control
    • control

      public void control(int x, int y)
      Does nothing.
      Specified by:
      control in class Control
    • getColor

      public byte[] getColor()
      Returns the color of the control. It is yellow by default.
      Specified by:
      getColor in class Control