|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectchemaxon.marvin.plugin.CalculatorPlugin
chemaxon.marvin.calculations.MarkushEnumerationPlugin
chemaxon.marvin.calculations.EnumerationPlugin
MarkushEnumerationPlugin
Plugin class for enumerating Markush molecules.
Input: a Markush structure.
Output: the number of possible enumerations; the enumerated molecules.
API usage examples:
// read input molecule
MolImporter mi = new MolImporter("testMarkush.mrv");
Molecule mol = mi.read();
mi.close();
// create plugin
EnumerationPlugin plugin = new EnumerationPlugin();
// set target molecule
plugin.setMolecule(mol);
// run the calculation
plugin.run();
// 1. Get results one by one
Molecule m = plugin.getNextStructure();
while (m != null) {
System.out.println(m.toFormat("smiles"));
// using molecule ...
// ...
// getting next enumerated molecule
m = plugin.getNextStructure();
}
// OR
// 2. Get results in an array
long size = plugin.getStructureCount();
if (size != -1 && size <= Integer.MAX_VALUE) {
Molecule[] enumerated = plugin.getStructures();
for (int i = 0; i < enumerated.length; i++) {
System.out.println(enumerated[i].toFormat("smiles"));
// using molecules ...
}
}
// OR
// 3. Print out some random enumerated structures
for (int i = 0; i < 10; i++) {
Molecule m = plugin.getRandomStructure();
System.out.println(m.toFormat("smiles"));
// using molecule ...
}
For concurrent plugin example applications using ChemAxon's concurrent framework, refer to the Concurrent plugin examples.
| Field Summary |
| Fields inherited from class chemaxon.marvin.plugin.CalculatorPlugin |
ATOM, BLUE, CALCRGB_OFF, COVALENT_HYDRATION_ERROR_REMARK, CRITICAL_ERROR_MSG, EPSILON, INCORRECT_AROMATIC_NITROGEN_REMARK, INSTABLE_TAUTOMERIC_FORM_REMARK, licenseEnvironment, MOLECULE, NAN, PLUGIN_CLASS_KEY, PLUGIN_DIR, RED |
| Constructor Summary | |
EnumerationPlugin()
Deprecated. |
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public EnumerationPlugin()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||