API:IPotential

From Wiketomica
Jump to: navigation, search
API Home Participants API Discussion Demos Downloads Documentation Contact Us Acknowledgements

IPotential

Reason for existence

An IPotential describes the interaction between IAtoms, typically 2 but possibly 3 or more or 1 (or even 0). The most basic potential simply handles the potential energy. IPotential subclasses might calculate the energy gradient, or collision times (for a hard potential).

subclass:IPotentialAtomic,IPotentialMolecular

Proposed Interface

interface IPotential {

    /**
     * Returns the range over which the potential applies.  IAtoms with a
     * greater separation do not interact.
     */
    readonly attribute unsigned double range;

    /**
     * Informs the potential of the box on which it acts. Typically this
     * requires at least that it update the nearestImageTransformer of its
     * coordinatePair (if it uses one), e.g.:
     * cPair.setNearestImageTransformer(box.boundary());
     */
    writeonly attribute IBox box;

    /**
     * The number of atoms on which the potential depends.
     */
    readonly attribute unsigned int nBody;
}


Use

Notes