Fix the example according to the convention

This commit is contained in:
Vsevak 2019-12-19 16:44:32 +03:00
parent a3fca53e97
commit 081839b449
9 changed files with 18333 additions and 9128 deletions

View File

@ -0,0 +1 @@
../../rdf-adf/data.spce

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,49 @@
# sample script to compare and debug GPU accelerated tip4p water
# use '-sf gpu' to enables the GPU accelerated pair style
# without it the original lj/cut/tip4p/long from module KSPACE will be used
units real
boundary p p p
atom_style full
bond_style harmonic
angle_style harmonic
atom_modify map array
pair_style lj/cut/tip4p/long 1 2 1 1 0.1546 9.0 9.0
pair_modify table 0
#long-range solver for TIP4P from module KSPACE works on CPU
suffix off
newton on
kspace_style pppm/tip4p 1.0e-5
suffix on
read_data data.spce
pair_coeff * * 0.0 0.0
pair_coeff 1 1 0.1852 3.1589
bond_coeff 1 0.0 0.9572
angle_coeff 1 0.0 104.52
group water type 1 2
#maintain the water molecule rigid
fix 1 water shake 1.0e-4 200 0 b 1 a 1
fix 2 water nve
thermo 100
thermo_style custom step etotal ke pe temp evdwl ecoul elong press
thermo_modify format float "%.15g"
velocity water create 300 123
if $(is_active(package,gpu)) &
then "dump 11 all custom 1 dump.force_gpu id type x y z fx fy fz"&
else "dump 11 all custom 1 dump.force_cpu id type x y z fx fy fz"
dump_modify 11 sort id
timestep 1
run 1

View File

@ -0,0 +1,127 @@
LAMMPS (30 Oct 2019)
#
units real
boundary p p p
atom_style full
bond_style harmonic
angle_style harmonic
atom_modify map array
pair_style lj/cut/tip4p/long 1 2 1 1 0.1546 9.0 9.0
pair_modify table 0
#long-range solver for TIP4P from module KSPACE works on CPU
suffix off
newton on
kspace_style pppm/tip4p 1.0e-5
suffix on
read_data data.spce
orthogonal box = (0.02645 0.02645 0.02641) to (35.5328 35.5328 35.4736)
1 by 1 by 1 MPI processor grid
reading atoms ...
4500 atoms
scanning bonds ...
2 = max bonds/atom
scanning angles ...
1 = max angles/atom
reading bonds ...
3000 bonds
reading angles ...
1500 angles
2 = max # of 1-2 neighbors
1 = max # of 1-3 neighbors
1 = max # of 1-4 neighbors
2 = max # of special neighbors
special bonds CPU = 0.00143709 secs
read_data CPU = 0.0185545 secs
pair_coeff * * 0.0 0.0
pair_coeff 1 1 0.1852 3.1589
bond_coeff 1 0.0 0.9572
angle_coeff 1 0.0 104.52
group water type 1 2
4500 atoms in group water
#maintain the water molecule rigid
fix 1 water shake 1.0e-4 200 0 b 1 a 1
0 = # of size 2 clusters
0 = # of size 3 clusters
0 = # of size 4 clusters
1500 = # of frozen angles
fix 2 water nve
thermo 100
thermo_style custom step etotal ke pe temp evdwl ecoul elong press
thermo_modify format float "%.15g"
velocity water create 300 123
if $(is_active(package,gpu)) then "dump 11 all custom 1 dump.force_gpu id type x y z fx fy fz" else "dump 11 all custom 1 dump.force_cpu id type x y z fx fy fz"
if 0 then "dump 11 all custom 1 dump.force_gpu id type x y z fx fy fz" else "dump 11 all custom 1 dump.force_cpu id type x y z fx fy fz"
dump 11 all custom 1 dump.force_cpu id type x y z fx fy fz
dump_modify 11 sort id
timestep 1
run 1
PPPM initialization ...
extracting TIP4P info from pair style
using polynomial approximation for long-range coulomb (../kspace.cpp:323)
G vector (1/distance) = 0.342797
grid = 36 36 36
stencil order = 5
estimated absolute RMS force accuracy = 0.00261362
estimated relative force accuracy = 7.87083e-06
using double precision KISS FFT
3d grid and FFT values/proc = 79507 46656
Neighbor list info ...
update every 1 steps, delay 10 steps, check yes
max neighbors/atom: 2000, page size: 100000
master list distance cutoff = 11.3092
ghost atom cutoff = 11.3092
binsize = 5.6546, bins = 7 7 7
1 neighbor lists, perpetual/occasional/extra = 1 0 0
(1) pair lj/cut/tip4p/long, perpetual
attributes: half, newton on
pair build: half/bin/newton
stencil: half/bin/3d/newton
bin: standard
Per MPI rank memory allocation (min/avg/max) = 30.18 | 30.18 | 30.18 Mbytes
Step TotEng KinEng PotEng Temp E_vdwl E_coul E_long Press
0 -6581.1098053463 2681.834801985 -9262.9446073313 300 3652.16918734499 90723.8782743546 -103638.992069031 20828.2770003273
1 -6293.09711304554 1787.55263217222 -8080.64974521776 199.96227554909 3652.66537554581 91910.2042281151 -103643.519348879 20986.2037813061
Loop time of 0.0943946 on 1 procs for 1 steps with 4500 atoms
Performance: 0.915 ns/day, 26.221 hours/ns, 10.594 timesteps/s
101.7% CPU use with 1 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.071838 | 0.071838 | 0.071838 | 0.0 | 76.10
Bond | 1.974e-06 | 1.974e-06 | 1.974e-06 | 0.0 | 0.00
Kspace | 0.012686 | 0.012686 | 0.012686 | 0.0 | 13.44
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.00012462 | 0.00012462 | 0.00012462 | 0.0 | 0.13
Output | 0.0093175 | 0.0093175 | 0.0093175 | 0.0 | 9.87
Modify | 0.00038138 | 0.00038138 | 0.00038138 | 0.0 | 0.40
Other | | 4.484e-05 | | | 0.05
Nlocal: 4500 ave 4500 max 4500 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 15219 ave 15219 max 15219 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 1.37151e+06 ave 1.37151e+06 max 1.37151e+06 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 1371514
Ave neighs/atom = 304.781
Ave special neighs/atom = 2
Neighbor list builds = 0
Dangerous builds = 0
Total wall time: 0:00:00

