Class AtomContext

java.lang.Object
chemaxon.chemterms.MolContext
chemaxon.chemterms.AtomContext
All Implemented Interfaces:
ChemTermsContext

Expression evaluation context containing an input molecule and an input atom.
Since:
JChem 2.2, Marvin 5.1
  • Field Details

  • Constructor Details

    • AtomContext

      public AtomContext()
      Constructor.
  • Method Details

    • callContextFunction

      public Object callContextFunction(String name, List<Object> params) throws ChemTermsException
      Executes the specified context function with the given parameters.

      Implemented functions:

      nameparameterreturn value
      "mol"the input molecule
      "fingerprint"the input molecule fingerprint
      "atom"the input atom
      Specified by:
      callContextFunction in interface ChemTermsContext
      Overrides:
      callContextFunction in class MolContext
      Parameters:
      name - the context function name (as specified by ChemTermsContext.ProvidesFunction.names())
      params - the context function parameters. The size of this list must be between the minimum and maximum allowed.
      Returns:
      the context element, or null if the given function is not supported
      Throws:
      ChemTermsException - on error
    • setAtom

      public void setAtom(int atom)
      Sets the input atom.
      Parameters:
      atom - is the input atom index
    • getAtom

      public int getAtom()
      Returns the input atom index.
      Returns:
      the input atom index
    • clear

      public void clear()
      Clears the context.
      Specified by:
      clear in interface ChemTermsContext
      Overrides:
      clear in class MolContext