Interface Smolecule


@PublicApi public interface Smolecule
Array-based molecule interface.

PLEASE DO NOT IMPLEMENT THIS INTERFACE! It may get more abstract methods in later versions.

Since:
Marvin 5.2.2, 04/24/2009
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Use all atom and bond property arrays.
    static final int
    Use atom stereo properties arrays, equals A_PARITY|A_CHIRALITY.
    static final int
    Use atom type array.
    static final int
    Use arrays to store bonds.
    static final int
    Use charge array.
    static final int
    Chirality.
    static final int
    Use explicit Hydrogen count array.
    static final int
    Use hybridization state array.
    static final int
    Use implicit Hydrogen count array.
    static final int
    Use mass number array.
    static final int
    Atom parity.
    static final int
    Use radical array.
    static final int
    Use R-group ID array.
    static final int
    Use valence array.
    static final int
    Maximum R-group index (32767).
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    areNeighbors(int atom1, int atom2)
    Tests whether two atoms are connected.
    chemaxon.struc.Gearch
    Gets graph search algorithms.
    int
    Gets info about the used arrays.
    int
    getAtom1(int i)
    Gets the index of the first atom of the specified bond.
    int
    getAtom2(int i)
    Gets the index of the second atom of the specified bond.
    int
    Gets the number of atoms.
    int
    getAtomMap(int atom)
    Gets the atom-atom mapping number.
    int
    getAtomStereo(int atom)
    Gets atom stereo properties as an integer.
    int
    getAtomType(int atom)
    Gets the type of an atom.
    int
    Gets the number of bonds.
    int
    getBondFlags(int i)
    Gets the bond descriptor flags.
    int
    getBondIndex(int atom1, int atom2)
    Gets the index of the bond between the specified atoms.
    int
    getBondType(int i)
    Gets the type of a bond.
    int
    getBondType(int atom1, int atom2)
    Gets the type of a bond between the two specified atoms.
    int
    getCharge(int atom)
    Gets the charge of an ion.
    int
    getChirality(int atom)
    Gets the chirality of an atom.
    int
    Gets the number of explicit hydrogen atom neighbors of the given atom.
    int
    Gets the hybridization state of an atom.
    int
    Gets the number of implicit Hydrogens of an atom.
    int
    getMassno(int atom)
    Gets the mass number of an atom.
    Gets the molecule title/name.
    int
    getNeighbor(int atom, int i)
    Gets the index of a neighbor of an atom.
    int
    getNeighborCount(int atom)
    Gets the number of neighbors of an atom.
    int
    getParity(int atom)
    Gets the parity of an atom.
    default int
    getRadical(int atom)
    Deprecated, for removal: This API element is subject to removal in a future version.
    getRadicalValue(int atom)
    Gets the radical value of an atom.
    int
    getRgroupId(int atom)
    Gets the R-group identifier of an atom.
    int
    getValence(int atom)
    Gets the valence.
    Gets the property container.
  • Field Details

  • Method Details

    • getName

      String getName()
      Gets the molecule title/name.
      Returns:
      the molecule name or an empty string
    • getAtomCount

      int getAtomCount()
      Gets the number of atoms.
      Returns:
      the number of atoms
    • getBondCount

      int getBondCount()
      Gets the number of bonds.
      Returns:
      the number of bonds
    • properties

      MPropertyContainer properties()
      Gets the property container.
      Returns:
      the property container
    • getArrayFlags

      int getArrayFlags()
      Gets info about the used arrays.
      Returns:
      the array info
    • getAtomType

      int getAtomType(int atom)
      Gets the type of an atom.
      Parameters:
      atom - the atom index
      Returns:
      the atom type
    • getCharge

      int getCharge(int atom)
      Gets the charge of an ion.
      Parameters:
      atom - the atom index
      Returns:
      the charge
      See Also:
    • getRadical

      @Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) default int getRadical(int atom)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the radical value of an atom.
      Parameters:
      atom - the atom index
      Returns:
      the radical value
      See Also:
    • getRadicalValue

      AtomProperty.Radical getRadicalValue(int atom)
      Gets the radical value of an atom.
      Parameters:
      atom - the atom index
      Returns:
      the radical value
      See Also:
    • getMassno

      int getMassno(int atom)
      Gets the mass number of an atom. In the case of an element it returns 0, because it is a mix of isotopes having different mass numbers.
      Parameters:
      atom - the atom index
      Returns:
      the mass number, or zero if not specified
      See Also:
    • getHybridizationState

      int getHybridizationState(int atom)
      Gets the hybridization state of an atom.
      Parameters:
      atom - the atom index
      Returns:
      the hybridization state
      See Also:
    • getImplicitHcount

      int getImplicitHcount(int atom)
      Gets the number of implicit Hydrogens of an atom.
      Parameters:
      atom - the atom index
      Returns:
      the number of Hydrogens
      See Also:
    • getExplicitHcount

      int getExplicitHcount(int atom)
      Gets the number of explicit hydrogen atom neighbors of the given atom.
      Parameters:
      atom - the atom index
      Returns:
      the number of Hydrogens
      See Also:
    • getValence

      int getValence(int atom)
      Gets the valence. If valence is set as a property, returns that. Otherwise the valence is the sum of bond orders plus the number of implicit hydrogens or query hydrogen atoms.
      Parameters:
      atom - the atom index
      Returns:
      the valence
      See Also:
    • getAtomMap

      int getAtomMap(int atom)
      Gets the atom-atom mapping number.
      Parameters:
      atom - the atom index
      Returns:
      the map value (positive integer) or 0
      See Also:
    • getRgroupId

      int getRgroupId(int atom)
      Gets the R-group identifier of an atom.
      Parameters:
      atom - the atom index
      Returns:
      the R-group identifier (between 0 and RGROUP_MAX) or 0 for normal atoms
      See Also:
    • getParity

      int getParity(int atom)
      Gets the parity of an atom.
      Parameters:
      atom - the atom index
      Returns:
      the parity or 0
      See Also:
    • getChirality

      int getChirality(int atom)
      Gets the chirality of an atom.
      Parameters:
      atom - the atom index
      Returns:
      the chirality or 0 if the atom is not chiral
      See Also:
    • getAtomStereo

      int getAtomStereo(int atom)
      Gets atom stereo properties as an integer.
      Returns:
      getParity(atom)|getChirality(atom)
      See Also:
    • getNeighborCount

      int getNeighborCount(int atom)
      Gets the number of neighbors of an atom.
      Parameters:
      atom - the atom index
      Returns:
      the number of neighbors
      See Also:
    • getNeighbor

      int getNeighbor(int atom, int i)
      Gets the index of a neighbor of an atom.
      Parameters:
      atom - the atom index
      i - the neighbor index
      Returns:
      the atom index of the i-th neighbor of atom k
      See Also:
    • areNeighbors

      boolean areNeighbors(int atom1, int atom2)
      Tests whether two atoms are connected.
      Parameters:
      atom1 - first atom index
      atom2 - second atom index
      Returns:
      true if they are connected, false otherwise
      See Also:
    • getAtom1

      int getAtom1(int i)
      Gets the index of the first atom of the specified bond.
      Parameters:
      i - the bond index
      Returns:
      an atom index
      See Also:
    • getAtom2

      int getAtom2(int i)
      Gets the index of the second atom of the specified bond.
      Parameters:
      i - the bond index
      Returns:
      an atom index
      See Also:
    • gearch

      chemaxon.struc.Gearch gearch()
      Gets graph search algorithms.
      Returns:
      graph searches
    • getBondIndex

      int getBondIndex(int atom1, int atom2)
      Gets the index of the bond between the specified atoms.
      Parameters:
      atom1 - first atom index
      atom2 - second atom index
      Returns:
      the bond index or -1
      See Also:
    • getBondType

      int getBondType(int i)
      Gets the type of a bond.
      Parameters:
      i - the bond index
      Returns:
      the bond type
      See Also:
    • getBondType

      int getBondType(int atom1, int atom2)
      Gets the type of a bond between the two specified atoms.
      Parameters:
      atom1 - first atom index
      atom2 - second atom index
      Returns:
      the bond type
      See Also:
    • getBondFlags

      int getBondFlags(int i)
      Gets the bond descriptor flags.
      Parameters:
      i - the bond index
      Returns:
      getBondType(i) | stereo1 | stereo2 | topology | reacting_center
      See Also: