Nonlocal function interface¶
-
class mdk::NonlocalForce : public mdk::Force
A nonlocal force interface. It differs from the standard force interface in that it must provide some specs for the VL list, and needs to implement a hook to run when a VL list is updated.
Subclassed by mdk::ESBase, mdk::NativeContacts, mdk::PauliExclusion, mdk::PseudoImproperDihedral, mdk::QuasiAdiabatic
Public Functions
-
virtual void bind(Simulation &simulation) override
Bind the nonlocal force to the simulation object. This class shouldn’t be bound to the simulation object, rather invoked by derived classes. In particular, it fetches Verlet list into
vl
.- Parameters
simulation – Simulation to bind to.
-
virtual void vlUpdateHook() = 0
An action to be performed when Verlet list is updated; usually one copies the relevant pairs into a local list, perhaps with some modifications. The actions are invoked in the order of being added to the Verlet list.
Protected Functions
-
virtual vl::Spec spec() const = 0
Compute the spec to register to the VL list.
- Returns
Generated VL spec.
-
void installIntoVL()
Registers the spec into the Verlet list. Note: it must be executed only one all the data required for its generation has been fetched, i.e. usually at the end of
bind
.
Protected Attributes
-
mutable vl::Spec savedSpec
A copy of the generated
spec()
, for use in the computation of forces (for example it holds the cutoff distance).
-
vl::List *vl = nullptr
A pointer to the VL list. It’s not const chiefly because the update hooks may modify the list, in particular create exclusions, like for example the native contacts’ forcefield removing the native contacts
-
virtual void bind(Simulation &simulation) override