|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.reaction.Fragmenter
public abstract class Fragmenter
Molecule fragmenter. Common base class for fragmentation implementations.
This class can be used from command-line or from the API.
See the
documentation
for details.
For an API usage example, see ExhaustiveFragmenter.
ExhaustiveFragmenter| Field Summary | |
|---|---|
protected chemaxon.reaction.Fragmenter.CutBondSearch[] |
cbs
The CutBondSearch objects corresponding to the reactions. |
protected chemaxon.util.BondClassifier |
classifier
The classifier object that performs the DFS algorithm and stores ring-bond data. |
protected java.lang.String |
licenseEnvironment
|
protected int |
maxfragmentcount
Stores the maximum number of fragments per fragment set. |
protected CutBondReviser |
reviser
The reviser object that accepts or rejects the cut-bonds. |
| Constructor Summary | |
|---|---|
Fragmenter()
Default constructor, does nothing. |
|
Fragmenter(RxnMolecule[] reactions)
Constructor with no standardizer and no reviser (accepts all cut-bonds). |
|
Fragmenter(RxnMolecule[] reactions,
Standardizer standardizer)
Constructor with no reviser (accepts all cut-bonds). |
|
Fragmenter(RxnMolecule[] reactions,
Standardizer standardizer,
CutBondReviser reviser)
Constructor. |
|
| Method Summary | |
|---|---|
protected void |
clearCutBond(int i,
int j)
Clears the i - j cut-bond. |
protected void |
clearCutBonds()
Clears the 'cutbond' array. |
void |
collect(java.lang.String uidTag,
java.lang.String cutidsTag,
java.lang.String cutcountsTag,
java.lang.String cutsumTag,
java.lang.String[] reactionIDs)
Initiates cleavage reaction data collecting. |
void |
collect(java.lang.String uidTag,
java.lang.String cutidsTag,
java.lang.String cutcountsTag,
java.lang.String cutsumTag,
java.lang.String[] reactionIDs,
boolean dataInLabel)
Initiates cleavage reaction data collecting. |
void |
create(java.util.List coll)
Creates the molecule fragments by removing the previously found cut-bonds and fragmenting the input molecule. |
protected abstract void |
find()
The main fragmentation finder method: sets the cut-bonds. |
void |
find(Molecule mol)
The main fragmenter algorithm: stores the accepted bond cuts. |
void |
fragment(java.util.List coll,
Molecule mol)
Runs the fragmenter on the given input molecule. |
protected chemaxon.util.BondClassifier |
getClassifier()
Returns the classifier object. |
int |
getCutBond(int i,
int j)
Return the cut-reaction index if i - j is a cut-bond,
-1 otherwise. |
static java.lang.String |
getData(Molecule fragment,
int index)
Returns fragment data from atom alias. |
protected void |
init(RxnMolecule[] reactions,
Standardizer standardizer,
CutBondReviser reviser)
Initializes Fragmenter. |
boolean |
isCutBond(int i,
int j)
Return true if bond i - j is stored as cut-bond. |
boolean |
isLicensed()
Returns information about the licensing of the product. |
static void |
main(java.lang.String[] args)
The command line invokation of the Fragmenter. |
void |
setCountTag(java.lang.String countTag)
Sets the Count tag storing the fragment count (multiplicity). |
protected void |
setCutBond(int i,
int j,
int r)
Store bond i - j as cut-bond. |
protected void |
setCutBond(int i,
int j,
int r,
int mi,
int mj)
Store bond i - j as cut-bond. |
void |
setLicenseEnvironment(java.lang.String env)
Every license can have a modifier environment that's tipically an integration environment. |
void |
setMaxFragmentCount(int maxfragmentcount)
Sets the maximum number of fragments per fragment set to be created. |
protected void |
setTags(Molecule frag)
Increases the fragment count tag. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String licenseEnvironment
protected chemaxon.reaction.Fragmenter.CutBondSearch[] cbs
protected CutBondReviser reviser
protected chemaxon.util.BondClassifier classifier
protected int maxfragmentcount
| Constructor Detail |
|---|
public Fragmenter()
public Fragmenter(RxnMolecule[] reactions)
throws chemaxon.sss.search.SearchException
reactions - is the reaction molecule array
chemaxon.sss.search.SearchException - if reaction check fails
(e.g. inconsistent atom maps or multiple reactants)
public Fragmenter(RxnMolecule[] reactions,
Standardizer standardizer)
throws chemaxon.sss.search.SearchException
reactions - is the reaction molecule arraystandardizer - is the standardizer object
chemaxon.sss.search.SearchException - if reaction check fails
(e.g. inconsistent atom maps or multiple reactants)
public Fragmenter(RxnMolecule[] reactions,
Standardizer standardizer,
CutBondReviser reviser)
throws chemaxon.sss.search.SearchException
reactions - is the reaction molecule arraystandardizer - is the standardizer objectreviser - is the cut-bond reviser object
chemaxon.sss.search.SearchException - if reaction check fails
(e.g. inconsistent atom maps or multiple reactants)| Method Detail |
|---|
public static java.lang.String getData(Molecule fragment,
int index)
rid1:m1,rid2:m2,...,ridN:mNwhere
rid1, ... ridN are the reaction IDs
from the configuration XML and m1, ... mN
are the corresponding atom maps. The empty string is returned
if there was no cleavage at the specified atom.
fragment - is the fragment molecule generated by Fragmenterindex - is the atom index
protected void init(RxnMolecule[] reactions,
Standardizer standardizer,
CutBondReviser reviser)
throws chemaxon.sss.search.SearchException
reactions - is the reaction molecule arraystandardizer - is the standardizer objectreviser - is the cut-bond reviser object
chemaxon.sss.search.SearchException - if reaction check fails
(e.g. inconsistent atom maps or multiple reactants)protected chemaxon.util.BondClassifier getClassifier()
public void setMaxFragmentCount(int maxfragmentcount)
maxfragmentcount - is the maximum number of fragments per fragment setpublic void setCountTag(java.lang.String countTag)
countTag - is the Count tag name
public void collect(java.lang.String uidTag,
java.lang.String cutidsTag,
java.lang.String cutcountsTag,
java.lang.String cutsumTag,
java.lang.String[] reactionIDs)
null then that data is not set.
uidTag - is the SDF tag storing the fragment UIDcutidsTag - is the SDF tag name for the ';' separated list of
the ',' separated lists of cut-reaction ids for the atomscutcountsTag - is the SDF tag name for the ';' separated list of
the attachment point counts for the atomscutsumTag - is the SDF tag name for the number of cut-bonds
for the whole fragment (the sum of the attachment point counts)reactionIDs - is the reaction ID array
public void collect(java.lang.String uidTag,
java.lang.String cutidsTag,
java.lang.String cutcountsTag,
java.lang.String cutsumTag,
java.lang.String[] reactionIDs,
boolean dataInLabel)
dataInLabel parameter.
The different data is set with the given tag names as property names
in the fragment Molecule objects and will be written to the SDF file
with these tag names upon SDF output.
If any of the tags is null then that data is not set.
uidTag - is the SDF tag storing the fragment UIDcutidsTag - is the SDF tag name for the ';' separated list of
the ',' separated lists of cut-reaction ids for the atomscutcountsTag - is the SDF tag name for the ';' separated list of
the attachment point counts for the atomscutsumTag - is the SDF tag name for the number of cut-bonds
for the whole fragment (the sum of the attachment point counts)reactionIDs - is the reaction ID arraydataInLabel - is true if cleavage data should be stored
in atom labels
public void find(Molecule mol)
throws chemaxon.sss.search.SearchException,
chemaxon.license.LicenseException
mol - is the input molecule
chemaxon.sss.search.SearchException - on search error
chemaxon.license.LicenseException - if no license found
protected abstract void find()
throws chemaxon.sss.search.SearchException
chemaxon.sss.search.SearchException - on search errorpublic void create(java.util.List coll)
find(Molecule) beforehand to set the cut-bonds!
coll - is the list which the fragments will be added toprotected void setTags(Molecule frag)
frag - is the fragment
public void fragment(java.util.List coll,
Molecule mol)
throws chemaxon.sss.search.SearchException
find(Molecule) and create(List).
coll - is the list which the fragments will be added tomol - is the input molecule
chemaxon.sss.search.SearchException - on search error
public boolean isCutBond(int i,
int j)
true if bond i - j is stored as cut-bond.
i - is a node indexj - is another node index
true if bond i - j is stored as cut-bond.
public int getCutBond(int i,
int j)
i - j is a cut-bond,
-1 otherwise.
i - j is a cut-bond,
-1 otherwise
protected final void setCutBond(int i,
int j,
int r,
int mi,
int mj)
i - j as cut-bond.
i - is a node indexj - is another node indexr - is the reaction indexmi - is the first atom mapmj - is the second atom map
protected final void setCutBond(int i,
int j,
int r)
i - j as cut-bond.
i - is a node indexj - is another node indexr - is the reaction index
protected final void clearCutBond(int i,
int j)
i - j cut-bond.
i - is a node indexj - is another node indexprotected final void clearCutBonds()
public boolean isLicensed()
chemaxon.license.Licensable
return LicenseHandler.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 - the command line parameters
java.lang.Exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||