Class AlignRigidEasy

java.lang.Object
chemaxon.alignment.AlignRigidEasy
All Implemented Interfaces:
Licensable

@PublicApi public class AlignRigidEasy extends Object implements 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 invalid input: '<' 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()
      Description copied from interface: Licensable
      Checks if the required license is available for using this class or product.
      Specified by:
      isLicensed in interface Licensable
      Returns:
      true if this software component is correctly licensed
    • setLicenseEnvironment

      public void setLicenseEnvironment(String env)
      Description copied from interface: Licensable
      Sets the current license environment identifier. For internal use only!
      Specified by:
      setLicenseEnvironment in interface Licensable
      Parameters:
      env - license environment. It is string identifier of a certain integration environment.
    • 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.