@PublicAPI public class TopologyAnalyserPlugin extends CalculatorPlugin
true
if two atoms are connected)
true
if the molecule graph is connected)
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 molecular results int ringCount = plugin.getRingCount(); int rotatableBondCount = plugin.getRotatableBondCount(); int smallestRingSize = plugin.getSmallestRingSize(); // get atomic result int count = mol.getAtomCount(); double[] stericEffectIndexes = new double[count]; for (int i=0; i < count; ++i) { stericEffectIndexes[i] = plugin.getStericEffectIndex(i); } // get bond result int index = plugin.getBondIndex(0,3); // bond index connecting atom 0 and atom 3 boolean isChainBond = plugin.isChainBond(index); // do something with the results ...
For concurrent plugin example applications using ChemAxon's concurrent framework, refer to the Concurrent plugin examples.
CalculatorPlugin.HydrogenData
ATOM, BLUE, CALCRGB_OFF, COVALENT_HYDRATION_ERROR_REMARK, CRITICAL_ERROR_MSG, EPSILON, explicitHydrogens, INCORRECT_AROMATIC_NITROGEN_REMARK, INSTABLE_TAUTOMERIC_FORM_REMARK, KEEP_HYDROGENS, keepHydrogens, licenseEnvironment, MOLECULE, MOLECULES, NAN, PLUGIN_CLASS_KEY, PLUGIN_DIR, RED, TRUE
Constructor and Description |
---|
TopologyAnalyserPlugin()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
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 |
getAliphaticRingCount(int size)
Returns the number of aliphatic rings (SSSR smallest set of smallest
rings) of a given size in the molecule.
|
int |
getAliphaticRingCountOfSize(int size)
Deprecated.
|
int[][] |
getAliphaticRings()
Identifies the aliphatic rings in the molecule.
|
int[][] |
getAliphaticRings(int size)
Indentifies aliphatic rings in the molecule having a given size (number
of atoms).
|
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 |
getAromaticRingCount(int size)
Returns the number of aromatic rings (SSSR smallest set of smallest
rings) of a given size in the molecule.
|
int |
getAromaticRingCountOfSize(int size)
Deprecated.
|
int[][] |
getAromaticRings()
Identifies the aromatic rings in the molecule.
|
int[][] |
getAromaticRings(int size)
Indentifies aromatic rings in the molecule having a given size (number
of rings).
|
int |
getAsymmetricAtomCount()
Returns the number of asymmetric atoms.
|
int[] |
getAsymmetricAtoms()
Determines the asymmetric atoms.
|
double |
getBalabanIndex()
Calculates the Balaban distance connectivity of the molecule, which is
the average distance sum connectivity.
|
int |
getBondCount()
Returns the bond count.
|
int |
getBondIndex(int i1,
int i2)
Returns the index of the bond connecting two atoms,
-1 if the two atoms are not connected by bond. |
int |
getBondType(int index)
Determines the type of a bond (aromatic bonds are automatically recognized)
|
int |
getCarboaliphaticRingCount()
Calculates the number of carboaliphatic rings in the molecule (aliphatic
rings containing carbon atoms only).
|
int |
getCarboaromaticRingCount()
Calculates the number of carboaromatic rings in the molecule (aromatic
rings containing carbon atoms only).
|
int |
getCarboRingCount()
Returns the carbo ring count.
|
int |
getCarboRingCount(int size)
Calculates the number of carbocyclic rings in the molecule (rings
containing at least a non-carbon atom).
|
int[][] |
getCarboRings()
Identifies carbocyclic rings in the molecule (rings containing carbon
atoms only).
|
int[][] |
getCarboRings(int size)
Identifies carbocyclic rings in the molecule (rings containing carbon
atoms only) having the given number of atoms.
|
int |
getChainAtomCount()
Returns the chain atom count.
|
int |
getChainBondCount()
Returns the chain bond count.
|
int |
getChiralCenterCount()
Calculates the number of tetrahedral stereogenic centers.
|
int[] |
getChiralCenters()
Determines the chiral center atoms.
|
Molecule |
getColoredLargestConjugatedSystem()
Returns a
Molecule in which the atoms of largest conjugated system are colored. |
int |
getCyclomaticNumber()
Calculates the smallest number of graph edges which must be removed such
that no circuit remains.
|
int |
getDistanceCount(int index,
int distance)
Counts the given value in a row of the distance matrix.
|
int |
getDistanceDegree(int index)
Calculates the distance degree of an atom, which is the sum of the
corresponding row values in the distance matrix.
|
int |
getEccentricity(int index)
Calculates the eccentricity of an atom, which is the greatest value in
the corresponding row of the distance matrix.
|
int |
getFragmentCount()
Returns the number of fragments (disconnected parts) of the molecule.
|
double |
getFsp3()
Calculates the Fsp3 value of the given molecule.
Fsp3 = number of sp3 carbons / number of carbons |
int |
getFusedAliphaticRingCount()
Calculates the number of fused aliphatic rings (SSSR smallest set of
smallest aliphatic rings) in the molecule.
|
int |
getFusedAliphaticRingCount(int size)
Calculates the number of fused aliphatic rings in the molecule (rings
s).
|
int[][] |
getFusedAliphaticRings()
Identifies fused aliphatic rings (SSSR smallest set of smallest aliphatic
rings) in the molecule.
|
int[][] |
getFusedAliphaticRings(int size)
Identifies fused aliphatic rings (SSSR smallest set of smallest aliphatic
rings) in the molecule having the given size (number of atoms).
|
int |
getFusedAromaticRingCount()
Calculates the number of fused aromatic rings (SSSR smallest set of
smallest aromatic rings) in the molecule.
|
int |
getFusedAromaticRingCount(int size)
Calculates the number of fused aromatic rings in the molecule (rings
s).
|
int[][] |
getFusedAromaticRings()
Identifies fused aromatic rings (SSSR smallest set of smallest aromatic
rings) in the molecule.
|
int[][] |
getFusedAromaticRings(int size)
Identifies fused aromatic rings (SSSR smallest set of smallest aromatic
rings) in the molecule having the given size (number of atoms).
|
int |
getFusedRingCount()
Calculates the number of fused rings (SSSR smallest set of smallest rings)
in the molecule.
|
double |
getHararyIndex()
Calculates the Harary index which is the half-sum of the off-diagonal
elements of the reciprocal molecular distance matrix of the molecule.
|
int |
getHeteroaliphaticRingCount()
Calculates the number of aliphatic heterocyclic rings in the molecule
(aliphatic rings containing at least a non-carbon atom).
|
int |
getHeteroaliphaticRingCount(int size)
Calculates the number of aliphatic heterocyclic rings in the molecule
(aliphatic rings containing at least a non-carbon atom) having a given
size (number of atoms).
|
int[][] |
getHeteroaliphaticRings()
Identifies heteroaliphatic rings in the molecule (aliphatic rings
containing at least a non-carbon atom).
|
int[][] |
getHeteroaliphaticRings(int size)
Identifies heteroaliphatic rings in the molecule (aliphatic rings
containing at least a non-carbon atom) having a given size (number of atoms).
|
int |
getHeteroaromaticRingCount()
Returns the heteroaromatic ring count.
|
int |
getHeteroaromaticRingCount(int size)
Calculates the number of aromatic heterocyclic rings in the molecule
(aromatic rings containing at least a non-carbon atom) having a given size
(number of atoms).
|
int[][] |
getHeteroaromaticRings()
Identifies heteroaromatic rings in the molecule (aromatic rings containing
at least a non-carbon atom).
|
int[][] |
getHeteroaromaticRings(int size)
Identifies heteroaromatic rings in the molecule (aromatic rings containing
at least a non-carbon atom) having a given size (number of atoms).
|
int |
getHeteroRingCount()
Returns the hetero ring count.
|
int |
getHeteroRingCount(int size)
Calculates the number of heterocyclic rings in the molecule (rings
containing at least a non-carbon atom).
|
int[][] |
getHeteroRings()
Identifies heterocyclic rings in the molecule (rings
containing at least a non-carbon atom).
|
int[][] |
getHeteroRings(int size)
Indentifies hetero rings in the molecule having a given size (number
of atoms).
|
int |
getHyperWienerIndex()
Calculates the hyper Wiener index of the molecule.
|
int[] |
getLargestConjugatedSystem()
Returns the largest conjugated system in the molecule.
|
int |
getLargestConjugatedSystemSize()
Returns the largest conjugated system size (number of pi electron pairs).
|
int[] |
getLargestRing()
Identifies the atoms of the largest ring (number of atoms) in the molecule.
|
int |
getLargestRingSize()
Returns the largest ring size.
|
int |
getLargestRingSizeOfAtom(int index)
Returns the size of largest ring containing the specified atom.
|
int[] |
getLargestRingSystem()
Identifies the atoms of the largest ring system (number of rings) in the
molecule.
|
int |
getLargestRingSystemSize()
Returns the size of the largest ring system (number of rings) in the molecule.
|
int |
getPlattIndex()
Calculates the Platt index of the molecule which is equal to the total
sum of the edge degrees of a molecular graph.
|
java.lang.String |
getProductName()
Returns the product identifier of the plugin as given by
LicenseManager . |
double |
getRandicIndex()
Calculates the Randic index or molecular connectivity index as the
harmonic sum of the geometric means of the node degrees for each edge.
|
java.lang.String |
getRemark()
Returns the calculation remark:
if no results (no result types) then returns remark,
otherwise returns
null . |
java.lang.Object |
getResult(java.lang.Object type,
int index)
Returns the result item for the specified key and index.
|
java.lang.Object |
getResult(java.lang.Object type,
java.lang.String arg)
Returns the shortest path between two atoms if type is set ot "shortestPath",
returns connectivity info if type is set to "connected".
|
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 . |
Molecule |
getResultMolecule()
Returns the result molecule for display.
|
Molecule[] |
getResultMolecules()
Returns the result molecules, molecular results are set in the first molecule,
atomic results are set in subsequent molecules as atom labels.
|
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 |
getRingCount(int size)
Calculates the number of rings (SSSR smallest set of smallest rings) of a
given size in the molecule.
|
int |
getRingCountOfAtom(int index)
Calculates the number of rings (SSSR smallest set of smallest rings) an
atom is part of.
|
int |
getRingCountOfSize(int size)
Deprecated.
|
int[][] |
getRings()
Identifies the rings in the molecule.
|
int[][] |
getRings(int size)
Identifies rings in the molecule having a given size.
|
int |
getRingSystemCount()
Returns the number of ring systems.
|
int |
getRingSystemCount(int size)
Returns the number of ring systems having a given size (number of
rings) in the molecule.
|
int |
getRingSystemCountOfSize(int size)
Deprecated.
|
int[][] |
getRingSystems()
Identifies the ring systems in the molecule.
|
int[][] |
getRingSystems(int size)
Indentifies the ring systems in the molecule having a given size (number
of rings).
|
int |
getRotatableBondCount()
Returns the rotatable bond count.
|
int |
getShortestPath(int index1,
int index2)
Calculates the shortest topological path (number of bonds) between two
atoms.
|
int[] |
getSmallestRing()
Identifies the smallest ring (number of stoms) in the molecule.
|
int |
getSmallestRingSize()
Returns the smallest ring size.
|
int |
getSmallestRingSizeOfAtom(int index)
Returns the size of smallest ring containing the specified atom.
|
int[] |
getSmallestRingSystem()
Identifies the smallest ring system (number of rings) in the molecule.
|
int |
getSmallestRingSystemSize()
Returns the size of the smallest ring system (number of rings) in the molecule.
|
java.lang.String |
getStereo(int a)
Calculates absolute stereo configuration of the given atom.
|
java.lang.String |
getStereo(int a1,
int a2)
Calculates absolute stereo configuration of the given double bond.
|
int |
getStereoDoubleBondCount()
Calculates the number of stereo double bonds.
|
double |
getStericEffectIndex(int index)
Calculates topological steric effect index (TSEI) of an atom from
covalent radii values and topological distances.
|
int |
getSzegedIndex()
Calculates the Szeged index of the molecule.
|
java.lang.String |
getTypeString(java.lang.Object type)
Returns a string representation of the given type.
|
int |
getWienerIndex()
Calculates the Wiener index of the molecule, which is the average
topological atom distance (half of the sumof all atom distances) in the
molecule.
|
int |
getWienerPolarity()
Calculates the Wiener polarity number of the molecule, which is the
number of 3 bond length distances in the molecule.
|
boolean |
handlesMultiFragmentMolecules()
Returns
true if the plugin handles multifragment molecules,
false otherwise. |
boolean |
isAliphaticAtom(int index)
Returns
true if aliphatic atom. |
boolean |
isAromaticAtom(int index)
Returns
true if aromatic atom. |
boolean |
isAsymmetricAtom(int index)
Returns
true if asymmetric atom. |
boolean |
isChainAtom(int index)
Returns
true if chain atom. |
boolean |
isChainBond(int index)
Determines if a bond is a ring bond or a chain bond.
|
boolean |
isChiralCenter(int index)
Determines if an atom can be a tetrahedral stereogenic center.
|
boolean |
isConnected(int index1,
int index2)
Returns
true if two atoms are in the same connected component,
false for atoms of disconnected structures. |
boolean |
isConnectedGraph()
Determines if the molecule is a connected graph or not.
|
boolean |
isRingAtom(int index)
Returns
true if ring atom. |
boolean |
isRingBond(int index)
Determines if a bond is a ring bond or a chain bond.
|
boolean |
isRotatableBond(int index)
Determines if a bond is a rotatable or not
|
boolean |
run()
Runs the tool.
|
void |
setAromatizationMethod(int aromatizationMethod)
Sets the aromatization method.
|
protected void |
setInputMolecule(Molecule mol)
Sets the input molecule.
|
void |
setLicenseEnvironment(java.lang.String env)
Sets license environment to be stored.
|
void |
setParameters(java.util.Properties params)
Sets the input parameters for the plugin.
|
void |
standardize(Molecule mol)
Expands sgroups.
|
arrangeHydrogenIncerments, canRepeat, checkLicense, checkType, containsCoordinateBond, containsMulticenterSgroup, containsPseudoAtom, containsSRUSgroup, create, createModifiedInputMolecule, createStandardizedMolecule, createStandardizedMolecule, dehydrogenize, format, format, format, format, getAtomCount, getAtomIndex, getAtomIndexMap, getCalcMolecule, getDisplayMolecule, getDocument, getDoublePrecision, getErrorMessage, getExplicitHydrogenData, getInputMolDim, getMainMolecule, getOriginalMolecule, getpH, getPluginResource, getQueryMoleculeErrorMessage, getResult, getResult, getResultAsRGB, getResultAsRGB, getResultAsString, getResultCount, getResultDomain, getResultMessage, getResultsAsRGB, getResultsAsRGB, getResultsAsString, getResultsAsString, getResultSource, getWarningMessage, isInputMoleculeAromatized, isLicensed, isMsCalc, isMultiThreadedRunEnabled, isNegligibleResult, isOK, isRgrouped, loadClass, readAttribute, removeWhitespace, restoreExplicitHydrogens, setAtomIndexMap, setDoublePrecision, setDoublePrecision, setDoublePrecision, setKeepHydrogens, setMolecule, setMolecule, setMolecule, setMolecule, setProgressMonitor, standardizeIonicGroups, standardizeNeutralGroups
public TopologyAnalyserPlugin()
public void setLicenseEnvironment(java.lang.String env)
CalculatorPlugin
setLicenseEnvironment
in interface chemaxon.license.Licensable
setLicenseEnvironment
in class CalculatorPlugin
env
- environment String to be stored and passed to the LicenseHandler in the isLicensed methodpublic java.lang.String getProductName()
LicenseManager
.getProductName
in class CalculatorPlugin
LicenseManager.GEOMETRY_PLUGIN_GROUP
public void setParameters(java.util.Properties params) throws PluginException
TopologyAnalyserPlugin
class header (data types).
(default: all molecular types)
type="shortestPath"
and bond-type
calculations only, sets the atom pair, used by cxcalc
, for internal use only;
API usage: call getShortestPath(int,int)
instead.
setParameters
in class CalculatorPlugin
params
- is the parameter tablePluginException
- on errorclass header
public 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 moleculePluginException
- 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 moleculePluginException
- on errorpublic int[] getLargestConjugatedSystem()
public int getLargestConjugatedSystemSize()
public Molecule getColoredLargestConjugatedSystem()
Molecule
in which the atoms of largest conjugated system are colored.public int getAllAtomCount()
public int getAliphaticAtomCount()
public int getAromaticAtomCount()
public int getBondCount()
public int getAliphaticBondCount()
public int getAromaticBondCount()
public int getFragmentCount()
public double getFsp3()
Double.NaN
if there is no carbon
in the structure.public int getRingCount()
public int getAliphaticRingCount()
public int getAliphaticRingCount(int size)
size
- size of the ring to count@Deprecated public int getAliphaticRingCountOfSize(int size)
getAliphaticRingCount(int)
size
- size of the ring to countpublic int[][] getAliphaticRings()
public int[][] getAliphaticRings(int size)
size
- size of the aliphatic rings to returnpublic int getAromaticRingCount()
public int getAromaticRingCount(int size)
size
- size of the ring to count@Deprecated public int getAromaticRingCountOfSize(int size)
getAromaticRingCount(int)
size
- size of the ring to countpublic int[][] getAromaticRings()
public int[][] getAromaticRings(int size)
size
- size of the aromatic rings to returnpublic int getHeteroRingCount()
public int getHeteroRingCount(int size)
size
- size of the rings to countpublic int[][] getHeteroRings()
public int[][] getHeteroRings(int size)
size
- size of the aliphatic rings to returnpublic int getHeteroaliphaticRingCount()
public int getHeteroaliphaticRingCount(int size)
size
- size of the heteroaliphatc rings to countpublic int[][] getHeteroaliphaticRings()
public int[][] getHeteroaliphaticRings(int size)
size
- size of the heteroaliphatic rings to countpublic int getHeteroaromaticRingCount()
public int getHeteroaromaticRingCount(int size)
size
- size of the heteroaromatic rings to countpublic int[][] getHeteroaromaticRings()
public int[][] getHeteroaromaticRings(int size)
size
- size of the heteroaromatic rings to countpublic int getCarboRingCount()
public int getCarboRingCount(int size)
size
- size of the rings to countpublic int[][] getCarboRings()
public int[][] getCarboRings(int size)
size
- size of the rings to countpublic int getCarboaliphaticRingCount()
public int getCarboaromaticRingCount()
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 getFusedAliphaticRingCount(int size)
size
- size of the fused aliphatic rings to countpublic int[][] getFusedAliphaticRings()
public int[][] getFusedAliphaticRings(int size)
size
- size of the fused aliphatic rings to countpublic int getFusedAromaticRingCount()
public int getFusedAromaticRingCount(int size)
size
- size of the fused aromatic rings to countpublic int[][] getFusedAromaticRings()
public int[][] getFusedAromaticRings(int size)
size
- size of the fused aromatic rings to countpublic int getRingSystemCount()
public int getRingSystemCount(int size)
size
- size of the ring to count@Deprecated public int getRingSystemCountOfSize(int size)
getRingSystemCount(int)
size
- size of the ring to countpublic int[] getLargestRing()
public int[] getLargestRingSystem()
public int getLargestRingSystemSize()
public int getSmallestRingSystemSize()
public boolean isAromaticAtom(int index)
true
if aromatic atom.index
- is the atom indextrue
if aromatic atompublic boolean isAliphaticAtom(int index)
true
if aliphatic atom.index
- is the atom indextrue
if aliphatic atompublic boolean isChainAtom(int index)
true
if chain atom.index
- is the atom indextrue
if chain atompublic boolean isRingAtom(int index)
true
if ring atom.index
- is the atom indextrue
if ring atompublic int getSmallestRingSizeOfAtom(int index)
index
- is the atom indexpublic int getLargestRingSizeOfAtom(int index)
index
- is the atom indexpublic int getCyclomaticNumber()
public int getAsymmetricAtomCount()
public int[] getAsymmetricAtoms()
public boolean isAsymmetricAtom(int index)
true
if asymmetric atom.index
- is the atom indextrue
if asymmetric atompublic int getChiralCenterCount()
public int[] getChiralCenters()
public boolean isChiralCenter(int index)
index
- is the atom indextrue
if the atom is stereogenic.public java.lang.String getStereo(int a)
a
- index of the atompublic java.lang.String getStereo(int a1, int a2)
a1
- index of the atom at one end of the double bonda2
- index of the atom at the other end of the double bondpublic int getStereoDoubleBondCount()
public int getShortestPath(int index1, int index2)
Integer.MAX_VALUE
for
atoms of disconnected structures.index1
- is the index of the first atomindex2
- is the index of the second atompublic boolean isConnected(int index1, int index2)
true
if two atoms are in the same connected component,
false
for atoms of disconnected structures.public int getPlattIndex()
public double getRandicIndex()
public double getBalabanIndex()
public int getDistanceDegree(int index)
index
- atom indexpublic int getEccentricity(int index)
index
- atom indexpublic double getHararyIndex()
public int getHyperWienerIndex()
public int getSzegedIndex()
public int getWienerIndex()
public int getWienerPolarity()
public double getStericEffectIndex(int index)
index
- atom indexpublic int getBondType(int index)
index
- bond indexpublic int getDistanceCount(int index, int distance)
index
- atom indexdistance
- the distance value to countpublic boolean isRingBond(int index)
index
- bond indexpublic boolean isChainBond(int index)
index
- bond indexpublic boolean isConnectedGraph()
public boolean isRotatableBond(int index)
index
- bond indexpublic int getRingCountOfAtom(int index)
index
- atom indexpublic int getRingCount(int size)
size
- size of the ring to count@Deprecated public int getRingCountOfSize(int size)
getRingCount(int)
size
- size of the ring to countpublic int[][] getRings()
public int[][] getRings(int size)
size
- size of the ring systems to returnpublic int[][] getRingSystems()
public int[][] getRingSystems(int size)
size
- size of the ring systems to returnpublic int[] getSmallestRing()
public int[] getSmallestRingSystem()
public int getBondIndex(int i1, int i2)
-1
if the two atoms are not connected by bond.i1
- the first atom indexi2
- the second atom index-1
if there is no such bondpublic void setAromatizationMethod(int aromatizationMethod)
aromatizationMethod
- MoleculeGraph.AROM_GENERAL
,
MoleculeGraph.AROM_BASIC
,
MoleculeGraph.AROM_LOOSE
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 indexPluginException
- if the result cannot be returnedCalculatorPlugin.getResultTypes()
public java.lang.Object getResult(java.lang.Object type, java.lang.String arg) throws PluginException
getResult
in class CalculatorPlugin
type
- is the result type ("shortestPath" or "connected")arg
- is the atom string as atom1-atom2 (e.g. "2-3")PluginException
- on errorCalculatorPlugin.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 itemPluginException
- if an invalid result item is givenpublic int getResultCount(java.lang.Object type)
getResultCount
in class CalculatorPlugin
type
- is the result typegetResultTypes()
public int getResultDomain(java.lang.Object type)
CalculatorPlugin.ATOM
or CalculatorPlugin.MOLECULE
.getResultDomain
in class CalculatorPlugin
type
- is the result keygetResultTypes()
public java.lang.Object[] getResultTypes()
TopologyAnalyserPlugin
class header (data types).getResultTypes
in class CalculatorPlugin
public java.lang.String getTypeString(java.lang.Object type)
getTypeString
in class CalculatorPlugin
type
- is the type objectpublic boolean run() throws PluginException
run
in class CalculatorPlugin
PluginException
- on errorCalculatorPlugin.getErrorMessage()
public Molecule getResultMolecule() throws PluginException
MolAtom.getExtraLabel()
).
Molecular results are stored in molecule properties
with keys being the result types
(Molecule.getProperty(String)
).getResultMolecule
in class CalculatorPlugin
PluginException
- on errorpublic Molecule[] getResultMolecules() throws PluginException
getResultMolecules
in class CalculatorPlugin
PluginException
- on errorpublic java.lang.String getRemark()
null
.getRemark
in class CalculatorPlugin
public void standardize(Molecule mol)
standardize
in class CalculatorPlugin
mol
- is the molecule to be standardized