Interface WSmolecule

All Superinterfaces:
Incomplecule, Smolecule

@PublicAPI public interface WSmolecule extends Smolecule
Writable abstract molecule class.

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

Since:
Marvin 5.3, 05/21/2009
  • Method Details

    • newInstance

      WSmolecule newInstance(int na, int nb, int aflags)
      Creates a new WSmolecule instance with the specified capacity.
      Parameters:
      na - the maximum number of atoms
      nb - the maximum number of bonds
      aflags - arrays to enable, see Smolecule.A_ALL
    • reset

      void reset(int aflags)
      Clears the molecule and sets the array flags.
      Parameters:
      aflags - the array flags
    • addAtom

      void addAtom(Smolecule smol, int k)
      Adds an atom from another Smolecule.
      Parameters:
      smol - the other Smolecule
      k - atom index in smol
    • addAtom

      void addAtom(int atno)
      Adds an atom.
      Parameters:
      atno - the atomic number
    • addBond

      void addBond(int atom1, int atom2, int type)
      Adds a bond.
      Parameters:
      atom1 - first atom index
      atom2 - second atom index
      type - bond type
    • removeAtom

      void removeAtom(int k)
      Removes an atom.
      Parameters:
      k - the atom index
    • removeBond

      void removeBond(int k)
      Removes a bond.
      Parameters:
      k - the bond index
    • setCharge

      void setCharge(int atom, int chg)
      Sets the charge of an ion.
      Parameters:
      atom - the atom index
      chg - the charge
    • setRadical

      @Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) default void setRadical(int atom, int rad)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the radical value of an atom.
      Parameters:
      atom - the atom index
      rad - the radical value
    • setRadicalValue

      void setRadicalValue(int atom, AtomProperty.Radical rad)
      Sets the radical value of an atom.
      Parameters:
      atom - the atom index
      rad - the radical value
    • setHybridizationState

      void setHybridizationState(int atom, int hs)
      Sets the hybridization state of an atom.
      Parameters:
      atom - the atom index
      hs - the hybridization state
      See Also:
    • setMassno

      void setMassno(int atom, int m)
      Sets the mass number.
      Parameters:
      atom - the atom index
      m - the mass number or zero to unset
    • setValence

      void setValence(int atom, int v)
      Sets the valence.
      Parameters:
      atom - the atom index
      v - the valence
    • setImplicitHcount

      void setImplicitHcount(int atom, int h)
      Sets the number of implicit Hydrogens.
      Parameters:
      atom - the atom index
      h - the number of implicit Hydrogens
    • setRgroupId

      void setRgroupId(int atom, int rgid)
      Sets the R-group identifier of an atom.
      Parameters:
      atom - the atom index
      rgid - the R-group identifier or 0 to unset
    • setAtomMap

      void setAtomMap(int atom, int map)
      Sets the atom-atom mapping number.
      Parameters:
      atom - the atom index
      map - the map value (positive integer) or 0
    • setAtomStereo

      void setAtomStereo(int atom, int stereo)
      Sets atom stereo properties.
      Parameters:
      atom - the atom index
      stereo - parity | chirality
      See Also: