Class SimilarityGraphBasedReactionMapper
- java.lang.Object
-
- com.actelion.research.chem.reaction.mapping.SimilarityGraphBasedReactionMapper
-
public class SimilarityGraphBasedReactionMapper extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static boolean
DEBUG
-
Constructor Summary
Constructors Constructor Description SimilarityGraphBasedReactionMapper()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
copyMapNosToReaction(Reaction rxn, int[] reactantMapNo, int[] productMapNo, int graphMapNoCount)
Copies the generated mapping numbers from the merged reactant/product molecules into the original reaction.int
getAtomPairSequenceCount()
int
getGraphMapNoCount()
StereoMolecule
getProduct()
StereoMolecule
getReactant()
float
getScore()
Calculates and returns a score <= 0 for the current mapping.static boolean
hasNonCarbonNeighbour(StereoMolecule mol, int atom)
static boolean
hasNonCarbonNeighbour(StereoMolecule mol, int atom, int notThisAtom)
static boolean
hasOxo(StereoMolecule mol, int atom)
static boolean
hasOxo(StereoMolecule mol, int atom, int notThisAtom)
void
map(Reaction rxn)
Entirely maps the given reaction by setting all reactant's and product's mapping numbers.void
map(StereoMolecule reactant, StereoMolecule product, int[] reactantMapNo, int[] productMapNo)
Entirely maps the given reaction by setting all reactant's and product's mapping numbers.void
mergeReactantsAndProducts(Reaction rxn)
Copies all reactant/product molecules into one StereoMolecule for easier processing Use getReactant() and getProduct() from outside to access these.
-
-
-
Field Detail
-
DEBUG
public static final boolean DEBUG
- See Also:
- Constant Field Values
-
-
Method Detail
-
map
public void map(Reaction rxn)
Entirely maps the given reaction by setting all reactant's and product's mapping numbers. If the reaction already contains manually mapped atoms, then these are untouched and used as seed atoms when building the mapping graph.- Parameters:
rxn
- reaction with proper atom coordinates
-
map
public void map(StereoMolecule reactant, StereoMolecule product, int[] reactantMapNo, int[] productMapNo)
Entirely maps the given reaction by setting all reactant's and product's mapping numbers.- Parameters:
reactant
- all reactants merged into one molecule; may contain seed mappingproduct
- all products merged into one molecule; may contain seed mappingreactantMapNo
- array to receive the created mapping numbersproductMapNo
- array to receive the created mapping numbers
-
getGraphMapNoCount
public int getGraphMapNoCount()
- Returns:
- number of atoms that could be mapped by graph similarity matching (no reaction center mapping)
-
getAtomPairSequenceCount
public int getAtomPairSequenceCount()
- Returns:
- number of atom pair sequences tried in the course of the last mapping run
-
getScore
public float getScore()
Calculates and returns a score <= 0 for the current mapping. Higher value (closer to 0) are better. The score adds about -2 for every broken or added bond, and about -1 for every changed bond order. It also adds a penalty for every inverted stereo center.- Returns:
-
mergeReactantsAndProducts
public void mergeReactantsAndProducts(Reaction rxn)
Copies all reactant/product molecules into one StereoMolecule for easier processing Use getReactant() and getProduct() from outside to access these.- Parameters:
rxn
-
-
getReactant
public StereoMolecule getReactant()
-
getProduct
public StereoMolecule getProduct()
-
copyMapNosToReaction
public void copyMapNosToReaction(Reaction rxn, int[] reactantMapNo, int[] productMapNo, int graphMapNoCount)
Copies the generated mapping numbers from the merged reactant/product molecules into the original reaction.- Parameters:
rxn
-
-
hasOxo
public static boolean hasOxo(StereoMolecule mol, int atom)
-
hasOxo
public static boolean hasOxo(StereoMolecule mol, int atom, int notThisAtom)
-
hasNonCarbonNeighbour
public static boolean hasNonCarbonNeighbour(StereoMolecule mol, int atom)
-
hasNonCarbonNeighbour
public static boolean hasNonCarbonNeighbour(StereoMolecule mol, int atom, int notThisAtom)
-
-