Package chemaxon.marvin.space.monitor
Class DihedralControl
java.lang.Object
chemaxon.marvin.space.monitor.Control
chemaxon.marvin.space.monitor.DihedralControl
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.- Since:
- Marvin 4.0.2
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected int
protected int
protected int
protected int
-
Constructor Summary
ConstructorsConstructorDescriptionDihedralControl
(DihedralMonitor monitor) Creates a new instance of DihedralControl -
Method Summary
Modifier and TypeMethodDescriptionvoid
control
(int v) One part of the molecule being in one of the end of the torsion bond will be rotated around the bond.void
control
(int x, int y) Does nothing.void
flip()
Torsion will affect the other part of the component.byte[]
getColor()
Returns the color of the control.void
setAtoms
(int atomA, int atomB) Sets 2 atoms as the 2 end of the torsion bond.void
Sets the affecting component of the DihedralControl which has to be a MoleculeComponent.Methods inherited from class chemaxon.marvin.space.monitor.Control
getCenter, projectVector, setCenter
-
Field Details
-
atomA
protected int atomA -
atomB
protected int atomB -
center
protected int center -
bond
protected int bond
-
-
Constructor Details
-
DihedralControl
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.- Parameters:
atomA
- index of one of the atoms in the moleculeatomB
- index of the other atom in the molecule
-
flip
public void flip()Torsion will affect the other part of the component. -
setComponent
Sets the affecting component of the DihedralControl which has to be a MoleculeComponent.- Overrides:
setComponent
in classControl
-
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. -
control
public void control(int x, int y) Does nothing. -
getColor
public byte[] getColor()Returns the color of the control. It is yellow by default.
-