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

    • AlignRigidEasy

      public AlignRigidEasy()
  • Method Details

    • isLicensed

      public boolean isLicensed()
      Specified by:
      isLicensed in interface chemaxon.license.Licensable
    • setLicenseEnvironment

      public void setLicenseEnvironment(String env)
      Specified by:
      setLicenseEnvironment in interface chemaxon.license.Licensable
    • setReference

      public void setReference(Molecule m)
      sets the reference molecule which remains intact
    • 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:
      LicenseException - if no valid LicenseGlobals.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 valid LicenseGlobals.ALIGNMENT license was found.