Package chemaxon.marvin.alignment
Class AlignRigidEasy
- java.lang.Object
-
- chemaxon.marvin.alignment.AlignRigidEasy
-
- All Implemented Interfaces:
chemaxon.license.Licensable
@PublicAPI public class AlignRigidEasy extends 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 usageAlignRigidEasy 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
-
-
Constructor Summary
Constructors Constructor Description AlignRigidEasy()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
align()
does a simple one-to-one atom mappin and aligns.void
align(int[][] index)
Rigid alignment on the user defined atom indexstatic double[]
convert(double[][] c)
Molecule
getReferenceAndRotatedFused()
before getRotatedMolecule thealign()
method must be calleddouble[][]
getRotatedCoordinates()
before getRotatedCoordinates thealign()
method must be calledMolecule
getRotatedMolecule()
before getRotatedMolecule thealign()
method must be calledboolean
isLicensed()
double
rmsd()
calculates the rmsd valuevoid
setLicenseEnvironment(String env)
void
setReference(double[][] c)
sets the coordinates of the reference molecule directly If this used thegetReferenceAndRotatedFused()
cannot be appliedvoid
setReference(Molecule m)
sets the reference molecule which remains intactvoid
setRotatable(double[][] c)
sets the coordinates of the rotatable molecule directly If this used thegetReferenceAndRotatedFused()
andgetRotatedMolecule()
cannot be appliedvoid
setRotatable(Molecule m)
sets the molecule to translate and rotate during the alignment
-
-
-
Method Detail
-
isLicensed
public boolean isLicensed()
- Specified by:
isLicensed
in interfacechemaxon.license.Licensable
-
setLicenseEnvironment
public void setLicenseEnvironment(String env)
- Specified by:
setLicenseEnvironment
in interfacechemaxon.license.Licensable
-
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 thegetReferenceAndRotatedFused()
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 thegetReferenceAndRotatedFused()
andgetRotatedMolecule()
cannot be applied- Parameters:
c
- double[number of atoms][3:x,y,z] format
-
getRotatedCoordinates
public double[][] getRotatedCoordinates()
before getRotatedCoordinates thealign()
method must be called- Returns:
- the rotated coordinates in double[number of atoms][3:x,y,z] format
-
getRotatedMolecule
public Molecule getRotatedMolecule()
before getRotatedMolecule thealign()
method must be called- Returns:
- the rotated molecule
-
getReferenceAndRotatedFused
public Molecule getReferenceAndRotatedFused()
before getRotatedMolecule thealign()
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 validLicenseGlobals.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 validLicenseGlobals.ALIGNMENT
license was found.
-
-