|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.reaction.SynthesisAlgorithm
public abstract class SynthesisAlgorithm
Abstract base class for synthesis algorithm implementations.
A synthesis algorithm provides the subsequent synthesis steps
for the Synthesizer. The set of reactions with reactant
and product molecule sets is defined in the SynthesisGraph
that is built according to the configuration XML.
SynthesisGraph| Field Summary | |
|---|---|
protected org.dom4j.Element |
algorithmElement
Deprecated. The algorithm element. |
protected Evaluator |
evaluator
Deprecated. Evaluator object. |
protected java.lang.String |
licenseEnvironment
Deprecated. |
protected long |
logStatTime
Deprecated. Log stat time. |
protected int |
mode
Deprecated. The processing mode: Synthesizer.DBMODE, Synthesizer.FILEMODE or Synthesizer.MEMMODE. |
protected java.lang.String |
name
Deprecated. The synthesis name. |
protected int |
phaseCount
Deprecated. The number of phases to be processed. |
protected int |
rcount
Deprecated. The number of reactions processed so far. |
static int |
RMODE_ALL
Deprecated. Reaction processing mode: take all reaction centers. |
static int |
RMODE_ANY
Deprecated. Reaction processing mode: take any of the reaction centers. |
static int |
RMODE_SINGLE
Deprecated. Reaction processing mode: process only if there is one reaction center list. |
protected int |
scount
Deprecated. The number of steps processed so far. |
protected int |
stepCount
Deprecated. The number of steps to be processed. |
| Constructor Summary | |
|---|---|
SynthesisAlgorithm()
Deprecated. Default constructor. |
|
| Method Summary | |
|---|---|
protected void |
addSets(MoleculeSet[] rsets,
MoleculeSet[] psets)
Deprecated. Adds reactant and product set IDs for the current step to the set list. |
protected static void |
clearOriginCode(MolAtom atom)
Deprecated. Clears atom origin code (currently stored as atom map). |
void |
close()
Deprecated. Closes the algorithm (writers). |
static SynthesisAlgorithm |
create(org.dom4j.Element element,
chemaxon.reaction.ReactorConfiguration reactorConfig,
ConnectionHandler conn,
java.lang.String name)
Deprecated. Creates the specified synthesis algorithm descendant. |
protected MolCondition |
createCondition(org.dom4j.Element element)
Deprecated. |
protected abstract void |
fillSetList()
Deprecated. Fills the set list with set ID-s with reactant and product sets for each algorithm step. |
protected void |
flushLog()
Deprecated. Flushes log writer. |
SynthesisGraph |
getGraph()
Deprecated. Returns the synthesis graph. |
protected static int |
getOriginCode(MolAtom atom)
Deprecated. Returns atom origin code. |
protected static int[] |
getOriginCodes(Molecule mol,
boolean clear)
Deprecated. Returns origin codes in an int[] array according to atom order. |
java.lang.String |
getSet(int i)
Deprecated. Returns the i-th set ID in the list. |
java.lang.String[] |
getSetIds()
Deprecated. Returns the set IDs, each set ID once. |
chemaxon.reaction.synthesis.TreeHandler |
getTree()
Deprecated. Returns the synthesis tree. |
protected void |
init(org.dom4j.Element algorithmElement,
chemaxon.reaction.ReactorConfiguration reactorConfig,
ConnectionHandler conn,
java.lang.String name)
Deprecated. Initializes the algorithm. |
boolean |
isLicensed()
Deprecated. Returns information about the licensing of the product. |
protected void |
postInit()
Deprecated. Initializes the algorithm. |
void |
restart()
Deprecated. Restarts the algorithm. |
abstract void |
setExcludedIDs(java.lang.String[] ids)
Deprecated. Sets phase/step IDs to be excluded. |
void |
setGraph(SynthesisGraph graph)
Deprecated. Sets the synthesis graph. |
void |
setLicenseEnvironment(java.lang.String env)
Deprecated. Every license can have a modifier environment that's tipically an integration environment. |
void |
setLogging(boolean log)
Deprecated. Sets logging. |
void |
setLogStatTime(long logStatTime)
Deprecated. Sets log statistics interval (in minutes). |
protected static void |
setOriginCode(MolAtom atom,
int code)
Deprecated. Sets atom origin code. |
protected static void |
setOriginCodes(Molecule mol,
int code)
Deprecated. Sets atom codes in the new atoms of the molecule as atom maps: an atom gets the specified new code if its stored origin code is 0 or there is no stored origin code. |
protected static void |
setOriginCodes(Molecule mol,
int[] codes,
int code)
Deprecated. Sets atom codes in the atoms of the molecule as atom maps: an atom gets the origin code with the corresponding index if it is not 0, gets the specified new code if the origin code is 0. |
void |
setPhaseCount(int count)
Deprecated. Sets the number of phases to be processed (the meaning of a phase depends on the algorithm, default: same as substep). |
void |
setProgressDisplay(boolean progressDisplay)
Deprecated. Sets progress display in status line on System.err. |
void |
setStepCount(int count)
Deprecated. Sets the number of substeps to be processed (the meaning of a substep depends on the algorithm). |
boolean |
step()
Deprecated. Performs the next synthesis phase. |
protected void |
writeLog(java.lang.String msg)
Deprecated. Writes log message if logging is enabled. |
protected void |
writeLog(java.lang.String msg,
Molecule mol)
Deprecated. Writes molecule in log if logging is enabled. |
protected void |
writeLog(java.lang.Throwable e)
Deprecated. Logs exception stack trace. |
protected void |
writeProgress(java.lang.String msg)
Deprecated. Writes progress message to status line if progress display is enabled. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int RMODE_ANY
public static final int RMODE_SINGLE
public static final int RMODE_ALL
protected java.lang.String name
protected int mode
Synthesizer.DBMODE, Synthesizer.FILEMODE or Synthesizer.MEMMODE.
protected org.dom4j.Element algorithmElement
protected Evaluator evaluator
protected int rcount
protected int scount
protected int stepCount
protected int phaseCount
protected long logStatTime
protected java.lang.String licenseEnvironment
| Constructor Detail |
|---|
public SynthesisAlgorithm()
| Method Detail |
|---|
public static SynthesisAlgorithm create(org.dom4j.Element element,
chemaxon.reaction.ReactorConfiguration reactorConfig,
ConnectionHandler conn,
java.lang.String name)
throws ReactionException
element - is the configuration DOM elementreactorConfig - is the reactor configuration objectconn - is the db connection handler, or null if memory based synthesisname - is the synthesis name
ReactionException - on errorpublic void restart()
protected void init(org.dom4j.Element algorithmElement,
chemaxon.reaction.ReactorConfiguration reactorConfig,
ConnectionHandler conn,
java.lang.String name)
throws ReactionException
algorithmElement - is the configuration DOM elementreactorConfig - is the reactor configuration objectconn - is the db connection handler, or null if memory based synthesisname - is the synthesis name
ReactionException - on error
protected void postInit()
throws ReactionException
ReactionException - on error
protected final MolCondition createCondition(org.dom4j.Element element)
throws ReactionException
ReactionExceptionpublic void setProgressDisplay(boolean progressDisplay)
System.err.
progressDisplay - is true is progress count
is to be displayed in status linepublic void setStepCount(int count)
Integer.MAX_VALUE, all substeps are processed.
count - is the number of steps to be processedpublic void setPhaseCount(int count)
Integer.MAX_VALUE, all phases are processed.
count - is the number of phases to be processed
protected static final void setOriginCode(MolAtom atom,
int code)
throws ReactionException
atom - is the atom objectcode - is the origin code
ReactionException - if the code exceeds the max atom map (1023)protected static final int getOriginCode(MolAtom atom)
atom - is the atom object
protected static final void clearOriginCode(MolAtom atom)
atom - is the atom object
protected static void setOriginCodes(Molecule mol,
int[] codes,
int code)
throws ReactionException
mol - is the molceulecodes - is the origin code array (one code for each atom)code - is the atom code for new atoms (with origin code 0)
ReactionException - if code is out of range (greater than 1023)
protected static void setOriginCodes(Molecule mol,
int code)
throws ReactionException
mol - is the molceulecode - is the atom code for new atoms (with origin code 0)
ReactionException - if code is out of range (greater than 1023)
protected static int[] getOriginCodes(Molecule mol,
boolean clear)
mol - is the moleculeclear - is true if origin codes should be cleared
protected final void addSets(MoleculeSet[] rsets,
MoleculeSet[] psets)
rsets - is the reactant set arraypsets - is the product set arraypublic java.lang.String getSet(int i)
i - is the set index in the list
public java.lang.String[] getSetIds()
public void setGraph(SynthesisGraph graph)
graph - is the synthesis graphpublic final SynthesisGraph getGraph()
public final chemaxon.reaction.synthesis.TreeHandler getTree()
public void close()
throws ReactionException
ReactionException - on error
public void setLogging(boolean log)
throws java.io.IOException
RandomAlgorithm, database mode.
log - is true if logging enabled
java.io.IOException
public void setLogStatTime(long logStatTime)
throws java.io.IOException
-1), no log statistics is written.
Currently implemented only in
RandomAlgorithm, database mode.
logStatTime - the log statistics interval (in minutes)
java.io.IOExceptionprotected void writeLog(java.lang.String msg)
msg - is the log message
protected void writeLog(java.lang.String msg,
Molecule mol)
msg - is the log messagemol - is the moleculeprotected void writeLog(java.lang.Throwable e)
e - is the throwable objectprotected void writeProgress(java.lang.String msg)
msg - is the progress messageprotected void flushLog()
public abstract void setExcludedIDs(java.lang.String[] ids)
ids - the phase/step IDs to be excluded
public boolean step()
throws ReactionException
postInit() if needed.
ReactionException - on error
protected abstract void fillSetList()
throws ReactionException
ReactionException - on errorpublic 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 methodpublic boolean isLicensed()
chemaxon.license.Licensable
return LicenseHandler.getInstance().isLicensed( LicenseHandler.MY_IDENTIFIER, licenseEnvironment );
isLicensed in interface chemaxon.license.Licensable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||