Package org.openscience.cdk.tautomers
Class InChITautomerGenerator
- java.lang.Object
-
- org.openscience.cdk.tautomers.InChITautomerGenerator
-
public final class InChITautomerGenerator extends Object
Creates tautomers for a given input molecule, based on the mobile H atoms listed in the InChI. Algorithm described in [Thalheim, T. et. al.. J. Chem. Inf. Model.. 2010. 50].
Provide your input molecules in Kekule form, and make sure atom type are perceived.
When creating an input molecule by reading an MDL file, make sure to set implicit hydrogens. See the InChITautomerGeneratorTest test case.- Author:
- Mark Rijnbeek
- Source code:
- main
- Belongs to CDK module:
- tautomer
-
-
Field Summary
Fields Modifier and Type Field Description static int
KETO_ENOL
Generate InChI with -KET (keto-enol tautomers) option.static int
ONE_FIVE_SHIFT
Generate InChI with -15T (1,5-shift tautomers) option.
-
Constructor Summary
Constructors Constructor Description InChITautomerGenerator()
Create a tautomer generator, keto-enol (-KET) and 1,5-shifts (-15T) are disabled.InChITautomerGenerator(int flags)
Create a tautomer generator specifygin whether to enable, keto-enol (-KET) and 1,5-shifts (-15T).
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description List<IAtomContainer>
getTautomers(IAtomContainer mol)
Public method to get tautomers for an input molecule, based on the InChI which will be calculated by JNI-InChI.List<IAtomContainer>
getTautomers(IAtomContainer mol, String inchi)
Deprecated.usegetTautomers(IAtomContainer)
directly
-
-
-
Field Detail
-
KETO_ENOL
public static final int KETO_ENOL
Generate InChI with -KET (keto-enol tautomers) option.- See Also:
- Constant Field Values
-
ONE_FIVE_SHIFT
public static final int ONE_FIVE_SHIFT
Generate InChI with -15T (1,5-shift tautomers) option.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
InChITautomerGenerator
public InChITautomerGenerator(int flags)
Create a tautomer generator specifygin whether to enable, keto-enol (-KET) and 1,5-shifts (-15T).// enabled -KET option InChITautomerGenerator tautgen = new InChITautomerGenerator(InChITautomerGenerator.KETO_ENOL); // enabled both -KET and -15T InChITautomerGenerator tautgen = new InChITautomerGenerator(InChITautomerGenerator.KETO_ENOL | InChITautomerGenerator.ONE_FIVE_SHIFT);
- Parameters:
flags
- the options
-
InChITautomerGenerator
public InChITautomerGenerator()
Create a tautomer generator, keto-enol (-KET) and 1,5-shifts (-15T) are disabled.
-
-
Method Detail
-
getTautomers
public List<IAtomContainer> getTautomers(IAtomContainer mol) throws CDKException, CloneNotSupportedException
Public method to get tautomers for an input molecule, based on the InChI which will be calculated by JNI-InChI.- Parameters:
mol
- molecule for which to generate tautomers- Returns:
- a list of tautomers, if any
- Throws:
CDKException
CloneNotSupportedException
-
getTautomers
@Deprecated public List<IAtomContainer> getTautomers(IAtomContainer mol, String inchi) throws CDKException, CloneNotSupportedException
Deprecated.usegetTautomers(IAtomContainer)
directlyThis method is slower than recalculating the InChI withgetTautomers(IAtomContainer)
as the mapping between the two can be found more efficiently.- Parameters:
mol
-inchi
-- Returns:
- Throws:
CDKException
CloneNotSupportedException
-
-