Package chemaxon.marvin.alignment
Class AlignRigidEasy
java.lang.Object
chemaxon.marvin.alignment.AlignRigidEasy
- All Implemented Interfaces:
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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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) before getRotatedMolecule thealign()
method must be calleddouble[][]
before getRotatedCoordinates thealign()
method must be calledbefore getRotatedMolecule thealign()
method must be calledboolean
double
rmsd()
calculates the rmsd valuevoid
void
setReference
(double[][] c) sets the coordinates of the reference molecule directly If this used thegetReferenceAndRotatedFused()
cannot be appliedvoid
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
sets the molecule to translate and rotate during the alignment
-
Constructor Details
-
AlignRigidEasy
public AlignRigidEasy()
-
-
Method Details
-
isLicensed
public boolean isLicensed()- Specified by:
isLicensed
in interfacechemaxon.license.Licensable
-
setLicenseEnvironment
- Specified by:
setLicenseEnvironment
in interfacechemaxon.license.Licensable
-
setReference
sets the reference molecule which remains intact -
setRotatable
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
before getRotatedMolecule thealign()
method must be called- Returns:
- the rotated 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:
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:
LicenseException
- if no validLicenseGlobals.ALIGNMENT
license was found.
-