espressopp.integrator.TDforce

Thermodynamic force.

Example - how to turn on thermodynamic force (except for multiple moving spherical regions)

>>> fthd="tabletf.xvg"
>>> thdforce = espressopp.integrator.TDforce(system,verletlist) #info about centre and shape of adress region come from the verletlist, info about size of adress region not needed, tabulated file tabletf.xvg should be appropriate for the region size
>>> thdforce.addForce(itype=3,filename="tabletf.xvg",type=typeCG)
>>> integrator.addExtension(thdforce)

Example - how to turn on thermodynamic force for multiple moving spherical regions

>>> fthd="tabletf.xvg"
>>> thdforce = espressopp.integrator.TDforce(system, verletlist, startdist = 0.9, enddist = 2.1, edgeweightmultiplier = 20) #info about moving centres come from the verletlist. Info about size of adress region not needed, tabulated file tabletf.xvg should be appropriate for the region size (enddist - startdist)
>>> thdforce.addForce(itype=3,filename="tabletf.xvg",type=typeCG)
>>> integrator.addExtension(thdforce)
espressopp.integrator.TDforce(system, verletlist, startdist, enddist, edgeweightmultiplier, slow)
Parameters:
  • system (shared_ptr<System>) – system object
  • verletlist (shared_ptr<VerletListAdress>) – verletlist object
  • startdist (real) – (default: 0.0) starting distance from center at which the TD force is actually applied. Needs to be altered when using several moving spherical regions (not used for static or single moving region)
  • enddist (real) – (default: 0.0) end distance from center up to which the TD force is actually applied. Needs to be altered when using several moving spherical regions (not used for static or single moving region)
  • edgeweightmultiplier (int) – (default: 20) interpolation parameter for multiple overlapping spherical regions (see Kreis et al., JCTC doi: 10.1021/acs.jctc.6b00440), the default should be fine for most applications (not used for static or single moving region)
  • slow (bool) – (default: False) When used with RESPA Velocity Verlet, this flag decides whether the TD force is applied together with the slow, less frequently updated forces (slow=True) or with the fast, more frequently updated (slow=False) forces.
espressopp.integrator.TDforce.addForce(itype, filename, type)

Adds a thermodynamic force acting on particles of type “type”.

Parameters:
  • itype (int) – interpolation type 1: linear, 2: Akima, 3: Cubic
  • filename (string) – filename for TD force file
  • type (int) – particle type on which the TD force needs to be applied
espressopp.integrator.TDforce.computeTDEnergy()

Computes the energy corresponding to the thermodynamics force (summing over all different particle types and thermodynamic forces on them).

Return type:real