View File

@ -0,0 +1,120 @@
LAMMPS (30 Oct 2019)
package gpu 1
#
units real
boundary p p p
atom_style full
bond_style harmonic
angle_style harmonic
atom_modify map array
pair_style lj/cut/tip4p/long 1 2 1 1 0.1546 9.0 9.0
pair_modify table 0
#long-range solver for TIP4P from module KSPACE works on CPU
suffix off
newton on
kspace_style pppm/tip4p 1.0e-5
suffix on
read_data data.spce
orthogonal box = (0.02645 0.02645 0.02641) to (35.5328 35.5328 35.4736)
1 by 1 by 1 MPI processor grid
reading atoms ...
4500 atoms
scanning bonds ...
2 = max bonds/atom
scanning angles ...
1 = max angles/atom
reading bonds ...
3000 bonds
reading angles ...
1500 angles
2 = max # of 1-2 neighbors
1 = max # of 1-3 neighbors
1 = max # of 1-4 neighbors
2 = max # of special neighbors
special bonds CPU = 0.000921346 secs
read_data CPU = 0.0115216 secs
pair_coeff * * 0.0 0.0
pair_coeff 1 1 0.1852 3.1589
bond_coeff 1 0.0 0.9572
angle_coeff 1 0.0 104.52
group water type 1 2
4500 atoms in group water
#maintain the water molecule rigid
fix 1 water shake 1.0e-4 200 0 b 1 a 1
0 = # of size 2 clusters
0 = # of size 3 clusters
0 = # of size 4 clusters
1500 = # of frozen angles
fix 2 water nve
thermo 100
thermo_style custom step etotal ke pe temp evdwl ecoul elong press
thermo_modify format float "%.15g"
velocity water create 300 123
if $(is_active(package,gpu)) then "dump 11 all custom 1 dump.force_gpu id type x y z fx fy fz" else "dump 11 all custom 1 dump.force_cpu id type x y z fx fy fz"
if 1 then "dump 11 all custom 1 dump.force_gpu id type x y z fx fy fz" else "dump 11 all custom 1 dump.force_cpu id type x y z fx fy fz"
dump 11 all custom 1 dump.force_gpu id type x y z fx fy fz
dump_modify 11 sort id
timestep 1
run 1
PPPM initialization ...
extracting TIP4P info from pair style
using polynomial approximation for long-range coulomb (../kspace.cpp:323)
G vector (1/distance) = 0.342797
grid = 36 36 36
stencil order = 5
estimated absolute RMS force accuracy = 0.00261362
estimated relative force accuracy = 7.87083e-06
using double precision KISS FFT
3d grid and FFT values/proc = 79507 46656
WARNING: Increasing communication cutoff for TIP4P GPU style (../pair_lj_cut_tip4p_long_gpu.cpp:220)
Per MPI rank memory allocation (min/avg/max) = 25.12 | 25.12 | 25.12 Mbytes
Step TotEng KinEng PotEng Temp E_vdwl E_coul E_long Press
0 -6581.10980534572 2681.834801985 -9262.94460733072 300 3652.169187345 90723.8782743551 -103638.992069031 20828.2770003278
1 -6293.09711304691 1787.55263217221 -8080.64974521913 199.96227554909 3652.6653755458 91910.2042281137 -103643.519348879 20986.203781307
Loop time of 0.0230916 on 1 procs for 1 steps with 4500 atoms
Performance: 3.742 ns/day, 6.414 hours/ns, 43.306 timesteps/s
103.9% CPU use with 1 MPI tasks x no OpenMP threads
MPI task timing breakdown:
Section | min time | avg time | max time |%varavg| %total
---------------------------------------------------------------
Pair | 0.000606 | 0.000606 | 0.000606 | 0.0 | 2.62
Bond | 1.682e-06 | 1.682e-06 | 1.682e-06 | 0.0 | 0.01
Kspace | 0.012588 | 0.012588 | 0.012588 | 0.0 | 54.51
Neigh | 0 | 0 | 0 | 0.0 | 0.00
Comm | 0.00015025 | 0.00015025 | 0.00015025 | 0.0 | 0.65
Output | 0.0093124 | 0.0093124 | 0.0093124 | 0.0 | 40.33
Modify | 0.00039674 | 0.00039674 | 0.00039674 | 0.0 | 1.72
Other | | 3.623e-05 | | | 0.16
Nlocal: 4500 ave 4500 max 4500 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Nghost: 16834 ave 16834 max 16834 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Neighs: 0 ave 0 max 0 min
Histogram: 1 0 0 0 0 0 0 0 0 0
Total # of neighbors = 0
Ave neighs/atom = 0
Ave special neighs/atom = 2
Neighbor list builds = 0
Dangerous builds = 0
Please see the log.cite file for references relevant to this simulation
Total wall time: 0:00:00

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +0,0 @@
# data
3 atoms
1 atom types
-10 10 xlo xhi
-10 10 ylo yhi
-10 10 zlo zhi
Masses
1 1.00794
Atoms
1 1 0 0 0
2 1 1.5 0 0
3 1 0 1.5 0

