com.im.df.api 5.8

com.im.df.api.chem
Class ChemUtils

java.lang.Object
  extended by com.im.df.api.chem.ChemUtils

public class ChemUtils
extends Object

Utilities related to chemical classes. Currently support to search of the core when molecule search is executed. UI can color the molecule core using different color.


Nested Class Summary
static class ChemUtils.MolCoreDescriptor
           
 
Constructor Summary
ChemUtils()
           
 
Method Summary
static String convertToSmartsRepresentation(Molecule m)
          Generates the simplest smarts representation of the molecule.
static String convertToSmilesRepresentation(Molecule m)
          Generates the simplest smiles representation of the molecule.
static String convertToStringRepresentation(Molecule m)
          Generates the simplest smiles representation of the molecule.
static JChemSearchOptions createJChemSearchOptions(DFOperator op, JChemEntityCapability jchemCapability)
          Temporary method for creating JChemSearchOptions instances for the specific operator and setting some default values
static ChemUtils.MolCoreDescriptor findMolCoreDescriptor(DFTermExpression expression, DFField field)
           
static int genSearchType(DFOperator op)
          Temporary method finding appropriate JChemSearch search type constant for the given operator.
static Molecule getLastQueryEditedStructure()
           
static Molecule getMoleculeForQuery(Molecule previousMol)
           
static void setLastQueryEditedStructure(Molecule mol)
           
static void updateJChemSearchOptions(JChemSearchOptions jchemOpts, DFOperator op, JChemEntityCapability jchemCapability)
          Temporary method for creating JChemSearchOptions instances for the specific operator and setting some default values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChemUtils

public ChemUtils()
Method Detail

setLastQueryEditedStructure

public static void setLastQueryEditedStructure(Molecule mol)

getLastQueryEditedStructure

public static Molecule getLastQueryEditedStructure()

getMoleculeForQuery

public static Molecule getMoleculeForQuery(Molecule previousMol)

findMolCoreDescriptor

public static ChemUtils.MolCoreDescriptor findMolCoreDescriptor(DFTermExpression expression,
                                                                DFField field)

genSearchType

public static int genSearchType(DFOperator op)
Temporary method finding appropriate JChemSearch search type constant for the given operator.

Parameters:
op - Operator must be a structure operator
Returns:
The one of JChemSearch search type constant

createJChemSearchOptions

public static JChemSearchOptions createJChemSearchOptions(DFOperator op,
                                                          JChemEntityCapability jchemCapability)
Temporary method for creating JChemSearchOptions instances for the specific operator and setting some default values

Parameters:
op - The operator is filled inside JChemSearchOptions (this property must be set first and can't be changed)
jchemCapability - The JChem capability which determines some of the default settings
Returns:
The new JChemSearchOptions instance

updateJChemSearchOptions

public static void updateJChemSearchOptions(JChemSearchOptions jchemOpts,
                                            DFOperator op,
                                            JChemEntityCapability jchemCapability)
Temporary method for creating JChemSearchOptions instances for the specific operator and setting some default values

Parameters:
op - The operator is filled inside JChemSearchOptions (this property must be set first and can't be changed)
jchemCapability - The JChem capability which determines some of the default settings

convertToSmilesRepresentation

public static String convertToSmilesRepresentation(Molecule m)
Generates the simplest smiles representation of the molecule. It tries in this order: Daylight smiles, Chemaxon Extended smiles, Daylight smarts, Chemaxon Extended smarts.

Parameters:
m - The molecule
Returns:
The first smiles variant that is supported
Throws:
IllegalArgumentException - If none of the smiles variants are supported. Your code should expect this to happen on occasion.

convertToSmartsRepresentation

public static String convertToSmartsRepresentation(Molecule m)
Generates the simplest smarts representation of the molecule. It tries in this order: Daylight smarts, Chemaxon Extended smarts.

Parameters:
m - The molecule
Returns:
The first smarts variant that is supported
Throws:
IllegalArgumentException - If none of the smiles variants are supported. Your code should expect this to happen on occasion.

convertToStringRepresentation

public static String convertToStringRepresentation(Molecule m)
Generates the simplest smiles representation of the molecule. It tries in this order: Daylight smiles, Chemaxon Extended smiles, Daylight smarts, Chemaxon Extended smarts.

Parameters:
m - The molecule
Returns:
The first smiles variant that is supported
Throws:
IllegalArgumentException - If none of the smiles variants are supported. Your code should expect this to happen on occasion.

com.im.df.api 5.8