|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object chemaxon.marvin.plugin.CalculatorPlugin chemaxon.marvin.calculations.TopologyAnalyserPlugin
Calculates topological data. Data types:
API usage example (as an alternative, you can also use the TopologyAnalyser class directly):
// read input molecule MolImporter mi = new MolImporter("test.mol"); Molecule mol = mi.read(); mi.close(); // create plugin TopologyAnalyserPlugin plugin = new TopologyAnalyserPlugin(); // set target molecule plugin.setMolecule(mol); // run the calculation plugin.run(); // get results int ringCount = plugin.getRingCount(); int rotatableBondCount = plugin.getRotatableBondCount(); int smallestRingSize = plugin.getSmallestRingSize(); // do something with the results ...
Field Summary |
Fields inherited from class chemaxon.marvin.plugin.CalculatorPlugin |
ATOM, BLUE, CALCRGB_OFF, CHART, HYDROGEN_VALENCE_ERROR_MSG, MOLECULE, NAN, RED, SUBRESULT |
Constructor Summary | |
TopologyAnalyserPlugin()
|
Method Summary | |
void |
checkMolecule(Molecule mol)
Checks the input molecule. |
int |
getAliphaticAtomCount()
Returns the aliphatic atom count. |
int |
getAliphaticBondCount()
Returns the aliphatic bond count. |
int |
getAliphaticRingCount()
Returns the aliphatic ring count. |
int |
getAllAtomCount()
Returns the atom count. |
int |
getAromaticAtomCount()
Returns the aromatic atom count. |
int |
getAromaticBondCount()
Returns the aromatic bond count. |
int |
getAromaticRingCount()
Returns the aromatic ring count. |
int |
getBondCount()
Returns the bond count. |
int |
getChainAtomCount()
Returns the chain atom count. |
int |
getChainBondCount()
Returns the chain bond count. |
int |
getFusedAliphaticRingCount()
Calculates the number of fused aliphatic rings (SSSR smallest set of smallest aliphatic rings) in the molecule. |
int |
getFusedAromaticRingCount()
Calculates the number of fused aromatic rings (SSSR smallest set of smallest aromatic rings) in the molecule. |
int |
getFusedRingCount()
Calculates the number of fused rings (SSSR smallest set of smallest rings) in the molecule. |
int |
getHeteroaromaticRingCount()
Returns the heteroaromatic ring count. |
int |
getHeteroRingCount()
Returns the hetero ring count. |
int |
getLargestRingSize()
Returns the largest ring size. |
int |
getLargestRingSizeOfAtom(int index)
Returns the size of largest ring containing the specified atom. |
java.lang.Object |
getResult(java.lang.Object type,
int index)
Returns the result item for the specified key and index. |
java.lang.String |
getResultAsString(java.lang.Object type,
int index,
java.lang.Object result)
Returns the specified result in String format. |
int |
getResultCount(java.lang.Object type)
Returns the number of result items for the given result key. |
int |
getResultDomain(java.lang.Object type)
Returns the calculation domain CalculatorPlugin.ATOM or CalculatorPlugin.MOLECULE . |
java.lang.Object[] |
getResultTypes()
Returns the result types. |
int |
getRingAtomCount()
Returns the ring atom count. |
int |
getRingBondCount()
Returns the ring bond count. |
int |
getRingCount()
Returns the ring count. |
int |
getRotatableBondCount()
Returns the rotatable bond count. |
int |
getSmallestRingSize()
Returns the smallest ring size. |
int |
getSmallestRingSizeOfAtom(int index)
Returns the size of smallest ring containing the specified atom. |
java.lang.String |
getTypeString(java.lang.Object type)
Returns a string representation of the given type. |
boolean |
handlesMultiFragmentMolecules()
Returns true if the plugin handles multifragment molecules,
false otherwise. |
boolean |
isAromaticAtom(int index)
Returns true if aromatic atom. |
boolean |
isChainAtom(int index)
Returns true if chain atom. |
boolean |
isRingAtom(int index)
Returns true if ring atom. |
boolean |
run()
Runs the tool. |
protected void |
setInputMolecule(Molecule mol)
Sets the input molecule. |
void |
setParameters(java.util.Properties params)
Sets the input parameters for the plugin. |
protected void |
standardize(Molecule mol)
Prevents default standardization: does nothing. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public TopologyAnalyserPlugin()
Method Detail |
public void setParameters(java.util.Properties params) throws PluginException
setParameters
in class CalculatorPlugin
params
- is the parameter table
PluginException
- on errorpublic boolean handlesMultiFragmentMolecules()
true
if the plugin handles multifragment molecules,
false
otherwise. In the latter case the plugin takes the
fragment with more atoms if a multifragment molecule is given as input.
Returns true
if parameter "single" is set to "false",
false
otherwise (default: false
).
handlesMultiFragmentMolecules
in class CalculatorPlugin
public void checkMolecule(Molecule mol) throws PluginException
RxnMolecule
or if the molecule contains R-groups.
checkMolecule
in class CalculatorPlugin
mol
- is the input molecule
PluginException
- with error message for the user if the molecule is refusedprotected void setInputMolecule(Molecule mol) throws PluginException
setInputMolecule
in class CalculatorPlugin
mol
- is the input molecule
PluginException
- on errorpublic int getAllAtomCount()
public int getAliphaticAtomCount()
public int getAromaticAtomCount()
public int getBondCount()
public int getAliphaticBondCount()
public int getAromaticBondCount()
public int getRingCount()
public int getAliphaticRingCount()
public int getAromaticRingCount()
public int getHeteroRingCount()
public int getHeteroaromaticRingCount()
public int getRingAtomCount()
public int getRingBondCount()
public int getChainAtomCount()
public int getChainBondCount()
public int getRotatableBondCount()
public int getSmallestRingSize()
public int getLargestRingSize()
public int getFusedRingCount()
public int getFusedAliphaticRingCount()
public int getFusedAromaticRingCount()
public boolean isAromaticAtom(int index)
true
if aromatic atom.
index
- is the atom index
true
if aromatic atompublic boolean isChainAtom(int index)
true
if chain atom.
index
- is the atom index
true
if chain atompublic boolean isRingAtom(int index)
true
if ring atom.
index
- is the atom index
true
if ring atompublic int getSmallestRingSizeOfAtom(int index)
index
- is the atom index
public int getLargestRingSizeOfAtom(int index)
index
- is the atom index
public java.lang.Object getResult(java.lang.Object type, int index) throws PluginException
getResult
in class CalculatorPlugin
type
- is the result typeindex
- is the result index
PluginException
- if the result cannot be returnedCalculatorPlugin.getResultTypes()
public java.lang.String getResultAsString(java.lang.Object type, int index, java.lang.Object result) throws PluginException
getResultAsString
in class CalculatorPlugin
type
- is the result typeindex
- is the result indexresult
- is the result item
PluginException
- if an invalid result item is givenpublic int getResultCount(java.lang.Object type)
getResultCount
in class CalculatorPlugin
type
- is the result type
getResultTypes()
public int getResultDomain(java.lang.Object type)
CalculatorPlugin.ATOM
or CalculatorPlugin.MOLECULE
.
getResultDomain
in class CalculatorPlugin
type
- is the result key
getResultTypes()
public java.lang.Object[] getResultTypes()
getResultTypes
in class CalculatorPlugin
public java.lang.String getTypeString(java.lang.Object type)
getTypeString
in class CalculatorPlugin
type
- is the type object
public boolean run() throws PluginException
run
in class CalculatorPlugin
PluginException
- on errorCalculatorPlugin.getErrorMessage()
protected void standardize(Molecule mol)
standardize
in class CalculatorPlugin
mol
- is the molecule to be standardized
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |