chemaxon.calculations.clean
Class Cleaner

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

public class Cleaner
extends java.lang.Object

Class to clean MoleculeGraphs, Molecules, SelectionMolecules and Sgroups.

Author:
Janos Kendi

Constructor Summary
Cleaner()
           
 
Method Summary
static boolean clean(MoleculeGraph mg, int dim, java.lang.String opts)
          Calculates atom coordinates.
static boolean clean(MoleculeGraph mg, int dim, java.lang.String opts, chemaxon.common.util.MProgressMonitor pmon)
          Calculates atom coordinates.
static boolean partialClean(MoleculeGraph mg, int dim, int[] fixed, java.lang.String opts)
          Calculates atom coordinates by using fixed atoms.
static boolean partialClean(MoleculeGraph mg, MoleculeGraph template, int[] map, java.lang.String opts)
          Calculates atom coordinates by using the given template molecule.
static boolean partialClean(Molecule m, Molecule[] template, java.lang.String opts)
          Calculates atom coordinates by using the given template molecule array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Cleaner

public Cleaner()
Method Detail

clean

public static boolean clean(MoleculeGraph mg,
                            int dim,
                            java.lang.String opts,
                            chemaxon.common.util.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 occured (for example 3D case for MoleculeGraphs).
Since:
Marvin 5.7, 07/22/2011

clean

public static boolean clean(MoleculeGraph mg,
                            int dim,
                            java.lang.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 occured (for example 3D case for MoleculeGraphs).
Since:
Marvin 5.7, 07/22/2011

partialClean

public static boolean partialClean(MoleculeGraph mg,
                                   MoleculeGraph template,
                                   int[] map,
                                   java.lang.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 occured
Since:
Marvin 5.7, 07/19/2011

partialClean

public static boolean partialClean(MoleculeGraph mg,
                                   int dim,
                                   int[] fixed,
                                   java.lang.String opts)
Calculates atom coordinates by using fixed atoms. Internal use only. Works only in 2D. Store the needed stereo information in the atomflags!

Parameters:
mg - MoleculeGraph to clean.
dim - dimensions
fixed - atom indexes to be fixed
opts - cleaning options
Returns:
true for success, false if an error occured
Since:
Marvin 5.7, 07/22/2011

partialClean

public static boolean partialClean(Molecule m,
                                   Molecule[] template,
                                   java.lang.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 occured
Since:
Marvin 5.7, 07/19/2011