chemaxon.marvin.alignment
Class AlignRigidEasy

java.lang.Object
  extended by chemaxon.marvin.alignment.AlignRigidEasy
All Implemented Interfaces:
chemaxon.license.Licensable

public class AlignRigidEasy
extends java.lang.Object
implements chemaxon.license.Licensable

Aligns pairs of molecules by translating and rotating one of them and leave the one called the reference molecule intact. Example usage

           AlignRigidEasy easy = new AlignRigidEasy();
           easy.setReference(m1);
           easy.setRotatable(m2);

           int[][] easyMap = new int[number of pairs][2];
           for (int i = 0; i < easyMap.length; i++) {
               easyMap[i][0] = atom index from m1;
               easyMap[i][1] = atom index from m2;
           }
           easy.align(easyMap);
           double rmsd = easy.rmsd();
 

Since:
Marvin 5.4.2
Author:
Adrian Kalaszi

Constructor Summary
AlignRigidEasy()
           
 
Method Summary
 void align()
          does a simple one-to-one atom mappin and aligns.
 void align(int[][] index)
          Rigid alignment on the user defined atom index
static double[] convert(double[][] c)
           
 Molecule getReferenceAndRotatedFused()
          before getRotatedMolecule the align() method must be called
 double[][] getRotatedCoordinates()
          before getRotatedCoordinates the align() method must be called
 Molecule getRotatedMolecule()
          before getRotatedMolecule the align() method must be called
 boolean isLicensed()
          Returns information about the licensing of the product.
 double rmsd()
          calculates the rmsd value
 void setLicenseEnvironment(java.lang.String env)
          Every license can have a modifier environment that's typically an integration environment.
 void setReference(double[][] c)
          sets the coordinates of the reference molecule directly If this used the getReferenceAndRotatedFused() cannot be applied
 void setReference(Molecule m)
          sets the reference molecule which remains intact
 void setRotatable(double[][] c)
          sets the coordinates of the rotatable molecule directly If this used the getReferenceAndRotatedFused() and getRotatedMolecule() cannot be applied
 void setRotatable(Molecule m)
          sets the molecule to translate and rotate during the alignment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlignRigidEasy

public AlignRigidEasy()
Method Detail

isLicensed

public boolean isLicensed()
Description copied from interface: chemaxon.license.Licensable
Returns information about the licensing of the product. Example implementation: return LicenseHandler.isLicensed( LicenseHandler.MY_IDENTIFIER, licenseEnvironment );

Specified by:
isLicensed in interface chemaxon.license.Licensable
Returns:
true if the product is correctly licensed

setLicenseEnvironment

public void setLicenseEnvironment(java.lang.String env)
Description copied from interface: chemaxon.license.Licensable
Every license can have a modifier environment that's typically an integration environment. All being Licensable should be prepared to store and show a set environment to the LicenseHandler. Example implementation:
 private String licenseEnvironment = "";
 public void setLicenseEnvironment(String env) {
     licenseEnvironment = env;
 }
 

Specified by:
setLicenseEnvironment in interface chemaxon.license.Licensable
Parameters:
env - environment String to be stored and passed to the LicenseHandler in the isLicensed method

setReference

public void setReference(Molecule m)
sets the reference molecule which remains intact

Parameters:
m -

setRotatable

public void setRotatable(Molecule m)
sets the molecule to translate and rotate during the alignment

Parameters:
m - molecule to translate and rotate

convert

public static double[] convert(double[][] c)

setReference

public void setReference(double[][] c)
sets the coordinates of the reference molecule directly If this used the getReferenceAndRotatedFused() cannot be applied

Parameters:
c - double[number of atoms][3:x,y,z] format

setRotatable

public void setRotatable(double[][] c)
sets the coordinates of the rotatable molecule directly If this used the getReferenceAndRotatedFused() and getRotatedMolecule() cannot be applied

Parameters:
c - double[number of atoms][3:x,y,z] format

getRotatedCoordinates

public double[][] getRotatedCoordinates()
before getRotatedCoordinates the align() method must be called

Returns:
the rotated coordinates in double[number of atoms][3:x,y,z] format

getRotatedMolecule

public Molecule getRotatedMolecule()
before getRotatedMolecule the align() method must be called

Returns:
the rotated molecule

getReferenceAndRotatedFused

public Molecule getReferenceAndRotatedFused()
before getRotatedMolecule the align() method must be called

Returns:
the rotated molecule

rmsd

public double rmsd()
calculates the rmsd value

Returns:
the rmsd value

align

public void align()
does a simple one-to-one atom mappin and aligns. The molecules must have the same atom count.

Throws:
chemaxon.license.LicenseException - if no valid LicenseHandler.ALIGNMENT license was found.

align

public void align(int[][] index)
Rigid alignment on the user defined atom index

Parameters:
index - in format int[number of pairs][reference atom index, atom to rotate index]
Throws:
chemaxon.license.LicenseException - if no valid LicenseHandler.ALIGNMENT license was found.