chemaxon.marvin.space.monitor
Class DihedralControl

java.lang.Object
  extended by chemaxon.marvin.space.monitor.Control
      extended by chemaxon.marvin.space.monitor.DihedralControl

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.

Since:
Marvin 4.0.2
Version:
MarvinSpace 1.0
Author:
Judit Papp

Field Summary
protected  int atomA
           
protected  int atomB
           
protected  int bond
           
protected  int center
           
 
Fields inherited from class chemaxon.marvin.space.monitor.Control
ambient, component, DEFAULT_SIZE, diffuse, monitor, shininess, size, specular, x, y
 
Constructor Summary
DihedralControl(DihedralMonitor monitor)
          Creates a new instance of DihedralControl
 
Method Summary
 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.
 
Methods inherited from class chemaxon.marvin.space.monitor.Control
getCenter, projectVector, setCenter
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

atomA

protected int atomA

atomB

protected int atomB

center

protected int center

bond

protected int bond
Constructor Detail

DihedralControl

public DihedralControl(DihedralMonitor monitor)
Creates a new instance of DihedralControl

Method Detail

finalize

public void finalize()
Overrides:
finalize in class java.lang.Object

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 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.

Overrides:
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