examples/PACKAGES/pair_sw_3b_table: added example for new pair style sw/3b/table

This commit is contained in:
Christoph Scherer
2022-05-26 14:00:06 +02:00
parent 0e114b1041
commit 770454cb8b
7 changed files with 3331 additions and 0 deletions

View File

@ -0,0 +1,41 @@
Example for pair style sw/table
================================
This example contains all required input files for the simulation of CG SPC/E water with
the user pair style sw/table, as well as a run.sh script.
To run the example, you have to compile LAMMPS with the MANYBODY package, including pair_sw_3b_table.h and pair_sw_3b_table.h.
Running the simulation, you will reproduce results of the following publication:
C. Scherer, and D. Andrienko, Understanding three-body contributions to coarse-grained force fields, Phys. Chem. Chem. Phys, 20(34):2238722394, 2018, http://xlink.rsc.org/?DOI=C8CP00746B
Here, a water molecule is represented by one coarse-grained (CG) bead. The
two-body (table_CG_CG.txt) and three-body angular (table_CG_CG_CG.txt) interaction potentials
have been parametrized with force-matching (FM) with the VOTCA package (https://gitlab.mpcdf.mpg.de/votca/votca).
For more details, have a look at the publication. For a example on the parametrization, have a look at
https://gitlab.mpcdf.mpg.de/votca/votca/-/tree/master/csg-examples/guide and
https://gitlab.mpcdf.mpg.de/votca/votca/-/tree/master/csg-examples/spce/3body_sw.
The folder contains the LAMMPS data file (spce.data) with the starting configuration
of 1000 CG water molecules, an input file (spce.in) and a (modified) Stillinger-Weber file (spce.sw).
The lammps input file contains the lines specifying the pair style and coefficients:
- pair_style hybrid/overlay table linear 1200 sw/3b/table - use a combination of pair_style table with 1200 linear table entries and the pair_style sw/3b/table
- pair_coeff 1 1 table table_CG_CG.txt VOTCA - set the table name and keyword for the pair_style table
- pair_coeff * * sw/3b/table spce.sw type - set the name of the Stillinger-Weber file for the pair_style sw/3b/table
A hybrid pair style is used, where pair forces are calculated as a tabulated interaction (table_CG_CG.txt) and the
pair style sw/table is only used to calculate the three-body forces. Therefore, in the Stillinger-Weber file all
parameters refering to two-body interactions are set to zero. As explained in the documentation of this pair
style, the .sw file contains the
additional lines refering to the tabulated angular potential:
- table_CG_CG_CG.txt - file name of tabulated angular potential
- VOTCA - keyword for tabulated angular potential
- linear - angular table is of linear style
- 1001 - 1001 table entries
The LAMMPS simulation is a standard nvt simulation. A dump file is output with the positions and forces every 10 time steps.
You can calculate the pair distribution and compare it to the one(s) in the publicattion.

View File

@ -0,0 +1,5 @@
#! /bin/bash -e
#run the LAMMPS simulation (needs a current LAMMPS version compiled with the user pair_style sw/table)
lmp < spce.in > spce.out

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,45 @@
log none
#SPC/E water
units real
atom_style atomic
read_data spce.data
#hybrid pair style consisting of
#pair_style table to read in CG pair potential
#pair_style sw/table for tabulated sw interactions
pair_style hybrid/overlay table linear 1200 sw/3b/table
#pair coefficients
pair_coeff 1 1 table table_CG_CG.txt VOTCA
pair_coeff * * sw/3b/table spce.sw type
#nvt run with nose-hoover thermostat
#time coupling of 100 ts for thermostat
#target T is 300 K
fix 1 all nvt temp 300.0 300.0 200.0
#create initial velocities
velocity all create 300 432567 dist uniform
#remove center of mass linear momentum
velocity all zero linear
#remove center of mass linear momentum every 1000 time steps in each cartesian direction
fix remove all momentum 1000 linear 1 1 1
#timestep of 2 fs
timestep 2.0
#print out thermodynamic info every 100 ts
thermo 100
#run 10000 ts
run 10000
#write out dump file every 10 ts for 100000 ts
dump 2 all custom 10 spce.dump id type x y z fx fy fz
run 100000
undump 2

View File

@ -0,0 +1,18 @@
type
type
type
1 #epsilon in kcal/mol
1 #sigma in dimensionless
3.7 # a in Ang
1.0 #lambda dimensionless
0.8 #gamma in Ang
0.0 #costheta0 dimensionless
0 #two body part A=0
0 #two body part B=0
0 #two body part p=0
0 #two body part q=0
0.0 # use the standard Stillinger-Weber cutoff
table_CG_CG_CG.txt
VOTCA
linear
1001

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff