Package chemaxon.jep.context
Class AtomContext
java.lang.Object
chemaxon.jep.context.MolContext
chemaxon.jep.context.AtomContext
- All Implemented Interfaces:
ChemContext,chemaxon.marvin.util.CallbackIface,Serializable
@PublicApi
@ProvidesFunction(minParameterCount=0,maxParameterCount=0,names={"atom","mol"}) @ProvidesFunction(minParameterCount=1,maxParameterCount=1,names="fingerprint")
public class AtomContext
extends MolContext
Expression evaluation context containing an input molecule
and an input atom.
- Since:
- JChem 2.2, Marvin 5.1
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface chemaxon.jep.ChemContext
ChemContext.ProvidesFunction, ChemContext.ProvidesFunctionContainer -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final String[]The context function names.Fields inherited from class chemaxon.jep.context.MolContext
FINGERPRINT, MOLFields inherited from interface chemaxon.jep.ChemContext
VARARG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncallContextFunction(String name, List<Object> params) Executes the specified context function with the given parameters.voidclear()Clears the context.intgetAtom()Returns the input atom index.String[]Deprecated, for removal: This API element is subject to removal in a future version.voidsetAtom(int atom) Sets the input atom.Methods inherited from class chemaxon.jep.context.MolContext
getFingerprint, getFingerprint, getMolecule, setFingerprint, setMolecule, setSupplierMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface chemaxon.jep.ChemContext
callback, getVariable
-
Field Details
-
ATOM
- See Also:
-
CFNS
The context function names.
-
-
Constructor Details
-
AtomContext
public AtomContext()Constructor.
-
-
Method Details
-
getContextFunctionNames
@Deprecated(forRemoval=true) @SubjectToRemoval(date=JUL_01_2025) public String[] getContextFunctionNames()Deprecated, for removal: This API element is subject to removal in a future version.Use theChemContext.ProvidesFunctionannotation instead.Returns {"mol", "fingerprint", "atom"}. This is the accessor function name for getting the molecule.- Specified by:
getContextFunctionNamesin interfaceChemContext- Overrides:
getContextFunctionNamesin classMolContext- Returns:
- {"mol", "fingerprint", "atom"}
-
callContextFunction
Executes the specified context function with the given parameters.Implemented functions:
name parameter return value "mol" the input molecule "fingerprint" the input molecule fingerprint "atom" the input atom - Specified by:
callContextFunctionin interfaceChemContext- Overrides:
callContextFunctionin classMolContext- Parameters:
name- the context function name (as specified byChemContext.ProvidesFunction.names())params- the context function parameters. The size of this list must be between theminimumandmaximumallowed.- Returns:
- the context element, or null if the given function is not supported
- Throws:
JepException- 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:
clearin interfaceChemContext- Overrides:
clearin classMolContext
-
ChemContext.ProvidesFunctionannotation instead.