|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.reaction.Reactor
public class Reactor
Executes a chemical reaction: creates products from reactants with reaction center data. If the reaction centers have not yet been searched for, uses substructure search to find and (optionally) store them. Provides command line interface and API to single reaction processing.
See the documentation for details.
An example usage of the API:
// create Reactor
Reactor reactor = new Reactor();
// set properties (reverse mode)
reactor.setReverse(true);
// set the reaction ('rxmol' is the reaction molecule)
// reaction rules are read from RDF/MRV tags
reactor.setReaction(rxmol);
// set the reactants
reactor.setReactants(reactants);
// get the result
Molecule[] products = reactor.react();
// create reaction molecule
RxnMolecule result = reactor.createReaction(products);
Another example with reaction rules:
// create Reactor
Reactor reactor = new Reactor();
// set the reaction
// ('rxmol' is the reaction molecule,
// 'rid' is the reaction ID
// 'reactivity' is the reactivity rule,
// 'selectivity' is the selectivity rule
// 'tolerances' is the tolerance string)
reactor.setReaction(rxmol, rid, reactivity, selectivity, tolerances);
// set the reactants
reactor.setReactants(reactants);
// get the result
Molecule[] products = reactor.react();
| Field Summary | |
|---|---|
static int |
DEF_MAX_TRANSFORM_COUNT
The default maximum transform count. |
static double |
DEF_TOLERANCE
The default tolerance. |
static int |
IGNORE_REACTIVITY
No-rule type: ignore reactivity rule. |
static int |
IGNORE_SELECTIVITY
No-rule type: ignore selectivity rule. |
static int |
IGNORE_TOLERANCE
No-rule type: ignore selectivity tolerance. |
static int |
MAPPING_STYLE_CHANGING
Output reaction mapping style: changing (ChemAxon). |
static int |
MAPPING_STYLE_COMPLETE
Output reaction mapping style: complete. |
static int |
MAPPING_STYLE_MATCHING
Output reaction mapping style: matching (Daylight). |
static int |
MAPPING_STYLE_NONE
Output reaction mapping style: none. |
static int |
NO_DUPLICATE_FILTERING
No duplicate product list filtering |
static int |
ORDER_INSENSITIVE_DUPLICATE_FILTERING
Order insensitive duplicate product list filtering |
static int |
ORDER_SENSITIVE_DUPLICATE_FILTERING
Order sensitive duplicate product list filtering |
static int |
PRODUCT_OUTPUT
Output type: products. |
static int |
REACTION_OUTPUT
Output type: reaction. |
static int |
SEQUENCE_OUTPUT
Output type: sequence. |
| Constructor Summary | |
|---|---|
|
Reactor()
Default constructor. |
protected |
Reactor(chemaxon.reaction.ReactorConfiguration rc)
Deprecated. As of JChem 3.2 Reactor configuration XML files are not supported. |
| Method Summary | |
|---|---|
RxnMolecule |
createReaction(Molecule[] products)
Creates reaction output from the reactants set by setReactants(Molecule[])
and the products created in react(). |
Reaction |
createReactionObject(Molecule rxmol)
Deprecated. Use setReaction(Molecule). |
Reaction |
createReactionObject(Molecule rxmol,
java.lang.String reactivity,
java.lang.String selectivity,
double[] tolerances)
Deprecated. Use setReaction(Molecule, String, String, String, double[])
and set rid parameter to null. |
Reaction |
createReactionObject(Molecule rxmol,
java.lang.String reactivity,
java.lang.String selectivity,
java.lang.String tolerances)
Deprecated. Use setReaction(Molecule, String, String, String, String)
and set rid parameter to null. |
Reaction |
createReactionObject(Molecule rxmol,
java.lang.String rid,
java.lang.String reactivity,
java.lang.String selectivity,
double[] tolerances)
Creates a reaction object with the reaction rules. |
Reaction |
createReactionObject(Molecule rxmol,
java.lang.String rid,
java.lang.String reactivity,
java.lang.String selectivity,
java.lang.String tolerances)
Creates a reaction object with the reaction rules. |
RxnMolecule[] |
createReactions(Molecule[] products)
Creates reaction sequence output from the reactants set by setReactants(Molecule[]),
intermediate reactants and products and the final products created in react(). |
int |
getProductCount()
Returns the number of products. |
Standardizer |
getProductStandardizer()
Returns the product standardizer object. |
int |
getReactantCount()
Returns the number of reactants. |
java.lang.String |
getReactionID()
Returns the reaction sequence ID. |
Molecule |
getReactionProduct(int i)
Returns a reaction product. |
Molecule |
getReactionReactant(int i)
Returns a reaction reactant. |
chemaxon.util.SearchAttributes |
getSearchAttributes()
Returns the search attributes. |
Standardizer |
getStandardizer()
Returns the reactant standardizer object. |
boolean |
isCached()
Returns the "cached" property: true if search and calculation results are to be cached and reused. |
boolean |
isLicensed()
Returns information about the licensing of the product. |
boolean |
isReverse()
Returns true if the reaction is to be processed in reversed direction. |
boolean |
isSingle()
Returns true if single mode. |
boolean |
isUnique()
Deprecated. Not used. |
static void |
main(java.lang.String[] args)
Command line entry point. |
Molecule[] |
react()
Performs the reaction. |
static Molecule[] |
removeDuplicateProductReferences(Molecule[] products)
Deprecated. Use setRemoveDuplicateProductReferences(boolean) |
void |
restart()
Restarts the reactor: the following call to react()
will return the first product set. |
void |
setCached(boolean cached)
Sets the "cached" property: true if search and calculation results are to be cached and reused. |
void |
setComponentIDPropertyNames(java.lang.String[] reactantIDProps,
java.lang.String[] productIDProps)
Sets reactant/product ID property (SDF/MRV tag) names. |
void |
setComponentIDPropertyNames(java.lang.String reactantIDProp,
java.lang.String productIDProp)
Sets reactant/product ID property (SDF/MRV tag) names. |
void |
setDuplicateFiltering(int duplicateFilteringMethod)
Sets duplicate product list filtering. |
void |
setFragmentTag(java.lang.String ftag)
Sets the fragment data tag name. |
void |
setIgnoreReactionDefinedStandardizer(boolean ignore)
Sets to ignore the standardization defined in the STANDARDIZATION RDF/MRV tag of the reaction molecule. |
void |
setIgnoreRules(int type)
Ignore reaction rules: 0: apply both rules (default)
IGNORE_REACTIVITY: ignore reactivity rule
IGNORE_SELECTIVITY: ignore selectivity rule
IGNORE_TOLERANCE: ignore selectivity tolerance
IGNORE_REACTIVITY | IGNORE_SELECTIVITY:
ignore both rules
IGNORE_REACTIVITY | IGNORE_TOLERANCE:
ignore reactivity rule and selectivity tolerance
|
protected void |
setJEP(ChemJEP jep)
Sets the reactor (synthesis) JEP object. |
void |
setLicenseEnvironment(java.lang.String env)
Every license can have a modifier environment that's tipically an integration environment. |
void |
setMaxNumberOfProductSets(int pieces)
Sets the maximum number of products sets to be returned for one reactant set. |
void |
setOutputReactionMappingStyle(int style)
Sets the output reaction's mapping style. |
void |
setProductIndexes(int[] inds)
Sets the product indexes (1-based) to be returned (default: null - all products). |
void |
setProductStandardizer(Standardizer productStandardizer)
Sets the product standardizer object. |
void |
setReactant(Molecule mol)
Sets single reactant. |
void |
setReactants(Molecule[] mols)
Sets the reactants. |
void |
setReactants(java.lang.String molstr)
Sets the reactants from a multi-fragment SMILES string: fragments separated by '.' are taken as separate reactants, therefore it is not possible to set a multi-fragment reactant with this method (use setReactants(Molecule[] mols)
for this purpose). |
void |
setReaction(Molecule rxmol)
Sets the reaction with reaction rules set in RDF/MRV tags REACTIVITY, EXCLUDE, SELECTIVITY, TOLERANCE. |
void |
setReaction(Molecule rxmol,
java.lang.String reactivity)
Deprecated. Use setReaction(Molecule, String, String, String, double[])
or setReaction(Molecule, String, String, String, String)
and set rid, selectivity and
tolerances parameters to null. |
void |
setReaction(Molecule rxmol,
java.lang.String reactivity,
java.lang.String selectivity)
Deprecated. Use setReaction(Molecule, String, String, String, double[])
or setReaction(Molecule, String, String, String, String)
and set rid and tolerances parameters
to null. |
void |
setReaction(Molecule rxmol,
java.lang.String reactivity,
java.lang.String selectivity,
double[] tolerances)
Deprecated. Use setReaction(Molecule, String, String, String, double[])
and set rid parameter to null. |
void |
setReaction(Molecule rxmol,
java.lang.String reactivity,
java.lang.String selectivity,
java.lang.String tolerances)
Deprecated. Use setReaction(Molecule, String, String, String, String)
and set rid parameter to null. |
void |
setReaction(Molecule rxmol,
java.lang.String rid,
java.lang.String reactivity,
java.lang.String selectivity,
double[] tolerances)
Sets the reaction and the reaction rules. |
void |
setReaction(Molecule rxmol,
java.lang.String rid,
java.lang.String reactivity,
java.lang.String selectivity,
java.lang.String tolerances)
Sets the reaction and the reaction rules. |
void |
setReaction(Reaction reaction)
Sets the reaction in form of a reaction object containing a searcher object and a reactivity condition evaluator object. |
void |
setReaction(java.lang.String rid)
Deprecated. As of JChem 3.2 Reactor configuration XML files are not supported. |
void |
setReactionIDPropertyName(java.lang.String reactionIDProp)
Sets the reaction ID property (RDF/MRV tag) name. |
void |
setReactions(Molecule[] rxmols)
Sets the reaction sequence with reaction rules set in RDF tags REACTIVITY, EXCLUDE, SELECTIVITY, TOLERANCE. |
void |
setReactions(Reaction[] reactions)
Sets a reaction sequence. |
void |
setReactions(Reaction[] reactions,
java.lang.String id)
Sets a reaction sequence. |
void |
setReactionString(java.lang.String str)
Sets the reaction and optionally the reaction rules specified in a string. |
void |
setReactionString(java.lang.String str,
java.lang.String rid)
Sets the reaction and optionally the reaction rules specified in a string. |
void |
setRemoveDuplicateProductReferences(boolean rmduprefs)
Sets to remove product reference repetitions from the generated product array. |
void |
setResultType(int type)
Sets the result type returned by react() method. |
void |
setReverse(boolean reverse)
Sets the "reverse" property: true if the reaction is to be
processed in reversed direction, that is, the product and reactant sides
are swapped. |
void |
setSearchAttributes(chemaxon.util.SearchAttributes attributes)
Sets the search attributes. |
void |
setSingle(boolean single)
Sets single mode. |
void |
setSkipReactionMappingCheck(boolean skip)
Sets to skip reaction mapping check. |
void |
setStandardizer(Standardizer standardizer)
Sets the reactant standardizer object. |
void |
setTransform(boolean transform)
Deprecated. Use Standardizer. |
void |
setUnique(boolean unique)
Deprecated. Use setDuplicateFiltering(int) instead |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int PRODUCT_OUTPUT
public static final int REACTION_OUTPUT
public static final int SEQUENCE_OUTPUT
public static final int NO_DUPLICATE_FILTERING
public static final int ORDER_SENSITIVE_DUPLICATE_FILTERING
public static final int ORDER_INSENSITIVE_DUPLICATE_FILTERING
public static final int MAPPING_STYLE_NONE
public static final int MAPPING_STYLE_CHANGING
public static final int MAPPING_STYLE_COMPLETE
public static final int MAPPING_STYLE_MATCHING
public static final int IGNORE_REACTIVITY
public static final int IGNORE_SELECTIVITY
public static final int IGNORE_TOLERANCE
public static final double DEF_TOLERANCE
public static final int DEF_MAX_TRANSFORM_COUNT
| Constructor Detail |
|---|
public Reactor()
protected Reactor(chemaxon.reaction.ReactorConfiguration rc)
throws ReactionException
rc - is the configuration object
ReactionException - on configuration error| Method Detail |
|---|
public void setTransform(boolean transform)
Standardizer.
true if the original reactant
should be transformed instead of creating new product molecules.
Used from Standardizer and in transform mode.
The default is false.
transform - is true if transform modepublic java.lang.String getReactionID()
protected void setJEP(ChemJEP jep)
jep - is the JEP objectpublic void setIgnoreRules(int type)
0: apply both rules (default)
IGNORE_REACTIVITY: ignore reactivity rule
IGNORE_SELECTIVITY: ignore selectivity rule
IGNORE_TOLERANCE: ignore selectivity tolerance
IGNORE_REACTIVITY | IGNORE_SELECTIVITY:
ignore both rules
IGNORE_REACTIVITY | IGNORE_TOLERANCE:
ignore reactivity rule and selectivity tolerance
type - is the rule type(s) to be ignored (see above)public void setSkipReactionMappingCheck(boolean skip)
false.
skip - if true then reaction mapping will not be checkedpublic void setSingle(boolean single)
react() returns null.
The default is false (non-single mode).
single - is true if single modepublic boolean isSingle()
true if single mode.
In single mode only single product lists are returned,
that is, if there are more than one product lists for a given reactant
list then react() retruns null.
The default is false (non-single mode).
true if single modepublic void setUnique(boolean unique)
setDuplicateFiltering(int) instead
true.
Note that skipping duplicate product list check increases efficiency
therefore it is wise to set this parameter to false
if duplicates do not matter (e.g. if only the first product list
is queried by calling react() only once).
unique - is true if multiple product lists should be returned only once,
false if no duplicate check should be performedpublic void setDuplicateFiltering(int duplicateFilteringMethod)
NO_DUPLICATE_FILTERING: no duplicate filtering
ORDER_SENSITIVE_DUPLICATE_FILTERING: order sensitive duplicate filtering
ORDER_INSENSITIVE_DUPLICATE_FILTERING: order insensitive duplicate filtering
The default is ORDER_SENSITIVE_DUPLICATE_FILTERING.
Note that skipping duplicate product list filtering increases efficiency
therefore it is wise to set this parameter to NO_DUPLICATE_FILTERING
if duplicates do not matter (e.g. if only the first product list
is queried by calling react() only once).
duplicateFilteringMethod - is the filtering methodpublic boolean isUnique()
true if multiple product lists should be returned only once.
The default is true.
true if multiple product lists should be returned only oncepublic void setMaxNumberOfProductSets(int pieces)
-1 to return all product sets.
(default: -1, return all product sets)
pieces - is the maximum number of products set to be returned for one reactant setpublic void setProductIndexes(int[] inds)
null - all products).
inds - is the 1-based product index array, null for all productspublic void setResultType(int type)
react() method.
If PRODUCT_OUTPUT then the Molecule[] array returned by react()
will contain the generated products, if REACTION_OUTPUT then the Molecule[]
array returned by react() will contain the reactants -> products reaction.
Default: PRODUCT_OUTPUT
type - is the result typepublic void setOutputReactionMappingStyle(int style)
MAPPING_STYLE_NONE
style - is the output reaction's mapping stylepublic void setStandardizer(Standardizer standardizer)
standardizer - is the reactant standardizer objectpublic Standardizer getStandardizer()
public void setIgnoreReactionDefinedStandardizer(boolean ignore)
STANDARDIZATION RDF/MRV tag of the reaction molecule.
ignore - if true reaction defined standardization is ignoredpublic void setProductStandardizer(Standardizer productStandardizer)
productStandardizer - is the product standardizer objectpublic Standardizer getProductStandardizer()
public void setReverse(boolean reverse)
true if the reaction is to be
processed in reversed direction, that is, the product and reactant sides
are swapped. Default: false.
Should be called before calling setReactants(Molecule[]).
reverse - is true if reversed reactionpublic boolean isReverse()
true if the reaction is to be processed in reversed direction.
public void setSearchAttributes(chemaxon.util.SearchAttributes attributes)
attributes - is the attribute objectpublic chemaxon.util.SearchAttributes getSearchAttributes()
public void setCached(boolean cached)
true if search and calculation results are to be cached and reused.
cached - is the true if search results are to be cached and reusedpublic boolean isCached()
true if search and calculation results are to be cached and reused.
public void setFragmentTag(java.lang.String ftag)
ftag - is the fragment data tag namepublic void setReactionIDPropertyName(java.lang.String reactionIDProp)
reactionIDProp - is the reaction ID property name
public void setComponentIDPropertyNames(java.lang.String reactantIDProp,
java.lang.String productIDProp)
reactantIDProp - is the reactant ID property nameproductIDProp - is the product ID property name
public void setComponentIDPropertyNames(java.lang.String[] reactantIDProps,
java.lang.String[] productIDProps)
reactantIDProps - is the reactant ID property name arrayproductIDProps - is the product ID property name array
public void setReactions(Molecule[] rxmols)
throws ReactionException
REACTIVITY, EXCLUDE, SELECTIVITY, TOLERANCE.
For internal use only.
rxmols - is the reaction array making up the sequence
ReactionException - on errorpublic void setReactions(Reaction[] reactions)
reactions - is the reaction array
public void setReactions(Reaction[] reactions,
java.lang.String id)
reactions - is the reaction arrayid - is the sequence IDpublic void setReaction(Reaction reaction)
setReactants(Molecule[]).
reaction - is the reaction object
public void setReaction(java.lang.String rid)
throws ReactionException
rid - is the reaction ID
ReactionException - on error or if the configuration is not set#Reactor(File)
public void setReaction(Molecule rxmol)
throws ReactionException
REACTIVITY, EXCLUDE, SELECTIVITY, TOLERANCE.
Also sets the reactant standardizer defined in the STANDARDIZATION RDF/MRV tag.
rxmol - is the reaction molecule
ReactionException - on errorsetIgnoreReactionDefinedStandardizer(boolean)
public void setReaction(Molecule rxmol,
java.lang.String reactivity)
throws ReactionException
setReaction(Molecule, String, String, String, double[])
or setReaction(Molecule, String, String, String, String)
and set rid, selectivity and
tolerances parameters to null.
null which means that the rule is not set.
Also sets the reactant standardizer defined in the STANDARDIZATION
RDF/MRV tag of the reaction molecule.
rxmol - is the reaction moleculereactivity - is the reactivity rule
ReactionException - on errorsetIgnoreReactionDefinedStandardizer(boolean)
public void setReaction(Molecule rxmol,
java.lang.String reactivity,
java.lang.String selectivity)
throws ReactionException
setReaction(Molecule, String, String, String, double[])
or setReaction(Molecule, String, String, String, String)
and set rid and tolerances parameters
to null.
null which means that the rule is not set.
Also sets the reactant standardizer defined in the STANDARDIZATION
RDF/MRV tag of the reaction molecule.
rxmol - is the reaction moleculereactivity - is the reactivity ruleselectivity - is the selectivity rule
ReactionException - on errorsetIgnoreReactionDefinedStandardizer(boolean)
public void setReaction(Molecule rxmol,
java.lang.String reactivity,
java.lang.String selectivity,
java.lang.String tolerances)
throws ReactionException
setReaction(Molecule, String, String, String, String)
and set rid parameter to null.
null which means that the rule is not set.
Selectivity tolerance is set to the default value: DEF_TOLERANCE
if not specified in the Tolerance property.
Also sets the reactant standardizer defined in the STANDARDIZATION
RDF/MRV tag of the reaction molecule.
rxmol - is the reaction moleculereactivity - is the reactivity ruleselectivity - is the selectivity ruletolerances - is the tolerance string
ReactionException - on errorsetIgnoreReactionDefinedStandardizer(boolean)
public void setReaction(Molecule rxmol,
java.lang.String rid,
java.lang.String reactivity,
java.lang.String selectivity,
java.lang.String tolerances)
throws ReactionException
null which means that the rule is not set.
Selectivity tolerance is set to the default value: DEF_TOLERANCE
if not specified in the Tolerance property.
Also sets the reactant standardizer defined in the STANDARDIZATION
RDF/MRV tag of the reaction molecule.
rxmol - is the reaction moleculerid - is the reaction IDreactivity - is the reactivity ruleselectivity - is the selectivity ruletolerances - is the tolerance string
ReactionException - on errorsetIgnoreReactionDefinedStandardizer(boolean)
public void setReaction(Molecule rxmol,
java.lang.String reactivity,
java.lang.String selectivity,
double[] tolerances)
throws ReactionException
setReaction(Molecule, String, String, String, double[])
and set rid parameter to null.
null which means that the rule is not set.
Also sets the reactant standardizer defined in the STANDARDIZATION
RDF/MRV tag of the reaction molecule.
rxmol - is the reaction moleculereactivity - is the reactivity ruleselectivity - is the selectivity ruletolerances - is the selectivity tolerance array (one for each selectivity rule,
null for taking the default tolerance DEF_TOLERANCE
for each rule)
ReactionException - on errorsetIgnoreReactionDefinedStandardizer(boolean)
public void setReaction(Molecule rxmol,
java.lang.String rid,
java.lang.String reactivity,
java.lang.String selectivity,
double[] tolerances)
throws ReactionException
null which means that the rule is not set.
Also sets the reactant standardizer defined in the STANDARDIZATION
RDF/MRV tag of the reaction molecule.
rxmol - is the reaction moleculerid - is the reaction IDreactivity - is the reactivity ruleselectivity - is the selectivity ruletolerances - is the selectivity tolerance array (one for each selectivity rule,
null for taking the default tolerance DEF_TOLERANCE
for each rule)
ReactionException - on errorsetIgnoreReactionDefinedStandardizer(boolean)
public Reaction createReactionObject(Molecule rxmol)
throws ReactionException
setReaction(Molecule).
REACTIVITY, EXCLUDE, SELECTIVITY, TOLERANCE.
rxmol - is the reaction molecule
ReactionException
public Reaction createReactionObject(Molecule rxmol,
java.lang.String reactivity,
java.lang.String selectivity,
java.lang.String tolerances)
throws ReactionException
setReaction(Molecule, String, String, String, String)
and set rid parameter to null.
null which means that the rule is not set.
rxmol - is the reaction moleculereactivity - is the reactivity ruleselectivity - is the selectivity ruletolerances - is the selectivity tolerance array (one for each selectivity rule,
null for taking the default tolerance DEF_TOLERANCE
for each rule)
ReactionException - on error
public Reaction createReactionObject(Molecule rxmol,
java.lang.String rid,
java.lang.String reactivity,
java.lang.String selectivity,
java.lang.String tolerances)
throws ReactionException
null which means that the rule is not set.
rxmol - is the reaction moleculerid - is the reaction IDreactivity - is the reactivity ruleselectivity - is the selectivity ruletolerances - is the selectivity tolerance array (one for each selectivity rule,
null for taking the default tolerance DEF_TOLERANCE
for each rule)
ReactionException - on error
public Reaction createReactionObject(Molecule rxmol,
java.lang.String reactivity,
java.lang.String selectivity,
double[] tolerances)
throws ReactionException
setReaction(Molecule, String, String, String, double[])
and set rid parameter to null.
null which means that the rule is not set.
rxmol - is the reaction moleculereactivity - is the reactivity ruleselectivity - is the selectivity ruletolerances - is the selectivity tolerance array (one for each selectivity rule,
null for taking the default tolerance DEF_TOLERANCE
for each rule)
ReactionException - on error
public Reaction createReactionObject(Molecule rxmol,
java.lang.String rid,
java.lang.String reactivity,
java.lang.String selectivity,
double[] tolerances)
throws ReactionException
null which means that the rule is not set.
rxmol - is the reaction moleculerid - is the reaction IDreactivity - is the reactivity ruleselectivity - is the selectivity ruletolerances - is the selectivity tolerance array (one for each selectivity rule,
null for taking the default tolerance DEF_TOLERANCE
for each rule)
ReactionException - on error
public void setReactionString(java.lang.String str)
throws ReactionException
r: denotes the reactivity rule
s: denotes the selectivity rule(s) separated by ";"
t: denotes the selectivity tolerance(s) separated by ";"
[Cl:4][C:3]=O.[#7:2][H:1]>>[#7:2][C:3]=O.[Cl:4][H:1]Rules can be added with the type prefixes described above, items separated by "..". Example:
[Cl:4][C:3]=O.[#7:2][H:1]>>[#7:2][C:3]=O.[Cl:4][H:1]..r:charge(ratom(4)) > 1.2..s:tpsa(product(0))..t:0.5
str - is the reaction configuration string described above
ReactionException - on configuration error
public void setReactionString(java.lang.String str,
java.lang.String rid)
throws ReactionException
r: denotes the reactivity rule
s: denotes the selectivity rule(s) separated by ";"
t: denotes the selectivity tolerance(s) separated by ";"
[Cl:4][C:3]=O.[#7:2][H:1]>>[#7:2][C:3]=O.[Cl:4][H:1]Rules can be added with the type prefixes described above, items separated by "..". Example:
[Cl:4][C:3]=O.[#7:2][H:1]>>[#7:2][C:3]=O.[Cl:4][H:1]..r:charge(ratom(4)) > 1.2..s:tpsa(product(0))..t:0.5
str - is the reaction configuration string described aboverid - is the reaction ID
ReactionException - on configuration errorpublic int getReactantCount()
public int getProductCount()
public Molecule getReactionReactant(int i)
i - is the reactant index
public Molecule getReactionProduct(int i)
i - is the reactant index
public void restart()
react()
will return the first product set.
public void setReactant(Molecule mol)
throws ReactionException
mol - the reactant molecule
ReactionException - if setting the reactant fails
public void setReactants(java.lang.String molstr)
throws ReactionException
setReactants(Molecule[] mols)
for this purpose).
The reaction should be set beforehand.
molstr - is the reactant molecule string, reactants separated by '.'
ReactionException - if setting the reactants fails
public void setReactants(Molecule[] mols)
throws ReactionException
mols - is the reactant array
ReactionException - if setting the reactants fails
public Molecule[] react()
throws ReactionException
null if there are no more
product lists. Product lists are ordered according to priority if a
selectivity rule is specified.
In single mode, returns only single results, that is,
returns null if here are more than one product lists
(see setSingle(boolean)).
In transform mode, returns the transformed input molecule, in this case
the output is always non-null and there is one output per input molecule,
repeated calls return the same
(see setTransform(boolean)).
The reaction should be set beforehand.
The reactants should be set beforehand by setReactants(Molecule[])
or setReactant(Molecule).
ReactionException - on reaction processing errorpublic void setRemoveDuplicateProductReferences(boolean rmduprefs)
react() will return an array with unique product references
(the order of the molecule objects in the return product array is preserved).
Default: false
rmduprefs - is true if duplicate product references should be
removed from the product array returned by react()public static Molecule[] removeDuplicateProductReferences(Molecule[] products)
setRemoveDuplicateProductReferences(boolean)
products - is the product array returned by react()
public RxnMolecule createReaction(Molecule[] products)
throws ReactionException
setReactants(Molecule[])
and the products created in react().
products - is the product array returned by react()
ReactionException - in transform modepublic RxnMolecule[] createReactions(Molecule[] products)
setReactants(Molecule[]),
intermediate reactants and products and the final products created in react().
For internal use only.
products - is the product array returned by react()
public boolean isLicensed()
chemaxon.license.Licensable
return LicenseHandler.getInstance().isLicensed( LicenseHandler.MY_IDENTIFIER, licenseEnvironment );
isLicensed in interface chemaxon.license.Licensablepublic void setLicenseEnvironment(java.lang.String env)
chemaxon.license.Licensable
private String licenseEnvironment = "";
public void setLicenseEnvironment(String env) {
licenseEnvironment = env;
}
setLicenseEnvironment in interface chemaxon.license.Licensableenv - environment String to be stored and passed to the LicenseHandler in the isLicensed method
public static void main(java.lang.String[] args)
throws java.lang.Exception
args - is the command line argument array
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||