chemaxon.marvin.alignment
Class DihedralRotator

java.lang.Object
  extended by chemaxon.marvin.alignment.DihedralRotator

public class DihedralRotator
extends Object

Rotates a dihedral in a 3D molecule

Author:
Adrian Kalaszi

Constructor Summary
DihedralRotator(Molecule m)
          creates a rotator object
 
Method Summary
 Molecule rotateBy(double angle, int a1, int a2, int a3, int a4)
          Rotates the selected dihedral by the defined angle
 Molecule rotateTo(double angle, int a1, int a2, int a3, int a4)
          Sets the dihedral defined by the atoms a1-a4 to the angle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DihedralRotator

public DihedralRotator(Molecule m)
creates a rotator object

Parameters:
m - for this molecule
Method Detail

rotateTo

public Molecule rotateTo(double angle,
                         int a1,
                         int a2,
                         int a3,
                         int a4)
Sets the dihedral defined by the atoms a1-a4 to the angle

Parameters:
angle - in radian
a1 - atom index in the molecule starting from 0
a2 - atom index in the molecule starting from 0
a3 - atom index in the molecule starting from 0
a4 - atom index in the molecule starting from 0
Returns:
the molecule having the requested dihedral setted.

rotateBy

public Molecule rotateBy(double angle,
                         int a1,
                         int a2,
                         int a3,
                         int a4)
Rotates the selected dihedral by the defined angle

Parameters:
angle - in radian
a1 - atom index in the molecule starting from 0
a2 - atom index in the molecule starting from 0
a3 - atom index in the molecule starting from 0
a4 - atom index in the molecule starting from 0
Returns:
the molecule having the requested dihedral setted.