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

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


From: Axel Kohlmeyer <akohlmey@...24...>
Date: Fri, 8 Sep 2017 11:59:06 -0400



On Fri, Sep 8, 2017 at 10:46 AM, Romain bey <romain4490@...8...> wrote:

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?


​a) if you want to modify LAMMPS, you should upgrade to the latest development version (and keep it up-to-date), so that submitting your extended code back to the developers is easier. also, you are more likely to get help, if you are using the latest development version. no developer will want to spend time doing testing with old versions.​

b) there is no need to worry about the GPU package. the GPU code only applies to time consuming parts of the time step, i.e. select pair and kspace styles. the rest of LAMMPS is used without any modification and is run on the CPU (and in part run concurrently to the GPU styles).

c) there is no need to change fix npt. as you already noted, there is already an infrastructure in place to tally virial data from fixes into the global virial. what is missing is the code in fix addforce (and related fixes) to support this and code added for fix_modify, so that it can be requested to include the added force from given fixes to the virial. the default, however, needs to remain to not do it, as there are many cases, where it is undesired to include external force contributions in the virial.

axel.


 

Thanks a lot,

 

Romain



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

 

Masses

 

1 1.0

 

Atoms

 

1 1 1 0 1 1 1

 

 


Virus-free. www.avast.com

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
lammps-users mailing list
lammps-users@...6297....sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lammps-users




--
Dr. Axel Kohlmeyer  akohlmey@...12...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.