espressopp.interaction.LennardJonesSoftcoreTI

This module is for performing simulations (e.g. as part of Thermodynamic Integration) where some Lennard-Jones interactions are a function of a parameter \(\lambda\), used to construct a pathway between states A and B.

For those interactions which are a function of \(\lambda\), the potential is softcore Lennard Jones with the following form:

\[ \begin{align}\begin{aligned}U_S(r_{ij},\lambda) = (1-\lambda)U_H^A(r_A) + \lambda U_H^B(r_B)\\r_A=(\alpha\sigma^6_A\lambda^p+r_{ij}^6)^{1/6}\\r_B=(\alpha\sigma^6_B(1-\lambda)^p+r_{ij}^6)^{1/6}\end{aligned}\end{align} \]

where \(\epsilon_A\), \(\epsilon_B\), \(\sigma_A\) and \(\sigma_B\) are the parameters of states A and B, and \(\alpha\) and \(p\) are adjustable parameters of the softcore potential. The potentials \(U_H^A(r_A)\) and \(U_H^B(r_B)\) are the normal Lennard-Jones 12-6 hardcore potentials:

\[U_H^A(r_A) = 4.0\epsilon_A(\frac{\sigma_A}{r_A}^{12} - \frac{\sigma_A}{r_A}^6)\]

The user specifies a list of particles, pidlist. For all pairs of particles with particletypes interacting via this potential, the LJ interaction between two particles i and j is calculated as follows:

if (i not in pidlist) and (j not in pidlist):
\(U_{H}^A\) (full state A hardcore LJ interaction)
if (i in pidlist) and (j in pidlist):
if annihilate==True:
\(U_{S}\) (softcore LJ interaction, function of lambda)
if annihilate==False:
\(U_{H}^A\) (full state A hardcore LJ interaction)
if (i in pidlist) xor (j in pidlist):
\(U_{S}\) (softcore LJ interaction, function of lambda)

The default is annihilation (interactions within pidlist are coupled to lambda, and cross-interactions between particles in pidlist and particles in the rest of the system are also coupled to lambda). The alternative is decoupling (only cross-interactions between particles in pidlist and particles in the rest of the system are coupled to lambda. Interactions within pidlist are not affected by the value of lambda.) If annihilation==False, then decoupling is performed. See: http://www.alchemistry.org/wiki/Decoupling_and_annihilation

Exclusions apply as normal, i.e. interactions are only calculated for pairs of particles not already excluded.

This class does not do any automatic shifting of the potential.

So far only VerletListAdressLennardJonesSoftcoreTI is implemented, however VerletListLennardJonesSoftcoreTI, VerletListHadressLennardJonesSoftcoreTI, etc. can also be easily implemented.

The \(\lambda\) (lambdaTI) parameter used here should not be confused with the \(\lambda\) (lambda_adr) particle property used in AdResS simulations.

See also the Thermodynamic Integration tutorial.

Example python script:

>>> #value of lambda
>>> lambdaTI = 0.3
>>> #softcore parameters
>>> alphaSC = 0.5
>>> powerSC = 1.0
>>> #make list of indices of particles whose LJ parameters are different in TI states A and B
>>> pidlist = [1,2,3,4]
>>> #create interaction using VerletListAdress object and FixedTupleListAdress object
>>> lj_adres_interaction=espressopp.interaction.VerletListAdressLennardJonesSoftcoreTI(verletlist, ftpl)
>>> #loop over list of all types for particles interacting with this atomistic potential
>>> for i in types:
>>>   for k in types:
>>>     ljpot = espressopp.interaction.LennardJonesSoftcoreTI(epsilonA=epsA[i][k], sigmaA=sigA[i][k], epsilonB=epsB[i][k], sigmaB=sigB[i][k], alpha=alphaSC, power=powerSC, cutoff=cutoff, lambdaTI=lambdaTI, annihilate=False)
>>>     ljpot.addPids(pidlist)
>>>     lj_adres_interaction.setPotentialAT(type1=i, type2=k, potential=ljpot)
>>> system.addInteraction(lj_adres_interaction)

During the MD run, one can then calculate the derivative of the RF energy wrt lambda

>>> #calculate dU/dlambda
>>> dUdl = lj_adres_interaction.computeEnergyDeriv()
espressopppp.interaction.LennardJonesSoftcoreTI(epsilonA, sigmaA, epsilonB, sigmaB, alpha, power, cutoff, lambdaTI, annihilate)
Parameters:
  • epsilonA (real) – (default: 1.0) LJ interaction parameter
  • sigmaA (real) – (default: 1.0) LJ interaction parameter
  • epsilonB (real) – (default: 0.0) LJ interaction parameter
  • sigmaB (real) – (default: 1.0) LJ interaction parameter
  • alpha (real) – (default: 1.0) softcore parameter
  • power (real) – (default: 1.0) softcore parameter
  • cutoff (real) – (default: infinity) interaction cutoff
  • lambdaTI (real) – (default: 0.0) TI lambda parameter
  • annihilate (bool) – (default: True) switch between annihilation and decoupling
espressopppp.interaction.LennardJonesSoftcoreTI.addPids(pidlist)
Parameters:pidlist (python list) – list of particle ids of particles whose interaction parameters differ in state A and B
espressopppp.interaction.VerletListAdressLennardJones(vl, fixedtupleList)
Parameters:
  • vl (VerletListAdress object) – Verlet list
  • fixedtupleList (FixedTupleListAdress object) – list of tuples describing mapping between CG and AT particles
espressopppp.interaction.VerletListAdressLennardJones.setPotentialAT(type1, type2, potential)
Parameters:
  • type1 (int) – atomtype
  • type2 (int) – atomtype
  • potential (Potential) – espressopppp potential
espressopppp.interaction.VerletListAdressLennardJones.setPotentialCG(type1, type2, potential)
Parameters:
  • type1 (int) – atomtype
  • type2 (int) – atomtype
  • potential (Potential) – espressopppp potential
class espressopp.interaction.LennardJonesSoftcoreTI.LennardJonesSoftcoreTI

The Lennard-Jones potential.