|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.reaction.Reaction
public class Reaction
Stores reaction data. The reaction data consists of:
| Field Summary | |
|---|---|
static int |
ALL_SIDE
Deprecated. Reactant and product sides of the reaction molecule |
protected int |
bcount
Deprecated. Number of changed bonds. |
static int |
DATA_ALL
Deprecated. Required data: all. |
static int |
DATA_ATOMS
Deprecated. Required data: atom data. |
static int |
DATA_BONDS
Deprecated. Required data: bond data. |
static int |
DATA_DOUBLE_BOND_STEREO
Deprecated. Required data: double bond stereo. |
static int |
DATA_PARITY
Deprecated. Required data: parity. |
protected int[] |
emaps
Deprecated. End map numbers: bond atom2. |
protected static int |
LEN
Deprecated. Default array length. |
protected int[] |
map2map
Deprecated. Identical maps. |
protected int[] |
map2pindex
Deprecated. Map number -> product index array. |
protected int[] |
map2rindex
Deprecated. Map number -> reactant index array. |
protected int[] |
map2stereo
Deprecated. Map -> reaction stereo info array. |
protected static int |
MAXMAPS
Deprecated. Maximal number of map values. |
protected java.util.ArrayList<MolAtom> |
patomprops
Deprecated. Atom objects for storing product atom properties. |
protected int[] |
pbondtypes
Deprecated. Product bond types. |
protected java.util.ArrayList<int[]> |
pcistrans
Deprecated. Stores double bond stereo info (product-side). |
protected int[] |
pindex2map
Deprecated. Product index -> map number array. |
protected java.util.ArrayList<int[]> |
pparities
Deprecated. Stores parity info (product-side). |
static int |
PRODUCT_SIDE
Deprecated. Product side of the reaction molecule |
protected static int |
PROP_CHARGE
Deprecated. Constant: charge atom property. |
protected static int |
PROP_HCOUNT
Deprecated. Constant: hydrogen count atom property. |
protected static int |
PROP_MASSNO
Deprecated. Constant: mass number atom property. |
protected static int |
PROP_RADICAL
Deprecated. Constant: radical atom property. |
protected static int |
PROP_STGRP
Deprecated. Constant: enhanced stereo atom property. |
protected static int |
PROP_VALENCE
Deprecated. Constant: valence atom property. |
protected java.util.ArrayList<java.lang.Integer> |
proptypes
Deprecated. Property types corresponding to 'ratomprops', 'patomprops'. |
protected java.util.ArrayList<MolAtom> |
ratomprops
Deprecated. Atom objects for storing reactant atom properties. |
protected int[] |
rbondtypes
Deprecated. Reactant bond types. |
protected java.util.ArrayList<int[]> |
rcistrans
Deprecated. Stores double bond stereo info (reactant-side). |
static int |
REACTANT_SIDE
Deprecated. Reactant side of the reaction molecule |
protected int[] |
rindex2map
Deprecated. Reactant index -> map number array. |
protected ChemJEP |
rjep
Deprecated. The JEP object that evaluates the reactivity (acceptance) rule. |
protected java.util.ArrayList<int[]> |
rparities
Deprecated. Stores parity info (reactant-side). |
protected RxnMolecule |
rxn
Deprecated. The reaction molecule. |
protected ChemJEP |
sjep
Deprecated. The JEP object that evaluates the selectivity (measure) rule. |
protected int[] |
smaps
Deprecated. Start map numbers: bond atom1. |
protected double[] |
tolerances
Deprecated. The tolerance value corresponding to the selectivity rule. |
| Constructor Summary | |
|---|---|
Reaction()
Deprecated. Default constructor. |
|
Reaction(Molecule reaction)
Deprecated. Constructor. |
|
Reaction(java.lang.String id)
Deprecated. Constructor. |
|
| Method Summary | |
|---|---|
protected int |
getBaseMap(int map)
Deprecated. Returns the base map corresponding to the given map. |
int[] |
getChangingAtoms(boolean all,
int side)
Deprecated. Returns the indexes of changing atoms. |
int[][] |
getChangingBondData(boolean all)
Deprecated. Returns changing bond data. |
protected java.lang.String |
getFID()
Deprecated. Not used. Returns null. |
java.lang.String |
getID()
Deprecated. Returns the reaction ID. |
protected Molecule |
getProduct(int i)
Deprecated. Returns the i-th product. |
protected MolAtom |
getProductAtom(int i)
Deprecated. Returns the i-th atom existing only on the product side. |
protected int |
getProductAtomCount()
Deprecated. Returns the number of atoms existing only on the product side. |
protected int |
getProductCount()
Deprecated. Returns the number of products. |
protected Molecule[] |
getProducts()
Deprecated. Returns the reaction products. |
Molecule |
getReactant(int i)
Deprecated. Returns the i-th reactant. |
protected MolAtom |
getReactantAtom(int i)
Deprecated. Returns the i-th atom existing only on the reactant side. |
protected int |
getReactantAtomCount()
Deprecated. Returns the number of atoms existing only on the reactant side. |
int |
getReactantCount()
Deprecated. Returns the number of reactants. |
protected Molecule[] |
getReactants()
Deprecated. Returns the reaction reactants. |
RxnMolecule |
getReaction()
Deprecated. Returns the reaction as RxnMolecule. |
static java.lang.String |
getReactivity(java.lang.String reactivity,
java.lang.String exclude)
Deprecated. Returns reactivity combined with exclude condition. |
static double[] |
getTolerances(java.lang.String tolerances)
Deprecated. Returns double[] created from ";" separated list of
real numbers. |
void |
setFID(java.lang.String fid)
Deprecated. Not used. |
void |
setID(java.lang.String id)
Deprecated. Sets the reaction ID. |
void |
setReaction(Molecule mol)
Deprecated. Sets the reaction molecule representing the reaction equation. |
void |
setReaction(Molecule mol,
boolean fuse)
Deprecated. Sets the reaction molecule representing the reaction equation. |
void |
setReaction(Molecule mol,
boolean fuse,
boolean skipMappingCheck)
Deprecated. Sets the reaction molecule representing the reaction equation. |
void |
setReaction(Molecule mol,
boolean fuse,
boolean skipMappingCheck,
boolean visualOrder)
Deprecated. Sets the reaction molecule representing the reaction equation. |
void |
setReactivityRule(java.lang.String rule,
Evaluator evaluator)
Deprecated. Sets the reactivity (acceptance) rule. |
void |
setRequiredData(int data)
Deprecated. Sets the required data to be stored. |
void |
setSelectivityRule(java.lang.String rule,
double[] tolerances,
Evaluator evaluator)
Deprecated. Sets the selectivity rule with tolerance. |
void |
setSelectivityRule(java.lang.String rule,
Evaluator evaluator)
Deprecated. Use setSelectivityRule(String, double[], Evaluator) or
setSelectivityRule(String, String, Evaluator) and set
tolerances parameter to null |
void |
setSelectivityRule(java.lang.String rule,
java.lang.String tolerances,
Evaluator evaluator)
Deprecated. Sets the selectivity rule with tolerance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final int MAXMAPS
protected static final int LEN
protected static final int PROP_CHARGE
protected static final int PROP_RADICAL
protected static final int PROP_STGRP
protected static final int PROP_HCOUNT
protected static final int PROP_MASSNO
protected static final int PROP_VALENCE
public static final int REACTANT_SIDE
public static final int PRODUCT_SIDE
public static final int ALL_SIDE
public static final int DATA_ATOMS
public static final int DATA_BONDS
public static final int DATA_PARITY
public static final int DATA_DOUBLE_BOND_STEREO
public static final int DATA_ALL
protected RxnMolecule rxn
protected ChemJEP rjep
protected ChemJEP sjep
protected double[] tolerances
protected int[] map2map
protected int[] smaps
protected int[] emaps
protected int[] rbondtypes
protected int[] pbondtypes
protected int bcount
protected transient java.util.ArrayList<java.lang.Integer> proptypes
protected transient java.util.ArrayList<MolAtom> ratomprops
protected transient java.util.ArrayList<MolAtom> patomprops
protected int[] map2stereo
protected int[] map2rindex
-1 if the mapped atom
exists only on the product side.
protected int[] map2pindex
-1 if the mapped atom
exists only on the reactant side.
protected int[] rindex2map
protected int[] pindex2map
protected java.util.ArrayList<int[]> rparities
protected java.util.ArrayList<int[]> pparities
protected java.util.ArrayList<int[]> rcistrans
StereoConstants.CIS,
StereoConstants.TRANS,
StereoConstants.CTUNSPECprotected java.util.ArrayList<int[]> pcistrans
StereoConstants.CIS,
StereoConstants.TRANS,
StereoConstants.CTUNSPEC| Constructor Detail |
|---|
public Reaction()
public Reaction(Molecule reaction)
throws ReactionException
reaction - is the reaction
ReactionException - on error (standardization, mapping, ...)public Reaction(java.lang.String id)
id - is the reaction ID| Method Detail |
|---|
public void setRequiredData(int data)
DATA_ALL.
data - is the required data, an OR-ed combination of the
DATA_ constants (e.g. DATA_ATOMS | DATA_BONDS)DATA_ATOMS,
DATA_BONDS,
DATA_PARITY,
DATA_DOUBLE_BOND_STEREOpublic int[][] getChangingBondData(boolean all)
DATA_BONDS flag should be set
to get this result (see setRequiredData(int)). By default,
all flags are set.
Format: an array of int[6] elements.
If we denote one such int[6] element by 'b' then:
-1 if bond exists only on the product side
-1 if atom exists only on the product side
-1 if atom exists only on the product side
-1 if bond exists only on the reactant side
-1 if atom exists only on the reactant side
-1 if atom exists only on the reactant side
all - is true if all changing bonds should be returned,
false if bonds between orphan/widow atoms should be
excluded
public int[] getChangingAtoms(boolean all,
int side)
DATA_BONDS flag should be set to include atoms having changing bonds
and the DATA_ATOMS flag should be set to include atoms having changing
atom properties (see setRequiredData(int)). By default,
all flags are set.
all - is true if all changing atoms should be returned,
false if orphan/widow atoms with only orphan/widow
neighbours should be excludedside - REACTANT_SIDE to get changing atoms from the reactant side
PRODUCT_SIDE to get changing atoms from the product side
ALL_SIDE to get all changing atoms
public static java.lang.String getReactivity(java.lang.String reactivity,
java.lang.String exclude)
reactivity && !exclude
reactivity - is the reactivity ruleexclude - is the exclude rule
public static double[] getTolerances(java.lang.String tolerances)
throws ReactionException
double[] created from ";" separated list of
real numbers. Empty string in the list is converted to Reactor.DEF_TOLERANCE.
tolerances - is the string: ";" separated list of real numbers
double[]
ReactionException - on format error
public void setReactivityRule(java.lang.String rule,
Evaluator evaluator)
throws ReactionException
true
precisely if the products should be accepted.
Evaluation of the reactivity rule precedes the evaluation of the
selectivity rule set by setSelectivityRule(String, Evaluator).
rule - is the rule chemical terms stringevaluator - is the evaluator object
ReactionException - on parse error
public void setSelectivityRule(java.lang.String rule,
Evaluator evaluator)
throws ReactionException
setSelectivityRule(String, double[], Evaluator) or
setSelectivityRule(String, String, Evaluator) and set
tolerances parameter to null
Reactor.DEF_TOLERANCE.
This rule is used to sort product sets by decreasing evaluation order,
that is, the product set with the largest evaluation result will be
returned first by Reactor.react().
The tolerance value is used to filter product sets based on their selectivity
compared to the maximal selectivity: a product set is accepted only if
the difference between the maximum selectivity and its selectivity
is not greater than the specified tolerance.
The default tolerance is set such that only values that are approximately
equal to the maximum are accepted.
rule - is the rule chemical terms stringevaluator - is the evaluator object
ReactionException - on parse error
public void setSelectivityRule(java.lang.String rule,
java.lang.String tolerances,
Evaluator evaluator)
throws ReactionException
tolerances parameter is
null then default tolerance (Reactor.DEF_TOLERANCE) is used.
This rule is used to sort product sets by decreasing evaluation order,
that is, the product set with the largest evaluation result will be
returned first by Reactor.react().
The tolerance value is used to filter product sets based on their selectivity
compared to the maximal selectivity: a product set is accepted only if
the difference between the maximum selectivity and its selectivity
is not greater than the specified tolerance.
rule - is the rule chemical terms string, items separated by ";"evaluator - is the evaluator objecttolerances - is the selectivity acceptance tolerance string,
items separated by ";". If null then
Reactor.DEF_TOLERANCE is used.
ReactionException - on parse error
public void setSelectivityRule(java.lang.String rule,
double[] tolerances,
Evaluator evaluator)
throws ReactionException
tolerances parameter is
null then default tolerance (Reactor.DEF_TOLERANCE) is used.
This rule is used to sort product sets by decreasing evaluation order,
that is, the product set with the largest evaluation result will be
returned first by Reactor.react().
The tolerance value is used to filter product sets based on their selectivity
compared to the maximal selectivity: a product set is accepted only if
the difference between the maximum selectivity and its selectivity
is not greater than the specified tolerance.
rule - is the rule chemical terms string, items separated by ";"evaluator - is the evaluator objecttolerances - is the selectivity acceptance tolerance array. If null then
Reactor.DEF_TOLERANCE is used.
ReactionException - on parse errorpublic void setID(java.lang.String id)
id - the reaction IDpublic java.lang.String getID()
public void setFID(java.lang.String fid)
fid - is the fragmentation IDprotected java.lang.String getFID()
null.
public Molecule getReactant(int i)
i - is the reactant index
protected Molecule[] getReactants()
public int getReactantCount()
protected Molecule getProduct(int i)
i - is the product index
protected Molecule[] getProducts()
protected int getProductCount()
protected int getProductAtomCount()
protected MolAtom getProductAtom(int i)
i - is the atom index
protected int getReactantAtomCount()
protected MolAtom getReactantAtom(int i)
i - is the atom index
public RxnMolecule getReaction()
RxnMolecule.
RxnMolecule
public void setReaction(Molecule mol)
throws ReactionException
mol - is the reaction molecule
ReactionException - on error (standardization, mapping, ...)
public void setReaction(Molecule mol,
boolean fuse)
throws ReactionException
mol - is the reaction moleculefuse - is true if reaction reactants / products
should be fused to form a 1-reactant 1-product molecule
used in Standardizer and Reactor
transform mode (see Reactor.setTransform(boolean))
ReactionException - on error (standardization, mapping, ...)
public void setReaction(Molecule mol,
boolean fuse,
boolean skipMappingCheck)
throws ReactionException
mol - is the reaction moleculefuse - is true if reaction reactants / products
should be fused to form a 1-reactant 1-product molecule
used in Standardizer and Reactor
transform mode (see Reactor.setTransform(boolean))skipMappingCheck - if true reaction mapping will not be checked
ReactionException - on error (standardization, mapping, ...)
public void setReaction(Molecule mol,
boolean fuse,
boolean skipMappingCheck,
boolean visualOrder)
throws ReactionException
mol - is the reaction moleculefuse - is true if reaction reactants / products
should be fused to form a 1-reactant 1-product molecule
used in Standardizer and Reactor
transform mode (see Reactor.setTransform(boolean))skipMappingCheck - if true reaction mapping will not be checkedvisualOrder - if true reactants and products will be processed in visual order. Has no effects in 0D.
ReactionException - on error (standardization, mapping, ...)protected int getBaseMap(int map)
map - is the map
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||