LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
[lammps-users] Indirect Umbrella Sampling INDUS and pressure control fix npt
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lammps-users] Indirect Umbrella Sampling INDUS and pressure control fix npt

From: Romain bey <romain4490@...8...>
Date: Fri, 8 Sep 2017 14:46:59 +0000

Dear all,

I would like to run Indirect Umbrella Sampling (INDUS) in NPT simulation following the article of Patel Varilly Chandler and Garde (JStatPhys 2011). It is therefore necessary to include the forces coming from biaising potential to virial _expression_ of internal pressure (Eq.17) in order to correctly simulate the NPT ensemble using Parrinello Rahman method.

In LAMMPS manual, for compute pressure command, it is written “If no extra keywords are listed, the entire equations above are calculated. This includes a kinetic energy (temperature) term and the virial as the sum of pair, bond, angle, dihedral, improper, kspace (long-range), and fix contributions to the force on each atom.”  But I think that forces coming from an addforce fix are not accounted for in pressure computation, and that “fix” refers to SHAKE-like commands.

I have tested it on a simple example, of a single LJ atom in a cubic box, without any initial velocity. Compute pressure command prints a pressure equal to 0, even if I add a force through addforce fix. My version of LAMMPS has been downloaded the 22nd July 2016. Would you have any idea of how to implement this modification without rewriting the fix NPT command? In particular in the case of GPU package?

Thanks a lot,



Hereafter are my input and initial configuration files:


variable temperature equal 0.8


variable Ftype        equal 1


variable Feps   equal 1.0

variable Fsig   equal 1.0


variable dumptime     equal 1

variable thermotime   equal 1

variable damp         equal 100


processors * * *


units      lj


boundary   p p p


atom_style full

bond_style harmonic

angle_style     harmonic


pair_style lj/cut 4.0


read_data data.input.txt

neighbor   2.0 bin


pair_coeff ${Ftype}   ${Ftype}   ${Feps}         ${Fsig}

pair_modify     mix arithmetic


group fluid      type ${Ftype}


neigh_modify    delay 5

neigh_modify one 4000


fix  0    fluid addforce 1.0 1.0 1.0

fix  1    fluid  nvt temp  ${temperature} ${temperature} ${damp}

compute temp_pres fluid temp

compute Pres all pressure temp_pres


dump       dmp all custom ${dumptime} dump1.lammpstrj id type x y z vx vy vz

dump_modify     dmp flush yes sort id format "%d %d %.6f %.6f %.6f %.6f %.6f %.6f"


thermo          ${thermotime}

thermo_style custom step temp epair c_Pres c_Pres[1] c_Pres[2] c_Pres[3]

thermo_modify   flush yes


run 10

write_data data.end1.txt




And initial configuration:

1 atoms

1 atom types


0 10 xlo xhi

0 10 ylo yhi

0 10 zlo zhi




1 1.0




1 1 1 0 1 1 1