public class DihedralControl extends Control
DihedralControl
is rotation of a part of a molecule around a bond.Modifier and Type | Field and Description |
---|---|
protected int |
atomA |
protected int |
atomB |
protected int |
bond |
protected int |
center |
Constructor and Description |
---|
DihedralControl(DihedralMonitor monitor)
Creates a new instance of DihedralControl
|
Modifier and Type | Method and Description |
---|---|
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.
|
void |
control(int x,
int y)
Does nothing.
|
void |
finalize() |
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 |
setComponent(GraphicComponent gc)
Sets the affecting component of the DihedralControl which has to be a MoleculeComponent.
|
getCenter, projectVector, setCenter
protected int atomA
protected int atomB
protected int center
protected int bond
public DihedralControl(DihedralMonitor monitor)
public void setAtoms(int atomA, int atomB)
atomA
- index of one of the atoms in the moleculeatomB
- index of the other atom in the moleculepublic void flip()
public void setComponent(GraphicComponent gc)
setComponent
in class Control
public void control(int v)