Class Cleaner

java.lang.Object
chemaxon.calculations.clean.Cleaner

@PublicApi public class Cleaner extends Object
Class to clean MoleculeGraphs, Molecules, SelectionMolecules and Sgroups.
  • Constructor Details

    • Cleaner

      public Cleaner()
  • Method Details

    • clean

      public static boolean clean(MoleculeGraph mg, int dim, String opts, MProgressMonitor pmon)
      Calculates atom coordinates. In a 3D it works only for Molecules (not for MoleculeGraphs).
      Parameters:
      mg - MoleculeGraph to clean.
      dim - dimensions
      opts - cleaning options
      pmon - progress monitor or null
      Returns:
      true for success, false if an error occurred (for example 3D case for MoleculeGraphs).
      Since:
      Marvin 5.7, 07/22/2011
    • clean

      public static boolean clean(MoleculeGraph mg, int dim, String opts)
      Calculates atom coordinates. In a 3D it works only for Molecules (not for MoleculeGraphs).
      Parameters:
      mg - MoleculeGraph to clean.
      dim - dimensions
      opts - cleaning options
      Returns:
      true for success, false if an error occurred (for example 3D case for MoleculeGraphs).
      Since:
      Marvin 5.7, 07/22/2011
    • clean

      public static boolean clean(MoleculeGraph mg, int dim)
      Calculates atom coordinates. In a 3D it works only for Molecules (not for MoleculeGraphs). Simple function to clean molecule if we don't want to give option for the clean.
      Parameters:
      mg - MoleculeGraph to clean.
      dim - dimensions
      Returns:
      true for success, false if an error occurred (for example 3D case for MoleculeGraphs).
      Since:
      Marvin 6.1, 05/27/2013
      See Also:
    • partialClean

      public static boolean partialClean(MoleculeGraph mg, MoleculeGraph template, int[] map, String opts)
      Calculates atom coordinates by using the given template molecule. Works only in 2D. Set the x and y coordinates of the molecule from the given template using the given mapping. Partially clean the rest atoms. Map length should be equal the atomcount of the template. If the template has no wedges, try to keep the wedges of the original molecule. Otherwise try to keep the template wedge settings.
      Parameters:
      mg - MoleculeGraph to clean.
      template - template molecule (substructure of the target)
      map - hit list which describes the atom mapping (the size equals to the number of atoms in the template, contains target atom indexes or -1 to exclude)
      opts - cleaning options
      Returns:
      true for success, false if an error occurred
      Since:
      Marvin 5.7, 07/19/2011
    • partialClean

      public static boolean partialClean(MoleculeGraph mg, MoleculeGraph template, int[] map, String opts, AtomChangeEventListener l)
    • partialClean

      public static boolean partialClean(MoleculeGraph mg, int dim, int[] fixed, String opts)
      Calculates atom coordinates by using fixed atoms. Works only in 2D. For stereoisomers, the expected parity information should be stored in the atomflags and the CIS/TRANS information in the bondflags.
      Parameters:
      mg - MoleculeGraph to clean.
      dim - dimensions
      fixed - fixed atom indexes, which are already cleaned
      opts - cleaning options
      Returns:
      true for success, false if an error occurred
      Since:
      Marvin 5.7, 07/22/2011
    • partialCleanWithStereo

      public static boolean partialCleanWithStereo(MoleculeGraph mg, int dim, int[] fixed, String opts)
      Calculates atom coordinates by using fixed atoms. The arrangement is based on the parity and CIS/TRANS information of the original molecule if it was 2D or 3D. Otherwise this information will be read from the atomflags and bondflags (see partialClean(MoleculeGraph, int, int[], String)
      Parameters:
      mg - MoleculeGraph to clean.
      dim - dimensions
      fixed - fixed atom indexes, which are already cleaned
      opts - cleaning options
      Returns:
      true for success, false if an error occurred
      Since:
      Marvin 6.0, Mar 22, 2013
    • partialClean

      public static boolean partialClean(Molecule m, Molecule[] template, String opts)
      Calculates atom coordinates by using the given template molecule array. Works only in 2D. Set the x and y coordinates for the substructure of this molecule which first match a molecule from template molecule array. Partially clean the rest atoms. Remark, that only the first matching template molecule is used despite any later match in the template molecules. If the template has no wedges, try to keep the wedges of the original molecule. Otherwise try to keep the template wedge settings.
      Parameters:
      m - Molecule to clean.
      template - template molecule array (substructure of the target)
      opts - cleaning options
      Returns:
      true for success, false if no template match found or an error occurred
      Since:
      Marvin 5.7, 07/19/2011
    • partialClean

      public static boolean partialClean(Molecule m, Molecule[] template, String opts, AtomChangeEventListener l)
      A specific overloading for partial clean. Events on applying template related changes to atoms are fired for the passed listener.
      Parameters:
      l - listener to be fired on changes