Class TopologyAnalyserPlugin

  • All Implemented Interfaces:
    chemaxon.license.Licensable

    @PublicAPI
    public class TopologyAnalyserPlugin
    extends CalculatorPlugin
    Calculates topological data. Data types:
    • "aliphaticAtom" (API/cxcalc only, atomic boolean property)
    • "aliphaticAtomCount"
    • "aliphaticBondCount"
    • "aliphaticRingCount"
    • "aliphaticRingCountOfSize" (API/cxcalc only, number of aliphatic rings of given size)
    • "aliphaticRings" (API/Chemical Terms only)
    • "aliphaticRingsOfSize" (API/Chemical Terms only)
    • "aromaticAtom" (API/cxcalc only, atomic boolean property)
    • "aromaticAtomCount"
    • "aromaticBondCount"
    • "aromaticRingCount"
    • "aromaticRingCountOfSize" (API/cxcalc only, number of aromatic rings of given size)
    • "aromaticRings" (API/Chemical Terms only)
    • "aromaticRingsOfSize" (API/Chemical Terms only)
    • "asymmetricAtom" (API/cxcalc only, atomic boolean property)
    • "asymmetricAtomCount"
    • "asymmetricAtoms"
    • "atomCount"
    • "balabanIndex"
    • "bondCount"
    • "bondType" (API/cxcalc only, the bond type)
    • "carboaliphaticRingCount"
    • "carboaromaticRingCount"
    • "carboRingCount"
    • "carboRingCountOfSize" (API/Chemical Terms only)
    • "carboRings" (API/Chemical Terms only)
    • "carboRingsOfSize" (API/Chemical Terms only)
    • "chainAtom" (API/cxcalc only, atomic boolean property)
    • "chainAtomCount"
    • "chainBond" (API/cxcalc only, bond boolean property)
    • "chainBondCount"
    • "chiralCenter" (API/cxcalc only, atomic boolean property)
    • "chiralCenterCount"
    • "chiralCenters"
    • "connected" (API/cxcalc only, true if two atoms are connected)
    • "connectedGraph" (API/cxcalc only, true if the molecule graph is connected)
    • "cyclomaticNumber"
    • "distanceCount" (API only, number of atoms at given distance from a given atom)
    • "distanceDegree" (atomic)
    • "eccentricity" (atomic)
    • "fragmentCount",
    • "fsp3",
    • "fusedAliphaticRingCount"
    • "fusedAliphaticRingCountOfSize" (API/Chemical Terms only)
    • "fusedAliphaticRings" (API/Chemical Terms only)
    • "fusedAliphaticRingsOfSize" (API/Chemical Terms only)
    • "fusedAromaticRingCount"
    • "fusedAromaticRingCountOfSize" (API/Chemical Terms only)
    • "fusedAromaticRings" (API/Chemical Terms only)
    • "fusedAromaticRingsOfSize" (API/Chemical Terms only)
    • "fusedRingCount"
    • "hararyIndex"
    • "heteroaliphaticRingCount" (API/Chemical Terms only)
    • "heteroaliphaticRingCountOfSize" (API/Chemical Terms only)
    • "heteroaliphaticRings" (API/Chemical Terms only)
    • "heteroaliphaticRingsOfSize" (API/Chemical Terms only)
    • "heteroaromaticRingCount"
    • "heteroaromaticRingCountOfSize" (API/Chemical Terms only)
    • "heteroaromaticRings" (API/Chemical Terms only)
    • "heteroaromaticRingsOfSize" (API/Chemical Terms only)
    • "heteroRingCount"
    • "heteroRingCountOfSize" (API/Chemical Terms only)
    • "heteroRings" (API/Chemical Terms only)
    • "heteroRingsOfSize" (API/Chemical Terms only)
    • "hyperWienerIndex"
    • "largestAtomRingSize" (API/cxcalc only, atomic, size of largest ring containing atom)
    • "largestRing" (API/Chemical Terms only)
    • "largestRingSize"
    • "largestRingsystem" (API/Chemical Terms only)
    • "largestRingSystemSize",
    • "plattIndex"
    • "randicIndex"
    • "ringAtom" (API/cxcalc only, atomic boolean property)
    • "ringAtomCount"
    • "ringBond" (API/cxcalc only, bond boolean property)
    • "ringBondCount"
    • "ringCount"
    • "ringCountOfAtom" (API/cxcalc only, number of rings of given atom)
    • "ringCountOfSize" (API only, number of rings of given size)
    • "rings"
    • "ringsOfSize"
    • "ringSystemCount",
    • "ringSystemCountOfSize",(API/cxcalc only, number of rings system of given size)
    • "ringSystems" (API/Chemical Terms only)
    • "ringSystemsOfSize" (API/Chemical Terms only)
    • "rotatableBond" (API/cxcalc only, bond boolean property)
    • "rotatableBondCount"
    • "shortestPath" (API/cxcalc only, size of shortest path between two atoms)
    • "smallestAtomRingSize" (API/cxcalc only, atomic, size of smallest ring containing atom)
    • "smallestRing" (API/Chemical Terms only)
    • "smallestRingSize"
    • "smallestRingSystem" (API/Chemical Terms only)
    • "smallestRingsyStemSize"
    • "stereoDoubleBondCount"
    • "stericEffectIndex" (atomic)
    • "szegedIndex"
    • "wienerIndex"
    • "wienerPolarity"

    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.

    Since:
    Marvin 3.5, 09/27/2004
    • Constructor Detail

      • TopologyAnalyserPlugin

        public TopologyAnalyserPlugin()
        Constructor. Creates the topology analyser object.
    • Method Detail

      • setLicenseEnvironment

        public void setLicenseEnvironment​(String env)
        Description copied from class: CalculatorPlugin
        Sets license environment to be stored.
        Specified by:
        setLicenseEnvironment in interface chemaxon.license.Licensable
        Overrides:
        setLicenseEnvironment in class CalculatorPlugin
        Parameters:
        env - environment String to be stored and passed to the LicenseHandler in the isLicensed method
      • setParameters

        public void setParameters​(Properties params)
                           throws PluginException
        Sets the input parameters for the plugin. Parameters:
        • single: "true" if single fragment mode (calculation is performed separately for each fragment) (default: "false")
        • type: result types, separated by ',', possible values:
          See TopologyAnalyserPlugin class header (data types). (default: all molecular types)
        • atoms: <atom1-atom2> valid for 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.
        Overrides:
        setParameters in class CalculatorPlugin
        Parameters:
        params - is the parameter table
        Throws:
        PluginException - on error
        See Also:
        class header
      • handlesMultiFragmentMolecules

        public boolean handlesMultiFragmentMolecules()
        Returns 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).
        Overrides:
        handlesMultiFragmentMolecules in class CalculatorPlugin
        Returns:
        true if the plugin handles multifragment molecules, false otherwise
      • getLargestConjugatedSystem

        public int[] getLargestConjugatedSystem()
        Returns the largest conjugated system in the molecule.
        Returns:
        atom indexes of the largest conjugated system in the molecule
        Since:
        version 17.1.9
      • getLargestConjugatedSystemSize

        public int getLargestConjugatedSystemSize()
        Returns the largest conjugated system size (number of pi electron pairs).
        Returns:
        the largest conjugated system size
        Since:
        version 17.1.9
      • getColoredLargestConjugatedSystem

        public Molecule getColoredLargestConjugatedSystem()
        Returns a Molecule in which the atoms of largest conjugated system are colored.
        Returns:
        a molecule with colored atoms
        Since:
        version 17.1.23
      • getAllAtomCount

        public int getAllAtomCount()
        Returns the atom count.
        Returns:
        the atom count
      • getAliphaticAtomCount

        public int getAliphaticAtomCount()
        Returns the aliphatic atom count.
        Returns:
        the aliphatic atom count
      • getAromaticAtomCount

        public int getAromaticAtomCount()
        Returns the aromatic atom count.
        Returns:
        the aromatic atom count
      • getBondCount

        public int getBondCount()
        Returns the bond count.
        Returns:
        the bond count
      • getAliphaticBondCount

        public int getAliphaticBondCount()
        Returns the aliphatic bond count.
        Returns:
        the aliphatic bond count
      • getAromaticBondCount

        public int getAromaticBondCount()
        Returns the aromatic bond count.
        Returns:
        the aromatic bond count
      • getFragmentCount

        public int getFragmentCount()
        Returns the number of fragments (disconnected parts) of the molecule.
        Returns:
        number of fragments in the molecule
        Since:
        Marvin 5.1
      • getFsp3

        public double getFsp3()
        Calculates the Fsp3 value of the given molecule.
        Fsp3 = number of sp3 carbons / number of carbons
        Returns:
        the fsp3 value of the given molecule or Double.NaN if there is no carbon in the structure.
      • getRingCount

        public int getRingCount()
        Returns the ring count.
        Returns:
        the ring count
      • getAliphaticRingCount

        public int getAliphaticRingCount()
        Returns the aliphatic ring count.
        Returns:
        the aliphatic ring count
      • getAliphaticRingCount

        public int getAliphaticRingCount​(int size)
        Returns the number of aliphatic rings (SSSR smallest set of smallest rings) of a given size in the molecule.
        Parameters:
        size - size of the ring to count
        Returns:
        number of aliphatic rings with the specified size in the molecule
        Since:
        Marvin 5.2
      • getAliphaticRingCountOfSize

        @Deprecated
        public int getAliphaticRingCountOfSize​(int size)
        Returns the number of aliphatic rings (SSSR smallest set of smallest rings) of a given size in the molecule.
        Parameters:
        size - size of the ring to count
        Returns:
        number of aliphatic rings with the specified size in the molecule
        Since:
        Marvin 5.1
      • getAliphaticRings

        public int[][] getAliphaticRings()
        Identifies the aliphatic rings in the molecule.
        Returns:
        aliphatic rings of the molecule (null if the molecule does not contain aliphatic rings)
        Since:
        version 5.2
      • getAliphaticRings

        public int[][] getAliphaticRings​(int size)
        Indentifies aliphatic rings in the molecule having a given size (number of atoms).
        Parameters:
        size - size of the aliphatic rings to return
        Returns:
        aliphatic rings in the molecule having the given size (null if the molecule does not contain aliphatic rings)
        Since:
        version 5.2
      • getAromaticRingCount

        public int getAromaticRingCount()
        Returns the aromatic ring count.
        Returns:
        the aromatic ring count
      • getAromaticRingCount

        public int getAromaticRingCount​(int size)
        Returns the number of aromatic rings (SSSR smallest set of smallest rings) of a given size in the molecule.
        Parameters:
        size - size of the ring to count
        Returns:
        number of aromatic rings with the specified size in the molecule
        Since:
        Marvin 5.2
      • getAromaticRingCountOfSize

        @Deprecated
        public int getAromaticRingCountOfSize​(int size)
        Deprecated.
        Returns the number of aromatic rings (SSSR smallest set of smallest rings) of a given size in the molecule.
        Parameters:
        size - size of the ring to count
        Returns:
        number of aromatic rings with the specified size in the molecule
        Since:
        Marvin 5.1
      • getAromaticRings

        public int[][] getAromaticRings()
        Identifies the aromatic rings in the molecule.
        Returns:
        aromatic rings of the molecule (null if the molecule is aliphatic)
        Since:
        version 5.2
      • getAromaticRings

        public int[][] getAromaticRings​(int size)
        Indentifies aromatic rings in the molecule having a given size (number of rings).
        Parameters:
        size - size of the aromatic rings to return
        Returns:
        aromatic rings in the molecule having the given size (null if the molecule is aliphatic or contains different sized aromatic rings only)
        Since:
        version 5.2
      • getHeteroRingCount

        public int getHeteroRingCount()
        Returns the hetero ring count.
        Returns:
        the hetero ring count
      • getHeteroRingCount

        public int getHeteroRingCount​(int size)
        Calculates the number of heterocyclic rings in the molecule (rings containing at least a non-carbon atom).
        Parameters:
        size - size of the rings to count
        Returns:
        number of heterocyclic rings
        Since:
        version 5.2
      • getHeteroRings

        public int[][] getHeteroRings()
        Identifies heterocyclic rings in the molecule (rings containing at least a non-carbon atom).
        Returns:
        heterocyclic rings (null of no heterocyclic ring found in the molecule.
        Since:
        version 5.2
      • getHeteroRings

        public int[][] getHeteroRings​(int size)
        Indentifies hetero rings in the molecule having a given size (number of atoms).
        Parameters:
        size - size of the aliphatic rings to return
        Returns:
        aliphatic rings in the molecule having the given size (null if the molecule does not contain aliphatic rings)
        Since:
        version 5.2
      • getHeteroaliphaticRingCount

        public int getHeteroaliphaticRingCount()
        Calculates the number of aliphatic heterocyclic rings in the molecule (aliphatic rings containing at least a non-carbon atom).
        Returns:
        number of heteroaliphatic rings
        Since:
        version 5.2
      • getHeteroaliphaticRingCount

        public 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).
        Parameters:
        size - size of the heteroaliphatc rings to count
        Returns:
        number of heteroaliphatic rings having the given size
        Since:
        version 5.2
      • getHeteroaliphaticRings

        public int[][] getHeteroaliphaticRings()
        Identifies heteroaliphatic rings in the molecule (aliphatic rings containing at least a non-carbon atom).
        Returns:
        atom indexes of heteroaliphatic rings
        Since:
        version 5.2
      • getHeteroaliphaticRings

        public 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).
        Parameters:
        size - size of the heteroaliphatic rings to count
        Returns:
        heteroaliphatic rings having the given size
        Since:
        version 5.2
      • getHeteroaromaticRingCount

        public int getHeteroaromaticRingCount()
        Returns the heteroaromatic ring count.
        Returns:
        the heteroaromatic ring count
      • getHeteroaromaticRingCount

        public 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).
        Parameters:
        size - size of the heteroaromatic rings to count
        Returns:
        number of heteroaromatic rings having the given size
        Since:
        version 5.2
      • getHeteroaromaticRings

        public int[][] getHeteroaromaticRings()
        Identifies heteroaromatic rings in the molecule (aromatic rings containing at least a non-carbon atom).
        Returns:
        heteroaromatic rings
        Since:
        version 5.2
      • getHeteroaromaticRings

        public 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).
        Parameters:
        size - size of the heteroaromatic rings to count
        Returns:
        heteroaromatic rings having the given size
        Since:
        version 5.2
      • getCarboRingCount

        public int getCarboRingCount()
        Returns the carbo ring count.
        Returns:
        the carbo ring count
      • getCarboRingCount

        public int getCarboRingCount​(int size)
        Calculates the number of carbocyclic rings in the molecule (rings containing at least a non-carbon atom).
        Parameters:
        size - size of the rings to count
        Returns:
        number of carbocyclic rings with the given size
        Since:
        version 5.2
      • getCarboRings

        public int[][] getCarboRings()
        Identifies carbocyclic rings in the molecule (rings containing carbon atoms only).
        Returns:
        carbocyclic rings (null if no carbocyclic ring found in the molecule.
        Since:
        version 5.2
      • getCarboRings

        public int[][] getCarboRings​(int size)
        Identifies carbocyclic rings in the molecule (rings containing carbon atoms only) having the given number of atoms.
        Parameters:
        size - size of the rings to count
        Returns:
        carbocyclic rings with the given size (null if no carbocyclic ring found in the molecule.
        Since:
        version 5.2
      • getCarboaliphaticRingCount

        public int getCarboaliphaticRingCount()
        Calculates the number of carboaliphatic rings in the molecule (aliphatic rings containing carbon atoms only).
        Returns:
        number of carboaliphatic rings
      • getCarboaromaticRingCount

        public int getCarboaromaticRingCount()
        Calculates the number of carboaromatic rings in the molecule (aromatic rings containing carbon atoms only).
        Returns:
        number of carboaromatic rings
      • getRingAtomCount

        public int getRingAtomCount()
        Returns the ring atom count.
        Returns:
        the ring atom count
      • getRingBondCount

        public int getRingBondCount()
        Returns the ring bond count.
        Returns:
        the ring bond count
      • getChainAtomCount

        public int getChainAtomCount()
        Returns the chain atom count.
        Returns:
        the chain atom count
      • getChainBondCount

        public int getChainBondCount()
        Returns the chain bond count.
        Returns:
        the chain bond count
      • getRotatableBondCount

        public int getRotatableBondCount()
        Returns the rotatable bond count.
        Returns:
        the rotatable bond count
      • getSmallestRingSize

        public int getSmallestRingSize()
        Returns the smallest ring size.
        Returns:
        the smallest ring size
      • getLargestRingSize

        public int getLargestRingSize()
        Returns the largest ring size.
        Returns:
        the largest ring size
      • getFusedRingCount

        public int getFusedRingCount()
        Calculates the number of fused rings (SSSR smallest set of smallest rings) in the molecule.
        Returns:
        number of fused rings in the molecule
      • getFusedAliphaticRingCount

        public int getFusedAliphaticRingCount()
        Calculates the number of fused aliphatic rings (SSSR smallest set of smallest aliphatic rings) in the molecule.
        Returns:
        number of fused aliphatic rings in the molecule
      • getFusedAliphaticRingCount

        public int getFusedAliphaticRingCount​(int size)
        Calculates the number of fused aliphatic rings in the molecule (rings s).
        Parameters:
        size - size of the fused aliphatic rings to count
        Returns:
        number of fused aliphatic rings having the given size
        Since:
        version 5.2
      • getFusedAliphaticRings

        public int[][] getFusedAliphaticRings()
        Identifies fused aliphatic rings (SSSR smallest set of smallest aliphatic rings) in the molecule.
        Returns:
        atom indexes of the fused aliphatic rings in the molecule
        Since:
        version 5.2
      • getFusedAliphaticRings

        public 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).
        Parameters:
        size - size of the fused aliphatic rings to count
        Returns:
        atom indexes of the fused aliphatic rings in the molecule having the given number of atoms
        Since:
        version 5.2
      • getFusedAromaticRingCount

        public int getFusedAromaticRingCount()
        Calculates the number of fused aromatic rings (SSSR smallest set of smallest aromatic rings) in the molecule.
        Returns:
        number of fused aromatic rings in the molecule
      • getFusedAromaticRingCount

        public int getFusedAromaticRingCount​(int size)
        Calculates the number of fused aromatic rings in the molecule (rings s).
        Parameters:
        size - size of the fused aromatic rings to count
        Returns:
        number of fused aromatic rings having the given size
        Since:
        version 5.2
      • getFusedAromaticRings

        public int[][] getFusedAromaticRings()
        Identifies fused aromatic rings (SSSR smallest set of smallest aromatic rings) in the molecule.
        Returns:
        atom indexes of the fused aromatic rings in the molecule
        Since:
        version 5.2
      • getFusedAromaticRings

        public 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).
        Parameters:
        size - size of the fused aromatic rings to count
        Returns:
        atom indexes of the fused aromatic rings in the molecule
        Since:
        version 5.2
      • getRingSystemCount

        public int getRingSystemCount()
        Returns the number of ring systems. Fused and spiro rings belong to to one ring system.
        Returns:
        number of ring systems in the molecule
        Since:
        Marvin 5.1
      • getRingSystemCount

        public int getRingSystemCount​(int size)
        Returns the number of ring systems having a given size (number of rings) in the molecule.
        Parameters:
        size - size of the ring to count
        Returns:
        number of ring systems with the specified size in the molecule
        Since:
        Marvin 5.2
      • getRingSystemCountOfSize

        @Deprecated
        public int getRingSystemCountOfSize​(int size)
        Deprecated.
        Returns the number of ring systems having a given size (number of rings) in the molecule.
        Parameters:
        size - size of the ring to count
        Returns:
        number of ring systems with the specified size in the molecule
        Since:
        Marvin 5.1
      • getLargestRing

        public int[] getLargestRing()
        Identifies the atoms of the largest ring (number of atoms) in the molecule.
        Returns:
        atom indexes of the largest ring in the molecule (null when acyclic)
        Since:
        version 5.2
      • getLargestRingSystem

        public int[] getLargestRingSystem()
        Identifies the atoms of the largest ring system (number of rings) in the molecule.
        Returns:
        atom indexes of the largest ring system in the molecule (null when acyclic)
        Since:
        version 5.2
      • getLargestRingSystemSize

        public int getLargestRingSystemSize()
        Returns the size of the largest ring system (number of rings) in the molecule.
        Returns:
        size of the largest ring system in the molecule (0 when acylcic)
        Since:
        Marvin 5.1
      • getSmallestRingSystemSize

        public int getSmallestRingSystemSize()
        Returns the size of the smallest ring system (number of rings) in the molecule.
        Returns:
        size of the smallest ring system in the molecule (0 when acylcic)
        Since:
        Marvin 5.1
      • isAromaticAtom

        public boolean isAromaticAtom​(int index)
        Returns true if aromatic atom.
        Parameters:
        index - is the atom index
        Returns:
        true if aromatic atom
      • isAliphaticAtom

        public boolean isAliphaticAtom​(int index)
        Returns true if aliphatic atom.
        Parameters:
        index - is the atom index
        Returns:
        true if aliphatic atom
      • isChainAtom

        public boolean isChainAtom​(int index)
        Returns true if chain atom.
        Parameters:
        index - is the atom index
        Returns:
        true if chain atom
      • isRingAtom

        public boolean isRingAtom​(int index)
        Returns true if ring atom.
        Parameters:
        index - is the atom index
        Returns:
        true if ring atom
      • getSmallestRingSizeOfAtom

        public int getSmallestRingSizeOfAtom​(int index)
        Returns the size of smallest ring containing the specified atom.
        Parameters:
        index - is the atom index
        Returns:
        the size of smallest ring containing the specified atom
      • getLargestRingSizeOfAtom

        public int getLargestRingSizeOfAtom​(int index)
        Returns the size of largest ring containing the specified atom.
        Parameters:
        index - is the atom index
        Returns:
        the size of largest ring containing the specified atom
      • getCyclomaticNumber

        public int getCyclomaticNumber()
        Calculates the smallest number of graph edges which must be removed such that no circuit remains. Also known as circuit rank.
        Returns:
        cyclomatic number of the molecule
      • getAsymmetricAtomCount

        public int getAsymmetricAtomCount()
        Returns the number of asymmetric atoms.
        Returns:
        the number of asymmetric atoms
      • getAsymmetricAtoms

        public int[] getAsymmetricAtoms()
        Determines the asymmetric atoms.
        Returns:
        indexes of asymmetric atoms
        Since:
        Marvin 5.3
      • isAsymmetricAtom

        public boolean isAsymmetricAtom​(int index)
        Returns true if asymmetric atom.
        Parameters:
        index - is the atom index
        Returns:
        true if asymmetric atom
      • getChiralCenterCount

        public int getChiralCenterCount()
        Calculates the number of tetrahedral stereogenic centers. This function identifies two chiral centers in 1,4-dimethylcyclohexane, which does not contain asymmetric atoms.
        Returns:
        number of tetrahedral stereogenic center atoms
      • getChiralCenters

        public int[] getChiralCenters()
        Determines the chiral center atoms.
        Returns:
        indexes of chiral center atoms
        Since:
        Marvin 5.3
      • isChiralCenter

        public boolean isChiralCenter​(int index)
        Determines if an atom can be a tetrahedral stereogenic center.
        Parameters:
        index - is the atom index
        Returns:
        true if the atom is stereogenic.
      • getStereo

        public String getStereo​(int a)
        Calculates absolute stereo configuration of the given atom. Returns "R" or "S" correspondingly, if the atom is stereo, otherwise it returns an empty string,
        Parameters:
        a - index of the atom
        Returns:
        the absolute stereo configuration of the atom
        Since:
        Marvin 5.2.1
      • getStereo

        public String getStereo​(int a1,
                                int a2)
        Calculates absolute stereo configuration of the given double bond. Returns "E" or "Z" correspondingly, if the bond is a stereo double bond, otherwise it returns an empty string. Double bonds in small rings are not considered stereo bonds.
        Parameters:
        a1 - index of the atom at one end of the double bond
        a2 - index of the atom at the other end of the double bond
        Returns:
        the absolute stereo configuration of the atom
        Since:
        Marvin 5.2.1
      • getStereoDoubleBondCount

        public int getStereoDoubleBondCount()
        Calculates the number of stereo double bonds.
        Returns:
        number of stereo double bonds atoms
        Since:
        Marvin 5.2.1
      • getShortestPath

        public int getShortestPath​(int index1,
                                   int index2)
        Calculates the shortest topological path (number of bonds) between two atoms. It returns Integer.MAX_VALUE for atoms of disconnected structures.
        Parameters:
        index1 - is the index of the first atom
        index2 - is the index of the second atom
        Returns:
        the shortest path between two atoms
      • isConnected

        public boolean isConnected​(int index1,
                                   int index2)
        Returns true if two atoms are in the same connected component, false for atoms of disconnected structures.
      • getPlattIndex

        public int getPlattIndex()
        Calculates the Platt index of the molecule which is equal to the total sum of the edge degrees of a molecular graph.
        Returns:
        the Platt index
      • getRandicIndex

        public 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.
        Returns:
        the Randic index
      • getBalabanIndex

        public double getBalabanIndex()
        Calculates the Balaban distance connectivity of the molecule, which is the average distance sum connectivity.
        Returns:
        the Balaban index (Integer.MAX_VALUE for disconnected graphs)
      • getDistanceDegree

        public int getDistanceDegree​(int index)
        Calculates the distance degree of an atom, which is the sum of the corresponding row values in the distance matrix.
        Parameters:
        index - atom index
        Returns:
        the distance degree of the atom (Integer.MAX_VALUE for disconnected graphs)
      • getEccentricity

        public int getEccentricity​(int index)
        Calculates the eccentricity of an atom, which is the greatest value in the corresponding row of the distance matrix.
        Parameters:
        index - atom index
        Returns:
        the eccentricity value of the atom (Integer.MAX_VALUE for disconnected graphs)
      • getHararyIndex

        public 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.
        Returns:
        the Harary index (Integer.MAX_VALUE for disconnected graphs)
      • getHyperWienerIndex

        public int getHyperWienerIndex()
        Calculates the hyper Wiener index of the molecule.
        Returns:
        the hyper Wiener index (Integer.MAX_VALUE for disconnected graphs)
      • getSzegedIndex

        public int getSzegedIndex()
        Calculates the Szeged index of the molecule. The Szeged index is based on the Wiener number, which is calculated by simply counting the number of nodes on both sides of each edge (and sum these counts). The Szeged index extends the Wiener number for cyclic graphs by counting those nodes only which are nearer to the given side of the edge than to the other. Unreachable nodes (disconnected graphs) or those at equidistance position to both sides of the given edge are not taken into account.
        Returns:
        the Szeged index
      • getWienerIndex

        public 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.
        Returns:
        the Wiener index (Integer.MAX_VALUE for disconnected graphs)
      • getWienerPolarity

        public int getWienerPolarity()
        Calculates the Wiener polarity number of the molecule, which is the number of 3 bond length distances in the molecule.
        Returns:
        the Wiener polarity number
      • getStericEffectIndex

        public double getStericEffectIndex​(int index)
        Calculates topological steric effect index (TSEI) of an atom from covalent radii values and topological distances. The stericEffectIndex is related to the steric hindrance of the given atom.
        Parameters:
        index - atom index
        Returns:
        the topological steric effect index of the atom
      • getBondType

        public int getBondType​(int index)
        Determines the type of a bond (aromatic bonds are automatically recognized)
        Parameters:
        index - bond index
        Returns:
        bond type
      • getDistanceCount

        public int getDistanceCount​(int index,
                                    int distance)
        Counts the given value in a row of the distance matrix.
        Parameters:
        index - atom index
        distance - the distance value to count
        Returns:
        the distance count of a value for the atom
      • isRingBond

        public boolean isRingBond​(int index)
        Determines if a bond is a ring bond or a chain bond.
        Parameters:
        index - bond index
        Returns:
        true if the bond is a ring bond, false if chain bond
      • isChainBond

        public boolean isChainBond​(int index)
        Determines if a bond is a ring bond or a chain bond.
        Parameters:
        index - bond index
        Returns:
        true if the bond is a chain bond, false if chain bond
      • isConnectedGraph

        public boolean isConnectedGraph()
        Determines if the molecule is a connected graph or not. There is a path from any node to any other node in the graph.
        Returns:
        true if the graph is connected, false if the graph is disconnected.
      • isRotatableBond

        public boolean isRotatableBond​(int index)
        Determines if a bond is a rotatable or not
        Parameters:
        index - bond index
        Returns:
        true if the bond is a rotatable bond, false otherwise
      • getRingCountOfAtom

        public int getRingCountOfAtom​(int index)
        Calculates the number of rings (SSSR smallest set of smallest rings) an atom is part of.
        Parameters:
        index - atom index
        Returns:
        number of rings the atom is a member of
      • getRingCount

        public int getRingCount​(int size)
        Calculates the number of rings (SSSR smallest set of smallest rings) of a given size in the molecule.
        Parameters:
        size - size of the ring to count
        Returns:
        number of rings in the molecule
        Since:
        Marvin 5.2
      • getRingCountOfSize

        @Deprecated
        public int getRingCountOfSize​(int size)
        Deprecated.
        Calculates the number of rings (SSSR smallest set of smallest rings) of a given size in the molecule.
        Parameters:
        size - size of the ring to count
        Returns:
        number of rings in the molecule
      • getRings

        public int[][] getRings()
        Identifies the rings in the molecule.
        Returns:
        rings of the molecule (null if the molecule is acyclic)
        Since:
        version 5.2
      • getRings

        public int[][] getRings​(int size)
        Identifies rings in the molecule having a given size.
        Parameters:
        size - size of the ring systems to return
        Returns:
        rings of the molecule having the given size (null if the molecule is acyclic or contains different rings only)
        Since:
        version 5.2
      • getRingSystems

        public int[][] getRingSystems()
        Identifies the ring systems in the molecule. Fused and spiro rings belong to one ring system.
        Returns:
        ring systems in the molecule (null if the molecule is acyclic)
        Since:
        version 5.2
      • getRingSystems

        public int[][] getRingSystems​(int size)
        Indentifies the ring systems in the molecule having a given size (number of rings). Fused and spiro rings belong to one ring system.
        Parameters:
        size - size of the ring systems to return
        Returns:
        ring systems in the molecule having the given size (null if the molecule is acyclic or contains different rings only)
        Since:
        version 5.2
      • getSmallestRing

        public int[] getSmallestRing()
        Identifies the smallest ring (number of stoms) in the molecule.
        Returns:
        atom indexes of the smallest ring in the molecule (null when acyclic)
        Since:
        version 5.2
      • getSmallestRingSystem

        public int[] getSmallestRingSystem()
        Identifies the smallest ring system (number of rings) in the molecule.
        Returns:
        atom indexes of the smallest ring system in the molecule (null when acyclic)
        Since:
        version 5.2
      • getBondIndex

        public 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.
        Parameters:
        i1 - the first atom index
        i2 - the second atom index
        Returns:
        the connectiong bond index, -1 if there is no such bond
      • getResultAsString

        public String getResultAsString​(Object type,
                                        int index,
                                        Object result)
                                 throws PluginException
        Returns the specified result in String format.
        Overrides:
        getResultAsString in class CalculatorPlugin
        Parameters:
        type - is the result type
        index - is the result index
        result - is the result item
        Returns:
        the specified result in String format
        Throws:
        PluginException - if an invalid result item is given
      • getResultCount

        public int getResultCount​(Object type)
        Returns the number of result items for the given result key.
        Overrides:
        getResultCount in class CalculatorPlugin
        Parameters:
        type - is the result type
        Returns:
        the number of result items
        See Also:
        getResultTypes()
      • getTypeString

        public String getTypeString​(Object type)
        Returns a string representation of the given type.
        Overrides:
        getTypeString in class CalculatorPlugin
        Parameters:
        type - is the type object
        Returns:
        the type string
      • getRemark

        public String getRemark()
        Returns the calculation remark: if no results (no result types) then returns remark, otherwise returns null.
        Overrides:
        getRemark in class CalculatorPlugin
        Returns:
        the calculation remark
      • standardize

        public void standardize​(Molecule mol)
        Expands sgroups.
        Overrides:
        standardize in class CalculatorPlugin
        Parameters:
        mol - is the molecule to be standardized