|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectchemaxon.reaction.Fragmenter
chemaxon.reaction.ExhaustiveFragmenter
Molecule fragmenter: exhaustive algorithm. Returns all possible fragment sets.
An example usage of the API:
// create fragmenter with configuration file "fragment.xml"
ExhaustiveFragmenter fragmenter = new ExhaustiveFragmenter(new File("fragment.xml"));
// load the input molecule from "fragment.mol"
MolImporter importer = new MolImporter("fragment.mol");
Molecule mol = importer.read();
importer.close();
// fragment the input molecule, collect fragments in a Vector
Vector fragments = new Vector();
fragmenter.fragment(fragments, mol);
// write the fragments in SDF format to "fragment.sdf"
OutputStream os = new BufferedOutputStream(new FileOutputStream("fragment.sdf"));
MolExporter exporter = new MolExporter(os, "sdf");
int size = fragments.size();
for (int i=0; i < size; ++i) {
Molecule frag = (Molecule) fragments.get(i);
exporter.write(frag);
}
exporter.close();
| Field Summary |
| Fields inherited from class chemaxon.reaction.Fragmenter |
cbs, classifier, licenseEnvironment, maxfragmentcount, reviser |
| Constructor Summary | |
ExhaustiveFragmenter(java.io.File file)
Constructor with reviser. |
|
ExhaustiveFragmenter(java.io.InputStream is)
Constructor with reviser. |
|
ExhaustiveFragmenter(RxnMolecule[] reactions,
Standardizer standardizer)
Constructor with no reviser (accepts all cut-bonds). |
|
ExhaustiveFragmenter(RxnMolecule[] reactions,
Standardizer standardizer,
CutBondReviser reviser)
Constructor. |
|
ExhaustiveFragmenter(java.lang.String xmlstr)
Constructor with reviser. |
|
| Method Summary | |
void |
create(java.util.List coll)
Creates the molecule fragments by removing the previously found cut-bonds and fragmenting the input molecule. |
protected void |
find()
Finds all possible cut-bond sets. |
void |
setExtensive(boolean extensive)
Sets the 'extensive' property: true if extendable cut sets
should be included. |
void |
setFragmentSetsTag(java.lang.String fragmentsetsTag)
Sets the SDF tag name storing the fragment set indices. |
void |
setMaxSetCount(int maxsetcount)
Sets the maximum number of fragment sets per molecule. |
protected void |
setTags(Molecule frag)
Increases the fragment count tag, sets the fragment set tag. |
| Methods inherited from class chemaxon.reaction.Fragmenter |
clearCutBond, clearCutBonds, collect, collect, find, fragment, getClassifier, getCutBond, getData, init, isCutBond, isLicensed, main, setCountTag, setCutBond, setCutBond, setLicenseEnvironment, setMaxFragmentCount |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ExhaustiveFragmenter(java.io.File file)
throws chemaxon.sss.search.SearchException
file - is the configuration XML file
chemaxon.sss.search.SearchException - if reaction check fails
(e.g. inconsistent atom maps or multiple reactants)
public ExhaustiveFragmenter(java.lang.String xmlstr)
throws chemaxon.sss.search.SearchException
xmlstr - is the configuration XML string
chemaxon.sss.search.SearchException - if reaction check fails
(e.g. inconsistent atom maps or multiple reactants)
public ExhaustiveFragmenter(java.io.InputStream is)
throws chemaxon.sss.search.SearchException
is - is the configuration XML input stream
chemaxon.sss.search.SearchException - if reaction check fails
(e.g. inconsistent atom maps or multiple reactants)
public ExhaustiveFragmenter(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 ExhaustiveFragmenter(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 void setFragmentSetsTag(java.lang.String fragmentsetsTag)
fragmentsetsTag - is the SDF tag name storing the fragment set indicespublic void setMaxSetCount(int maxsetcount)
maxsetcount - is the maximum number of fragment sets per moleculepublic void setExtensive(boolean extensive)
true if extendable cut sets
should be included. Default: false.
extensive - is true if extendable cut sets should be included
protected void find()
throws chemaxon.sss.search.SearchException
find in class Fragmenterchemaxon.sss.search.SearchException - on search errorpublic void create(java.util.List coll)
Fragmenter.find(Molecule) beforehand to set the cut-bonds!
create in class Fragmentercoll - is the list which the fragments will be added toprotected void setTags(Molecule frag)
setTags in class Fragmenterfrag - is the fragment
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||