View File

@ -1,80 +0,0 @@
#LAMMPS input file
#All informations can be find on http://lammps.sandia.gov/
#choose the system of unit (real, metal, SI...)
units real
#define the boundary conditions, periodic here
boundary p p p
#define the atom style, bond style and angle style
atom_style full
bond_style harmonic
angle_style harmonic
atom_modify map array
#comm_modify cutoff 15
#atom_modify first water
#neigh_modify cluster yes
#choose the interaction between water molecules:
pair_style lj/cut/tip4p/long 1 2 1 1 0.1546 9.0 9.0
pair_modify table 0
#water model is TIP4P/2005
#water molecules less than 1nm from each other interact via a cut lennard jones potential
#water molecules interact via coulomb interactions calculated in real or conjugate space depending on the distance separating molecules
#define the long-range solver (here for long range coulombic interaction)
suffix off
newton on
kspace_style pppm/tip4p 1.0e-5
suffix on
#neighbor 5.0 bin
#neigh_modify every 1 check yes
#import the initial position of atoms, the coordinates of the box, etc
read_data data.spce
replicate 2 2 2
#define the pair coeff for LJ interaction
pair_coeff * * 0.0 0.0
pair_coeff 1 1 0.1852 3.1589
#define the coef for water molecule (distances between O-H and angle between H-O-H atoms)
bond_coeff 1 0.0 0.9572
angle_coeff 1 0.0 104.52
#define groups
group water type 1 2
#maintain the water molecule rigid
fix 1 water shake 1.0e-4 200 0 b 1 a 1
#udate position and velocity each timesteps using constant NVE integration
fix 2 water nve
#apply Langevin thermostat on water molecules
#fix 3 water langevin 300.0 300.0 100.0 123
#choose how often you want thermodynamic info to be print during the computation
thermo 1000
thermo_modify flush yes
thermo_style custom step etotal ke pe temp evdwl ecoul elong press
#thermo_modify format float "%.15g"
#give an initial random velocity to water molecule (corresponding to a temperature equal to 300K)
velocity water create 300 123
#print the position of atoms to visualise it with VMD for example
#dump 4 all atom 1 dump.lammpstrj
#dump_modify 4 flush yes
#if $(is_active(package,gpu)) &
# then "dump 11 all custom 1 dump.force_gpu id type x y z fx fy fz"&
# else "dump 11 all custom 1 dump.force_cpu id type x y z fx fy fz"
#choose the timestep, 2fs is a common choice
timestep 1
#run during 50000 timestep (0.1 ns)
run 50000