Interface IAtom

All Superinterfaces:
Cloneable, IAtomType, ICDKObject, IChemObject, IElement, IIsotope
All Known Subinterfaces:
IFragmentAtom, IPDBAtom, IPseudoAtom, IQueryAtom
All Known Implementing Classes:
AliphaticAtom, AliphaticSymbolAtom, AnyAtom, AromaticAtom, AromaticSymbolAtom, Atom, Atom, AtomicNumberAtom, AtomRef, ChiralityAtom, DebugAtom, DebugFragmentAtom, DebugPDBAtom, DebugPseudoAtom, EnzymeResidueLocator, ExplicitConnectionAtom, FormalChargeAtom, FragmentAtom, FragmentAtom, HybridizationNumberAtom, HydrogenAtom, ImplicitHCountAtom, InverseSymbolSetQueryAtom, LogicalOperatorAtom, MassAtom, NonCHHeavyAtom, PDBAtom, PDBAtom, PeriodicGroupNumberAtom, PharmacophoreAtom, PharmacophoreQueryAtom, PseudoAtom, PseudoAtom, QueryAtom, ReactionRoleQueryAtom, RecursiveSmartsAtom, RingIdentifierAtom, RingMembershipAtom, SmallestRingAtom, SMARTSAtom, SymbolAndChargeQueryAtom, SymbolChargeIDQueryAtom, SymbolQueryAtom, SymbolSetQueryAtom, TotalConnectionAtom, TotalHCountAtom, TotalRingConnectionAtom, TotalValencyAtom

public interface IAtom extends IAtomType
Represents the idea of an chemical atom.
Author:
egonw
Source code:
main
Belongs to CDK module:
interfaces
Keywords:
atom
Created on:
2005-08-24
  • Method Details

    • setCharge

      void setCharge(Double charge)
      Sets the partial charge of this atom.
      Parameters:
      charge - The partial charge
      See Also:
    • getCharge

      Double getCharge()
      Returns the partial charge of this atom.
      Returns:
      the charge of this atom
      See Also:
    • setImplicitHydrogenCount

      void setImplicitHydrogenCount(Integer hydrogenCount)
      Sets the implicit hydrogen count of this atom.
      Parameters:
      hydrogenCount - The number of hydrogen atoms bonded to this atom.
      See Also:
    • getImplicitHydrogenCount

      Integer getImplicitHydrogenCount()
      Returns the implicit hydrogen count of this atom.
      Returns:
      The hydrogen count of this atom.
      See Also:
    • setPoint2d

      void setPoint2d(javax.vecmath.Point2d point2d)
      Sets a point specifying the location of this atom in a 2D space.
      Parameters:
      point2d - A point in a 2D plane
      See Also:
    • setPoint3d

      void setPoint3d(javax.vecmath.Point3d point3d)
      Sets a point specifying the location of this atom in 3D space.
      Parameters:
      point3d - A point in a 3-dimensional space
      See Also:
    • setFractionalPoint3d

      void setFractionalPoint3d(javax.vecmath.Point3d point3d)
      Sets a point specifying the location of this atom in a Crystal unit cell.
      Parameters:
      point3d - A point in a 3d fractional unit cell space
      See Also:
    • setStereoParity

      @Deprecated void setStereoParity(Integer stereoParity)
      Deprecated.
      use IStereoElements for storing stereochemistry
      Sets the stereo parity for this atom.
      Parameters:
      stereoParity - The stereo parity for this atom
      See Also:
    • getPoint2d

      javax.vecmath.Point2d getPoint2d()
      Returns a point specifying the location of this atom in a 2D space.
      Returns:
      A point in a 2D plane. Null if unset.
      See Also:
    • getPoint3d

      javax.vecmath.Point3d getPoint3d()
      Returns a point specifying the location of this atom in a 3D space.
      Returns:
      A point in 3-dimensional space. Null if unset.
      See Also:
    • getFractionalPoint3d

      javax.vecmath.Point3d getFractionalPoint3d()
      Returns a point specifying the location of this atom in a Crystal unit cell.
      Returns:
      A point in 3d fractional unit cell space. Null if unset.
      See Also:
    • getStereoParity

      @Deprecated Integer getStereoParity()
      Deprecated.
      use IStereoElements for storing stereochemistry
      Returns the stereo parity of this atom. It uses the predefined values found in CDKConstants.
      Returns:
      The stereo parity for this atom
      See Also:
    • getContainer

      IAtomContainer getContainer()
      Access the IAtomContainer of which this atom is a member of. Because atoms can be in multiple molecules this method will only work if the atom has been accessed in the context of an IAtomContainer, for example:
      
       IAtomContainer mol  = new AtomContainer();
       IAtom          atom = new Atom(6);
      
       atom.getContainer(); // null
       mol.add(atom);
       atom.getContainer(); // still null
       mol.getAtom(0).getContainer(); // not-null, returns 'mol'
       
      Returns:
      the atom container or null if not accessed in the context of a container
    • getIndex

      int getIndex()
      Acces the index of an atom in the context of an IAtomContainer. If the index is not known, < 0 is returned.
      Returns:
      atom index or < 0 if the index is not known
    • bonds

      Iterable<IBond> bonds()
      Returns the bonds connected to this atom. If the bonds are not known an exception is thrown. This method will only throw an exception if getIndex() returns < 0 or getContainer() returns null.
      
      
       IAtom atom = ...;
      
       if (atom.getIndex() >= 0) {
         for (IBond bond : atom.bonds()) {
      
         }
       }
      
       if (atom.getContainer() != null) {
         for (IBond bond : atom.bonds()) {
      
         }
       }
      
       IAtomContainer mol = ...;
       // guaranteed not throw an exception
       for (IBond bond : mol.getAtom(i).bonds()) {
      
       }
       
      Returns:
      iterable of bonds
      Throws:
      UnsupportedOperationException - thrown if the bonds are not known
    • getBondCount

      int getBondCount()
      Get the number of explicit bonds connected to this atom.
      Returns:
      the total bond count
    • getBond

      IBond getBond(IAtom atom)
      Returns the bond connecting 'this' atom to the provided atom. If the atoms are not bonded, null is returned.
      Parameters:
      atom - the other atom
      Returns:
      the bond connecting the atoms
      Throws:
      UnsupportedOperationException - thrown if the bonds are not known
    • isAromatic

      boolean isAromatic()
      Access whether this atom has been marked as aromatic. The default value is false and you must explicitly perceive aromaticity with one of the available models.
      Returns:
      aromatic status
      See Also:
    • setIsAromatic

      void setIsAromatic(boolean arom)
      Mark this atom as being aromatic.
      Parameters:
      arom - aromatic status
      See Also:
    • isInRing

      boolean isInRing()
      Access whether this atom has been flagged as in a ring. The default value is false and you must explicitly find rings first.
      Returns:
      ring status
      See Also:
    • setIsInRing

      void setIsInRing(boolean ring)
      Mark this atom as being in a ring.
      Parameters:
      ring - ring status
      See Also:
    • getMapIdx

      int getMapIdx()
      Access the map index for this atom.
      Returns:
      the map index (0 if not set)
    • setMapIdx

      void setMapIdx(int mapidx)
      Set the map index for this atom.
      Parameters:
      mapidx - the new map index
    • clone

      Returns a deep clone of this IChemObject.
      Specified by:
      clone in interface IChemObject
      Returns:
      Object the clone of this IChemObject.
      Throws:
      CloneNotSupportedException - if the IChemObject cannot be cloned