Merge branch 'develop' into replicate_periodic_box
This commit is contained in:
@ -29,8 +29,10 @@ stochastic rotation dynamics solvent, using the fix srd command.
|
||||
box = 2d rigid box particles in SRDs, self-diffusion and viscosity
|
||||
dimer = 2d rigid dimers in SRDs, self-diffusion and viscosity
|
||||
ellipsoid = 2d ellipsoids in SRDs, self-diffusion and viscosity
|
||||
flat_membrane = 2d flat membrane in NVE, self-diffusion and viscosity
|
||||
line = 2d line-faceted rigid particles, NEMD shearing for viscosity,
|
||||
implicit and in SRDs
|
||||
poly = 2d poly-disperse spheroids in SRDs, self-diffusion and viscosity
|
||||
star = 2d rigid star particles in SRDs, self-diffusion and viscosity
|
||||
tri = 3d triangle-faceted rigid particles in SRDs, NEMD shearing for viscosity
|
||||
vesicle = 3d vesicle in NVE, self-diffusionand viscosity
|
||||
|
||||
@ -1,23 +1,23 @@
|
||||
# SRD diffusion demo - ellipsoids
|
||||
|
||||
units lj
|
||||
atom_style ellipsoid
|
||||
atom_modify first big
|
||||
dimension 2
|
||||
units lj
|
||||
atom_style ellipsoid
|
||||
atom_modify first big
|
||||
dimension 2
|
||||
|
||||
# create big ellipsoidal particles
|
||||
|
||||
lattice sq 0.14
|
||||
region box block 0 10 0 10 -0.5 0.5
|
||||
create_box 2 box
|
||||
create_atoms 1 region box
|
||||
lattice sq 0.14
|
||||
region box block 0 10 0 10 -0.5 0.5
|
||||
create_box 2 box
|
||||
create_atoms 1 region box
|
||||
|
||||
set type 1 mass 1.0
|
||||
set type 1 shape 3.0 1.0 1.0
|
||||
group big type 1
|
||||
set group big quat/random 29898
|
||||
set type 1 mass 1.0
|
||||
set type 1 shape 3.0 1.0 1.0
|
||||
group big type 1
|
||||
set group big quat/random 29898
|
||||
|
||||
velocity big create 1.44 87287 loop geom
|
||||
velocity big create 1.44 87287 loop geom
|
||||
|
||||
# equilibrate big particles
|
||||
|
||||
@ -26,57 +26,59 @@ pair_coeff 1 1 1.0 1.0 1 1 1 1 1 1
|
||||
pair_coeff 1 2 1.0 1.0 1 1 1 1 1 1 0.0
|
||||
pair_coeff 2 2 1.0 1.0 1 1 1 1 1 1 0.0
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 big nve/asphere
|
||||
fix 2 all enforce2d
|
||||
fix 1 big nve/asphere
|
||||
fix 2 all enforce2d
|
||||
|
||||
compute rot big temp/asphere
|
||||
compute rot big temp/asphere
|
||||
compute 0 all property/atom quatw quati quatj quatk shapex shapey shapez
|
||||
|
||||
#dump 1 all custom 10 dump.ellipsoid.equil id type x y z &
|
||||
# quatw quati quatj quatk
|
||||
#dump 1 all custom 10 dump.ellipsoid.equil id type x y z c_0[*]
|
||||
#dump_modify 1 colname c_0[1] quatw colname c_0[2] quati colname c_0[3] quatj colname c_0[4] quatk &
|
||||
# colname c_0[5] shapex colname c_0[6] shapey colname c_0[7] shapez
|
||||
|
||||
thermo_style custom step temp c_rot epair etotal press
|
||||
thermo 100
|
||||
thermo_style custom step temp c_rot epair etotal press
|
||||
thermo 100
|
||||
|
||||
run 1000
|
||||
run 1000
|
||||
|
||||
#undump 1
|
||||
unfix 1
|
||||
unfix 2
|
||||
#undump 1
|
||||
unfix 1
|
||||
unfix 2
|
||||
|
||||
# add small particles as hi density lattice
|
||||
|
||||
region plane block INF INF INF INF -0.001 0.001 units box
|
||||
lattice sq 120.0
|
||||
create_atoms 2 region plane
|
||||
region plane block INF INF INF INF -0.001 0.001 units box
|
||||
lattice sq 120.0
|
||||
create_atoms 2 region plane
|
||||
|
||||
set type 2 mass 0.01
|
||||
group small type 2
|
||||
velocity small create 1.0 593849 loop geom
|
||||
set type 2 mass 0.01
|
||||
group small type 2
|
||||
velocity small create 1.0 593849 loop geom
|
||||
|
||||
# delete overlaps
|
||||
# must set 1-2 cutoff to non-zero value
|
||||
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0
|
||||
pair_coeff 2 2 0.0 1.0 0.0
|
||||
pair_coeff 1 2 0.0 1.0 2.0
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0
|
||||
pair_coeff 2 2 0.0 1.0 0.0
|
||||
pair_coeff 1 2 0.0 1.0 2.0
|
||||
|
||||
neigh_modify one 10000
|
||||
neigh_modify one 10000
|
||||
|
||||
delete_atoms overlap 1.6 small big
|
||||
delete_atoms overlap 1.6 small big
|
||||
|
||||
# SRD run
|
||||
|
||||
reset_timestep 0
|
||||
reset_timestep 0
|
||||
|
||||
neighbor 0.3 multi
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
neighbor 0.3 multi
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
comm_modify mode multi group big vel yes
|
||||
neigh_modify include big
|
||||
comm_modify mode multi group big vel yes
|
||||
neigh_modify include big
|
||||
|
||||
# no pairwise interactions with small particles
|
||||
|
||||
@ -88,29 +90,30 @@ pair_coeff 2 2 1.0 1.0 1 1 1 1 1 1 0.0
|
||||
# use fix SRD to push small particles out from inside big ones
|
||||
# if comment out, big particles won't see SRD particles
|
||||
|
||||
timestep 0.0005
|
||||
timestep 0.0005
|
||||
|
||||
fix 1 big nve/asphere
|
||||
fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 &
|
||||
collision noslip search 0.2 inside ignore exact no bounce 50
|
||||
fix 3 all enforce2d
|
||||
fix 1 big nve/asphere
|
||||
fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 &
|
||||
collision noslip search 0.2 inside ignore exact no bounce 50
|
||||
fix 3 all enforce2d
|
||||
|
||||
# diagnostics
|
||||
|
||||
compute tbig big temp/asphere
|
||||
variable pebig equal pe*atoms/count(big)
|
||||
variable ebig equal etotal*atoms/count(big)
|
||||
thermo_style custom step temp c_rot f_2[9] etotal v_pebig v_ebig press &
|
||||
f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] &
|
||||
f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12]
|
||||
compute tbig big temp/asphere
|
||||
variable pebig equal pe*atoms/count(big)
|
||||
variable ebig equal etotal*atoms/count(big)
|
||||
thermo_style custom step temp c_rot f_2[9] etotal v_pebig v_ebig press &
|
||||
f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] &
|
||||
f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12]
|
||||
|
||||
thermo_modify temp tbig
|
||||
thermo 1000
|
||||
thermo_modify temp tbig
|
||||
thermo 1000
|
||||
|
||||
#dump 1 all custom 1000 dump.ellipsoid id type x y z &
|
||||
# quatw quati quatj quatk
|
||||
#dump 1 all custom 1000 dump.ellipsoid id type x y z c_0[*]
|
||||
#dump_modify 1 colname c_0[1] quatw colname c_0[2] quati colname c_0[3] quatj colname c_0[4] quatk &
|
||||
# colname c_0[5] shapex colname c_0[6] shapey colname c_0[7] shapez
|
||||
|
||||
#dump 1 all image 1000 image.*.jpg type type zoom 1.6
|
||||
#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2
|
||||
#dump 2 all image 1000 image.*.jpg type type zoom 1.6
|
||||
#dump_modify 2 pad 6 adiam 1 1 adiam 2 0.2
|
||||
|
||||
run 100000
|
||||
run 100000
|
||||
|
||||
@ -1,23 +1,23 @@
|
||||
# SRD viscosity demo - ellipsoids
|
||||
|
||||
units lj
|
||||
atom_style ellipsoid
|
||||
atom_modify first big
|
||||
dimension 2
|
||||
units lj
|
||||
atom_style ellipsoid
|
||||
atom_modify first big
|
||||
dimension 2
|
||||
|
||||
# create big ellipsoidal particles
|
||||
|
||||
lattice sq 0.14
|
||||
region box block 0 10 0 10 -0.5 0.5
|
||||
create_box 2 box
|
||||
create_atoms 1 region box
|
||||
lattice sq 0.14
|
||||
region box block 0 10 0 10 -0.5 0.5
|
||||
create_box 2 box
|
||||
create_atoms 1 region box
|
||||
|
||||
set type 1 mass 1.0
|
||||
set type 1 shape 3.0 1.0 1.0
|
||||
group big type 1
|
||||
set group big quat/random 29898
|
||||
set type 1 mass 1.0
|
||||
set type 1 shape 3.0 1.0 1.0
|
||||
group big type 1
|
||||
set group big quat/random 29898
|
||||
|
||||
velocity big create 1.44 87287 loop geom
|
||||
velocity big create 1.44 87287 loop geom
|
||||
|
||||
# equilibrate big particles
|
||||
|
||||
@ -26,57 +26,59 @@ pair_coeff 1 1 1.0 1.0 1 1 1 1 1 1
|
||||
pair_coeff 1 2 1.0 1.0 1 1 1 1 1 1 0.0
|
||||
pair_coeff 2 2 1.0 1.0 1 1 1 1 1 1 0.0
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
fix 1 big nve/asphere
|
||||
fix 2 all enforce2d
|
||||
fix 1 big nve/asphere
|
||||
fix 2 all enforce2d
|
||||
|
||||
compute rot big temp/asphere
|
||||
compute rot big temp/asphere
|
||||
compute 0 all property/atom quatw quati quatj quatk shapex shapey shapez
|
||||
|
||||
#dump 1 all custom 10 dump.ellipsoid.equil id type x y z &
|
||||
# quatw quati quatj quatk
|
||||
#dump 1 all custom 10 dump.ellipsoid.equil id type x y z c_0[*]
|
||||
#dump_modify 1 colname c_0[1] quatw colname c_0[2] quati colname c_0[3] quatj colname c_0[4] quatk &
|
||||
# colname c_0[5] shapex colname c_0[6] shapey colname c_0[7] shapez
|
||||
|
||||
thermo_style custom step temp c_rot epair etotal press
|
||||
thermo 100
|
||||
thermo_style custom step temp c_rot epair etotal press
|
||||
thermo 100
|
||||
|
||||
run 1000
|
||||
run 1000
|
||||
|
||||
#undump 1
|
||||
unfix 1
|
||||
unfix 2
|
||||
#undump 1
|
||||
unfix 1
|
||||
unfix 2
|
||||
|
||||
# add small particles as hi density lattice
|
||||
|
||||
region plane block INF INF INF INF -0.001 0.001 units box
|
||||
lattice sq 120.0
|
||||
create_atoms 2 region plane
|
||||
region plane block INF INF INF INF -0.001 0.001 units box
|
||||
lattice sq 120.0
|
||||
create_atoms 2 region plane
|
||||
|
||||
set type 2 mass 0.01
|
||||
group small type 2
|
||||
velocity small create 1.0 593849 loop geom
|
||||
set type 2 mass 0.01
|
||||
group small type 2
|
||||
velocity small create 1.0 593849 loop geom
|
||||
|
||||
# delete overlaps
|
||||
# must set 1-2 cutoff to non-zero value
|
||||
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0
|
||||
pair_coeff 2 2 0.0 1.0 0.0
|
||||
pair_coeff 1 2 0.0 1.0 2.0
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff 1 1 1.0 1.0
|
||||
pair_coeff 2 2 0.0 1.0 0.0
|
||||
pair_coeff 1 2 0.0 1.0 2.0
|
||||
|
||||
neigh_modify one 10000
|
||||
neigh_modify one 10000
|
||||
|
||||
delete_atoms overlap 1.6 small big
|
||||
delete_atoms overlap 1.6 small big
|
||||
|
||||
# SRD run
|
||||
|
||||
reset_timestep 0
|
||||
reset_timestep 0
|
||||
|
||||
neighbor 0.3 multi
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
neighbor 0.3 multi
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
|
||||
comm_modify mode multi group big vel yes
|
||||
neigh_modify include big
|
||||
comm_modify mode multi group big vel yes
|
||||
neigh_modify include big
|
||||
|
||||
# no pairwise interactions with small particles
|
||||
|
||||
@ -88,30 +90,31 @@ pair_coeff 2 2 1.0 1.0 1 1 1 1 1 1 0.0
|
||||
# use fix SRD to push small particles out from inside big ones
|
||||
# if comment out, big particles won't see SRD particles
|
||||
|
||||
timestep 0.0005
|
||||
timestep 0.0005
|
||||
|
||||
fix 1 big nve/asphere
|
||||
fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 &
|
||||
fix 1 big nve/asphere
|
||||
fix 2 small srd 20 big 1.0 0.25 49894 shift yes 54979 &
|
||||
collision noslip search 0.2 inside ignore exact no bounce 50
|
||||
fix 3 small viscosity 20 x y 50
|
||||
fix 4 all enforce2d
|
||||
fix 3 small viscosity 20 x y 50
|
||||
fix 4 all enforce2d
|
||||
|
||||
# diagnostics
|
||||
|
||||
compute tbig big temp/asphere
|
||||
variable pebig equal pe*atoms/count(big)
|
||||
variable ebig equal etotal*atoms/count(big)
|
||||
thermo_style custom step temp c_rot f_2[9] etotal v_pebig v_ebig press &
|
||||
f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] &
|
||||
f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12]
|
||||
compute tbig big temp/asphere
|
||||
variable pebig equal pe*atoms/count(big)
|
||||
variable ebig equal etotal*atoms/count(big)
|
||||
thermo_style custom step temp c_rot f_2[9] etotal v_pebig v_ebig press &
|
||||
f_2[1] f_2[2] f_2[3] f_2[4] f_2[5] &
|
||||
f_2[6] f_2[7] f_2[8] f_2[9] f_2[10] f_2[11] f_2[12]
|
||||
|
||||
thermo_modify temp tbig
|
||||
thermo 1000
|
||||
thermo_modify temp tbig
|
||||
thermo 1000
|
||||
|
||||
#dump 1 all custom 500 dump.ellipsoid.mp id type x y z &
|
||||
# quatw quati quatj quatk
|
||||
#dump 1 all custom 500 dump.ellipsoid id type x y z c_0[*]
|
||||
#dump_modify 1 colname c_0[1] quatw colname c_0[2] quati colname c_0[3] quatj colname c_0[4] quatk &
|
||||
# colname c_0[5] shapex colname c_0[6] shapey colname c_0[7] shapez
|
||||
|
||||
#dump 1 all image 500 image.*.jpg type type zoom 1.6
|
||||
#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2
|
||||
#dump 1 all image 500 image.*.jpg type type zoom 1.6
|
||||
#dump_modify 1 pad 6 adiam 1 1 adiam 2 0.2
|
||||
|
||||
run 50000
|
||||
run 50000
|
||||
|
||||
55
examples/ASPHERE/flat_membrane/in.flat_membrane
Normal file
55
examples/ASPHERE/flat_membrane/in.flat_membrane
Normal file
@ -0,0 +1,55 @@
|
||||
# flat membrane demo
|
||||
variable r0 equal 0.97
|
||||
variable d1 equal ${r0}
|
||||
variable d2 equal sqrt(3.0)*${r0}
|
||||
variable d3 equal 3.0*${r0}
|
||||
variable ro equal 2./${d1}/${d2}/${d3}
|
||||
|
||||
variable T equal 0.23
|
||||
variable LD equal 1.0
|
||||
|
||||
units lj
|
||||
atom_style ellipsoid
|
||||
|
||||
boundary p p p
|
||||
|
||||
lattice custom ${ro} a1 ${d1} 0.0 0.0 a2 0.0 ${d2} 0.0 &
|
||||
a3 0.0 0.0 ${d3} basis 0.0 0.0 0.0 basis 0.5 0.5 0.0
|
||||
|
||||
|
||||
region box block 0 40 0 24 -20 20
|
||||
create_box 1 box
|
||||
region membrane block 0 40 0 24 -0.5 0.5
|
||||
create_atoms 1 region membrane
|
||||
|
||||
group membrane region membrane
|
||||
|
||||
set type 1 mass 1.0
|
||||
|
||||
set type 1 shape 1 0.99 0.99
|
||||
|
||||
set group all quat 0 -1 0 90
|
||||
|
||||
#compute memb all temp/com
|
||||
#compute rot all temp/asphere bias memb
|
||||
velocity all create ${T} 87287 loop geom
|
||||
|
||||
pair_style ylz 2.6
|
||||
pair_coeff * * 1.0 1.0 4 3 0.0 2.6
|
||||
neighbor 1.0 bin
|
||||
|
||||
|
||||
thermo_style custom step temp press pxx pyy
|
||||
thermo 200
|
||||
|
||||
timestep 0.01
|
||||
|
||||
#dump 1 all atom 10 dump_onlymembrane.lammpstrj
|
||||
|
||||
fix 1 all langevin ${T} ${T} ${LD} 48279
|
||||
|
||||
|
||||
fix 2 all nve/asphere
|
||||
run 3000
|
||||
|
||||
|
||||
159
examples/ASPHERE/flat_membrane/log.18Oct22.flat_membrane.g++.1
Normal file
159
examples/ASPHERE/flat_membrane/log.18Oct22.flat_membrane.g++.1
Normal file
@ -0,0 +1,159 @@
|
||||
LAMMPS (15 Sep 2022)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# flat membrane demo
|
||||
variable r0 equal 0.97
|
||||
variable d1 equal ${r0}
|
||||
variable d1 equal 0.97
|
||||
variable d2 equal sqrt(3.0)*${r0}
|
||||
variable d2 equal sqrt(3.0)*0.97
|
||||
variable d3 equal 3.0*${r0}
|
||||
variable d3 equal 3.0*0.97
|
||||
variable ro equal 2./${d1}/${d2}/${d3}
|
||||
variable ro equal 2./0.97/${d2}/${d3}
|
||||
variable ro equal 2./0.97/1.68008928334181/${d3}
|
||||
variable ro equal 2./0.97/1.68008928334181/2.91
|
||||
|
||||
variable T equal 0.23
|
||||
variable LD equal 1.0
|
||||
|
||||
units lj
|
||||
atom_style ellipsoid
|
||||
|
||||
boundary p p p
|
||||
|
||||
lattice custom ${ro} a1 ${d1} 0.0 0.0 a2 0.0 ${d2} 0.0 a3 0.0 0.0 ${d3} basis 0.0 0.0 0.0 basis 0.5 0.5 0.0
|
||||
lattice custom 0.421728460751825 a1 ${d1} 0.0 0.0 a2 0.0 ${d2} 0.0 a3 0.0 0.0 ${d3} basis 0.0 0.0 0.0 basis 0.5 0.5 0.0
|
||||
lattice custom 0.421728460751825 a1 0.97 0.0 0.0 a2 0.0 ${d2} 0.0 a3 0.0 0.0 ${d3} basis 0.0 0.0 0.0 basis 0.5 0.5 0.0
|
||||
lattice custom 0.421728460751825 a1 0.97 0.0 0.0 a2 0.0 1.68008928334181 0.0 a3 0.0 0.0 ${d3} basis 0.0 0.0 0.0 basis 0.5 0.5 0.0
|
||||
lattice custom 0.421728460751825 a1 0.97 0.0 0.0 a2 0.0 1.68008928334181 0.0 a3 0.0 0.0 2.91 basis 0.0 0.0 0.0 basis 0.5 0.5 0.0
|
||||
Lattice spacing in x,y,z = 0.97 1.6800893 2.91
|
||||
|
||||
|
||||
region box block 0 40 0 24 -20 20
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0 0 -58.2) to (38.8 40.322143 58.2)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
region membrane block 0 40 0 24 -0.5 0.5
|
||||
create_atoms 1 region membrane
|
||||
Created 1920 atoms
|
||||
using lattice units in orthogonal box = (0 0 -58.2) to (38.8 40.322143 58.2)
|
||||
create_atoms CPU = 0.001 seconds
|
||||
|
||||
group membrane region membrane
|
||||
1920 atoms in group membrane
|
||||
|
||||
set type 1 mass 1.0
|
||||
Setting atom values ...
|
||||
1920 settings made for mass
|
||||
|
||||
set type 1 shape 1 1 1
|
||||
Setting atom values ...
|
||||
1920 settings made for shape
|
||||
|
||||
set group all quat 0 -1 0 90
|
||||
Setting atom values ...
|
||||
1920 settings made for quat
|
||||
|
||||
#compute memb all temp/com
|
||||
#compute rot all temp/asphere bias memb
|
||||
velocity all create ${T} 87287 loop geom
|
||||
velocity all create 0.23 87287 loop geom
|
||||
|
||||
pair_style ylz 2.6
|
||||
pair_coeff * * 1.0 1.0 4 3 0.0 2.6
|
||||
neighbor 1.0 bin
|
||||
|
||||
|
||||
thermo_style custom step temp press pxx pyy
|
||||
thermo 200
|
||||
|
||||
timestep 0.01
|
||||
|
||||
#dump 1 all atom 10 dump_onlymembrane.lammpstrj
|
||||
|
||||
fix 1 all langevin ${T} ${T} ${LD} 48279
|
||||
fix 1 all langevin 0.23 ${T} ${LD} 48279
|
||||
fix 1 all langevin 0.23 0.23 ${LD} 48279
|
||||
fix 1 all langevin 0.23 0.23 1 48279
|
||||
|
||||
|
||||
fix 2 all nve/asphere
|
||||
run 3000
|
||||
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Your simulation uses code contributions which should be cited:
|
||||
|
||||
- pair ylz command:
|
||||
|
||||
@Article{Yuan10,
|
||||
author = {H. Yuan, C. Huang, J. Li, G. Lykotrafitis, and S. Zhang},
|
||||
title = {One-particle-thick, solvent-free, coarse-grained model for biological and biomimetic fluid membranes},
|
||||
journal = {Phys. Rev. E},
|
||||
year = 2010,
|
||||
volume = 82,
|
||||
pages = {011905}
|
||||
}
|
||||
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
|
||||
Neighbor list info ...
|
||||
update: every = 1 steps, delay = 10 steps, check = yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 3.6
|
||||
ghost atom cutoff = 3.6
|
||||
binsize = 1.8, bins = 22 23 65
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair ylz, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/atomonly/newton
|
||||
stencil: half/bin/3d
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 5.024 | 5.024 | 5.024 Mbytes
|
||||
Step Temp Press Pxx Pyy
|
||||
0 0.23 -0.0073508785 -0.012283389 -0.012234574
|
||||
200 0.20903886 -0.0010605951 -0.0011885957 -0.00198842
|
||||
400 0.21898026 -0.00069250685 -0.0013217981 -0.00073225707
|
||||
600 0.22689361 -0.00057919328 -0.00076880503 -0.0010242283
|
||||
800 0.22983221 -0.00032145682 -0.00051928834 -0.00059337525
|
||||
1000 0.23819392 -0.00027969126 -0.00088082301 -5.2666567e-05
|
||||
1200 0.22053795 -0.00029571329 -0.0004446455 -0.00035529929
|
||||
1400 0.22285021 -0.0002690371 -0.00068896571 -3.6258442e-05
|
||||
1600 0.22687044 2.8599875e-05 -0.00032651798 0.0004056081
|
||||
1800 0.23356905 -2.28742e-05 -0.00027073251 0.00025081131
|
||||
2000 0.22499821 8.8230586e-06 -7.5750159e-05 0.0001988705
|
||||
2200 0.23162995 -9.026855e-05 -0.00025832535 5.4904927e-05
|
||||
2400 0.22920223 0.00016700455 3.5283125e-05 0.00034955857
|
||||
2600 0.2260299 5.3095557e-05 0.00025691786 0.00013353467
|
||||
2800 0.2296401 0.00043234854 0.00058344966 0.00063645193
|
||||
3000 0.22564577 2.6423111e-05 8.9918406e-05 0.00022146229
|
||||
Loop time of 6.76659 on 1 procs for 3000 steps with 1920 atoms
|
||||
|
||||
Performance: 383058.431 tau/day, 443.355 timesteps/s
|
||||
99.8% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 5.7968 | 5.7968 | 5.7968 | 0.0 | 85.67
|
||||
Neigh | 0.086077 | 0.086077 | 0.086077 | 0.0 | 1.27
|
||||
Comm | 0.034761 | 0.034761 | 0.034761 | 0.0 | 0.51
|
||||
Output | 0.00038014 | 0.00038014 | 0.00038014 | 0.0 | 0.01
|
||||
Modify | 0.8268 | 0.8268 | 0.8268 | 0.0 | 12.22
|
||||
Other | | 0.02181 | | | 0.32
|
||||
|
||||
Nlocal: 1920 ave 1920 max 1920 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 772 ave 772 max 772 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 46804 ave 46804 max 46804 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 46804
|
||||
Ave neighs/atom = 24.377083
|
||||
Neighbor list builds = 99
|
||||
Dangerous builds = 0
|
||||
|
||||
|
||||
Total wall time: 0:00:06
|
||||
159
examples/ASPHERE/flat_membrane/log.18Oct22.flat_membrane.g++.4
Normal file
159
examples/ASPHERE/flat_membrane/log.18Oct22.flat_membrane.g++.4
Normal file
@ -0,0 +1,159 @@
|
||||
LAMMPS (15 Sep 2022)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# flat membrane demo
|
||||
variable r0 equal 0.97
|
||||
variable d1 equal ${r0}
|
||||
variable d1 equal 0.97
|
||||
variable d2 equal sqrt(3.0)*${r0}
|
||||
variable d2 equal sqrt(3.0)*0.97
|
||||
variable d3 equal 3.0*${r0}
|
||||
variable d3 equal 3.0*0.97
|
||||
variable ro equal 2./${d1}/${d2}/${d3}
|
||||
variable ro equal 2./0.97/${d2}/${d3}
|
||||
variable ro equal 2./0.97/1.68008928334181/${d3}
|
||||
variable ro equal 2./0.97/1.68008928334181/2.91
|
||||
|
||||
variable T equal 0.23
|
||||
variable LD equal 1.0
|
||||
|
||||
units lj
|
||||
atom_style ellipsoid
|
||||
|
||||
boundary p p p
|
||||
|
||||
lattice custom ${ro} a1 ${d1} 0.0 0.0 a2 0.0 ${d2} 0.0 a3 0.0 0.0 ${d3} basis 0.0 0.0 0.0 basis 0.5 0.5 0.0
|
||||
lattice custom 0.421728460751825 a1 ${d1} 0.0 0.0 a2 0.0 ${d2} 0.0 a3 0.0 0.0 ${d3} basis 0.0 0.0 0.0 basis 0.5 0.5 0.0
|
||||
lattice custom 0.421728460751825 a1 0.97 0.0 0.0 a2 0.0 ${d2} 0.0 a3 0.0 0.0 ${d3} basis 0.0 0.0 0.0 basis 0.5 0.5 0.0
|
||||
lattice custom 0.421728460751825 a1 0.97 0.0 0.0 a2 0.0 1.68008928334181 0.0 a3 0.0 0.0 ${d3} basis 0.0 0.0 0.0 basis 0.5 0.5 0.0
|
||||
lattice custom 0.421728460751825 a1 0.97 0.0 0.0 a2 0.0 1.68008928334181 0.0 a3 0.0 0.0 2.91 basis 0.0 0.0 0.0 basis 0.5 0.5 0.0
|
||||
Lattice spacing in x,y,z = 0.97 1.6800893 2.91
|
||||
|
||||
|
||||
region box block 0 40 0 24 -20 20
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0 0 -58.2) to (38.8 40.322143 58.2)
|
||||
1 by 1 by 4 MPI processor grid
|
||||
region membrane block 0 40 0 24 -0.5 0.5
|
||||
create_atoms 1 region membrane
|
||||
Created 1920 atoms
|
||||
using lattice units in orthogonal box = (0 0 -58.2) to (38.8 40.322143 58.2)
|
||||
create_atoms CPU = 0.001 seconds
|
||||
|
||||
group membrane region membrane
|
||||
1920 atoms in group membrane
|
||||
|
||||
set type 1 mass 1.0
|
||||
Setting atom values ...
|
||||
1920 settings made for mass
|
||||
|
||||
set type 1 shape 1 1 1
|
||||
Setting atom values ...
|
||||
1920 settings made for shape
|
||||
|
||||
set group all quat 0 -1 0 90
|
||||
Setting atom values ...
|
||||
1920 settings made for quat
|
||||
|
||||
#compute memb all temp/com
|
||||
#compute rot all temp/asphere bias memb
|
||||
velocity all create ${T} 87287 loop geom
|
||||
velocity all create 0.23 87287 loop geom
|
||||
|
||||
pair_style ylz 2.6
|
||||
pair_coeff * * 1.0 1.0 4 3 0.0 2.6
|
||||
neighbor 1.0 bin
|
||||
|
||||
|
||||
thermo_style custom step temp press pxx pyy
|
||||
thermo 200
|
||||
|
||||
timestep 0.01
|
||||
|
||||
#dump 1 all atom 10 dump_onlymembrane.lammpstrj
|
||||
|
||||
fix 1 all langevin ${T} ${T} ${LD} 48279
|
||||
fix 1 all langevin 0.23 ${T} ${LD} 48279
|
||||
fix 1 all langevin 0.23 0.23 ${LD} 48279
|
||||
fix 1 all langevin 0.23 0.23 1 48279
|
||||
|
||||
|
||||
fix 2 all nve/asphere
|
||||
run 3000
|
||||
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Your simulation uses code contributions which should be cited:
|
||||
|
||||
- pair ylz command:
|
||||
|
||||
@Article{Yuan10,
|
||||
author = {H. Yuan, C. Huang, J. Li, G. Lykotrafitis, and S. Zhang},
|
||||
title = {One-particle-thick, solvent-free, coarse-grained model for biological and biomimetic fluid membranes},
|
||||
journal = {Phys. Rev. E},
|
||||
year = 2010,
|
||||
volume = 82,
|
||||
pages = {011905}
|
||||
}
|
||||
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Generated 0 of 0 mixed pair_coeff terms from geometric mixing rule
|
||||
Neighbor list info ...
|
||||
update: every = 1 steps, delay = 10 steps, check = yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 3.6
|
||||
ghost atom cutoff = 3.6
|
||||
binsize = 1.8, bins = 22 23 65
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair ylz, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/atomonly/newton
|
||||
stencil: half/bin/3d
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 4.182 | 4.794 | 5.472 Mbytes
|
||||
Step Temp Press Pxx Pyy
|
||||
0 0.23 -0.0073508785 -0.012283389 -0.012234574
|
||||
200 0.20647718 -0.0012368074 -0.0021167303 -0.0015343502
|
||||
400 0.21648371 -0.00085695085 -0.0015627331 -0.0011177093
|
||||
600 0.22929515 -0.00050218657 -0.0008332 -0.00062622609
|
||||
800 0.22062664 -0.00049172378 -0.000611884 -0.00075089294
|
||||
1000 0.22422425 -0.00039405068 -0.00037600355 -0.00070786572
|
||||
1200 0.2298767 -0.00025939082 -0.00021616578 -0.00053125505
|
||||
1400 0.2335927 5.8028332e-05 0.00017530192 -3.1675138e-05
|
||||
1600 0.22884878 -0.0001733902 -0.0008056431 0.00014276754
|
||||
1800 0.22813498 0.00019873459 0.00051040124 5.8860949e-05
|
||||
2000 0.2273166 -3.3595127e-05 0.0001705632 -0.00026498213
|
||||
2200 0.2251643 -2.4517311e-05 -4.0618888e-05 1.066658e-05
|
||||
2400 0.22460629 -4.5661259e-05 -0.00019144039 -1.6649099e-05
|
||||
2600 0.23085675 0.00014029405 0.00017983536 0.00017895001
|
||||
2800 0.22364591 4.2999164e-05 -0.00011000466 0.00024363243
|
||||
3000 0.23421357 0.00023505702 0.00020752013 0.00053567111
|
||||
Loop time of 4.68577 on 4 procs for 3000 steps with 1920 atoms
|
||||
|
||||
Performance: 553164.568 tau/day, 640.237 timesteps/s
|
||||
95.6% CPU use with 4 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 0.00015072 | 1.6029 | 3.8573 | 131.7 | 34.21
|
||||
Neigh | 0.00055747 | 0.025423 | 0.065858 | 17.0 | 0.54
|
||||
Comm | 0.0052259 | 0.48173 | 1.624 | 96.5 | 10.28
|
||||
Output | 0.0003894 | 0.023428 | 0.047223 | 15.0 | 0.50
|
||||
Modify | 0.00037337 | 0.2141 | 0.44595 | 46.3 | 4.57
|
||||
Other | | 2.338 | | | 49.90
|
||||
|
||||
Nlocal: 480 ave 1011 max 0 min
|
||||
Histogram: 2 0 0 0 0 0 0 0 1 1
|
||||
Nghost: 860 ave 1771 max 0 min
|
||||
Histogram: 2 0 0 0 0 0 0 0 0 2
|
||||
Neighs: 11697.8 ave 30095 max 0 min
|
||||
Histogram: 2 0 0 0 0 1 0 0 0 1
|
||||
|
||||
Total # of neighbors = 46791
|
||||
Ave neighs/atom = 24.370313
|
||||
Neighbor list builds = 99
|
||||
Dangerous builds = 0
|
||||
|
||||
|
||||
Total wall time: 0:00:04
|
||||
@ -2,7 +2,7 @@
|
||||
|
||||
units lj
|
||||
atom_style tri
|
||||
atom_modify first big
|
||||
atom_modify first big map yes
|
||||
|
||||
read_data data.tri.srd
|
||||
|
||||
@ -52,12 +52,12 @@ pair_coeff 1 2 0.0 1.0 0.0
|
||||
|
||||
timestep 0.001
|
||||
|
||||
fix 1 big rigid molecule #langevin 1.0 1.0 0.1 12398
|
||||
fix 2 small srd 20 big 1.0 0.25 49894 &
|
||||
fix 1 big rigid/small molecule #langevin 1.0 1.0 0.1 12398
|
||||
fix 2 small srd 20 big 1.0 1.0 49894 &
|
||||
search 0.2 cubic warn 0.0001 shift yes 49829 &
|
||||
overlap yes collision noslip
|
||||
overlap yes collision noslip inside ignore
|
||||
|
||||
fix 3 all deform 1 x scale 0.6 y scale 0.6 z scale 0.6
|
||||
fix 3 all deform 1 x scale 0.8 y scale 0.8 z scale 0.8
|
||||
|
||||
# diagnostics
|
||||
|
||||
@ -73,8 +73,8 @@ compute 2 all ke
|
||||
compute 3 all pe
|
||||
variable toteng equal (c_1+c_2+c_3)/atoms
|
||||
|
||||
thermo 1000
|
||||
thermo_style custom step f_1 c_tsmall f_2[9] temp press
|
||||
thermo 100
|
||||
thermo_style custom step f_1 c_tsmall temp press f_2[9] f_2[4]
|
||||
thermo_modify temp tbig
|
||||
|
||||
compute 10 all property/atom corner1x corner1y corner1z &
|
||||
@ -93,9 +93,9 @@ unfix 3
|
||||
|
||||
change_box all triclinic
|
||||
|
||||
fix 2 small srd 20 big 1.0 0.25 49894 &
|
||||
fix 2 small srd 20 big 1.0 1.0 49894 &
|
||||
search 0.2 cubic warn 0.0001 shift yes 49829 &
|
||||
overlap yes collision noslip tstat yes
|
||||
overlap yes collision noslip tstat yes inside ignore
|
||||
|
||||
#dump 1 all custom 500 dump2.atom.srd id type x y z ix iy iz
|
||||
#dump 2 all custom 500 dump2.tri.srd id type &
|
||||
|
||||
812
examples/ASPHERE/tri/log.15Aug23.tri.srd.g++.8
Normal file
812
examples/ASPHERE/tri/log.15Aug23.tri.srd.g++.8
Normal file
@ -0,0 +1,812 @@
|
||||
LAMMPS (2 Aug 2023 - Development - patch_2Aug2023-114-gdad8081d55-modified)
|
||||
WARNING: Using I/O redirection is unreliable with parallel runs. Better to use the -in switch to read input files. (../lammps.cpp:537)
|
||||
# Aspherical shear demo - 3d triangle boxes, solvated by SRD particles
|
||||
|
||||
units lj
|
||||
atom_style tri
|
||||
atom_modify first big map yes
|
||||
|
||||
read_data data.tri.srd
|
||||
Reading data file ...
|
||||
orthogonal box = (-8.4373405 -8.4373405 -8.4373405) to (8.4373405 8.4373405 8.4373405)
|
||||
2 by 2 by 2 MPI processor grid
|
||||
reading atoms ...
|
||||
1500 atoms
|
||||
1500 triangles
|
||||
read_data CPU = 0.007 seconds
|
||||
|
||||
# add small particles as hi density lattice
|
||||
|
||||
lattice sc 0.4
|
||||
Lattice spacing in x,y,z = 1.3572088 1.3572088 1.3572088
|
||||
region box block INF INF INF INF INF INF
|
||||
lattice sc 20.0
|
||||
Lattice spacing in x,y,z = 0.36840315 0.36840315 0.36840315
|
||||
create_atoms 2 region box
|
||||
Created 91125 atoms
|
||||
using lattice units in orthogonal box = (-8.4373405 -8.4373405 -8.4373405) to (8.4373405 8.4373405 8.4373405)
|
||||
create_atoms CPU = 0.002 seconds
|
||||
|
||||
group big type 1
|
||||
1500 atoms in group big
|
||||
group small type 2
|
||||
91125 atoms in group small
|
||||
set group small mass 0.01
|
||||
Setting atom values ...
|
||||
91125 settings made for mass
|
||||
|
||||
# delete overlaps
|
||||
# must set 1-2 cutoff to non-zero value
|
||||
|
||||
pair_style lj/cut 1.5
|
||||
pair_coeff 1 1 1.0 1.0
|
||||
pair_coeff 2 2 0.0 1.0 0.0
|
||||
pair_coeff 1 2 0.0 1.0
|
||||
|
||||
delete_atoms overlap 1.5 small big
|
||||
System init for delete_atoms ...
|
||||
Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule
|
||||
Neighbor list info ...
|
||||
update: every = 1 steps, delay = 0 steps, check = yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 1.8
|
||||
ghost atom cutoff = 1.8
|
||||
binsize = 0.9, bins = 19 19 19
|
||||
2 neighbor lists, perpetual/occasional/extra = 1 1 0
|
||||
(1) command delete_atoms, occasional
|
||||
attributes: full, newton on
|
||||
pair build: full/bin/atomonly
|
||||
stencil: full/bin/3d
|
||||
bin: standard
|
||||
(2) pair lj/cut, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/atomonly/newton
|
||||
stencil: half/bin/3d
|
||||
bin: standard
|
||||
WARNING: Delete_atoms cutoff > minimum neighbor cutoff (../delete_atoms.cpp:312)
|
||||
Deleted 76354 atoms, new total = 16271
|
||||
|
||||
# SRD run
|
||||
|
||||
reset_timestep 0
|
||||
|
||||
velocity small create 1.44 87287 loop geom
|
||||
|
||||
neighbor 0.3 multi
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
neigh_modify exclude molecule/intra big include big
|
||||
|
||||
comm_modify mode multi group big vel yes
|
||||
neigh_modify include big
|
||||
|
||||
# no pairwise interactions with small particles
|
||||
|
||||
pair_style tri/lj 3.5
|
||||
pair_coeff 1 1 0.1 1.0
|
||||
pair_coeff 2 2 0.0 1.0 0.0
|
||||
pair_coeff 1 2 0.0 1.0 0.0
|
||||
|
||||
# use fix SRD to push small particles out from inside big ones
|
||||
# if comment out, big particles won't see SRD particles
|
||||
|
||||
timestep 0.001
|
||||
|
||||
fix 1 big rigid/small molecule #langevin 1.0 1.0 0.1 12398
|
||||
create bodies CPU = 0.000 seconds
|
||||
125 rigid bodies with 1500 atoms
|
||||
1.8601881 = max distance from body owner to body atom
|
||||
fix 2 small srd 20 big 1.0 1.0 49894 search 0.2 cubic warn 0.0001 shift yes 49829 overlap yes collision noslip inside ignore
|
||||
|
||||
fix 3 all deform 1 x scale 0.8 y scale 0.8 z scale 0.8
|
||||
|
||||
# diagnostics
|
||||
|
||||
compute tsmall small temp/deform
|
||||
compute tbig big temp
|
||||
variable pebig equal pe*atoms/count(big)
|
||||
variable ebig equal etotal*atoms/count(big)
|
||||
|
||||
compute_modify tbig extra/dof -4500
|
||||
|
||||
compute 1 big erotate/asphere
|
||||
compute 2 all ke
|
||||
compute 3 all pe
|
||||
variable toteng equal (c_1+c_2+c_3)/atoms
|
||||
|
||||
thermo 100
|
||||
thermo_style custom step f_1 c_tsmall temp press f_2[9] f_2[4]
|
||||
thermo_modify temp tbig
|
||||
WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:527)
|
||||
|
||||
compute 10 all property/atom corner1x corner1y corner1z corner2x corner2y corner2z corner3x corner3y corner3z
|
||||
|
||||
#dump 1 all custom 500 dump1.atom.srd id type x y z ix iy iz
|
||||
#dump 2 all custom 500 dump1.tri.srd id type # c_10[1] c_10[2] c_10[3] c_10[4] c_10[5] c_10[6] # c_10[7] c_10[8] c_10[9]
|
||||
|
||||
run 10000
|
||||
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Your simulation uses code contributions which should be cited:
|
||||
|
||||
- neighbor multi command: doi:10.1016/j.cpc.2008.03.005, doi:10.1007/s40571-020-00361-2
|
||||
|
||||
@Article{Intveld08,
|
||||
author = {in 't Veld, P. J. and S. J.~Plimpton and G. S. Grest},
|
||||
title = {Accurate and Efficient Methods for Modeling Colloidal
|
||||
Mixtures in an Explicit Solvent using Molecular Dynamics},
|
||||
journal = {Comput.\ Phys.\ Commut.},
|
||||
year = 2008,
|
||||
volume = 179,
|
||||
pages = {320--329}
|
||||
}
|
||||
|
||||
@article{Shire2020,
|
||||
author = {Shire, Tom and Hanley, Kevin J. and Stratford, Kevin},
|
||||
title = {{DEM} Simulations of Polydisperse Media: Efficient Contact
|
||||
Detection Applied to Investigate the Quasi-Static Limit},
|
||||
journal = {Computational Particle Mechanics},
|
||||
year = {2020}
|
||||
@article{Monti2022,
|
||||
author = {Monti, Joseph M. and Clemmer, Joel T. and Srivastava,
|
||||
Ishan and Silbert, Leonardo E. and Grest, Gary S.
|
||||
and Lechman, Jeremy B.},
|
||||
title = {Large-scale frictionless jamming with power-law particle
|
||||
size distributions},
|
||||
journal = {Phys. Rev. E},
|
||||
volume = {106}
|
||||
issue = {3}
|
||||
year = {2022}
|
||||
}
|
||||
|
||||
- fix srd command: doi:10.1063/1.3419070
|
||||
|
||||
@Article{Petersen10,
|
||||
author = {M. K. Petersen and J. B. Lechman and S. J. Plimpton and
|
||||
G. S. Grest and in 't Veld, P. J. and P. R. Schunk},
|
||||
title = {Mesoscale Hydrodynamics via Stochastic Rotation
|
||||
Dynamics: Comparison with {L}ennard-{J}ones Fluid},
|
||||
journal = {J.~Chem.\ Phys.},
|
||||
year = 2010,
|
||||
volume = 132,
|
||||
pages = 174106
|
||||
}
|
||||
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule
|
||||
WARNING: Using compute temp/deform with inconsistent fix deform remap option (../compute_temp_deform.cpp:71)
|
||||
WARNING: Using fix srd with box deformation but no SRD thermostat (../fix_srd.cpp:405)
|
||||
SRD info:
|
||||
SRD/big particles = 14771 1500
|
||||
big particle diameter max/min = 2.9202881 0.87320391
|
||||
SRD temperature & lamda = 1 0.2
|
||||
SRD max distance & max velocity = 0.8 40
|
||||
SRD grid counts: 17 17 17
|
||||
SRD grid size: request, actual (xyz) = 1, 0.99262829 0.99262829 0.99262829
|
||||
SRD per actual grid cell = -3.9971745
|
||||
SRD viscosity = -34.162587
|
||||
big/SRD mass density ratio = -3.3753691
|
||||
WARNING: SRD bin size for fix srd differs from user request (../fix_srd.cpp:2805)
|
||||
WARNING: Fix srd grid size > 1/4 of big particle diameter (../fix_srd.cpp:2826)
|
||||
WARNING: Fix srd viscosity < 0.0 due to low SRD density (../fix_srd.cpp:2828)
|
||||
# of rescaled SRD velocities = 0
|
||||
ave/max small velocity = 19.970837 35.150443
|
||||
ave/max big velocity = 0 0
|
||||
Neighbor list info ...
|
||||
update: every = 1 steps, delay = 0 steps, check = yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 3.8
|
||||
ghost atom cutoff = 3.8
|
||||
binsize = 16.874681, bins = 1 1 1
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair tri/lj, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/multi/newton
|
||||
stencil: half/multi/3d
|
||||
bin: multi
|
||||
Per MPI rank memory allocation (min/avg/max) = 125.9 | 126.4 | 126.7 Mbytes
|
||||
Step f_1 c_tsmall Temp Press f_2[9] f_2[4]
|
||||
0 0 1.4401779 0 -0.15917996 0 0
|
||||
100 0.36662911 1.1475389 0.24585067 1.0290503 1.1382325 18
|
||||
200 0.73133134 1.0558153 0.49986673 0.73932383 1.049638 34
|
||||
300 1.1229361 1.0218621 0.82641583 0.7589689 1.0205369 40
|
||||
400 1.5826262 0.99541508 1.2201293 0.69171726 0.99190857 52
|
||||
500 1.8834563 0.99351667 1.4778822 1.0147794 1.0005581 63
|
||||
600 2.4225372 0.98954834 1.8740966 1.1362893 0.99760042 61
|
||||
700 3.0172772 0.99153625 2.3351502 1.3284877 0.98731355 39
|
||||
800 3.5307913 1.0012521 2.6477224 1.1404922 0.9846605 52
|
||||
900 3.757064 0.99743944 2.7220653 1.4078087 0.97538456 55
|
||||
1000 4.3165268 1.002214 3.055501 1.2252972 0.99123745 63
|
||||
1100 4.2796945 1.0075233 3.1022956 1.1893685 1.0139864 69
|
||||
1200 4.3719315 1.0037271 3.0054509 1.3886162 1.002661 64
|
||||
1300 4.5628012 0.99368316 3.2690604 1.3621012 0.9810568 56
|
||||
1400 4.6954389 0.99365088 3.1940001 1.8485712 0.99571089 71
|
||||
1500 5.0270163 0.99455258 3.4120396 1.5992539 0.98294263 77
|
||||
1600 5.5897797 1.0021621 3.647347 1.7796904 0.98967622 66
|
||||
1700 5.5330194 1.0130853 3.6407996 1.8005429 1.0068955 62
|
||||
1800 5.3606928 1.0090284 3.5863618 1.3308757 1.0214092 59
|
||||
1900 5.6086195 1.0071865 3.7427101 1.5296314 0.99886937 55
|
||||
2000 5.3726474 1.0064207 3.603621 1.9473142 0.99999816 54
|
||||
2100 5.836183 1.0124553 3.7321841 1.7889397 1.0188986 59
|
||||
2200 5.5090061 1.0113832 3.5884963 1.6617781 1.0071583 59
|
||||
2300 5.4011211 1.0095947 3.520406 1.8937582 0.99689983 61
|
||||
2400 5.2219281 1.0053246 3.3699458 1.7231672 0.99899754 59
|
||||
2500 5.7695275 1.0141459 3.6211469 1.7767598 1.0143133 65
|
||||
2600 5.4206253 1.0182828 3.521774 2.0800518 1.0081603 70
|
||||
2700 5.1401099 1.0085209 3.4200563 2.4019836 1.0107652 59
|
||||
2800 6.5420721 1.0159876 4.1996904 1.863842 1.0160738 61
|
||||
2900 5.9082962 1.0106921 3.7223419 2.0586998 1.0073885 67
|
||||
3000 5.6556123 1.0099021 3.6768976 1.921987 1.0068962 76
|
||||
3100 5.2913762 1.0008567 3.4103831 1.9831969 0.99187526 80
|
||||
3200 5.1032361 0.99756662 3.1967156 2.2448433 0.99743574 93
|
||||
3300 5.2622386 1.0024934 3.3325614 2.0078097 1.0047789 86
|
||||
3400 5.1247527 0.99810102 3.1363556 1.8907269 0.98936508 82
|
||||
3500 4.9424333 1.0009344 3.2153968 1.9002728 0.99161849 71
|
||||
3600 5.1243735 1.0037377 3.3117313 2.1267438 1.0078943 65
|
||||
3700 5.5045819 1.0006119 3.5686193 2.3466538 0.99876164 68
|
||||
3800 5.5355384 1.0022639 3.6701457 2.0383269 1.0008683 76
|
||||
3900 6.4915796 1.0137733 4.3225864 2.6996933 1.0064787 79
|
||||
4000 6.6631737 1.0236248 4.3057163 2.6352666 1.0255232 75
|
||||
4100 6.2999507 1.0263876 4.0101385 2.5479077 1.0168303 79
|
||||
4200 6.7902489 1.0247392 4.4616158 2.4926177 1.0191403 91
|
||||
4300 6.505908 1.0182073 4.0675428 2.168754 1.0177101 74
|
||||
4400 5.9554283 1.0115938 3.5787297 2.9258144 1.0133896 72
|
||||
4500 6.2276609 1.0202416 3.8211204 2.5308249 1.0174385 74
|
||||
4600 6.0485727 1.0195757 3.8217434 2.6421797 1.0201441 78
|
||||
4700 6.511063 1.0220764 3.933486 2.8591093 1.0147269 83
|
||||
4800 6.9478172 1.0106414 4.345402 3.3257663 1.00469 85
|
||||
4900 6.7547045 1.0211842 4.1874576 3.6503845 1.022873 94
|
||||
5000 7.2603949 1.0234313 4.5393985 3.4667806 1.0222306 105
|
||||
5100 7.1899652 1.0256566 4.5421834 3.8137207 1.0317242 99
|
||||
5200 7.1960739 1.026746 4.4288606 3.5523675 1.0242269 97
|
||||
5300 7.1294458 1.017883 4.5799808 3.3917274 1.0145317 99
|
||||
5400 6.2810892 1.0291953 4.0109229 2.8604571 1.0289438 97
|
||||
5500 6.15246 1.0288734 3.8714587 3.2760394 1.0210757 89
|
||||
5600 6.5860526 1.0192882 4.0272883 3.3124298 1.0096258 93
|
||||
5700 7.0296116 1.0097293 4.2652722 3.6049788 1.012463 82
|
||||
5800 6.8372302 1.0140065 4.2205065 4.3686183 1.0088542 93
|
||||
5900 7.8887098 1.0090612 4.9724078 4.457317 1.0045137 92
|
||||
6000 10.120663 1.0312443 6.3025192 4.72018 1.0374722 91
|
||||
6100 9.1318265 1.0304199 5.7084296 4.244548 1.0259056 97
|
||||
6200 8.9758903 1.0295285 5.1842704 4.870955 1.0178851 95
|
||||
6300 9.0088218 1.022484 5.3742805 5.1554352 1.0138365 101
|
||||
6400 10.470322 1.0287848 6.4602103 4.5461489 1.0335978 105
|
||||
6500 11.100779 1.0347405 6.9630121 4.9840664 1.0339044 99
|
||||
6600 10.139333 1.0476079 6.4284839 4.5523893 1.0433517 104
|
||||
6700 8.9706766 1.0386262 5.8387485 4.247024 1.0408151 101
|
||||
6800 7.7799532 1.0362651 4.9946283 4.6093924 1.0274763 102
|
||||
6900 8.0866551 1.0337743 4.9942769 4.1679939 1.0454805 102
|
||||
7000 8.0224277 1.0193598 4.9380527 3.9173115 1.0185001 109
|
||||
7100 7.8361001 1.0211143 4.872673 5.3471479 1.024779 110
|
||||
7200 7.8542147 1.0057183 4.8666653 4.668317 0.99980296 122
|
||||
7300 7.9313852 1.0159181 5.0062527 4.1410294 1.0195705 114
|
||||
7400 7.2769846 1.0155245 4.6349779 4.9138895 1.0005886 119
|
||||
7500 7.5974523 1.0196295 4.7918247 4.2525935 1.0211412 124
|
||||
7600 6.7835063 1.0203187 4.2674694 4.9251624 1.0218296 113
|
||||
7700 6.4039017 1.0119494 4.1086667 5.5240525 1.0078246 118
|
||||
7800 7.0715134 1.0149015 4.2450776 4.8796778 1.0164737 125
|
||||
7900 6.3626535 1.02294 4.202778 4.482164 1.0235878 136
|
||||
8000 6.2423869 1.0212553 4.0460303 5.2753307 1.0124884 132
|
||||
8100 6.550891 1.0223318 4.2993545 5.2634985 1.0163244 143
|
||||
8200 6.9122202 1.008347 4.3551124 5.4108909 1.0084913 142
|
||||
8300 6.9104634 1.0103936 4.4622206 5.6762373 0.99559355 143
|
||||
8400 6.4918879 1.0084381 4.1050732 5.8389788 1.0036021 135
|
||||
8500 7.4377218 1.0216662 4.5229841 5.5431311 1.0260799 123
|
||||
8600 7.572198 1.0228381 4.9058913 7.1028185 1.0015164 116
|
||||
8700 8.204675 1.03457 5.2231696 6.4790244 1.0214635 132
|
||||
8800 8.3118914 1.0381333 5.1795799 6.7437722 1.0290086 132
|
||||
8900 8.2559198 1.0268665 5.218352 7.2191395 1.019804 138
|
||||
9000 8.0403128 1.0339414 4.9310394 6.4942331 1.041527 156
|
||||
9100 7.1773079 1.0397062 4.4993688 7.0272109 1.0388012 167
|
||||
9200 7.1793935 1.0373589 4.3481663 7.4894459 1.0078785 157
|
||||
9300 8.3705146 1.0248112 5.1036971 8.2173072 1.010168 156
|
||||
9400 9.4935002 1.0252907 5.7846951 9.7466018 1.028941 170
|
||||
9500 9.5208037 1.0371093 5.9635099 7.6444933 1.022673 165
|
||||
9600 8.9992217 1.0292895 5.6224192 8.8071452 1.0101362 169
|
||||
9700 8.682661 1.0422224 5.3997636 8.6827834 1.0337928 149
|
||||
9800 7.6191562 1.0350948 4.7198842 8.6125595 1.0300395 151
|
||||
9900 8.0910913 1.0319432 4.8843183 7.9013334 1.0272495 167
|
||||
10000 7.4438347 1.0186098 4.7184985 8.999795 0.99762661 177
|
||||
Loop time of 162.325 on 8 procs for 10000 steps with 16271 atoms
|
||||
|
||||
Performance: 5322.658 tau/day, 61.605 timesteps/s, 1.002 Matom-step/s
|
||||
99.3% CPU use with 8 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 33.647 | 64.106 | 79.639 | 169.5 | 39.49
|
||||
Neigh | 0.30808 | 0.44033 | 0.50863 | 9.8 | 0.27
|
||||
Comm | 26.611 | 43.438 | 74.998 | 215.7 | 26.76
|
||||
Output | 0.0072573 | 0.0087791 | 0.0097993 | 0.9 | 0.01
|
||||
Modify | 53.171 | 54.121 | 55.362 | 12.3 | 33.34
|
||||
Other | | 0.2104 | | | 0.13
|
||||
|
||||
Nlocal: 2033.88 ave 2601 max 1413 min
|
||||
Histogram: 1 2 0 0 0 0 2 1 1 1
|
||||
Nghost: 1647.25 ave 1714 max 1617 min
|
||||
Histogram: 4 0 1 0 0 1 1 0 0 1
|
||||
Neighs: 12482.8 ave 17009 max 8679 min
|
||||
Histogram: 1 1 1 0 1 1 2 0 0 1
|
||||
|
||||
Total # of neighbors = 99862
|
||||
Ave neighs/atom = 6.1374224
|
||||
Neighbor list builds = 562
|
||||
Dangerous builds = 0
|
||||
|
||||
#undump 1
|
||||
#undump 2
|
||||
unfix 3
|
||||
|
||||
change_box all triclinic
|
||||
Changing box ...
|
||||
triclinic box = (-6.7498724 -6.7498724 -6.7498724) to (6.7498724 6.7498724 6.7498724) with tilt (0 0 0)
|
||||
|
||||
fix 2 small srd 20 big 1.0 1.0 49894 search 0.2 cubic warn 0.0001 shift yes 49829 overlap yes collision noslip tstat yes inside ignore
|
||||
|
||||
#dump 1 all custom 500 dump2.atom.srd id type x y z ix iy iz
|
||||
#dump 2 all custom 500 dump2.tri.srd id type # c_10[1] c_10[2] c_10[3] c_10[4] c_10[5] c_10[6] # c_10[7] c_10[8] c_10[9]
|
||||
|
||||
fix 3 all deform 1 xy erate 0.05 units box remap v
|
||||
|
||||
run 40000
|
||||
Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule
|
||||
SRD info:
|
||||
SRD/big particles = 14771 1500
|
||||
big particle diameter max/min = 2.9202881 0.87320391
|
||||
SRD temperature & lamda = 1 0.2
|
||||
SRD max distance & max velocity = 0.8 40
|
||||
SRD grid counts: 13 13 13
|
||||
SRD grid size: request, actual (xyz) = 1, 1.0384419 1.0384419 1.0384419
|
||||
SRD per actual grid cell = -2.775698
|
||||
SRD viscosity = -12.180602
|
||||
big/SRD mass density ratio = -5.5653033
|
||||
WARNING: SRD bin size for fix srd differs from user request (../fix_srd.cpp:2805)
|
||||
WARNING: Fix srd grid size > 1/4 of big particle diameter (../fix_srd.cpp:2826)
|
||||
WARNING: Fix srd viscosity < 0.0 due to low SRD density (../fix_srd.cpp:2828)
|
||||
# of rescaled SRD velocities = 1
|
||||
ave/max small velocity = 16.14994 40
|
||||
ave/max big velocity = 1.6952661 5.2200074
|
||||
Neighbor list info ...
|
||||
update: every = 1 steps, delay = 0 steps, check = yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 3.8
|
||||
ghost atom cutoff = 3.8
|
||||
binsize = 13.499745, bins = 1 1 1
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair tri/lj, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/multi/newton/tri
|
||||
stencil: half/multi/3d/tri
|
||||
bin: multi
|
||||
Per MPI rank memory allocation (min/avg/max) = 106.9 | 107.5 | 107.7 Mbytes
|
||||
Step f_1 c_tsmall Temp Press f_2[9] f_2[4]
|
||||
10000 7.4438347 1.0189789 4.7184481 7.9505614 0 0
|
||||
10100 7.0770142 1.0021471 4.4491455 6.606701 1 141
|
||||
10200 6.7628072 1.002308 4.152988 8.5190386 1 125
|
||||
10300 6.5333319 1.0007472 4.1295404 8.2341747 1 109
|
||||
10400 6.3237519 1.0024029 3.8636034 9.4058128 1 95
|
||||
10500 6.6411054 1.0026261 4.2975997 7.6122304 1 82
|
||||
10600 5.7470775 1.0004827 3.7959947 7.3091777 1 67
|
||||
10700 5.9744919 1.0014977 3.6885649 7.5517197 1 59
|
||||
10800 5.8028731 1.0029627 3.7553961 6.2787087 1 49
|
||||
10900 5.3755286 1.0019318 3.5334739 7.1318348 1 41
|
||||
11000 5.3915962 1.001463 3.483172 7.6362496 1 40
|
||||
11100 5.8683672 1.0022459 3.6697589 6.9711866 1 33
|
||||
11200 5.4351801 0.99956703 3.4548447 7.0745257 1 29
|
||||
11300 4.9397513 1.0008287 3.1990325 6.0917337 1 27
|
||||
11400 4.9159845 1.0017862 3.0005677 7.653817 1 26
|
||||
11500 4.9243103 1.0013135 3.1799841 7.744414 1 23
|
||||
11600 5.2036357 1.0017984 3.2963749 7.540477 1 22
|
||||
11700 4.8991892 1.0020757 3.1773032 8.7218471 1 27
|
||||
11800 4.9489399 1.003438 3.1679764 7.1605486 1 26
|
||||
11900 4.82398 1.0019946 3.1939566 7.1397869 1 21
|
||||
12000 4.3531411 1.000532 2.8321416 7.6672501 1 23
|
||||
12100 4.8226081 1.0018898 3.0382137 6.8343432 1 25
|
||||
12200 4.7456418 1.0032116 2.9186038 7.3067818 1 20
|
||||
12300 4.4280468 1.0005857 2.734593 8.0365684 1 22
|
||||
12400 4.7311239 1.0000982 2.8898839 7.9231831 1 22
|
||||
12500 4.7261054 1.0016127 2.9090517 7.6085854 1 24
|
||||
12600 4.7719025 1.0016702 2.9736761 7.6101796 1 26
|
||||
12700 4.386248 1.001394 2.8508378 6.4765102 1 28
|
||||
12800 4.3313538 1.0019737 2.6258221 6.3164681 1 19
|
||||
12900 4.2219861 1.0007469 2.5345699 7.0901077 1 22
|
||||
13000 4.1775643 1.0011891 2.5807017 7.3579938 1 25
|
||||
13100 4.3060837 1.0008671 2.5974066 6.9301328 1 22
|
||||
13200 4.3529062 0.99996469 2.7571632 6.7806287 1 21
|
||||
13300 4.2178709 1.000673 2.7819091 7.6449064 1 18
|
||||
13400 4.2714169 1.0021294 2.7280794 8.0986691 1 18
|
||||
13500 4.3430969 1.0037732 2.6768429 8.1267941 1 18
|
||||
13600 4.3664374 1.0016083 2.6470186 6.2797727 1 20
|
||||
13700 4.4904769 1.0008993 2.7885718 7.7410193 1 22
|
||||
13800 4.2966193 1.001532 2.73862 7.9651302 1 21
|
||||
13900 4.4003185 1.0009984 2.7484129 8.7160439 1 24
|
||||
14000 4.5948292 1.0011748 2.9051777 7.842121 1 22
|
||||
14100 4.6901122 1.0001265 2.9404111 8.9953816 1 20
|
||||
14200 4.8517518 0.99998743 2.9647625 6.6450509 1 22
|
||||
14300 4.889628 1.0018051 3.0891097 7.2671824 1 20
|
||||
14400 4.578862 1.0010629 2.8239776 6.1317183 1 23
|
||||
14500 4.0865406 1.0013917 2.5119661 6.864665 1 19
|
||||
14600 4.30688 1.0009041 2.6817814 6.9007433 1 18
|
||||
14700 4.1295726 1.002342 2.6032093 7.1441648 1 15
|
||||
14800 4.2176021 1.0015157 2.7332903 6.8394683 1 16
|
||||
14900 4.2012664 0.99986345 2.6498409 7.4568241 1 15
|
||||
15000 4.6124269 1.0014751 2.9584178 7.9341875 1 16
|
||||
15100 4.947327 1.0010615 3.0784409 7.6241305 1 21
|
||||
15200 5.253281 1.002095 3.3093754 8.1872718 1 25
|
||||
15300 5.2642369 1.0017799 3.1511136 7.4668389 1 25
|
||||
15400 5.1967916 1.0029407 3.247548 8.0840111 1 23
|
||||
15500 5.7465412 1.001896 3.468834 9.5990471 1 15
|
||||
15600 6.2245772 1.0021086 3.6127689 7.8242016 1 19
|
||||
15700 5.5626191 0.99984979 3.3893723 7.8124588 1 20
|
||||
15800 5.5945727 1.0010291 3.3442448 7.0116922 1 17
|
||||
15900 5.4450219 1.0006248 3.3132381 8.4803413 1 15
|
||||
16000 5.7800459 1.001449 3.5002534 8.7989456 1 19
|
||||
16100 6.1168718 1.0008109 3.8081142 8.0119729 1 18
|
||||
16200 5.4901649 1.0020643 3.3673653 7.3483134 1 17
|
||||
16300 5.4051694 1.0015652 3.3560012 7.4641983 1 19
|
||||
16400 5.4237612 1.0012686 3.3816406 7.3845086 1 14
|
||||
16500 5.1935593 1.001754 3.3340381 7.8607712 1 16
|
||||
16600 5.539343 1.0021073 3.4164309 8.1541097 1 12
|
||||
16700 5.8922923 1.0013792 3.553426 7.5220576 1 14
|
||||
16800 5.956937 1.0005959 3.7630589 8.7417987 1 13
|
||||
16900 5.469721 1.0016219 3.5531223 8.6721994 1 13
|
||||
17000 5.3110154 1.001142 3.4167244 7.4644182 1 15
|
||||
17100 5.9226035 0.99918238 4.0244287 6.5172028 1 16
|
||||
17200 5.4897042 0.99981565 3.4350691 5.6840394 1 20
|
||||
17300 5.4302636 1.0021571 3.421473 6.4317025 1 21
|
||||
17400 5.5559131 1.0013807 3.4951403 6.874191 1 24
|
||||
17500 5.4068006 1.0010448 3.4506835 7.7069504 1 22
|
||||
17600 4.9283792 1.0007628 3.1736308 7.3098058 1 20
|
||||
17700 4.9319722 0.99935896 3.0956257 8.2120111 1 15
|
||||
17800 4.6842391 1.00037 2.9602433 7.4116352 1 17
|
||||
17900 4.7714682 1.0009332 2.9666778 7.5925131 1 17
|
||||
18000 4.7233188 1.0035687 3.0991778 7.1636357 1 10
|
||||
18100 4.6487958 1.0020255 3.10781 6.8468658 1 12
|
||||
18200 4.6284129 1.0012617 3.089724 6.3082275 1 13
|
||||
18300 4.7136404 0.99962415 3.1261978 7.3359556 1 15
|
||||
18400 5.0367681 1.0011016 3.2413493 8.3910633 1 14
|
||||
18500 4.9658104 1.0025407 3.2420827 7.4701216 1 17
|
||||
18600 4.6100059 1.0014508 3.0216884 6.553483 1 17
|
||||
18700 4.3246452 1.0016721 2.7810363 6.7450293 1 19
|
||||
18800 4.9415788 1.0012406 3.1661907 7.5544034 1 18
|
||||
18900 5.3930915 1.000138 3.2557456 7.350955 1 21
|
||||
19000 5.1938599 1.0007364 3.2398733 6.5397956 1 22
|
||||
19100 5.4433048 1.0019191 3.2699245 8.3625772 1 22
|
||||
19200 6.1303261 1.0004005 3.7823203 8.0537369 1 22
|
||||
19300 5.5762518 1.0008117 3.5689121 8.3714373 1 22
|
||||
19400 5.1316743 0.9999834 3.099381 7.405287 1 23
|
||||
19500 5.2064799 1.0012007 3.3059455 7.3499127 1 25
|
||||
19600 5.1650099 1.0023314 3.3759492 7.3637616 1 21
|
||||
19700 5.8316278 1.0023317 3.601564 7.153887 1 19
|
||||
19800 5.6435147 1.0010657 3.4967581 6.8899334 1 21
|
||||
19900 5.4071193 0.99961357 3.4977894 6.1068438 1 20
|
||||
20000 5.5058495 1.000982 3.5185057 8.5657603 1 19
|
||||
20100 5.6551271 1.0025852 3.5672369 7.8242273 1 20
|
||||
20200 5.7196886 1.002283 3.6010925 7.1449072 1 22
|
||||
20300 5.5593553 1.0009987 3.4363398 8.4141755 1 21
|
||||
20400 5.5550247 1.001081 3.3950874 8.0222131 1 20
|
||||
20500 5.4510415 0.99997273 3.5505093 7.5243655 1 18
|
||||
20600 5.8014064 1.0007611 3.8084579 7.6583499 1 18
|
||||
20700 5.7337315 1.0020309 3.7973684 8.7376766 1 17
|
||||
20800 5.2512898 0.99901254 3.5027763 7.8902791 1 14
|
||||
20900 5.3245034 1.0014504 3.3354615 6.7030716 1 17
|
||||
21000 5.2071731 1.0020459 3.3881369 5.8616999 1 20
|
||||
21100 5.3187535 1.0010762 3.2845672 8.1422146 1 21
|
||||
21200 5.5298545 0.99942313 3.4393978 7.1183144 1 22
|
||||
21300 5.8430744 1.0008652 3.719408 7.8522038 1 20
|
||||
21400 5.8190457 1.0017046 3.5624252 7.8150165 1 20
|
||||
21500 6.004585 1.0035276 3.9161914 7.7719377 1 21
|
||||
21600 6.7202635 0.99970072 3.9642141 8.7934294 1 18
|
||||
21700 6.8590346 1.0007883 4.4285217 8.9014638 1 20
|
||||
21800 6.627638 1.0012117 4.1154082 8.3153026 1 22
|
||||
21900 7.8281047 1.0008299 4.8842343 8.4016227 1 20
|
||||
22000 7.200038 1.0014681 4.4141419 9.4091956 1 18
|
||||
22100 7.7442011 1.0018051 4.7850371 8.9885489 1 15
|
||||
22200 7.4770203 1.0033558 4.7512643 8.4898148 1 17
|
||||
22300 8.1080801 1.0000019 5.2725185 9.2314625 1 14
|
||||
22400 7.8068311 1.0020672 4.9055683 8.4064748 1 12
|
||||
22500 7.4594636 1.0008427 4.6586396 8.5102986 1 11
|
||||
22600 6.9380609 1.0024634 4.2435619 10.395118 1 16
|
||||
22700 6.9338066 1.001056 4.3436179 7.9126284 1 18
|
||||
22800 6.8049493 1.0020052 4.1443407 7.8228868 1 18
|
||||
22900 6.2280158 1.0021474 3.7695343 7.3179647 1 20
|
||||
23000 5.649403 1.0017128 3.5941976 7.2964709 1 19
|
||||
23100 5.3203116 1.001912 3.3807399 6.6454551 1 15
|
||||
23200 5.8172882 1.0005742 3.6625896 8.4256312 1 15
|
||||
23300 5.9647182 1.0015466 3.9106019 8.3303303 1 14
|
||||
23400 5.9784055 1.0034542 3.7229235 7.7934273 1 14
|
||||
23500 5.377627 1.00192 3.5481778 6.8195124 1 17
|
||||
23600 5.4807136 1.0014662 3.563123 7.6356376 1 18
|
||||
23700 5.8896329 1.0013553 3.7990694 8.5513408 1 13
|
||||
23800 6.3463707 0.9999403 3.9609397 8.5741923 1 11
|
||||
23900 6.656669 1.0014998 4.1993183 9.0862996 1 13
|
||||
24000 7.583723 1.0025057 4.7628652 7.5007245 1 20
|
||||
24100 6.9868359 1.0014089 4.4369841 7.692833 1 25
|
||||
24200 7.1966062 1.0013149 4.4384528 9.5264821 1 18
|
||||
24300 6.7765706 1.0007065 4.3500477 9.4974154 1 16
|
||||
24400 7.0853466 1.0013246 4.409163 9.2215823 1 17
|
||||
24500 6.9603823 1.0004247 4.4866051 7.7870058 1 20
|
||||
24600 6.9208291 0.99953329 4.2298144 6.5732392 1 21
|
||||
24700 6.5005518 1.0026848 4.0003505 7.8094715 1 22
|
||||
24800 5.8421948 1.0012055 3.6686768 7.6078157 1 26
|
||||
24900 5.8410604 1.0023428 3.746177 6.8971309 1 22
|
||||
25000 5.8728511 1.0001747 3.7170134 7.4456816 1 19
|
||||
25100 6.0217168 1.000624 3.7756108 6.6542452 1 20
|
||||
25200 6.1939015 1.0017861 3.8943084 9.395821 1 25
|
||||
25300 6.161998 1.0010373 3.9255122 6.2228884 1 28
|
||||
25400 5.5850406 1.0018505 3.5129832 7.2551309 1 24
|
||||
25500 6.0286276 1.0009028 3.8580887 6.8065265 1 24
|
||||
25600 5.6262228 1.0005097 3.4574446 7.5061246 1 21
|
||||
25700 6.1348187 1.0009828 3.8073512 7.4818375 1 17
|
||||
25800 6.09781 1.0026426 3.9585383 9.0915939 1 21
|
||||
25900 6.2673667 1.0002269 3.8182813 9.2134822 1 21
|
||||
26000 6.6001776 1.0020444 4.041386 8.0403555 1 18
|
||||
26100 6.3063025 1.0016633 3.8649839 8.8149734 1 19
|
||||
26200 6.0046983 1.002332 3.5380766 8.6145656 1 17
|
||||
26300 5.9627788 1.0005401 3.56864 6.7821213 1 15
|
||||
26400 5.0547314 0.9998295 3.2106781 9.2935351 1 15
|
||||
26500 5.256781 1.0013131 3.2946631 8.8590275 1 15
|
||||
26600 5.6250355 1.0023929 3.5243033 8.8985058 1 17
|
||||
26700 6.0197165 1.0018323 3.7973947 7.3093402 1 17
|
||||
26800 5.4556541 1.0015309 3.4295107 8.2342049 1 18
|
||||
26900 5.420428 1.0024996 3.4374201 7.1444636 1 16
|
||||
27000 6.165624 1.0019174 3.8726016 8.6588275 1 20
|
||||
27100 6.7131697 1.0006541 4.266264 8.7063389 1 24
|
||||
27200 6.4855163 1.0016139 4.2029778 7.667611 1 29
|
||||
27300 6.0525608 1.000478 3.9169723 7.4515279 1 25
|
||||
27400 6.1426194 1.0014522 3.9176108 6.8689671 1 24
|
||||
27500 6.5981349 1.0001143 4.0620686 8.6804552 1 27
|
||||
27600 6.7827138 1.0016694 4.2764286 9.3912843 1 21
|
||||
27700 6.6368902 1.0025149 4.1452128 9.1814523 1 24
|
||||
27800 6.9791025 1.0019486 4.3989933 7.9446882 1 24
|
||||
27900 6.617142 1.0015736 4.360571 9.3732108 1 26
|
||||
28000 7.2818263 1.0014101 4.6041512 8.2398587 1 28
|
||||
28100 7.2543709 1.0007625 4.5724787 7.7373488 1 22
|
||||
28200 7.0631847 1.0023922 4.4021705 8.3290554 1 29
|
||||
28300 7.2999952 1.0012593 4.4655563 8.612666 1 27
|
||||
28400 7.4124538 1.0014043 4.5011335 8.379391 1 29
|
||||
28500 7.0350937 1.0011392 4.3528091 7.8167375 1 24
|
||||
28600 7.9659642 1.0031684 4.8732467 8.0661929 1 30
|
||||
28700 7.2865919 1.0010958 4.6650146 8.0325989 1 32
|
||||
28800 7.7039529 1.0027912 4.8299888 9.5471747 1 30
|
||||
28900 8.3288847 1.0012438 5.0785288 8.8964877 1 31
|
||||
29000 7.9348665 1.0021794 4.9393968 9.5531767 1 31
|
||||
29100 8.2473389 1.0013795 4.9890359 9.7697184 1 29
|
||||
29200 8.6383362 1.0018356 4.9856954 7.6402719 1 25
|
||||
29300 8.2504592 1.0011048 4.9631793 7.9466724 1 24
|
||||
29400 8.0502922 1.0010516 5.2521065 8.4515028 1 26
|
||||
29500 7.9475896 1.0012951 4.8584644 9.1225463 1 19
|
||||
29600 8.5641641 1.0016228 5.4361335 9.2045399 1 23
|
||||
29700 8.9932021 1.0011848 5.5727205 8.6045729 1 23
|
||||
29800 8.0320178 1.0019073 5.2837013 8.9335413 1 22
|
||||
29900 8.2676522 1.0012734 5.2213798 8.8966896 1 24
|
||||
30000 9.1848984 1.001747 5.9147628 12.096129 1 27
|
||||
30100 10.184519 0.99977427 6.4260136 11.140491 1 27
|
||||
30200 9.271472 1.0023983 6.0252189 9.6954338 1 30
|
||||
30300 9.0751572 1.000851 5.6010295 9.734426 1 28
|
||||
30400 9.4581261 1.0018449 5.6987258 9.70456 1 34
|
||||
30500 9.1574751 0.99944001 5.582217 9.300318 1 27
|
||||
30600 8.619312 1.001388 5.3503985 8.2759155 1 26
|
||||
30700 7.9370031 1.0026674 5.0702831 8.5368014 1 28
|
||||
30800 7.9221619 1.0019077 5.1278637 11.046922 1 26
|
||||
30900 9.9722884 1.0025903 6.4055506 10.167311 1 25
|
||||
31000 8.8648667 0.99962676 5.4777514 10.142102 1 21
|
||||
31100 8.576344 1.000906 5.3216342 8.7984921 1 18
|
||||
31200 7.8480974 1.0010341 4.9584917 9.0696437 1 16
|
||||
31300 8.3536183 1.0005758 5.208516 9.7971514 1 15
|
||||
31400 8.5301933 1.0007603 5.2241536 9.0257241 1 17
|
||||
31500 8.5196226 1.0018215 5.0576064 8.8847294 1 19
|
||||
31600 8.1470823 1.0023147 4.9182956 9.0205413 1 20
|
||||
31700 8.1475888 1.0005764 5.1814113 9.0603162 1 16
|
||||
31800 7.8629717 1.0014194 4.9221218 9.366291 1 16
|
||||
31900 7.7206559 1.0021082 4.9167636 7.4136735 1 16
|
||||
32000 7.5152809 1.0004752 4.6330638 8.830959 1 16
|
||||
32100 8.2693974 1.0011751 4.9094804 9.427636 1 13
|
||||
32200 8.3067661 0.9997006 4.9036865 9.0374633 1 17
|
||||
32300 7.2068514 1.0007866 4.3580755 8.6445065 1 17
|
||||
32400 6.885063 1.0011887 4.1528011 8.1199454 1 16
|
||||
32500 6.9147014 1.0020825 4.160405 7.5398034 1 19
|
||||
32600 6.8809668 1.000971 4.3312782 8.2157688 1 16
|
||||
32700 6.4818892 1.0000885 3.9433899 7.309605 1 22
|
||||
32800 6.6875555 1.0018674 4.1017504 7.2327183 1 22
|
||||
32900 7.6118502 0.99975736 4.4498951 8.5072395 1 19
|
||||
33000 7.7576909 1.0022061 4.7239551 9.2132467 1 22
|
||||
33100 7.8616235 1.000482 5.0031322 9.349805 1 20
|
||||
33200 8.2620563 1.0015059 5.2482188 10.286446 1 17
|
||||
33300 8.0217099 1.0015466 5.1166876 9.1381844 1 20
|
||||
33400 7.6565746 1.0024855 4.7594208 9.2646824 1 22
|
||||
33500 7.9633887 1.0010334 4.6754116 9.1085184 1 23
|
||||
33600 7.9566834 1.0024542 4.6712679 9.2046594 1 25
|
||||
33700 8.2639384 1.0003021 5.1326892 8.0930215 1 24
|
||||
33800 8.5648917 1.0000947 5.2099387 8.8127486 1 21
|
||||
33900 8.3593557 1.0002488 5.1291354 8.5938391 1 25
|
||||
34000 8.1922068 1.0030011 5.1441189 7.1529563 1 24
|
||||
34100 8.4260308 1.0004639 5.5876122 9.0450303 1 28
|
||||
34200 8.3014654 1.0002204 5.1964772 8.4920822 1 33
|
||||
34300 7.4736545 1.0010306 4.7932244 7.8442244 1 30
|
||||
34400 7.0023126 1.0024002 4.5665168 8.4702188 1 29
|
||||
34500 7.3797703 1.000813 4.7224014 8.4098954 1 30
|
||||
34600 7.7158761 0.99973161 4.7441628 8.5818592 1 29
|
||||
34700 7.6135895 1.0015768 4.6612844 7.2195952 1 28
|
||||
34800 7.0458078 0.99992638 4.2805357 7.4162305 1 32
|
||||
34900 7.6190708 1.0007146 4.8064968 8.2709405 1 27
|
||||
35000 7.4614294 1.0006051 4.7807207 7.7137359 1 28
|
||||
35100 7.7008336 1.0008263 4.6823621 7.0208513 1 26
|
||||
35200 8.1510766 1.000271 5.1781834 7.3231692 1 24
|
||||
35300 7.5106275 1.0010438 4.6988185 8.9418343 1 25
|
||||
35400 7.8116652 1.0009688 4.8622216 7.4624002 1 17
|
||||
35500 7.2159785 1.0027484 4.543984 8.3177043 1 21
|
||||
35600 7.6978875 1.0004834 4.7021203 8.3706905 1 20
|
||||
35700 7.7827655 1.0019919 4.775879 8.6083292 1 15
|
||||
35800 7.8433537 1.001844 4.7506574 7.3250009 1 15
|
||||
35900 7.9456497 1.0004336 4.7925775 7.9824359 1 18
|
||||
36000 8.1044513 1.0022261 5.1213755 9.211699 1 16
|
||||
36100 7.6657532 1.0025661 4.751804 8.9770412 1 19
|
||||
36200 7.909323 1.0035462 4.8435293 10.232493 1 21
|
||||
36300 8.4188244 1.0016775 5.4337725 9.2060079 1 24
|
||||
36400 8.7352689 1.0011274 5.6313351 8.6202832 1 24
|
||||
36500 8.3459273 1.0005659 5.187336 6.9333716 1 21
|
||||
36600 7.7118105 1.0018769 4.9293347 8.2789615 1 14
|
||||
36700 7.8069879 1.0014021 4.7782709 8.4841233 1 15
|
||||
36800 7.862085 1.0005342 4.8680692 8.1055023 1 16
|
||||
36900 7.9469362 1.0027815 4.9339095 9.157722 1 16
|
||||
37000 7.9085375 1.0024851 5.0921374 8.9374239 1 16
|
||||
37100 8.9464869 1.0005734 5.6837772 8.806998 1 16
|
||||
37200 8.1482632 1.0021175 5.1266453 8.5772094 1 18
|
||||
37300 7.7958072 1.0026336 4.788431 8.3233372 1 19
|
||||
37400 7.3647655 1.0015482 4.4786134 9.6606112 1 23
|
||||
37500 7.3071882 1.0003912 4.681549 8.6319438 1 17
|
||||
37600 7.8672509 1.0000478 4.7981944 8.3051478 1 14
|
||||
37700 7.9306696 0.99923102 4.9316544 9.3672856 1 15
|
||||
37800 7.7397949 0.99948557 5.1168552 8.5978047 1 17
|
||||
37900 7.9121039 1.0020122 4.9866234 7.640888 1 14
|
||||
38000 7.433451 1.0007901 4.6254894 8.0853539 1 14
|
||||
38100 7.4636908 1.0021552 4.8472833 8.1975615 1 10
|
||||
38200 7.4453077 1.0010305 4.6910943 7.8192603 1 13
|
||||
38300 7.0488536 1.0012587 4.5490462 8.190036 1 16
|
||||
38400 8.0686748 1.0016782 5.0747029 7.7242015 1 15
|
||||
38500 7.9575875 1.0007137 4.8361776 8.05268 1 15
|
||||
38600 7.6690498 1.0027522 4.8823286 9.1926516 1 20
|
||||
38700 7.1567 1.002374 4.5600354 10.098089 1 19
|
||||
38800 6.9100518 1.0008695 4.4101446 7.8832032 1 19
|
||||
38900 6.8021882 1.0017647 4.1844125 8.1858761 1 21
|
||||
39000 8.3996464 1.0010263 4.8183813 8.0997387 1 16
|
||||
39100 8.4533834 1.0021643 5.074254 11.291904 1 19
|
||||
39200 8.2406701 1.002062 5.0117425 8.778159 1 24
|
||||
39300 8.3134114 1.0008218 5.0067136 7.9871787 1 22
|
||||
39400 7.4307571 1.0014205 4.5858283 8.8596594 1 25
|
||||
39500 7.1146821 1.0016367 4.5021057 7.4890018 1 22
|
||||
39600 8.0048978 0.99992107 4.9235747 7.8770845 1 24
|
||||
39700 8.070853 1.0029024 5.0842957 9.020664 1 21
|
||||
39800 7.6939108 1.0012543 4.8986595 8.3306129 1 20
|
||||
39900 7.2915444 1.00267 4.5038291 8.3844384 1 20
|
||||
40000 7.3023994 1.0020441 4.4960911 8.1023709 1 18
|
||||
40100 7.0221648 1.0033695 4.6374149 8.3756822 1 24
|
||||
40200 7.4114756 1.0019246 4.6733475 7.6547258 1 23
|
||||
40300 7.5323108 1.0005472 4.8284493 8.2820085 1 26
|
||||
40400 7.3890772 1.0010491 4.6599273 8.9203575 1 19
|
||||
40500 7.5786764 1.0016114 4.8166885 8.6760107 1 25
|
||||
40600 8.165763 1.0006961 5.1488995 7.9321524 1 22
|
||||
40700 8.1277597 0.99933464 5.0441567 10.069551 1 16
|
||||
40800 8.1050904 1.0024705 5.4408599 8.3244459 1 21
|
||||
40900 7.805318 1.0022992 4.9965408 9.7193723 1 21
|
||||
41000 9.0130932 1.0006842 5.7931112 6.1646073 1 20
|
||||
41100 8.0387975 1.0017359 5.3355655 9.6123191 1 21
|
||||
41200 8.4484723 1.0014151 5.4461007 8.5146504 1 27
|
||||
41300 8.6181909 1.0007562 5.2963876 9.1122306 1 30
|
||||
41400 9.6762899 1.0010931 5.950456 9.2851025 1 25
|
||||
41500 9.9414226 1.0016186 6.1433384 10.741453 1 24
|
||||
41600 9.3348435 1.0003483 5.9291766 11.460717 1 20
|
||||
41700 9.6125587 1.0013661 5.8530052 9.2105722 1 19
|
||||
41800 11.383056 1.0032034 7.1988684 10.312945 1 22
|
||||
41900 10.884524 1.0034888 6.9126707 10.775457 1 20
|
||||
42000 11.071218 1.0026753 7.0004189 10.740627 1 20
|
||||
42100 11.054304 1.0008347 6.9602414 8.9885498 1 22
|
||||
42200 22.478691 1.0020466 14.997099 12.72513 1 19
|
||||
42300 18.303508 1.0027626 11.336523 12.638769 1 18
|
||||
42400 15.998712 1.0030312 9.4092725 11.070501 1 24
|
||||
42500 15.034488 1.0024472 9.3543751 11.48052 1 28
|
||||
42600 14.538257 1.0033153 9.2523745 10.909576 1 27
|
||||
42700 13.986613 1.001458 8.5544184 10.765136 1 29
|
||||
42800 13.240256 1.0027899 8.2014429 10.506497 1 32
|
||||
42900 12.784336 1.0001406 8.0823431 12.258209 1 33
|
||||
43000 13.374145 1.0012996 8.4207155 10.32817 1 31
|
||||
43100 13.142334 1.0022503 8.5908808 10.152205 1 32
|
||||
43200 12.669284 1.0018944 7.8511966 10.580104 1 32
|
||||
43300 13.155032 1.001144 8.0337768 10.6652 1 39
|
||||
43400 12.155928 1.0019472 7.5886584 11.234772 1 35
|
||||
43500 12.385603 1.0007639 7.8865245 9.3868914 1 32
|
||||
43600 12.236179 1.0027456 7.7521353 10.456701 1 42
|
||||
43700 11.49535 1.0008758 7.3633144 8.8490079 1 40
|
||||
43800 11.469157 1.0015845 7.0035577 10.594522 1 41
|
||||
43900 11.228266 1.0013014 7.0137223 8.0653711 1 38
|
||||
44000 10.56742 1.0016631 6.6908938 8.1094154 1 35
|
||||
44100 9.8964699 1.0008351 6.3550438 8.6578181 1 36
|
||||
44200 9.041539 1.0019541 5.6721401 8.6518043 1 38
|
||||
44300 9.0767434 1.0034191 5.7446596 8.3838528 1 38
|
||||
44400 9.2299608 1.0019526 5.7117964 8.3106491 1 37
|
||||
44500 9.458981 1.0030409 5.7612138 7.7679755 1 37
|
||||
44600 8.9611997 1.0014848 5.6490756 6.9224078 1 37
|
||||
44700 8.0853184 1.0018894 5.2288749 8.0910912 1 32
|
||||
44800 7.9999755 1.0015853 4.8088312 7.1854304 1 30
|
||||
44900 7.6598023 1.0009751 4.6690664 7.1999858 1 28
|
||||
45000 7.4939315 1.0010307 4.8119666 7.9615769 1 26
|
||||
45100 7.4690079 0.99913423 4.9704428 7.6026835 1 32
|
||||
45200 7.7001199 1.001626 4.9315953 7.4926686 1 25
|
||||
45300 7.8794405 1.0011648 4.8624857 8.0804457 1 26
|
||||
45400 7.493909 1.0016257 4.7631808 8.0330626 1 26
|
||||
45500 7.5963141 1.0005825 4.7220659 7.0971298 1 23
|
||||
45600 7.9028612 1.0017008 4.9561022 8.440428 1 23
|
||||
45700 7.2285584 1.0006033 4.5521456 9.385579 1 23
|
||||
45800 7.5687284 1.0024318 4.8557498 8.3052658 1 23
|
||||
45900 7.8938604 1.0013937 5.1393944 5.5323667 1 26
|
||||
46000 8.318466 1.0020803 5.4761811 8.2227801 1 25
|
||||
46100 7.9169512 1.0024598 5.0406355 8.64365 1 27
|
||||
46200 7.5535458 1.0016318 4.8010133 9.370726 1 26
|
||||
46300 7.8926896 1.0001525 5.18463 7.9830196 1 27
|
||||
46400 7.487145 1.002671 4.7718312 8.300134 1 29
|
||||
46500 7.3564658 1.0006114 4.6762189 7.34947 1 26
|
||||
46600 7.2261291 1.0005569 4.4751221 6.5847138 1 27
|
||||
46700 7.2943203 1.0020164 4.3335327 7.7296507 1 25
|
||||
46800 8.5849411 1.0014634 5.4501531 9.0933014 1 25
|
||||
46900 10.176752 1.0023799 6.0456779 9.4050423 1 16
|
||||
47000 9.1913098 1.0029076 5.7577256 9.1826215 1 22
|
||||
47100 9.5479771 1.0022102 6.1100973 8.9440056 1 28
|
||||
47200 9.9944172 1.0004924 6.3649417 9.1507264 1 25
|
||||
47300 9.3543283 1.0013246 6.0873147 10.41657 1 24
|
||||
47400 8.594101 1.0020068 5.6864295 9.2388304 1 24
|
||||
47500 9.3191964 1.002411 6.0537511 9.3506828 1 23
|
||||
47600 8.1615734 1.001364 5.3757905 10.303962 1 30
|
||||
47700 8.3615046 1.0003075 5.2727936 9.3162209 1 32
|
||||
47800 8.3566467 1.0026031 5.4379524 7.7644422 1 33
|
||||
47900 8.4062556 1.0006471 5.3098736 8.0181121 1 33
|
||||
48000 8.2233307 1.0012304 4.9650027 9.2644288 1 34
|
||||
48100 8.4495256 1.000088 4.9940422 10.01023 1 27
|
||||
48200 8.8068097 1.0014275 5.4732649 8.410093 1 31
|
||||
48300 8.0008187 1.0017459 4.7732764 9.25726 1 27
|
||||
48400 7.7242529 1.0026909 4.9084505 8.7147295 1 30
|
||||
48500 8.3752816 1.001333 5.1071228 8.2267308 1 32
|
||||
48600 9.0777805 1.0019328 5.7331841 9.6679383 1 29
|
||||
48700 9.3623061 1.0001767 5.7117062 8.396895 1 25
|
||||
48800 8.1186637 1.0013185 5.2697427 8.6058372 1 27
|
||||
48900 7.3685497 1.0007173 4.6097553 7.8047228 1 24
|
||||
49000 7.1661421 1.0023152 4.5389038 8.8759552 1 22
|
||||
49100 6.9857144 1.0016394 4.6489319 8.2022359 1 24
|
||||
49200 6.7160336 1.0018413 4.2488082 8.3393245 1 25
|
||||
49300 7.9703755 1.0010628 5.2328567 7.968278 1 28
|
||||
49400 8.2628465 1.0010877 5.2292977 8.0196533 1 27
|
||||
49500 8.1436558 1.0015175 5.0344712 8.0712037 1 30
|
||||
49600 8.5182498 1.0021589 5.1029028 8.6869789 1 28
|
||||
49700 8.3604444 1.0015016 5.0333696 9.4861656 1 25
|
||||
49800 7.336335 1.0020055 4.6365173 8.7210022 1 30
|
||||
49900 7.432996 1.0016415 4.7090587 8.7033033 1 29
|
||||
50000 7.4937053 1.001014 4.7212573 9.0890363 1 29
|
||||
Loop time of 999.576 on 8 procs for 40000 steps with 16271 atoms
|
||||
|
||||
Performance: 3457.466 tau/day, 40.017 timesteps/s, 651.116 katom-step/s
|
||||
99.3% CPU use with 8 MPI tasks x no OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 293.48 | 403.7 | 545.29 | 357.5 | 40.39
|
||||
Neigh | 2.4176 | 3.2721 | 3.8303 | 25.2 | 0.33
|
||||
Comm | 163.58 | 305.88 | 419.83 | 416.7 | 30.60
|
||||
Output | 0.032483 | 0.034794 | 0.040514 | 1.2 | 0.00
|
||||
Modify | 281.15 | 285.67 | 293.8 | 24.3 | 28.58
|
||||
Other | | 1.023 | | | 0.10
|
||||
|
||||
Nlocal: 2033.88 ave 2657 max 1198 min
|
||||
Histogram: 2 0 0 0 0 2 1 0 1 2
|
||||
Nghost: 1628.12 ave 1719 max 1569 min
|
||||
Histogram: 2 0 1 1 2 1 0 0 0 1
|
||||
Neighs: 13566 ave 18212 max 8488 min
|
||||
Histogram: 1 0 0 1 2 1 2 0 0 1
|
||||
|
||||
Total # of neighbors = 108528
|
||||
Ave neighs/atom = 6.6700264
|
||||
Neighbor list builds = 2447
|
||||
Dangerous builds = 2
|
||||
Total wall time: 0:19:22
|
||||
@ -1,243 +0,0 @@
|
||||
LAMMPS (1 Feb 2014)
|
||||
# Aspherical shear demo - 3d triangle boxes, solvated by SRD particles
|
||||
|
||||
units lj
|
||||
atom_style tri
|
||||
atom_modify first big
|
||||
|
||||
read_data data.tri.srd
|
||||
orthogonal box = (-8.43734 -8.43734 -8.43734) to (8.43734 8.43734 8.43734)
|
||||
2 by 2 by 2 MPI processor grid
|
||||
reading atoms ...
|
||||
1500 atoms
|
||||
1500 triangles
|
||||
|
||||
# add small particles as hi density lattice
|
||||
|
||||
lattice sc 0.4
|
||||
Lattice spacing in x,y,z = 1.35721 1.35721 1.35721
|
||||
region box block INF INF INF INF INF INF
|
||||
lattice sc 20.0
|
||||
Lattice spacing in x,y,z = 0.368403 0.368403 0.368403
|
||||
create_atoms 2 region box
|
||||
Created 91125 atoms
|
||||
|
||||
group big type 1
|
||||
1500 atoms in group big
|
||||
group small type 2
|
||||
91125 atoms in group small
|
||||
set group small mass 0.01
|
||||
91125 settings made for mass
|
||||
|
||||
# delete overlaps
|
||||
# must set 1-2 cutoff to non-zero value
|
||||
|
||||
pair_style lj/cut 1.5
|
||||
pair_coeff 1 1 1.0 1.0
|
||||
pair_coeff 2 2 0.0 1.0 0.0
|
||||
pair_coeff 1 2 0.0 1.0
|
||||
|
||||
delete_atoms overlap 1.5 small big
|
||||
Deleted 76354 atoms, new total = 16271
|
||||
|
||||
# SRD run
|
||||
|
||||
reset_timestep 0
|
||||
|
||||
velocity small create 1.44 87287 loop geom
|
||||
|
||||
neighbor 0.3 bin
|
||||
neigh_modify delay 0 every 1 check yes
|
||||
neigh_modify exclude molecule big include big
|
||||
|
||||
communicate multi group big vel yes
|
||||
neigh_modify include big
|
||||
|
||||
# no pairwise interactions with small particles
|
||||
|
||||
pair_style tri/lj 3.5
|
||||
pair_coeff 1 1 0.1 1.0
|
||||
pair_coeff 2 2 0.0 1.0 0.0
|
||||
pair_coeff 1 2 0.0 1.0 0.0
|
||||
|
||||
# use fix SRD to push small particles out from inside big ones
|
||||
# if comment out, big particles won't see SRD particles
|
||||
|
||||
timestep 0.001
|
||||
|
||||
fix 1 big rigid molecule #langevin 1.0 1.0 0.1 12398
|
||||
125 rigid bodies with 1500 atoms
|
||||
fix 2 small srd 20 big 1.0 0.25 49894 search 0.2 cubic warn 0.0001 shift yes 49829 overlap yes collision noslip
|
||||
|
||||
fix 3 all deform 1 x scale 0.6 y scale 0.6 z scale 0.6
|
||||
|
||||
# diagnostics
|
||||
|
||||
compute tsmall small temp/deform
|
||||
compute tbig big temp
|
||||
variable pebig equal pe*atoms/count(big)
|
||||
variable ebig equal etotal*atoms/count(big)
|
||||
|
||||
compute 1 big erotate/asphere
|
||||
compute 2 all ke
|
||||
compute 3 all pe
|
||||
variable toteng equal (c_1+c_2+c_3)/atoms
|
||||
|
||||
thermo 1000
|
||||
thermo_style custom step f_1 c_tsmall f_2[9] temp press
|
||||
thermo_modify temp tbig
|
||||
WARNING: Temperature for thermo pressure is not for group all (../thermo.cpp:439)
|
||||
|
||||
compute 10 all property/atom corner1x corner1y corner1z corner2x corner2y corner2z corner3x corner3y corner3z
|
||||
|
||||
#dump 1 all custom 500 dump1.atom.srd id type x y z ix iy iz
|
||||
#dump 2 all custom 500 dump1.tri.srd id type # c_10[1] c_10[2] c_10[3] c_10[4] c_10[5] c_10[6] # c_10[7] c_10[8] c_10[9]
|
||||
|
||||
run 10000
|
||||
WARNING: Using fix srd with box deformation but no SRD thermostat (../fix_srd.cpp:385)
|
||||
SRD info:
|
||||
SRD/big particles = 14771 1500
|
||||
big particle diameter max/min = 1.46014 0.436602
|
||||
SRD temperature & lamda = 1 0.2
|
||||
SRD max distance & max velocity = 0.8 40
|
||||
SRD grid counts: 67 67 67
|
||||
SRD grid size: request, actual (xyz) = 0.25, 0.251861 0.251861 0.251861
|
||||
SRD per actual grid cell = 0.0647662
|
||||
SRD viscosity = -1.09837
|
||||
big/SRD mass density ratio = 24.668
|
||||
WARNING: SRD bin size for fix srd differs from user request (../fix_srd.cpp:2853)
|
||||
WARNING: Fix srd grid size > 1/4 of big particle diameter (../fix_srd.cpp:2875)
|
||||
WARNING: Fix srd viscosity < 0.0 due to low SRD density (../fix_srd.cpp:2877)
|
||||
# of rescaled SRD velocities = 0
|
||||
ave/max small velocity = 19.9708 35.1504
|
||||
ave/max big velocity = 0 0
|
||||
WARNING: Using compute temp/deform with inconsistent fix deform remap option (../compute_temp_deform.cpp:76)
|
||||
Memory usage per processor = 116.135 Mbytes
|
||||
Step 1 tsmall 2[9] Temp Press
|
||||
0 0 1.4405441 0 0 -0.15917996
|
||||
1000 1.0535509 1.1241378 1.1224038 0 0.15526438
|
||||
2000 2.4635987 1.0240667 0.94231519 0 0.011069846
|
||||
3000 3.1093028 1.0070585 1.0176028 0 0.34124888
|
||||
4000 2.9524179 1.0101774 1.0311733 0 -0.22118101
|
||||
5000 2.9175438 1.0109144 1.0284445 0 0.1839507
|
||||
6000 3.3200928 0.99108983 0.95968219 0 1.0229339
|
||||
7000 3.3020156 0.99661428 0.98000621 0 2.3333851
|
||||
8000 4.1500999 0.99129645 0.99723707 0 4.3054414
|
||||
9000 6.537028 1.0074533 1.0251098 0 18.782913
|
||||
10000 16.233245 1.0145766 1.0219787 0 147.83787
|
||||
Loop time of 228.558 on 8 procs for 10000 steps with 16271 atoms
|
||||
|
||||
Pair time (%) = 145.018 (63.4492)
|
||||
Neigh time (%) = 32.6283 (14.2757)
|
||||
Comm time (%) = 43.3283 (18.9572)
|
||||
Outpt time (%) = 0.000848889 (0.00037141)
|
||||
Other time (%) = 7.58254 (3.31755)
|
||||
|
||||
Nlocal: 2033.88 ave 2092 max 1902 min
|
||||
Histogram: 1 0 0 0 1 1 0 1 1 3
|
||||
Nghost: 2805 ave 2855 max 2751 min
|
||||
Histogram: 1 0 2 1 0 0 0 2 1 1
|
||||
Neighs: 30026.5 ave 38700 max 24367 min
|
||||
Histogram: 1 0 2 1 3 0 0 0 0 1
|
||||
|
||||
Total # of neighbors = 240212
|
||||
Ave neighs/atom = 14.7632
|
||||
Neighbor list builds = 501
|
||||
Dangerous builds = 0
|
||||
|
||||
#undump 1
|
||||
#undump 2
|
||||
unfix 3
|
||||
|
||||
change_box all triclinic
|
||||
triclinic box = (-5.0624 -5.0624 -5.0624) to (5.0624 5.0624 5.0624) with tilt (0 0 0)
|
||||
|
||||
fix 2 small srd 20 big 1.0 0.25 49894 search 0.2 cubic warn 0.0001 shift yes 49829 overlap yes collision noslip tstat yes
|
||||
|
||||
#dump 1 all custom 500 dump2.atom.srd id type x y z ix iy iz
|
||||
#dump 2 all custom 500 dump2.tri.srd id type # c_10[1] c_10[2] c_10[3] c_10[4] c_10[5] c_10[6] # c_10[7] c_10[8] c_10[9]
|
||||
|
||||
fix 3 all deform 1 xy erate 0.05 units box remap v
|
||||
|
||||
run 40000
|
||||
SRD info:
|
||||
SRD/big particles = 14771 1500
|
||||
big particle diameter max/min = 1.46014 0.436602
|
||||
SRD temperature & lamda = 1 0.2
|
||||
SRD max distance & max velocity = 0.8 40
|
||||
SRD grid counts: 40 40 40
|
||||
SRD grid size: request, actual (xyz) = 0.25, 0.25312 0.25312 0.25312
|
||||
SRD per actual grid cell = -1.93929
|
||||
SRD viscosity = -0.36972
|
||||
big/SRD mass density ratio = -0.836253
|
||||
WARNING: SRD bin size for fix srd differs from user request (../fix_srd.cpp:2853)
|
||||
WARNING: Fix srd grid size > 1/4 of big particle diameter (../fix_srd.cpp:2875)
|
||||
WARNING: Fix srd viscosity < 0.0 due to low SRD density (../fix_srd.cpp:2877)
|
||||
# of rescaled SRD velocities = 1
|
||||
ave/max small velocity = 16.0639 40
|
||||
ave/max big velocity = 2.05735 6.73052
|
||||
Memory usage per processor = 65.2471 Mbytes
|
||||
Step 1 tsmall 2[9] Temp Press
|
||||
10000 16.233245 1.0144194 0 0 146.27032
|
||||
11000 17.301043 1.0619209 1 0 84.226323
|
||||
12000 13.481177 1.063945 1 0 80.42834
|
||||
13000 12.616615 1.0536125 1 0 68.365053
|
||||
14000 12.16592 1.0581344 1 0 59.709941
|
||||
15000 10.811557 1.0650453 1 0 59.869798
|
||||
16000 9.9303081 1.0641012 1 0 59.289126
|
||||
17000 10.452639 1.0589904 1 0 52.680235
|
||||
18000 9.2488947 1.0556713 1 0 51.044123
|
||||
19000 8.7179788 1.0566791 1 0 50.927924
|
||||
20000 7.8641299 1.0668891 1 0 53.961014
|
||||
21000 8.4333975 1.0628003 1 0 54.677068
|
||||
22000 8.554623 1.0591872 1 0 51.784737
|
||||
23000 7.895462 1.0598512 1 0 53.26885
|
||||
24000 7.7014869 1.055569 1 0 54.236941
|
||||
25000 7.508138 1.0581539 1 0 53.297709
|
||||
26000 8.0707381 1.0586451 1 0 51.411341
|
||||
27000 8.224223 1.0585509 1 0 52.775784
|
||||
28000 8.8720461 1.0648837 1 0 49.681447
|
||||
29000 8.503895 1.0538278 1 0 52.478556
|
||||
30000 8.2272425 1.0625583 1 0 52.795709
|
||||
31000 8.4626161 1.0599557 1 0 52.905343
|
||||
32000 7.7410527 1.0587681 1 0 57.464472
|
||||
33000 7.2765481 1.0677531 1 0 59.46728
|
||||
34000 7.036016 1.0640728 1 0 60.636828
|
||||
35000 8.497203 1.0577458 1 0 55.257312
|
||||
36000 8.9218761 1.0585038 1 0 55.668201
|
||||
37000 8.0469115 1.0561193 1 0 58.711565
|
||||
38000 8.6456966 1.0663818 1 0 53.691658
|
||||
39000 8.566667 1.0616928 1 0 52.866468
|
||||
40000 7.7081259 1.0577046 1 0 54.105829
|
||||
41000 7.4051952 1.0570277 1 0 56.094997
|
||||
42000 7.331432 1.0632261 1 0 55.661067
|
||||
43000 7.5587053 1.0602077 1 0 54.30762
|
||||
44000 7.4521497 1.0594391 1 0 52.993548
|
||||
45000 7.6234559 1.0641992 1 0 53.352202
|
||||
46000 8.0659693 1.0609367 1 0 50.302682
|
||||
47000 7.5227882 1.0563543 1 0 50.43551
|
||||
48000 8.0798684 1.0628968 1 0 48.419201
|
||||
49000 7.130784 1.0594143 1 0 50.656081
|
||||
50000 7.3219268 1.0608236 1 0 54.808358
|
||||
Loop time of 1651.84 on 8 procs for 40000 steps with 16271 atoms
|
||||
|
||||
Pair time (%) = 1232.76 (74.6296)
|
||||
Neigh time (%) = 171.893 (10.4061)
|
||||
Comm time (%) = 193.625 (11.7218)
|
||||
Outpt time (%) = 0.00338289 (0.000204795)
|
||||
Other time (%) = 53.5578 (3.24231)
|
||||
|
||||
Nlocal: 2033.88 ave 2229 max 1953 min
|
||||
Histogram: 2 1 2 2 0 0 0 0 0 1
|
||||
Nghost: 2757.88 ave 2810 max 2692 min
|
||||
Histogram: 1 1 1 0 1 0 0 1 1 2
|
||||
Neighs: 30098.6 ave 37369 max 25592 min
|
||||
Histogram: 1 3 0 1 0 1 1 0 0 1
|
||||
|
||||
Total # of neighbors = 240789
|
||||
Ave neighs/atom = 14.7987
|
||||
Neighbor list builds = 2007
|
||||
Dangerous builds = 0
|
||||
|
||||
Please see the log.cite file for references relevant to this simulation
|
||||
|
||||
33
examples/ASPHERE/vesicle/in.vesicle
Normal file
33
examples/ASPHERE/vesicle/in.vesicle
Normal file
@ -0,0 +1,33 @@
|
||||
# Vesicle demo
|
||||
|
||||
variable T equal 0.2
|
||||
variable LD equal 1.0
|
||||
|
||||
units lj
|
||||
atom_style ellipsoid
|
||||
|
||||
boundary p p p
|
||||
|
||||
read_data read_data.vesicle1026
|
||||
|
||||
compute ali all temp/com
|
||||
compute rott all temp/asphere bias ali
|
||||
|
||||
velocity all create ${T} 87287 loop geom
|
||||
|
||||
pair_style ylz 2.6
|
||||
pair_coeff * * 1.0 1.0 4 3 0.0 2.6
|
||||
neighbor 1.0 bin
|
||||
|
||||
thermo_style custom step temp press pxx pyy
|
||||
thermo 200
|
||||
|
||||
timestep 0.001
|
||||
|
||||
#dump 1 all atom 10 onlymembrane2.lammpstrj
|
||||
|
||||
fix 1 all langevin ${T} ${T} ${LD} 48279
|
||||
fix 2 all nve/asphere
|
||||
|
||||
run 3000
|
||||
|
||||
122
examples/ASPHERE/vesicle/log.18Oct22.vesicle.g++.1
Normal file
122
examples/ASPHERE/vesicle/log.18Oct22.vesicle.g++.1
Normal file
@ -0,0 +1,122 @@
|
||||
LAMMPS (15 Sep 2022)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# Vesicle demo
|
||||
|
||||
variable T equal 0.2
|
||||
variable LD equal 1.0
|
||||
|
||||
units lj
|
||||
atom_style ellipsoid
|
||||
|
||||
boundary p p p
|
||||
|
||||
read_data read_data.vesicle1026
|
||||
Reading data file ...
|
||||
orthogonal box = (-35 -35 -35) to (35 35 35)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
2938 atoms
|
||||
2938 ellipsoids
|
||||
read_data CPU = 0.010 seconds
|
||||
|
||||
compute ali all temp/com
|
||||
compute rott all temp/asphere bias ali
|
||||
|
||||
velocity all create ${T} 87287 loop geom
|
||||
velocity all create 0.2 87287 loop geom
|
||||
|
||||
pair_style ylz 2.6
|
||||
pair_coeff * * 1.0 1.0 4 3 0.0 2.6
|
||||
neighbor 1.0 bin
|
||||
|
||||
thermo_style custom step temp press pxx pyy
|
||||
thermo 200
|
||||
|
||||
timestep 0.001
|
||||
|
||||
#dump 1 all atom 10 onlymembrane2.lammpstrj
|
||||
|
||||
fix 1 all langevin ${T} ${T} ${LD} 48279
|
||||
fix 1 all langevin 0.2 ${T} ${LD} 48279
|
||||
fix 1 all langevin 0.2 0.2 ${LD} 48279
|
||||
fix 1 all langevin 0.2 0.2 1 48279
|
||||
fix 2 all nve/asphere
|
||||
|
||||
run 3000
|
||||
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Your simulation uses code contributions which should be cited:
|
||||
|
||||
- pair ylz command:
|
||||
|
||||
@Article{Yuan10,
|
||||
author = {H. Yuan, C. Huang, J. Li, G. Lykotrafitis, and S. Zhang},
|
||||
title = {One-particle-thick, solvent-free, coarse-grained model for biological and biomimetic fluid membranes},
|
||||
journal = {Phys. Rev. E},
|
||||
year = 2010,
|
||||
volume = 82,
|
||||
pages = {011905}
|
||||
}
|
||||
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule
|
||||
Neighbor list info ...
|
||||
update: every = 1 steps, delay = 10 steps, check = yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 3.6
|
||||
ghost atom cutoff = 3.6
|
||||
binsize = 1.8, bins = 39 39 39
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair ylz, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/atomonly/newton
|
||||
stencil: half/bin/3d
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 5.091 | 5.091 | 5.091 Mbytes
|
||||
Step Temp Press Pxx Pyy
|
||||
0 0.2 -0.0054891414 -0.0052713616 -0.0053641136
|
||||
200 0.12816247 -0.0051288861 -0.0048542514 -0.0049847561
|
||||
400 0.1377632 -0.0048071582 -0.0045651263 -0.0048444087
|
||||
600 0.14983781 -0.0045305725 -0.0043305994 -0.0046127777
|
||||
800 0.16205271 -0.0041176346 -0.0040534483 -0.0041351779
|
||||
1000 0.17462122 -0.0037000069 -0.0034938539 -0.0037915494
|
||||
1200 0.18335448 -0.0032674318 -0.0032790248 -0.0031967931
|
||||
1400 0.19195613 -0.0029332101 -0.0030823703 -0.0028287799
|
||||
1600 0.19261762 -0.0025263447 -0.0025152249 -0.0026205398
|
||||
1800 0.19758674 -0.0021087725 -0.001981333 -0.002309048
|
||||
2000 0.19748896 -0.0017662369 -0.0019316344 -0.0016696035
|
||||
2200 0.20196986 -0.0013363214 -0.0015581191 -0.0013384961
|
||||
2400 0.20109248 -0.0009190831 -0.0010331417 -0.0010664316
|
||||
2600 0.20228664 -0.00053590675 -0.00071808747 -0.00050218533
|
||||
2800 0.20512955 -0.00030845899 -0.00016244901 -0.00047877516
|
||||
3000 0.19855941 -7.9520073e-05 -0.00014969215 -5.4724226e-06
|
||||
Loop time of 9.6866 on 1 procs for 3000 steps with 2938 atoms
|
||||
|
||||
Performance: 26758.610 tau/day, 309.706 timesteps/s
|
||||
99.9% CPU use with 1 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 8.3097 | 8.3097 | 8.3097 | 0.0 | 85.79
|
||||
Neigh | 0.039037 | 0.039037 | 0.039037 | 0.0 | 0.40
|
||||
Comm | 0.0021766 | 0.0021766 | 0.0021766 | 0.0 | 0.02
|
||||
Output | 0.00048628 | 0.00048628 | 0.00048628 | 0.0 | 0.01
|
||||
Modify | 1.3043 | 1.3043 | 1.3043 | 0.0 | 13.47
|
||||
Other | | 0.0309 | | | 0.32
|
||||
|
||||
Nlocal: 2938 ave 2938 max 2938 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 0 ave 0 max 0 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 73242 ave 73242 max 73242 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 73242
|
||||
Ave neighs/atom = 24.929204
|
||||
Neighbor list builds = 26
|
||||
Dangerous builds = 0
|
||||
|
||||
Total wall time: 0:00:09
|
||||
122
examples/ASPHERE/vesicle/log.18Oct22.vesicle.g++.4
Normal file
122
examples/ASPHERE/vesicle/log.18Oct22.vesicle.g++.4
Normal file
@ -0,0 +1,122 @@
|
||||
LAMMPS (15 Sep 2022)
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# Vesicle demo
|
||||
|
||||
variable T equal 0.2
|
||||
variable LD equal 1.0
|
||||
|
||||
units lj
|
||||
atom_style ellipsoid
|
||||
|
||||
boundary p p p
|
||||
|
||||
read_data read_data.vesicle1026
|
||||
Reading data file ...
|
||||
orthogonal box = (-35 -35 -35) to (35 35 35)
|
||||
1 by 2 by 2 MPI processor grid
|
||||
reading atoms ...
|
||||
2938 atoms
|
||||
2938 ellipsoids
|
||||
read_data CPU = 0.137 seconds
|
||||
|
||||
compute ali all temp/com
|
||||
compute rott all temp/asphere bias ali
|
||||
|
||||
velocity all create ${T} 87287 loop geom
|
||||
velocity all create 0.2 87287 loop geom
|
||||
|
||||
pair_style ylz 2.6
|
||||
pair_coeff * * 1.0 1.0 4 3 0.0 2.6
|
||||
neighbor 1.0 bin
|
||||
|
||||
thermo_style custom step temp press pxx pyy
|
||||
thermo 200
|
||||
|
||||
timestep 0.001
|
||||
|
||||
#dump 1 all atom 10 onlymembrane2.lammpstrj
|
||||
|
||||
fix 1 all langevin ${T} ${T} ${LD} 48279
|
||||
fix 1 all langevin 0.2 ${T} ${LD} 48279
|
||||
fix 1 all langevin 0.2 0.2 ${LD} 48279
|
||||
fix 1 all langevin 0.2 0.2 1 48279
|
||||
fix 2 all nve/asphere
|
||||
|
||||
run 3000
|
||||
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Your simulation uses code contributions which should be cited:
|
||||
|
||||
- pair ylz command:
|
||||
|
||||
@Article{Yuan10,
|
||||
author = {H. Yuan, C. Huang, J. Li, G. Lykotrafitis, and S. Zhang},
|
||||
title = {One-particle-thick, solvent-free, coarse-grained model for biological and biomimetic fluid membranes},
|
||||
journal = {Phys. Rev. E},
|
||||
year = 2010,
|
||||
volume = 82,
|
||||
pages = {011905}
|
||||
}
|
||||
|
||||
CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE-CITE
|
||||
|
||||
Generated 0 of 1 mixed pair_coeff terms from geometric mixing rule
|
||||
Neighbor list info ...
|
||||
update: every = 1 steps, delay = 10 steps, check = yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 3.6
|
||||
ghost atom cutoff = 3.6
|
||||
binsize = 1.8, bins = 39 39 39
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair ylz, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/atomonly/newton
|
||||
stencil: half/bin/3d
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 4.899 | 4.9 | 4.902 Mbytes
|
||||
Step Temp Press Pxx Pyy
|
||||
0 0.2 -0.0054891414 -0.0052713616 -0.0053641136
|
||||
200 0.12893798 -0.0051492794 -0.0048734875 -0.0049624005
|
||||
400 0.13798694 -0.004875313 -0.0047071897 -0.0049305051
|
||||
600 0.14725193 -0.0046349542 -0.004719983 -0.0045791451
|
||||
800 0.16146954 -0.0042232199 -0.0040789193 -0.0043672895
|
||||
1000 0.17268468 -0.0037146703 -0.0036270393 -0.0039169034
|
||||
1200 0.18266242 -0.0032749755 -0.0032971704 -0.0033323855
|
||||
1400 0.18500165 -0.0028179031 -0.0030659821 -0.0027519633
|
||||
1600 0.19513132 -0.0023407512 -0.0025109801 -0.0023416835
|
||||
1800 0.19645259 -0.0019995412 -0.0019064341 -0.0021757747
|
||||
2000 0.19658104 -0.0015897919 -0.0015850523 -0.0016828478
|
||||
2200 0.1989936 -0.0011794062 -0.0011779716 -0.0012070706
|
||||
2400 0.20011525 -0.0009147432 -0.00094040885 -0.001073922
|
||||
2600 0.2013975 -0.00059253676 -0.00051920304 -0.00075138934
|
||||
2800 0.19715513 -0.00020995605 -0.00024386426 -0.0005475745
|
||||
3000 0.1976782 -0.0001308553 5.693004e-05 -0.00034478469
|
||||
Loop time of 8.46954 on 4 procs for 3000 steps with 2938 atoms
|
||||
|
||||
Performance: 30603.800 tau/day, 354.211 timesteps/s
|
||||
77.9% CPU use with 4 MPI tasks x 1 OpenMP threads
|
||||
|
||||
MPI task timing breakdown:
|
||||
Section | min time | avg time | max time |%varavg| %total
|
||||
---------------------------------------------------------------
|
||||
Pair | 2.1751 | 2.4162 | 2.6707 | 13.2 | 28.53
|
||||
Neigh | 0.0090503 | 0.0098389 | 0.010503 | 0.6 | 0.12
|
||||
Comm | 3.5807 | 4.1526 | 4.9283 | 24.3 | 49.03
|
||||
Output | 0.00032165 | 0.0029648 | 0.010842 | 8.4 | 0.04
|
||||
Modify | 0.34554 | 0.37442 | 0.39198 | 2.8 | 4.42
|
||||
Other | | 1.514 | | | 17.87
|
||||
|
||||
Nlocal: 734.5 ave 739 max 730 min
|
||||
Histogram: 1 0 1 0 0 0 0 1 0 1
|
||||
Nghost: 420.25 ave 424 max 415 min
|
||||
Histogram: 1 0 0 0 0 1 0 1 0 1
|
||||
Neighs: 18304.5 ave 19839 max 16636 min
|
||||
Histogram: 1 0 0 0 1 0 1 0 0 1
|
||||
|
||||
Total # of neighbors = 73218
|
||||
Ave neighs/atom = 24.921035
|
||||
Neighbor list builds = 25
|
||||
Dangerous builds = 0
|
||||
|
||||
Total wall time: 0:00:08
|
||||
5894
examples/ASPHERE/vesicle/read_data.vesicle1026
Normal file
5894
examples/ASPHERE/vesicle/read_data.vesicle1026
Normal file
File diff suppressed because it is too large
Load Diff
@ -19,12 +19,12 @@ See these sections of the LAMMPS manual for details:
|
||||
Build LAMMPS as a library (doc/html/Build_basics.html)
|
||||
Link LAMMPS as a library to another code (doc/html/Build_link.html)
|
||||
Coupling LAMMPS to other codes (doc/html/Howto_couple.html)
|
||||
Using LAMMPS in client/server mode (doc/html/Howto_client_server.html)
|
||||
Library interface to LAMMPS (doc/html/Howto_library.html)
|
||||
Detailed documentation of the LAMMPS interfaces (doc/html/Library.html)
|
||||
|
||||
The library interface to LAMMPS is in src/library.cpp. Routines can
|
||||
be easily added to this file so an external program can perform the
|
||||
LAMMPS tasks desired.
|
||||
The core library interface to LAMMPS is in src/library.cpp. Routines
|
||||
can be easily added to this file so an external program can perform
|
||||
the LAMMPS tasks desired.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
||||
@ -33,16 +33,8 @@ These are the sub-directories included in this directory:
|
||||
simple simple example of driver code calling LAMMPS as a lib
|
||||
multiple example of driver code calling multiple instances of LAMMPS
|
||||
plugin example for loading LAMMPS at runtime from a shared library
|
||||
lammps_quest MD with quantum forces, coupling to Quest DFT code
|
||||
lammps_spparks grain-growth Monte Carlo with strain via MD,
|
||||
coupling to SPPARKS kinetic MC code
|
||||
library collection of useful inter-code communication routines
|
||||
fortran a simple wrapper on the LAMMPS library API that
|
||||
can be called from Fortran
|
||||
fortran2 a more sophisticated wrapper on the LAMMPS library API that
|
||||
can be called from Fortran
|
||||
fortran_dftb wrapper written by Nir Goldman (LLNL), as an
|
||||
extension to fortran2, used for calling LAMMPS
|
||||
from Fortran DFTB+ tight-binding code
|
||||
|
||||
Each sub-directory has its own README with more details.
|
||||
|
||||
@ -1,11 +0,0 @@
|
||||
libfwrapper.c is a C file that wraps a few functions of the LAMMPS
|
||||
library API in src/library.h so that it can be called from Fortran.
|
||||
|
||||
See the couple/simple/simple_f77.f90 program for an example of a Fortran
|
||||
code that does this.
|
||||
|
||||
See the README file in that dir for instructions on how to build a
|
||||
Fortran code that uses this wrapper and links to the LAMMPS library.
|
||||
|
||||
This legacy wrapper is deprecated and will be removed in a future
|
||||
release of LAMMPS. Please use the Fortran 90 module instead.
|
||||
@ -1,102 +0,0 @@
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
www.cs.sandia.gov/~sjplimp/lammps.html
|
||||
Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* libwrapper = fortran wrappers for LAMMPS library functions.
|
||||
See README for compilation instructions */
|
||||
|
||||
#include "mpi.h"
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
#include "stdint.h"
|
||||
#include "library.h" /* this is a LAMMPS include file */
|
||||
|
||||
/* wrapper for creating a lammps instance from fortran.
|
||||
since fortran has no simple way to emit a C-compatible
|
||||
argument array, we don't support it. for simplicity,
|
||||
the address of the pointer to the lammps object is
|
||||
stored in a 64-bit integer on all platforms. */
|
||||
|
||||
void lammps_open_(MPI_Fint *comm, int64_t *ptr)
|
||||
{
|
||||
*ptr = (int64_t) lammps_open_fortran(0,NULL,*comm);
|
||||
}
|
||||
|
||||
/* no-MPI version of the wrapper from above. */
|
||||
|
||||
void lammps_open_no_mpi_(int64_t *ptr)
|
||||
{
|
||||
void *obj;
|
||||
|
||||
lammps_open_no_mpi(0,NULL,&obj);
|
||||
*ptr = (int64_t) obj;
|
||||
}
|
||||
|
||||
/* wrapper for shutting down a lammps instance from fortran. */
|
||||
|
||||
void lammps_close_(int64_t *ptr)
|
||||
{
|
||||
void *obj;
|
||||
obj = (void *) *ptr;
|
||||
|
||||
lammps_close(obj);
|
||||
}
|
||||
|
||||
/* wrapper for passing an input file to lammps from fortran.
|
||||
since fortran strings are not zero terminated, we have
|
||||
to pass the length explicitly and make a copy that is. */
|
||||
|
||||
void lammps_file_(int64_t *ptr, char *fname, MPI_Fint *len)
|
||||
{
|
||||
void *obj;
|
||||
char *cpy;
|
||||
|
||||
obj = (void *) *ptr;
|
||||
|
||||
cpy = (char *)calloc(*len + 1,sizeof(char));
|
||||
memcpy(cpy,fname,*len);
|
||||
|
||||
lammps_file(obj,cpy);
|
||||
free(cpy);
|
||||
}
|
||||
|
||||
/* wrapper for passing a line input to lammps from fortran.
|
||||
since fortran strings are not zero terminated, we have
|
||||
to pass the length explicitly and make a copy that is. */
|
||||
|
||||
void lammps_command_(int64_t *ptr, char *line, MPI_Fint *len)
|
||||
{
|
||||
void *obj;
|
||||
char *cpy;
|
||||
|
||||
obj = (void *) *ptr;
|
||||
|
||||
cpy = (char *)calloc(*len + 1,sizeof(char));
|
||||
memcpy(cpy,line,*len);
|
||||
|
||||
lammps_command(obj,cpy);
|
||||
free(cpy);
|
||||
}
|
||||
|
||||
/* fortran wrapper to get the number of atoms from lammps.
|
||||
return values require an interface in fortran, so we
|
||||
make the wrapper into a procedure. */
|
||||
|
||||
void lammps_get_natoms_(int64_t *ptr, MPI_Fint *natoms)
|
||||
{
|
||||
void *obj;
|
||||
obj = (void *) *ptr;
|
||||
|
||||
*natoms = lammps_get_natoms(obj);
|
||||
}
|
||||
|
||||
1
examples/COUPLE/fortran2/.gitignore
vendored
1
examples/COUPLE/fortran2/.gitignore
vendored
@ -1 +0,0 @@
|
||||
*.mod
|
||||
@ -1,236 +0,0 @@
|
||||
/* -----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/
|
||||
Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
Contributing author: Karl D. Hammond <karlh@ugcs.caltech.edu>
|
||||
University of Tennessee, Knoxville (USA), 2012
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* This is set of "wrapper" functions to assist LAMMPS.F90, which itself
|
||||
provides a (I hope) robust Fortran interface to library.cpp and
|
||||
library.h. All functions herein COULD be added to library.cpp instead of
|
||||
including this as a separate file. See the README for instructions. */
|
||||
|
||||
#include <mpi.h>
|
||||
#include "LAMMPS-wrapper.h"
|
||||
#include <library.h>
|
||||
#include <lammps.h>
|
||||
#include <atom.h>
|
||||
#include <fix.h>
|
||||
#include <compute.h>
|
||||
#include <modify.h>
|
||||
#include <error.h>
|
||||
#include <cstdlib>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
void lammps_open_fortran_wrapper (int argc, char **argv,
|
||||
MPI_Fint communicator, void **ptr)
|
||||
{
|
||||
MPI_Comm C_communicator = MPI_Comm_f2c (communicator);
|
||||
lammps_open (argc, argv, C_communicator, ptr);
|
||||
}
|
||||
|
||||
int lammps_get_ntypes (void *ptr)
|
||||
{
|
||||
class LAMMPS *lmp = (class LAMMPS *) ptr;
|
||||
int ntypes = lmp->atom->ntypes;
|
||||
return ntypes;
|
||||
}
|
||||
|
||||
void lammps_error_all (void *ptr, const char *file, int line, const char *str)
|
||||
{
|
||||
class LAMMPS *lmp = (class LAMMPS *) ptr;
|
||||
lmp->error->all (file, line, str);
|
||||
}
|
||||
|
||||
int lammps_extract_compute_vectorsize (void *ptr, char *id, int style)
|
||||
{
|
||||
class LAMMPS *lmp = (class LAMMPS *) ptr;
|
||||
int icompute = lmp->modify->find_compute(id);
|
||||
if ( icompute < 0 ) return 0;
|
||||
class Compute *compute = lmp->modify->compute[icompute];
|
||||
|
||||
if ( style == 0 )
|
||||
{
|
||||
if ( !compute->vector_flag )
|
||||
return 0;
|
||||
else
|
||||
return compute->size_vector;
|
||||
}
|
||||
else if ( style == 1 )
|
||||
{
|
||||
return lammps_get_natoms (ptr);
|
||||
}
|
||||
else if ( style == 2 )
|
||||
{
|
||||
if ( !compute->local_flag )
|
||||
return 0;
|
||||
else
|
||||
return compute->size_local_rows;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
void lammps_extract_compute_arraysize (void *ptr, char *id, int style,
|
||||
int *nrows, int *ncols)
|
||||
{
|
||||
class LAMMPS *lmp = (class LAMMPS *) ptr;
|
||||
int icompute = lmp->modify->find_compute(id);
|
||||
if ( icompute < 0 )
|
||||
{
|
||||
*nrows = 0;
|
||||
*ncols = 0;
|
||||
}
|
||||
class Compute *compute = lmp->modify->compute[icompute];
|
||||
|
||||
if ( style == 0 )
|
||||
{
|
||||
if ( !compute->array_flag )
|
||||
{
|
||||
*nrows = 0;
|
||||
*ncols = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
*nrows = compute->size_array_rows;
|
||||
*ncols = compute->size_array_cols;
|
||||
}
|
||||
}
|
||||
else if ( style == 1 )
|
||||
{
|
||||
if ( !compute->peratom_flag )
|
||||
{
|
||||
*nrows = 0;
|
||||
*ncols = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
*nrows = lammps_get_natoms (ptr);
|
||||
*ncols = compute->size_peratom_cols;
|
||||
}
|
||||
}
|
||||
else if ( style == 2 )
|
||||
{
|
||||
if ( !compute->local_flag )
|
||||
{
|
||||
*nrows = 0;
|
||||
*ncols = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
*nrows = compute->size_local_rows;
|
||||
*ncols = compute->size_local_cols;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
*nrows = 0;
|
||||
*ncols = 0;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
int lammps_extract_fix_vectorsize (void *ptr, char *id, int style)
|
||||
{
|
||||
class LAMMPS *lmp = (class LAMMPS *) ptr;
|
||||
int ifix = lmp->modify->find_fix(id);
|
||||
if ( ifix < 0 ) return 0;
|
||||
class Fix *fix = lmp->modify->fix[ifix];
|
||||
|
||||
if ( style == 0 )
|
||||
{
|
||||
if ( !fix->vector_flag )
|
||||
return 0;
|
||||
else
|
||||
return fix->size_vector;
|
||||
}
|
||||
else if ( style == 1 )
|
||||
{
|
||||
return lammps_get_natoms (ptr);
|
||||
}
|
||||
else if ( style == 2 )
|
||||
{
|
||||
if ( !fix->local_flag )
|
||||
return 0;
|
||||
else
|
||||
return fix->size_local_rows;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
void lammps_extract_fix_arraysize (void *ptr, char *id, int style,
|
||||
int *nrows, int *ncols)
|
||||
{
|
||||
class LAMMPS *lmp = (class LAMMPS *) ptr;
|
||||
int ifix = lmp->modify->find_fix(id);
|
||||
if ( ifix < 0 )
|
||||
{
|
||||
*nrows = 0;
|
||||
*ncols = 0;
|
||||
}
|
||||
class Fix *fix = lmp->modify->fix[ifix];
|
||||
|
||||
if ( style == 0 )
|
||||
{
|
||||
if ( !fix->array_flag )
|
||||
{
|
||||
*nrows = 0;
|
||||
*ncols = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
*nrows = fix->size_array_rows;
|
||||
*ncols = fix->size_array_cols;
|
||||
}
|
||||
}
|
||||
else if ( style == 1 )
|
||||
{
|
||||
if ( !fix->peratom_flag )
|
||||
{
|
||||
*nrows = 0;
|
||||
*ncols = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
*nrows = lammps_get_natoms (ptr);
|
||||
*ncols = fix->size_peratom_cols;
|
||||
}
|
||||
}
|
||||
else if ( style == 2 )
|
||||
{
|
||||
if ( !fix->local_flag )
|
||||
{
|
||||
*nrows = 0;
|
||||
*ncols = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
*nrows = fix->size_local_rows;
|
||||
*ncols = fix->size_local_cols;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
*nrows = 0;
|
||||
*ncols = 0;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
/* vim: set ts=3 sts=3 expandtab: */
|
||||
@ -1,41 +0,0 @@
|
||||
/* -----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
www.cs.sandia.gov/~sjplimp/lammps.html
|
||||
Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
Contributing author: Karl D. Hammond <karlh@ugcs.caltech.edu>
|
||||
University of Tennessee, Knoxville (USA), 2012
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* This is set of "wrapper" functions to assist LAMMPS.F90, which itself
|
||||
provides a (I hope) robust Fortran interface to library.cpp and
|
||||
library.h. All prototypes herein COULD be added to library.h instead of
|
||||
including this as a separate file. See the README for instructions. */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Prototypes for auxiliary functions */
|
||||
void lammps_open_fortran_wrapper (int, char**, MPI_Fint, void**);
|
||||
int lammps_get_ntypes (void*);
|
||||
int lammps_extract_compute_vectorsize (void*, char*, int);
|
||||
void lammps_extract_compute_arraysize (void*, char*, int, int*, int*);
|
||||
int lammps_extract_fix_vectorsize (void*, char*, int);
|
||||
void lammps_extract_fix_arraysize (void*, char*, int, int*, int*);
|
||||
void lammps_error_all (void*, const char*, int, const char*);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* vim: set ts=3 sts=3 expandtab: */
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,37 +0,0 @@
|
||||
SHELL = /bin/sh
|
||||
|
||||
# Path to LAMMPS extraction directory
|
||||
LAMMPS_ROOT = ../../..
|
||||
LAMMPS_SRC = $(LAMMPS_ROOT)/src
|
||||
|
||||
# Uncomment the line below if using the MPI stubs library
|
||||
MPI_STUBS = #-I$(LAMMPS_SRC)/STUBS
|
||||
|
||||
FC = mpifort # replace with your Fortran compiler
|
||||
CXX = mpicxx # replace with your C++ compiler
|
||||
CXXLIB = -lstdc++ # replace with your C++ runtime libs
|
||||
|
||||
# Flags for Fortran compiler, C++ compiler, and C preprocessor, respectively
|
||||
FFLAGS = -O2 -fPIC
|
||||
CXXFLAGS = -O2 -fPIC
|
||||
CPPFLAGS = -DOMPI_SKIP_MPICXX=1 -DMPICH_SKIP_MPICXX -DLAMMPS_LIB_MPI
|
||||
|
||||
all : liblammps_fortran.a liblammps_fortran.so
|
||||
|
||||
liblammps_fortran.so : LAMMPS.o LAMMPS-wrapper.o
|
||||
$(FC) $(FFLAGS) -shared -o $@ $^ $(CXXLIB)
|
||||
|
||||
liblammps_fortran.a : LAMMPS.o LAMMPS-wrapper.o
|
||||
$(AR) rs $@ $^
|
||||
|
||||
LAMMPS.o lammps.mod : LAMMPS.F90
|
||||
$(FC) $(CPPFLAGS) $(FFLAGS) -c $<
|
||||
|
||||
LAMMPS-wrapper.o : LAMMPS-wrapper.cpp LAMMPS-wrapper.h
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -I$(LAMMPS_SRC) $(MPI_STUBS)
|
||||
|
||||
clean :
|
||||
$(RM) *.o *.mod liblammps_fortran.a liblammps_fortran.so
|
||||
|
||||
dist :
|
||||
tar -czf Fortran-interface.tar.gz LAMMPS-wrapper.h LAMMPS-wrapper.cpp LAMMPS.F90 makefile README
|
||||
@ -1,265 +0,0 @@
|
||||
LAMMPS.F90 defines a Fortran 2003 module, LAMMPS, which wraps all functions in
|
||||
src/library.h so they can be used directly from Fortran-encoded programs.
|
||||
|
||||
All functions in src/library.h that use and/or return C-style pointers have
|
||||
Fortran wrapper functions that use Fortran-style arrays, pointers, and
|
||||
strings; all C-style memory management is handled internally with no user
|
||||
intervention. See --USE-- for notes on how this interface differs from the
|
||||
C interface (and the Python interface).
|
||||
|
||||
This interface was created by Karl Hammond who you can contact with
|
||||
questions:
|
||||
|
||||
Karl D. Hammond
|
||||
University of Tennessee, Knoxville
|
||||
karlh at ugcs.caltech.edu
|
||||
karlh at utk.edu
|
||||
|
||||
-------------------------------------
|
||||
|
||||
--COMPILATION--
|
||||
|
||||
First, be advised that mixed-language programming is not trivial. It requires
|
||||
you to link in the required libraries of all languages you use (in this case,
|
||||
those for Fortran, C, and C++), as well as any other libraries required.
|
||||
You are also advised to read the --USE-- section below before trying to
|
||||
compile.
|
||||
|
||||
The following steps will work to compile this module (replace ${LAMMPS_SRC}
|
||||
with the path to your LAMMPS source directory).
|
||||
|
||||
Steps 3-5 are accomplished, possibly after some modifications to
|
||||
the makefile, by make using the attached makefile. Said makefile also builds
|
||||
the dynamically-linkable library (liblammps_fortran.so).
|
||||
|
||||
** STATIC LIBRARY INSTRUCTIONS **
|
||||
(1) Compile LAMMPS as a static library.
|
||||
Call the resulting file ${LAMMPS_LIB}, which will have an actual name
|
||||
like liblmp_openmpi.a. If compiling using the MPI stubs in
|
||||
${LAMMPS_SRC}/STUBS, you will need to know where libmpi_stubs.a
|
||||
is as well (I'll call it ${MPI_STUBS} hereafter)
|
||||
(2) Copy said library to your Fortran program's source directory or replace
|
||||
${LAMMPS_LIB} with its full path in the instructions below.
|
||||
(3) Compile (but don't link!) LAMMPS.F90. Example:
|
||||
mpif90 -c LAMMPS.f90
|
||||
OR
|
||||
gfortran -c LAMMPS.F90
|
||||
NOTE: you may get a warning such as,
|
||||
subroutine lammps_open_wrapper (argc, argv, communicator, ptr) &
|
||||
Variable 'communicator' at (1) is a parameter to the BIND(C)
|
||||
procedure 'lammps_open_wrapper' but may not be C interoperable
|
||||
This is normal (see --IMPLEMENTATION NOTES--).
|
||||
|
||||
(4) Compile (but don't link) LAMMPS-wrapper.cpp. You will need its header
|
||||
file as well. You will have to provide the locations of LAMMPS's
|
||||
header files. For example,
|
||||
mpicxx -c -I${LAMMPS_SRC} LAMMPS-wrapper.cpp
|
||||
OR
|
||||
g++ -c -I${LAMMPS_SRC} -I${LAMMPS_SRC}/STUBS LAMMPS-wrapper.cpp
|
||||
OR
|
||||
icpc -c -I${LAMMPS_SRC} -I${LAMMPS_SRC}/STUBS LAMMPS-wrapper.cpp
|
||||
(5) OPTIONAL: Make a library from the object files so you can carry around
|
||||
two files instead of three. Example:
|
||||
ar rs liblammps_fortran.a LAMMPS.o LAMMPS-wrapper.o
|
||||
This will create the file liblammps_fortran.a that you can use in place
|
||||
of "LAMMPS.o LAMMPS-wrapper.o" later. Note that you will still
|
||||
need to have the .mod file from part (3).
|
||||
|
||||
It is also possible to add LAMMPS.o and LAMMPS-wrapper.o into the
|
||||
LAMMPS library (e.g., liblmp_openmpi.a) instead of creating a separate
|
||||
library, like so:
|
||||
ar rs ${LAMMPS_LIB} LAMMPS.o LAMMPS-wrapper.o
|
||||
In this case, you can now use the Fortran wrapper functions as if they
|
||||
were part of the usual LAMMPS library interface (if you have the module
|
||||
file visible to the compiler, that is).
|
||||
(6) Compile (but don't link) your Fortran program. Example:
|
||||
mpif90 -c myfreeformatfile.f90
|
||||
mpif90 -c myfixedformatfile.f
|
||||
OR
|
||||
gfortran -c myfreeformatfile.f90
|
||||
gfortran -c myfixedformatfile.f
|
||||
The object files generated by these steps are collectively referred to
|
||||
as ${my_object_files} in the next step(s).
|
||||
|
||||
IMPORTANT: If the Fortran module from part (3) is not in the current
|
||||
directory or in one searched by the compiler for module files, you will
|
||||
need to include that location via the -I flag to the compiler, like so:
|
||||
mpif90 -I${LAMMPS_SRC}/examples/COUPLE/fortran2 -c myfreeformatfile.f90
|
||||
|
||||
(7) Link everything together, including any libraries needed by LAMMPS (such
|
||||
as the C++ standard library, the C math library, the JPEG library, fftw,
|
||||
etc.) For example,
|
||||
mpif90 LAMMPS.o LAMMPS-wrapper.o ${my_object_files} \
|
||||
${LAMMPS_LIB} -lmpi_cxx -lstdc++ -lm
|
||||
OR
|
||||
gfortran LAMMPS.o LAMMPS-wrapper.o ${my_object_files} \
|
||||
${LAMMPS_LIB} ${MPI_STUBS} -lstdc++ -lm
|
||||
OR
|
||||
ifort LAMMPS.o LAMMPS-wrapper.o ${my_object_files} \
|
||||
${LAMMPS_LIB} ${MPI_STUBS} -cxxlib -lm
|
||||
Any other required libraries (e.g. -ljpeg, -lfftw) should be added to
|
||||
the end of this line.
|
||||
|
||||
You should now have a working executable.
|
||||
|
||||
** DYNAMIC LIBRARY INSTRUCTIONS **
|
||||
(1) Compile LAMMPS as a dynamic library
|
||||
(make makeshlib && make -f Makefile.shlib [targetname]).
|
||||
(2) Compile, but don't link, LAMMPS.F90 using the -fPIC flag, such as
|
||||
mpif90 -fPIC -c LAMMPS.f90
|
||||
(3) Compile, but don't link, LAMMPS-wrapper.cpp in the same manner, e.g.
|
||||
mpicxx -fPIC -c LAMMPS-wrapper.cpp
|
||||
(4) Make the dynamic library, like so:
|
||||
mpif90 -fPIC -shared -o liblammps_fortran.so LAMMPS.o LAMMPS-wrapper.o
|
||||
(5) Compile your program, such as,
|
||||
mpif90 -I${LAMMPS_SRC}/examples/COUPLE/fortran2 -c myfreeformatfile.f90
|
||||
where ${LAMMPS_SRC}/examples/COUPLE/fortran2 contains the .mod file from
|
||||
step (3)
|
||||
(6) Link everything together, such as
|
||||
mpif90 ${my_object_files} -L${LAMMPS_SRC} \
|
||||
-L${LAMMPS_SRC}/examples/COUPLE/fortran2 -llammps_fortran \
|
||||
-llammps_openmpi -lmpi_cxx -lstdc++ -lm
|
||||
|
||||
If you wish to avoid the -L flags, add the directories containing your
|
||||
shared libraries to the LIBRARY_PATH environment variable. At run time, you
|
||||
will have to add these directories to LD_LIBRARY_PATH as well; otherwise,
|
||||
your executable will not find the libraries it needs.
|
||||
|
||||
-------------------------------------
|
||||
|
||||
--USAGE--
|
||||
|
||||
To use this API, your program unit (PROGRAM/SUBROUTINE/FUNCTION/MODULE/etc.)
|
||||
should look something like this:
|
||||
program call_lammps
|
||||
use LAMMPS
|
||||
! Other modules, etc.
|
||||
implicit none
|
||||
type (lammps_instance) :: lmp ! This is a pointer to your LAMMPS instance
|
||||
real (C_double) :: fix
|
||||
real (C_double), dimension(:), pointer :: fix2
|
||||
! Rest of declarations
|
||||
call lammps_open_no_mpi ('lmp -in /dev/null -screen out.lammps',lmp)
|
||||
! Set up rest of program here
|
||||
call lammps_file (lmp, 'in.example')
|
||||
call lammps_extract_fix (fix, lmp, '2', 0, 1, 1, 1)
|
||||
call lammps_extract_fix (fix2, lmp, '4', 0, 2, 1, 1)
|
||||
call lammps_close (lmp)
|
||||
end program call_lammps
|
||||
|
||||
Important notes:
|
||||
* Though I dislike the use of pointers, they are necessary when communicating
|
||||
with C and C++, which do not support Fortran's ALLOCATABLE attribute.
|
||||
* There is no need to deallocate C-allocated memory; this is done for you in
|
||||
the cases when it is done (which are all cases when pointers are not
|
||||
accepted, such as global fix data)
|
||||
* All arguments which are char* variables in library.cpp are character (len=*)
|
||||
variables here. For example,
|
||||
call lammps_command (lmp, 'units metal')
|
||||
will work as expected.
|
||||
* The public functions (the only ones you can use) have interfaces as
|
||||
described in the comments at the top of LAMMPS.F90. They are not always
|
||||
the same as those in library.h, since C strings are replaced by Fortran
|
||||
strings and the like.
|
||||
* The module attempts to check whether you have done something stupid (such
|
||||
as assign a 2D array to a scalar), but it's not perfect. For example, the
|
||||
command
|
||||
call lammps_extract_global (nlocal, ptr, 'nlocal')
|
||||
will give nlocal correctly if nlocal is a pointer to type INTEGER, but it
|
||||
will give the wrong answer if nlocal is a pointer to type REAL. This is a
|
||||
feature of the (void*) type cast in library.cpp. There is no way I can
|
||||
check this for you! It WILL catch you if you pass it an allocatable or
|
||||
fixed-size array when it expects a pointer.
|
||||
* Arrays constructed from temporary data from LAMMPS are ALLOCATABLE, and
|
||||
represent COPIES of data, not the originals. Functions like
|
||||
lammps_extract_atom, which return actual LAMMPS data, are pointers.
|
||||
* IMPORTANT: Due to the differences between C and Fortran arrays (C uses
|
||||
row-major vectors, Fortran uses column-major vectors), all arrays returned
|
||||
from LAMMPS have their indices swapped.
|
||||
* An example of a complete program, simple.f90, is included with this
|
||||
package.
|
||||
|
||||
-------------------------------------
|
||||
|
||||
--TROUBLESHOOTING--
|
||||
|
||||
Compile-time errors (when compiling LAMMPS.F90, that is) probably indicate
|
||||
that your compiler is not new enough to support Fortran 2003 features. For
|
||||
example, GCC 4.1.2 will not compile this module, but GCC 4.4.0 will.
|
||||
|
||||
If your compiler balks at 'use, intrinsic :: ISO_C_binding,' try removing the
|
||||
intrinsic part so it looks like an ordinary module. However, it is likely
|
||||
that such a compiler will also have problems with everything else in the
|
||||
file as well.
|
||||
|
||||
If you get a segfault as soon as the lammps_open call is made, check that you
|
||||
compiled your program AND LAMMPS-wrapper.cpp using the same MPI headers. Using
|
||||
the stubs for one and the actual MPI library for the other will cause Bad
|
||||
Things to happen.
|
||||
|
||||
If you find run-time errors, please pass them along via the LAMMPS Users
|
||||
mailing list (please CC me as well; address above). Please provide a minimal
|
||||
working example along with the names and versions of the compilers you are
|
||||
using. Please make sure the error is repeatable and is in MY code, not yours
|
||||
(generating a minimal working example will usually ensure this anyway).
|
||||
|
||||
-------------------------------------
|
||||
|
||||
--IMPLEMENTATION NOTES--
|
||||
|
||||
The Fortran procedures have the same names as the C procedures, and
|
||||
their purpose is the same, but they may take different arguments. Here are
|
||||
some of the important differences:
|
||||
* lammps_open and lammps_open_no_mpi take a string instead of argc and
|
||||
argv. This is necessary because C and C++ have a very different way
|
||||
of treating strings than Fortran. If you want the command line to be
|
||||
passed to lammps_open (as it often would be from C/C++), use the
|
||||
GET_COMMAND intrinsic to obtain it.
|
||||
* All C++ functions that accept char* pointers now accept Fortran-style
|
||||
strings within this interface instead.
|
||||
* All of the lammps_extract_[something] functions, which return void*
|
||||
C-style pointers, have been replaced by generic subroutines that return
|
||||
Fortran variables (which may be arrays). The first argument houses the
|
||||
variable/pointer to be returned (pretend it's on the left-hand side); all
|
||||
other arguments are identical except as stipulated above.
|
||||
Note that it is not possible to declare generic functions that are selected
|
||||
based solely on the type/kind/rank (TKR) signature of the return value,
|
||||
only based on the TKR of the arguments.
|
||||
* The SHAPE of the first argument to lammps_extract_[something] is checked
|
||||
against the "shape" of the C array (e.g., double vs. double* vs. double**).
|
||||
Calling a subroutine with arguments of inappropriate rank will result in an
|
||||
error at run time.
|
||||
* The indices i and j in lammps_extract_fix are used the same way they
|
||||
are in f_ID[i][j] references in LAMMPS (i.e., starting from 1). This is
|
||||
different than the way library.cpp uses these numbers, but is more
|
||||
consistent with the way arrays are accessed in LAMMPS and in Fortran.
|
||||
* The char* pointer normally returned by lammps_command is thrown away
|
||||
in this version; note also that lammps_command is now a subroutine
|
||||
instead of a function.
|
||||
* The pointer to LAMMPS itself is of type(lammps_instance), which is itself
|
||||
a synonym for type(C_ptr), part of ISO_C_BINDING. Type (C_ptr) is
|
||||
C's void* data type.
|
||||
* This module will almost certainly generate a compile-time warning,
|
||||
such as,
|
||||
subroutine lammps_open_wrapper (argc, argv, communicator, ptr) &
|
||||
Variable 'communicator' at (1) is a parameter to the BIND(C)
|
||||
procedure 'lammps_open_wrapper' but may not be C interoperable
|
||||
This happens because lammps_open_wrapper actually takes a Fortran
|
||||
INTEGER argument, whose type is defined by the MPI library itself. The
|
||||
Fortran integer is converted to a C integer by the MPI library (if such
|
||||
conversion is actually necessary).
|
||||
* lammps_extract_global returns COPIES of the (scalar) data, as does the
|
||||
C version.
|
||||
* lammps_extract_atom, lammps_extract_compute, and lammps_extract_fix
|
||||
have a first argument that will be associated with ACTUAL LAMMPS DATA.
|
||||
This means the first argument must be:
|
||||
* The right rank (via the DIMENSION modifier)
|
||||
* A C-interoperable POINTER type (i.e., INTEGER (C_int) or
|
||||
REAL (C_double)).
|
||||
* lammps_extract_variable returns COPIES of the data, as the C library
|
||||
interface does. There is no need to deallocate using lammps_free.
|
||||
* The 'data' argument to lammps_gather_atoms and lammps_scatter atoms must
|
||||
be ALLOCATABLE. It should be of type INTEGER or DOUBLE PRECISION. It
|
||||
does NOT need to be C inter-operable (and indeed should not be).
|
||||
* The 'count' argument of lammps_scatter_atoms is unnecessary; the shape of
|
||||
the array determines the number of elements LAMMPS will read.
|
||||
@ -1,16 +0,0 @@
|
||||
units lj
|
||||
atom_modify map array
|
||||
lattice bcc 1.0
|
||||
region simbox block 0 10 0 10 0 10
|
||||
create_box 2 simbox
|
||||
create_atoms 1 region simbox
|
||||
pair_style lj/cut 2.5
|
||||
pair_coeff * * 1.0 1.0
|
||||
mass 1 58.2 # These are made-up numbers
|
||||
mass 2 28.3
|
||||
velocity all create 1200.0 7474848 dist gaussian
|
||||
fix 1 all nve
|
||||
fix 2 all dt/reset 1 1E-5 1E-3 0.01 units box
|
||||
fix 4 all ave/histo 10 5 100 0.5 1.5 50 f_2 file temp.histo ave running
|
||||
thermo_style custom step dt temp press etotal f_4[1][1]
|
||||
thermo 100
|
||||
@ -1,112 +0,0 @@
|
||||
program simple
|
||||
|
||||
use MPI
|
||||
use LAMMPS
|
||||
|
||||
! The following line is unnecessary, as I have included these three entities
|
||||
! with the LAMMPS module, but I leave them in anyway to remind people where
|
||||
! they came from
|
||||
use, intrinsic :: ISO_C_binding, only : C_double, C_ptr, C_int
|
||||
|
||||
implicit none
|
||||
|
||||
! Notes:
|
||||
! * If LAMMPS returns a scalar that is allocated by the library interface
|
||||
! (see library.cpp), then that memory is deallocated automatically and
|
||||
! the argument to lammps_extract_fix must be a SCALAR.
|
||||
! * If LAMMPS returns a pointer to an array, consisting of internal LAMMPS
|
||||
! data, then the argument must be an interoperable Fortran pointer.
|
||||
! Interoperable means it is of type INTEGER (C_INT) or of type
|
||||
! REAL (C_DOUBLE) in this context.
|
||||
! * Pointers should NEVER be deallocated, as that would deallocate internal
|
||||
! LAMMPS data!
|
||||
! * Note that just because you can read the values of, say, a compute at
|
||||
! any time does not mean those values represent the "correct" values.
|
||||
! LAMMPS will abort you if you try to grab a pointer to a non-current
|
||||
! entity, but once it's bound, it's your responsibility to check that
|
||||
! it's current before evaluating.
|
||||
! * IMPORTANT: Two-dimensional arrays (such as 'x' from extract_atom)
|
||||
! will be transposed from what they might look like in C++. This is
|
||||
! because of different bookkeeping conventions between Fortran and C
|
||||
! that date back to about 1970 or so (when C was written).
|
||||
! * Arrays start from 1, EXCEPT for mass from extract_atom, which
|
||||
! starts from 0. This is because the C array actually has a blank
|
||||
! first element (and thus mass[1] corresponds to the mass of type 1)
|
||||
|
||||
type (C_ptr) :: lmp
|
||||
real (C_double), pointer :: compute => NULL()
|
||||
real (C_double) :: fix, fix2
|
||||
real (C_double), dimension(:), pointer :: compute_v => NULL()
|
||||
real (C_double), dimension(:,:), pointer :: x => NULL()
|
||||
real (C_double), dimension(:), pointer :: mass => NULL()
|
||||
integer, dimension(:), allocatable :: types
|
||||
double precision, dimension(:), allocatable :: r
|
||||
integer :: error, narg, me, nprocs
|
||||
character (len=1024) :: command_line
|
||||
|
||||
call MPI_Init (error)
|
||||
call MPI_Comm_rank (MPI_COMM_WORLD, me, error)
|
||||
call MPI_Comm_size (MPI_COMM_WORLD, nprocs, error)
|
||||
|
||||
! You are free to pass any string you like to lammps_open or
|
||||
! lammps_open_no_mpi; here is how you pass it the command line
|
||||
!call get_command (command_line)
|
||||
!call lammps_open (command_line, MPI_COMM_WORLD, lmp)
|
||||
|
||||
! And here's how to to it with a string constant of your choice
|
||||
call lammps_open_no_mpi ('lmp -log log.simple', lmp)
|
||||
|
||||
call lammps_file (lmp, 'in.simple')
|
||||
call lammps_command (lmp, 'run 500')
|
||||
|
||||
! This extracts f_2 as a scalar (the last two arguments can be arbitrary)
|
||||
call lammps_extract_fix (fix, lmp, '2', LMP_STYLE_GLOBAL, LMP_TYPE_SCALAR, 1, 1)
|
||||
print *, 'Fix is ', fix
|
||||
|
||||
! This extracts f_4[1][1] as a scalar
|
||||
call lammps_extract_fix (fix2, lmp, '4', LMP_STYLE_GLOBAL, LMP_TYPE_ARRAY, 1, 1)
|
||||
print *, 'Fix 2 is ', fix2
|
||||
|
||||
! This extracts the scalar compute of compute thermo_temp
|
||||
call lammps_extract_compute (compute, lmp, 'thermo_temp', LMP_STYLE_GLOBAL, LMP_TYPE_SCALAR)
|
||||
print *, 'Compute is ', compute
|
||||
|
||||
! This extracts the vector compute of compute thermo_temp
|
||||
call lammps_extract_compute (compute_v, lmp, 'thermo_temp', LMP_STYLE_GLOBAL, LMP_TYPE_VECTOR)
|
||||
print *, 'Vector is ', compute_v
|
||||
|
||||
! This extracts the masses
|
||||
call lammps_extract_atom (mass, lmp, 'mass')
|
||||
print *, 'Mass is ', mass(1:)
|
||||
|
||||
! Extracts a pointer to the arrays of positions for all atoms
|
||||
call lammps_extract_atom (x, lmp, 'x')
|
||||
if ( .not. associated (x) ) print *, 'x is not associated'
|
||||
print *, 'x is ', x(:,1) ! Prints x, y, z for atom 1
|
||||
|
||||
! Extracts pointer to atom types
|
||||
call lammps_gather_atoms (lmp, 'type', 1, types)
|
||||
print *, 'types is ', types(1:3)
|
||||
|
||||
! Allocates an array and assigns all positions to it
|
||||
call lammps_gather_atoms (lmp, 'x', 3, r)
|
||||
print *, 'natoms = ', int(lammps_get_natoms(lmp))
|
||||
print *, 'size(r) = ', size(r)
|
||||
print *, 'r is ', r(1:6)
|
||||
|
||||
! Puts those position data back
|
||||
call lammps_scatter_atoms (lmp, 'x', r)
|
||||
|
||||
call lammps_command (lmp, 'run 1')
|
||||
print *, 'x is ', x(:,1) ! Note that the position updates!
|
||||
print *, 'Compute is ', compute ! This did only because "temp" is part of
|
||||
! the thermo output; the vector part did
|
||||
! not, and won't until we give LAMMPS a
|
||||
! thermo output or other command that
|
||||
! requires its value
|
||||
|
||||
call lammps_close (lmp)
|
||||
|
||||
call MPI_Finalize (error)
|
||||
|
||||
end program simple
|
||||
@ -1,236 +0,0 @@
|
||||
/* -----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/
|
||||
Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
Contributing author: Karl D. Hammond <karlh@ugcs.caltech.edu>
|
||||
University of Tennessee, Knoxville (USA), 2012
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* This is set of "wrapper" functions to assist LAMMPS.F90, which itself
|
||||
provides a (I hope) robust Fortran interface to library.cpp and
|
||||
library.h. All functions herein COULD be added to library.cpp instead of
|
||||
including this as a separate file. See the README for instructions. */
|
||||
|
||||
#include <mpi.h>
|
||||
#include "LAMMPS-wrapper.h"
|
||||
#include <library.h>
|
||||
#include <lammps.h>
|
||||
#include <atom.h>
|
||||
#include <fix.h>
|
||||
#include <compute.h>
|
||||
#include <modify.h>
|
||||
#include <error.h>
|
||||
#include <cstdlib>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
void lammps_open_fortran_wrapper (int argc, char **argv,
|
||||
MPI_Fint communicator, void **ptr)
|
||||
{
|
||||
MPI_Comm C_communicator = MPI_Comm_f2c (communicator);
|
||||
lammps_open (argc, argv, C_communicator, ptr);
|
||||
}
|
||||
|
||||
int lammps_get_ntypes (void *ptr)
|
||||
{
|
||||
class LAMMPS *lmp = (class LAMMPS *) ptr;
|
||||
int ntypes = lmp->atom->ntypes;
|
||||
return ntypes;
|
||||
}
|
||||
|
||||
void lammps_error_all (void *ptr, const char *file, int line, const char *str)
|
||||
{
|
||||
class LAMMPS *lmp = (class LAMMPS *) ptr;
|
||||
lmp->error->all (file, line, str);
|
||||
}
|
||||
|
||||
int lammps_extract_compute_vectorsize (void *ptr, char *id, int style)
|
||||
{
|
||||
class LAMMPS *lmp = (class LAMMPS *) ptr;
|
||||
int icompute = lmp->modify->find_compute(id);
|
||||
if ( icompute < 0 ) return 0;
|
||||
class Compute *compute = lmp->modify->compute[icompute];
|
||||
|
||||
if ( style == 0 )
|
||||
{
|
||||
if ( !compute->vector_flag )
|
||||
return 0;
|
||||
else
|
||||
return compute->size_vector;
|
||||
}
|
||||
else if ( style == 1 )
|
||||
{
|
||||
return lammps_get_natoms (ptr);
|
||||
}
|
||||
else if ( style == 2 )
|
||||
{
|
||||
if ( !compute->local_flag )
|
||||
return 0;
|
||||
else
|
||||
return compute->size_local_rows;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
void lammps_extract_compute_arraysize (void *ptr, char *id, int style,
|
||||
int *nrows, int *ncols)
|
||||
{
|
||||
class LAMMPS *lmp = (class LAMMPS *) ptr;
|
||||
int icompute = lmp->modify->find_compute(id);
|
||||
if ( icompute < 0 )
|
||||
{
|
||||
*nrows = 0;
|
||||
*ncols = 0;
|
||||
}
|
||||
class Compute *compute = lmp->modify->compute[icompute];
|
||||
|
||||
if ( style == 0 )
|
||||
{
|
||||
if ( !compute->array_flag )
|
||||
{
|
||||
*nrows = 0;
|
||||
*ncols = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
*nrows = compute->size_array_rows;
|
||||
*ncols = compute->size_array_cols;
|
||||
}
|
||||
}
|
||||
else if ( style == 1 )
|
||||
{
|
||||
if ( !compute->peratom_flag )
|
||||
{
|
||||
*nrows = 0;
|
||||
*ncols = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
*nrows = lammps_get_natoms (ptr);
|
||||
*ncols = compute->size_peratom_cols;
|
||||
}
|
||||
}
|
||||
else if ( style == 2 )
|
||||
{
|
||||
if ( !compute->local_flag )
|
||||
{
|
||||
*nrows = 0;
|
||||
*ncols = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
*nrows = compute->size_local_rows;
|
||||
*ncols = compute->size_local_cols;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
*nrows = 0;
|
||||
*ncols = 0;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
int lammps_extract_fix_vectorsize (void *ptr, char *id, int style)
|
||||
{
|
||||
class LAMMPS *lmp = (class LAMMPS *) ptr;
|
||||
int ifix = lmp->modify->find_fix(id);
|
||||
if ( ifix < 0 ) return 0;
|
||||
class Fix *fix = lmp->modify->fix[ifix];
|
||||
|
||||
if ( style == 0 )
|
||||
{
|
||||
if ( !fix->vector_flag )
|
||||
return 0;
|
||||
else
|
||||
return fix->size_vector;
|
||||
}
|
||||
else if ( style == 1 )
|
||||
{
|
||||
return lammps_get_natoms (ptr);
|
||||
}
|
||||
else if ( style == 2 )
|
||||
{
|
||||
if ( !fix->local_flag )
|
||||
return 0;
|
||||
else
|
||||
return fix->size_local_rows;
|
||||
}
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
void lammps_extract_fix_arraysize (void *ptr, char *id, int style,
|
||||
int *nrows, int *ncols)
|
||||
{
|
||||
class LAMMPS *lmp = (class LAMMPS *) ptr;
|
||||
int ifix = lmp->modify->find_fix(id);
|
||||
if ( ifix < 0 )
|
||||
{
|
||||
*nrows = 0;
|
||||
*ncols = 0;
|
||||
}
|
||||
class Fix *fix = lmp->modify->fix[ifix];
|
||||
|
||||
if ( style == 0 )
|
||||
{
|
||||
if ( !fix->array_flag )
|
||||
{
|
||||
*nrows = 0;
|
||||
*ncols = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
*nrows = fix->size_array_rows;
|
||||
*ncols = fix->size_array_cols;
|
||||
}
|
||||
}
|
||||
else if ( style == 1 )
|
||||
{
|
||||
if ( !fix->peratom_flag )
|
||||
{
|
||||
*nrows = 0;
|
||||
*ncols = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
*nrows = lammps_get_natoms (ptr);
|
||||
*ncols = fix->size_peratom_cols;
|
||||
}
|
||||
}
|
||||
else if ( style == 2 )
|
||||
{
|
||||
if ( !fix->local_flag )
|
||||
{
|
||||
*nrows = 0;
|
||||
*ncols = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
*nrows = fix->size_local_rows;
|
||||
*ncols = fix->size_local_cols;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
*nrows = 0;
|
||||
*ncols = 0;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
/* vim: set ts=3 sts=3 expandtab: */
|
||||
@ -1,40 +0,0 @@
|
||||
/* -----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
www.cs.sandia.gov/~sjplimp/lammps.html
|
||||
Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
Contributing author: Karl D. Hammond <karlh@ugcs.caltech.edu>
|
||||
University of Tennessee, Knoxville (USA), 2012
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* This is set of "wrapper" functions to assist LAMMPS.F90, which itself
|
||||
provides a (I hope) robust Fortran interface to library.cpp and
|
||||
library.h. All prototypes herein COULD be added to library.h instead of
|
||||
including this as a separate file. See the README for instructions. */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Prototypes for auxiliary functions */
|
||||
void lammps_open_fortran_wrapper (int, char**, MPI_Fint, void**);
|
||||
int lammps_get_ntypes (void*);
|
||||
int lammps_extract_compute_vectorsize (void*, char*, int);
|
||||
void lammps_extract_compute_arraysize (void*, char*, int, int*, int*);
|
||||
int lammps_extract_fix_vectorsize (void*, char*, int);
|
||||
void lammps_extract_fix_arraysize (void*, char*, int, int*, int*);
|
||||
void lammps_error_all (void*, const char*, int, const char*);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* vim: set ts=3 sts=3 expandtab: */
|
||||
@ -1,81 +0,0 @@
|
||||
/* -----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/
|
||||
Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
Contributing author: Karl D. Hammond <karlh@ugcs.caltech.edu>
|
||||
University of Tennessee, Knoxville (USA), 2012
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* This is set of "wrapper" functions to assist LAMMPS.F90, which itself
|
||||
provides a (I hope) robust Fortran interface to library.cpp and
|
||||
library.h. All functions herein COULD be added to library.cpp instead of
|
||||
including this as a separate file. See the README for instructions. */
|
||||
|
||||
#include <mpi.h>
|
||||
#include "LAMMPS-wrapper2.h"
|
||||
#include <library.h>
|
||||
#include <lammps.h>
|
||||
#include <atom.h>
|
||||
#include <input.h>
|
||||
#include <modify.h>
|
||||
#include <fix.h>
|
||||
#include <fix_external.h>
|
||||
#include <compute.h>
|
||||
#include <modify.h>
|
||||
#include <error.h>
|
||||
#include <cstdlib>
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
extern "C" void f_callback(void *, bigint, int, tagint *, double **, double **);
|
||||
|
||||
void lammps_set_callback (void *ptr) {
|
||||
class LAMMPS *lmp = (class LAMMPS *) ptr;
|
||||
int ifix = lmp->modify->find_fix_by_style("external");
|
||||
FixExternal *fix = (FixExternal *) lmp->modify->fix[ifix];
|
||||
fix->set_callback(f_callback, ptr);
|
||||
return;
|
||||
}
|
||||
|
||||
void lammps_set_external_vector_length (void *ptr, int n) {
|
||||
class LAMMPS *lmp = (class LAMMPS *) ptr;
|
||||
int ifix = lmp->modify->find_fix_by_style("external");
|
||||
FixExternal *fix = (FixExternal *) lmp->modify->fix[ifix];
|
||||
fix->set_vector_length(n);
|
||||
return;
|
||||
}
|
||||
|
||||
void lammps_set_external_vector (void *ptr, int n, double val) {
|
||||
class LAMMPS *lmp = (class LAMMPS *) ptr;
|
||||
int ifix = lmp->modify->find_fix_by_style("external");
|
||||
FixExternal *fix = (FixExternal *) lmp->modify->fix[ifix];
|
||||
fix->set_vector (n, val);
|
||||
return;
|
||||
}
|
||||
|
||||
void lammps_set_user_energy (void *ptr, double energy) {
|
||||
class LAMMPS *lmp = (class LAMMPS *) ptr;
|
||||
int ifix = lmp->modify->find_fix_by_style("external");
|
||||
FixExternal *fix = (FixExternal *) lmp->modify->fix[ifix];
|
||||
fix->set_energy_global(energy);
|
||||
return;
|
||||
}
|
||||
|
||||
void lammps_set_user_virial (void *ptr, double *virial) {
|
||||
class LAMMPS *lmp = (class LAMMPS *) ptr;
|
||||
int ifix = lmp->modify->find_fix_by_style("external");
|
||||
FixExternal *fix = (FixExternal *) lmp->modify->fix[ifix];
|
||||
fix->set_virial_global(virial);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1,37 +0,0 @@
|
||||
/* -----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
www.cs.sandia.gov/~sjplimp/lammps.html
|
||||
Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
certain rights in this software. This software is distributed under
|
||||
the GNU General Public License.
|
||||
|
||||
See the README file in the top-level LAMMPS directory.
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
Contributing author: Nir Goldman, ngoldman@llnl.gov, Oct. 19th, 2016
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
/* This is set of "wrapper" functions to assist LAMMPS.F90, which itself
|
||||
provides a (I hope) robust Fortran interface to library.cpp and
|
||||
library.h. All prototypes herein COULD be added to library.h instead of
|
||||
including this as a separate file. See the README for instructions. */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Prototypes for auxiliary functions */
|
||||
void lammps_set_callback (void *);
|
||||
void lammps_set_user_energy (void*, double);
|
||||
void lammps_set_user_virial (void*, double*);
|
||||
void lammps_set_external_vector_length (void*, int);
|
||||
void lammps_set_external_vector (void*, int, double);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* vim: set ts=3 sts=3 expandtab: */
|
||||
@ -1,982 +0,0 @@
|
||||
!! -----------------------------------------------------------------------
|
||||
! LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
! www.cs.sandia.gov/~sjplimp/lammps.html
|
||||
! Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories
|
||||
!
|
||||
! Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
! DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
! certain rights in this software. This software is distributed under
|
||||
! the GNU General Public License.
|
||||
!
|
||||
! See the README file in the top-level LAMMPS directory.
|
||||
!--------------------------------------------------------------------------
|
||||
|
||||
!! ------------------------------------------------------------------------
|
||||
! Contributing author: Karl D. Hammond <karlh@ugcs.caltech.edu>
|
||||
! University of Tennessee, Knoxville (USA), 2012
|
||||
!--------------------------------------------------------------------------
|
||||
|
||||
!! LAMMPS, a Fortran 2003 module containing an interface between Fortran
|
||||
!! programs and the C-style functions in library.cpp that ship with LAMMPS.
|
||||
!! This file should be accompanied by LAMMPS-wrapper.cpp and LAMMPS-wrapper.h,
|
||||
!! which define wrapper functions that ease portability and enforce array
|
||||
!! dimensions.
|
||||
!!
|
||||
!! Everything in this module should be 100% portable by way of Fortran 2003's
|
||||
!! ISO_C_BINDING intrinsic module. See the README for instructions for
|
||||
!! compilation and use.
|
||||
!!
|
||||
!! Here are the PUBLIC functions and subroutines included in this module.
|
||||
!! subroutine lammps_open (command_line, communicator, ptr)
|
||||
!! subroutine lammps_open_no_mpi (command_line, ptr)
|
||||
!! subroutine lammps_close (ptr)
|
||||
!! subroutine lammps_file (ptr, str)
|
||||
!! subroutine lammps_command (ptr, str)
|
||||
!! subroutine lammps_free (ptr)
|
||||
!! subroutine lammps_extract_global (global, ptr, name)
|
||||
!! subroutine lammps_extract_atom (atom, ptr, name)
|
||||
!! subroutine lammps_extract_fix (fix, ptr, id, style, type, i, j)
|
||||
!! subroutine lammps_extract_compute (compute, ptr, id, style, type)
|
||||
!! subroutine lammps_extract_variable (variable, ptr, name, group)
|
||||
!! function lammps_get_natoms (ptr)
|
||||
!! subroutine lammps_gather_atoms (ptr, name, count, data)
|
||||
!! subroutine lammps_scatter_atoms (ptr, name, data)
|
||||
|
||||
#define FLERR __FILE__,__LINE__
|
||||
! The above line allows for similar error checking as is done with standard
|
||||
! LAMMPS files.
|
||||
|
||||
module LAMMPS
|
||||
|
||||
use, intrinsic :: ISO_C_binding, only : C_double, C_int, C_ptr, C_char, &
|
||||
C_NULL_CHAR, C_loc, C_F_pointer, lammps_instance => C_ptr
|
||||
implicit none
|
||||
private
|
||||
public :: lammps_set_user_virial
|
||||
public :: lammps_set_external_vector_length
|
||||
public :: lammps_set_external_vector
|
||||
public :: lammps_set_user_energy
|
||||
public :: lammps_open, lammps_open_no_mpi, lammps_close, lammps_file, &
|
||||
lammps_command, lammps_free, lammps_extract_global, &
|
||||
lammps_extract_atom, lammps_extract_compute, lammps_extract_fix, &
|
||||
lammps_extract_variable, lammps_get_natoms, lammps_gather_atoms, &
|
||||
lammps_set_callback
|
||||
public :: lammps_scatter_atoms, lammps_instance, C_ptr, C_double, C_int
|
||||
|
||||
!! Functions supplemental to the prototypes in library.h. {{{1
|
||||
!! The function definitions (in C++) are contained in LAMMPS-wrapper.cpp.
|
||||
!! I would have written the first in Fortran, but the MPI libraries (which
|
||||
!! were written in C) have C-based functions to convert from Fortran MPI
|
||||
!! handles to C MPI handles, and there is no Fortran equivalent for those
|
||||
!! functions.
|
||||
interface
|
||||
subroutine lammps_open_wrapper (argc, argv, communicator, ptr) &
|
||||
bind (C, name='lammps_open_fortran_wrapper')
|
||||
import :: C_int, C_ptr
|
||||
integer (C_int), value :: argc
|
||||
type (C_ptr), dimension(*) :: argv
|
||||
integer, value :: communicator
|
||||
type (C_ptr) :: ptr
|
||||
end subroutine lammps_open_wrapper
|
||||
subroutine lammps_actual_error_all (ptr, file, line, str) &
|
||||
bind (C, name='lammps_error_all')
|
||||
import :: C_int, C_char, C_ptr
|
||||
type (C_ptr), value :: ptr
|
||||
character (kind=C_char), dimension(*), intent(in) :: file, str
|
||||
integer (C_int), value :: line
|
||||
end subroutine lammps_actual_error_all
|
||||
function lammps_get_ntypes (ptr) result (ntypes) &
|
||||
bind (C, name='lammps_get_ntypes')
|
||||
import :: C_int, C_ptr
|
||||
type (C_ptr), value :: ptr
|
||||
integer (C_int) :: ntypes
|
||||
end function lammps_get_ntypes
|
||||
function lammps_actual_extract_compute_vectorsize (ptr, id, style) &
|
||||
result (vectorsize) bind (C, name='lammps_extract_compute_vectorsize')
|
||||
import :: C_int, C_char, C_ptr
|
||||
integer (C_int) :: vectorsize
|
||||
type (C_ptr), value :: ptr
|
||||
character (kind=C_char), dimension(*) :: id
|
||||
integer (C_int), value :: style
|
||||
end function lammps_actual_extract_compute_vectorsize
|
||||
subroutine lammps_actual_extract_compute_arraysize (ptr, id, style, &
|
||||
nrows, ncols) bind (C, name='lammps_extract_compute_arraysize')
|
||||
import :: C_int, C_char, C_ptr
|
||||
integer (C_int) :: arraysize
|
||||
type (C_ptr), value :: ptr
|
||||
character (kind=C_char), dimension(*) :: id
|
||||
integer (C_int), value :: style
|
||||
integer (C_int) :: nrows, ncols
|
||||
end subroutine lammps_actual_extract_compute_arraysize
|
||||
function lammps_actual_extract_fix_vectorsize (ptr, id, style) &
|
||||
result (vectorsize) bind (C, name='lammps_extract_fix_vectorsize')
|
||||
import :: C_int, C_char, C_ptr
|
||||
integer (C_int) :: vectorsize
|
||||
type (C_ptr), value :: ptr
|
||||
character (kind=C_char), dimension(*) :: id
|
||||
integer (C_int), value :: style
|
||||
end function lammps_actual_extract_fix_vectorsize
|
||||
subroutine lammps_actual_extract_fix_arraysize (ptr, id, style, &
|
||||
nrows, ncols) bind (C, name='lammps_extract_fix_arraysize')
|
||||
import :: C_int, C_char, C_ptr
|
||||
type (C_ptr), value :: ptr
|
||||
character (kind=C_char), dimension(*) :: id
|
||||
integer (C_int), value :: style
|
||||
integer (C_int) :: nrows, ncols
|
||||
end subroutine lammps_actual_extract_fix_arraysize
|
||||
end interface
|
||||
|
||||
!! Functions/subroutines defined in library.h and library.cpp {{{1
|
||||
interface
|
||||
subroutine lammps_actual_open_no_mpi (argc, argv, ptr) &
|
||||
bind (C, name='lammps_open_no_mpi')
|
||||
import :: C_int, C_ptr
|
||||
integer (C_int), value :: argc
|
||||
type (C_ptr), dimension(*) :: argv
|
||||
type (C_ptr) :: ptr
|
||||
end subroutine lammps_actual_open_no_mpi
|
||||
|
||||
subroutine lammps_close (ptr) bind (C, name='lammps_close')
|
||||
import :: C_ptr
|
||||
type (C_ptr), value :: ptr
|
||||
end subroutine lammps_close
|
||||
|
||||
subroutine lammps_actual_file (ptr, str) bind (C, name='lammps_file')
|
||||
import :: C_ptr, C_char
|
||||
type (C_ptr), value :: ptr
|
||||
character (kind=C_char), dimension(*) :: str
|
||||
end subroutine lammps_actual_file
|
||||
|
||||
function lammps_actual_command (ptr, str) result (command) &
|
||||
bind (C, name='lammps_command')
|
||||
import :: C_ptr, C_char
|
||||
type (C_ptr), value :: ptr
|
||||
character (kind=C_char), dimension(*) :: str
|
||||
type (C_ptr) :: command
|
||||
end function lammps_actual_command
|
||||
|
||||
subroutine lammps_free (ptr) bind (C, name='lammps_free')
|
||||
import :: C_ptr
|
||||
type (C_ptr), value :: ptr
|
||||
end subroutine lammps_free
|
||||
|
||||
function lammps_actual_extract_global (ptr, name) &
|
||||
bind (C, name='lammps_extract_global') result (global)
|
||||
import :: C_ptr, C_char
|
||||
type (C_ptr), value :: ptr
|
||||
character (kind=C_char), dimension(*) :: name
|
||||
type (C_ptr) :: global
|
||||
end function lammps_actual_extract_global
|
||||
|
||||
function lammps_actual_extract_atom (ptr, name) &
|
||||
bind (C, name='lammps_extract_atom') result (atom)
|
||||
import :: C_ptr, C_char
|
||||
type (C_ptr), value :: ptr
|
||||
character (kind=C_char), dimension(*) :: name
|
||||
type (C_ptr) :: atom
|
||||
end function lammps_actual_extract_atom
|
||||
|
||||
function lammps_actual_extract_compute (ptr, id, style, type) &
|
||||
result (compute) bind (C, name='lammps_extract_compute')
|
||||
import :: C_ptr, C_char, C_int
|
||||
type (C_ptr), value :: ptr
|
||||
character (kind=C_char), dimension(*) :: id
|
||||
integer (C_int), value :: style, type
|
||||
type (C_ptr) :: compute
|
||||
end function lammps_actual_extract_compute
|
||||
|
||||
function lammps_actual_extract_fix (ptr, id, style, type, i, j) &
|
||||
result (fix) bind (C, name='lammps_extract_fix')
|
||||
import :: C_ptr, C_char, C_int
|
||||
type (C_ptr), value :: ptr
|
||||
character (kind=C_char), dimension(*) :: id
|
||||
integer (C_int), value :: style, type, i, j
|
||||
type (C_ptr) :: fix
|
||||
end function lammps_actual_extract_fix
|
||||
|
||||
function lammps_actual_extract_variable (ptr, name, group) &
|
||||
result (variable) bind (C, name='lammps_extract_variable')
|
||||
import :: C_ptr, C_char
|
||||
type (C_ptr), value :: ptr
|
||||
character (kind=C_char), dimension(*) :: name, group
|
||||
type (C_ptr) :: variable
|
||||
end function lammps_actual_extract_variable
|
||||
|
||||
function lammps_get_natoms (ptr) result (natoms) &
|
||||
bind (C, name='lammps_get_natoms')
|
||||
import :: C_ptr, C_int
|
||||
type (C_ptr), value :: ptr
|
||||
integer (C_int) :: natoms
|
||||
end function lammps_get_natoms
|
||||
|
||||
subroutine lammps_set_callback (ptr) &
|
||||
bind (C, name='lammps_set_callback')
|
||||
import :: C_ptr
|
||||
type (C_ptr), value :: ptr
|
||||
end subroutine lammps_set_callback
|
||||
|
||||
subroutine lammps_set_user_energy (ptr, energy) &
|
||||
bind (C, name='lammps_set_user_energy')
|
||||
import :: C_ptr, C_double
|
||||
type (C_ptr), value :: ptr
|
||||
real(C_double), value :: energy
|
||||
end subroutine lammps_set_user_energy
|
||||
|
||||
subroutine lammps_set_user_virial (ptr, virial) &
|
||||
bind (C, name='lammps_set_user_virial')
|
||||
import :: C_ptr, C_double
|
||||
type (C_ptr), value :: ptr
|
||||
real(C_double) :: virial(6)
|
||||
end subroutine lammps_set_user_virial
|
||||
|
||||
subroutine lammps_set_external_vector_length (ptr, n) &
|
||||
bind (C, name='lammps_set_external_vector_length')
|
||||
import :: C_ptr, C_double, C_int
|
||||
type(C_ptr), value :: ptr
|
||||
integer (C_int), value :: n
|
||||
end subroutine lammps_set_external_vector_length
|
||||
|
||||
subroutine lammps_set_external_vector (ptr, n, val) &
|
||||
bind (C, name='lammps_set_external_vector')
|
||||
import :: C_ptr, C_int, C_double
|
||||
type (C_ptr), value :: ptr
|
||||
integer (C_int), value :: n
|
||||
real(C_double), value :: val
|
||||
end subroutine lammps_set_external_vector
|
||||
|
||||
subroutine lammps_actual_gather_atoms (ptr, name, type, count, data) &
|
||||
bind (C, name='lammps_gather_atoms')
|
||||
import :: C_ptr, C_int, C_char
|
||||
type (C_ptr), value :: ptr, data
|
||||
character (kind=C_char), dimension(*) :: name
|
||||
integer (C_int), value :: type, count
|
||||
end subroutine lammps_actual_gather_atoms
|
||||
|
||||
subroutine lammps_actual_scatter_atoms (ptr, name, type, count, data) &
|
||||
bind (C, name='lammps_scatter_atoms')
|
||||
import :: C_ptr, C_int, C_char
|
||||
type (C_ptr), value :: ptr, data
|
||||
character (kind=C_char), dimension(*) :: name
|
||||
integer (C_int), value :: type, count
|
||||
end subroutine lammps_actual_scatter_atoms
|
||||
end interface
|
||||
|
||||
! Generic functions for the wrappers below {{{1
|
||||
|
||||
interface lammps_extract_global
|
||||
module procedure lammps_extract_global_i, &
|
||||
lammps_extract_global_dp
|
||||
end interface lammps_extract_global
|
||||
|
||||
interface lammps_extract_atom
|
||||
module procedure lammps_extract_atom_ia, &
|
||||
lammps_extract_atom_dpa, &
|
||||
lammps_extract_atom_dp2a
|
||||
end interface lammps_extract_atom
|
||||
|
||||
interface lammps_extract_compute
|
||||
module procedure lammps_extract_compute_dp, &
|
||||
lammps_extract_compute_dpa, &
|
||||
lammps_extract_compute_dp2a
|
||||
end interface lammps_extract_compute
|
||||
|
||||
interface lammps_extract_fix
|
||||
module procedure lammps_extract_fix_dp, &
|
||||
lammps_extract_fix_dpa, &
|
||||
lammps_extract_fix_dp2a
|
||||
end interface lammps_extract_fix
|
||||
|
||||
interface lammps_extract_variable
|
||||
module procedure lammps_extract_variable_dp, &
|
||||
lammps_extract_variable_dpa
|
||||
end interface lammps_extract_variable
|
||||
|
||||
interface lammps_gather_atoms
|
||||
module procedure lammps_gather_atoms_ia, lammps_gather_atoms_dpa
|
||||
end interface lammps_gather_atoms
|
||||
|
||||
interface lammps_scatter_atoms
|
||||
module procedure lammps_scatter_atoms_ia, lammps_scatter_atoms_dpa
|
||||
end interface lammps_scatter_atoms
|
||||
|
||||
contains !! Wrapper functions local to this module {{{1
|
||||
|
||||
subroutine lammps_open (command_line, communicator, ptr)
|
||||
character (len=*), intent(in) :: command_line
|
||||
integer, intent(in) :: communicator
|
||||
type (C_ptr) :: ptr
|
||||
integer (C_int) :: argc
|
||||
type (C_ptr), dimension(:), allocatable :: argv
|
||||
character (kind=C_char), dimension(len_trim(command_line)+1), target :: &
|
||||
c_command_line
|
||||
c_command_line = string2Cstring (command_line)
|
||||
call Cstring2argcargv (c_command_line, argc, argv)
|
||||
call lammps_open_wrapper (argc, argv, communicator, ptr)
|
||||
deallocate (argv)
|
||||
end subroutine lammps_open
|
||||
|
||||
!-----------------------------------------------------------------------------
|
||||
|
||||
subroutine lammps_open_no_mpi (command_line, ptr)
|
||||
character (len=*), intent(in) :: command_line
|
||||
type (C_ptr) :: ptr
|
||||
integer (C_int) :: argc
|
||||
type (C_ptr), dimension(:), allocatable :: argv
|
||||
character (kind=C_char), dimension(len_trim(command_line)+1), target :: &
|
||||
c_command_line
|
||||
c_command_line = string2Cstring (command_line)
|
||||
call Cstring2argcargv (c_command_line, argc, argv)
|
||||
call lammps_actual_open_no_mpi (argc, argv, ptr)
|
||||
deallocate (argv)
|
||||
end subroutine lammps_open_no_mpi
|
||||
|
||||
!-----------------------------------------------------------------------------
|
||||
|
||||
subroutine lammps_file (ptr, str)
|
||||
type (C_ptr) :: ptr
|
||||
character (len=*) :: str
|
||||
character (kind=C_char), dimension(len_trim(str)+1) :: Cstr
|
||||
Cstr = string2Cstring (str)
|
||||
call lammps_actual_file (ptr, Cstr)
|
||||
end subroutine lammps_file
|
||||
|
||||
!-----------------------------------------------------------------------------
|
||||
|
||||
subroutine lammps_command (ptr, str)
|
||||
type (C_ptr) :: ptr
|
||||
character (len=*) :: str
|
||||
character (kind=C_char), dimension(len_trim(str)+1) :: Cstr
|
||||
type (C_ptr) :: dummy
|
||||
Cstr = string2Cstring (str)
|
||||
dummy = lammps_actual_command (ptr, Cstr)
|
||||
end subroutine lammps_command
|
||||
|
||||
!-----------------------------------------------------------------------------
|
||||
|
||||
! lammps_extract_global {{{2
|
||||
function lammps_extract_global_Cptr (ptr, name) result (global)
|
||||
type (C_ptr) :: global
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: name
|
||||
character (kind=C_char), dimension(len_trim(name)+1) :: Cname
|
||||
Cname = string2Cstring (name)
|
||||
global = lammps_actual_extract_global (ptr, Cname)
|
||||
end function lammps_extract_global_Cptr
|
||||
subroutine lammps_extract_global_i (global, ptr, name)
|
||||
integer (C_int), pointer, intent(out) :: global
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: name
|
||||
type (C_ptr) :: Cptr
|
||||
Cptr = lammps_extract_global_Cptr (ptr, name)
|
||||
call C_F_pointer (Cptr, global)
|
||||
end subroutine lammps_extract_global_i
|
||||
subroutine lammps_extract_global_dp (global, ptr, name)
|
||||
real (C_double), pointer, intent(out) :: global
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: name
|
||||
type (C_ptr) :: Cptr
|
||||
Cptr = lammps_extract_global_Cptr (ptr, name)
|
||||
call C_F_pointer (Cptr, global)
|
||||
end subroutine lammps_extract_global_dp
|
||||
|
||||
!-----------------------------------------------------------------------------
|
||||
|
||||
! lammps_extract_atom {{{2
|
||||
function lammps_extract_atom_Cptr (ptr, name) result (atom)
|
||||
type (C_ptr) :: atom
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: name
|
||||
character (kind=C_char), dimension(len_trim(name)+1) :: Cname
|
||||
Cname = string2Cstring (name)
|
||||
atom = lammps_actual_extract_atom (ptr, Cname)
|
||||
end function lammps_extract_atom_Cptr
|
||||
subroutine lammps_extract_atom_ia (atom, ptr, name)
|
||||
integer (C_int), dimension(:), pointer, intent(out) :: atom
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: name
|
||||
type (C_ptr) :: Cptr
|
||||
integer (C_int), pointer :: nelements
|
||||
call lammps_extract_global_i (nelements, ptr, 'nlocal')
|
||||
Cptr = lammps_extract_atom_Cptr (ptr, name)
|
||||
call C_F_pointer (Cptr, atom, (/nelements/))
|
||||
end subroutine lammps_extract_atom_ia
|
||||
subroutine lammps_extract_atom_dpa (atom, ptr, name)
|
||||
real (C_double), dimension(:), pointer, intent(out) :: atom
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: name
|
||||
type (C_ptr) :: Cptr
|
||||
integer (C_int), pointer :: nlocal
|
||||
integer :: nelements
|
||||
real (C_double), dimension(:), pointer :: Fptr
|
||||
if ( name == 'mass' ) then
|
||||
nelements = lammps_get_ntypes (ptr) + 1
|
||||
else if ( name == 'x' .or. name == 'v' .or. name == 'f' .or. &
|
||||
name == 'mu' .or. name == 'omega' .or. name == 'torque' .or. &
|
||||
name == 'angmom' ) then
|
||||
! We should not be getting a rank-2 array here!
|
||||
call lammps_error_all (ptr, FLERR, 'You cannot extract those atom&
|
||||
& data (' // trim(name) // ') into a rank 1 array.')
|
||||
return
|
||||
else
|
||||
! Everything else we can get is probably nlocal units long
|
||||
call lammps_extract_global_i (nlocal, ptr, 'nlocal')
|
||||
nelements = nlocal
|
||||
end if
|
||||
Cptr = lammps_extract_atom_Cptr (ptr, name)
|
||||
call C_F_pointer (Cptr, Fptr, (/nelements/))
|
||||
if ( name == 'mass' ) then
|
||||
!atom(0:) => Fptr
|
||||
atom => Fptr
|
||||
else
|
||||
atom => Fptr
|
||||
end if
|
||||
end subroutine lammps_extract_atom_dpa
|
||||
subroutine lammps_extract_atom_dp2a (atom, ptr, name)
|
||||
real (C_double), dimension(:,:), pointer, intent(out) :: atom
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: name
|
||||
type (C_ptr) :: Cptr
|
||||
type (C_ptr), pointer, dimension(:) :: Catom
|
||||
integer (C_int), pointer :: nelements
|
||||
if ( name /= 'x' .and. name /= 'v' .and. name /= 'f' .and. &
|
||||
name /= 'mu' .and. name /= 'omega' .and. name /= 'tandque' .and. &
|
||||
name /= 'angmom' .and. name /= 'fexternal' ) then
|
||||
! We should not be getting a rank-2 array here!
|
||||
call lammps_error_all (ptr, FLERR, 'You cannot extract those atom&
|
||||
& data (' // trim(name) // ') into a rank 2 array.')
|
||||
return
|
||||
end if
|
||||
Cptr = lammps_extract_atom_Cptr (ptr, name)
|
||||
call lammps_extract_global_i (nelements, ptr, 'nlocal')
|
||||
! Catom will now be the array of void* pointers that the void** pointer
|
||||
! pointed to. Catom(1) is now the pointer to the first element.
|
||||
call C_F_pointer (Cptr, Catom, (/nelements/))
|
||||
! Now get the actual array, which has its shape transposed from what we
|
||||
! might think of it in C
|
||||
call C_F_pointer (Catom(1), atom, (/3, nelements/))
|
||||
end subroutine lammps_extract_atom_dp2a
|
||||
|
||||
!-----------------------------------------------------------------------------
|
||||
|
||||
! lammps_extract_compute {{{2
|
||||
function lammps_extract_compute_Cptr (ptr, id, style, type) result (compute)
|
||||
type (C_ptr) :: compute
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: id
|
||||
integer, intent(in) :: style, type
|
||||
integer (kind=C_int) :: Cstyle, Ctype
|
||||
character (kind=C_char), dimension(len_trim(id)+1) :: Cid
|
||||
Cid = string2Cstring (id)
|
||||
Cstyle = style
|
||||
Ctype = type
|
||||
compute = lammps_actual_extract_compute (ptr, Cid, Cstyle, Ctype)
|
||||
end function lammps_extract_compute_Cptr
|
||||
subroutine lammps_extract_compute_dp (compute, ptr, id, style, type)
|
||||
real (C_double), pointer, intent(out) :: compute
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: id
|
||||
integer, intent(in) :: style, type
|
||||
type (C_ptr) :: Cptr
|
||||
! The only valid values of (style,type) are (0,0) for scalar 'compute'
|
||||
if ( style /= 0 ) then
|
||||
call lammps_error_all (ptr, FLERR, 'You cannot pack per-atom/local&
|
||||
& data into a scalar.')
|
||||
return
|
||||
end if
|
||||
if ( type == 1 ) then
|
||||
call lammps_error_all (ptr, FLERR, 'You cannot extract a compute&
|
||||
& vector (rank 1) into a scalar.')
|
||||
return
|
||||
else if ( type == 2 ) then
|
||||
call lammps_error_all (ptr, FLERR, 'You cannot extract a compute&
|
||||
& array (rank 2) into a scalar.')
|
||||
return
|
||||
end if
|
||||
Cptr = lammps_extract_compute_Cptr (ptr, id, style, type)
|
||||
call C_F_pointer (Cptr, compute)
|
||||
end subroutine lammps_extract_compute_dp
|
||||
subroutine lammps_extract_compute_dpa (compute, ptr, id, style, type)
|
||||
real (C_double), dimension(:), pointer, intent(out) :: compute
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: id
|
||||
integer, intent(in) :: style, type
|
||||
type (C_ptr) :: Cptr
|
||||
integer :: nelements
|
||||
! Check for the correct dimensionality
|
||||
if ( type == 0 ) then
|
||||
call lammps_error_all (ptr, FLERR, 'You cannot extract a compute&
|
||||
& scalar (rank 0) into a rank 1 variable.')
|
||||
return
|
||||
else if ( type == 2 ) then
|
||||
call lammps_error_all (ptr, FLERR, 'You cannot extract a compute&
|
||||
& array (rank 2) into a rank 1 variable.')
|
||||
return
|
||||
end if
|
||||
nelements = lammps_extract_compute_vectorsize (ptr, id, style)
|
||||
Cptr = lammps_extract_compute_Cptr (ptr, id, style, type)
|
||||
call C_F_pointer (Cptr, compute, (/nelements/))
|
||||
end subroutine lammps_extract_compute_dpa
|
||||
subroutine lammps_extract_compute_dp2a (compute, ptr, id, style, type)
|
||||
real (C_double), dimension(:,:), pointer, intent(out) :: compute
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: id
|
||||
integer, intent(in) :: style, type
|
||||
type (C_ptr) :: Cptr
|
||||
type (C_ptr), pointer, dimension(:) :: Ccompute
|
||||
integer :: nr, nc
|
||||
! Check for the correct dimensionality
|
||||
if ( type == 0 ) then
|
||||
call lammps_error_all (ptr, FLERR, 'You cannot extract a compute&
|
||||
& scalar (rank 0) into a rank 2 variable.')
|
||||
return
|
||||
else if ( type == 1 ) then
|
||||
call lammps_error_all (ptr, FLERR, 'You cannot extract a compute&
|
||||
& array (rank 1) into a rank 2 variable.')
|
||||
return
|
||||
end if
|
||||
call lammps_extract_compute_arraysize (ptr, id, style, nr, nc)
|
||||
Cptr = lammps_extract_compute_Cptr (ptr, id, style, type)
|
||||
call C_F_pointer (Cptr, Ccompute, (/nr/))
|
||||
! Note that the matrix is transposed, from Fortran's perspective
|
||||
call C_F_pointer (Ccompute(1), compute, (/nc, nr/))
|
||||
end subroutine lammps_extract_compute_dp2a
|
||||
|
||||
!-----------------------------------------------------------------------------
|
||||
|
||||
! lammps_extract_fix {{{2
|
||||
function lammps_extract_fix_Cptr (ptr, id, style, type, i, j) &
|
||||
result (fix)
|
||||
type (C_ptr) :: fix
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: id
|
||||
integer, intent(in) :: style, type, i, j
|
||||
character (kind=C_char), dimension(len_trim(id)+1) :: Cid
|
||||
integer (kind=C_int) :: Cstyle, Ctype, Ci, Cj
|
||||
Cid = string2Cstring (id)
|
||||
Cstyle = style
|
||||
Ctype = type
|
||||
Ci = i - 1 ! This is for consistency with the values from f_ID[i],
|
||||
Cj = j - 1 ! which is different from what library.cpp uses!
|
||||
if ( (type >= 1 .and. Ci < 0) .or. &
|
||||
(type == 2 .and. (Ci < 0 .or. Cj < 0) ) ) then
|
||||
call lammps_error_all (ptr, FLERR, 'Index out of range in&
|
||||
& lammps_extract_fix')
|
||||
end if
|
||||
fix = lammps_actual_extract_fix (ptr, Cid, Cstyle, Ctype, Ci, Cj)
|
||||
end function lammps_extract_fix_Cptr
|
||||
subroutine lammps_extract_fix_dp (fix, ptr, id, style, type, i, j)
|
||||
real (C_double), intent(out) :: fix
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: id
|
||||
integer, intent(in) :: style, type, i, j
|
||||
type (C_ptr) :: Cptr
|
||||
real (C_double), pointer :: Fptr
|
||||
! Check for the correct dimensionality
|
||||
if ( style /= 0 ) then
|
||||
select case (type)
|
||||
case (0)
|
||||
call lammps_error_all (ptr, FLERR, 'There is no per-atom or local&
|
||||
& scalar data available from fixes.')
|
||||
case (1)
|
||||
call lammps_error_all (ptr, FLERR, 'You cannot extract a fix''s &
|
||||
&per-atom/local vector (rank 1) into a scalar.')
|
||||
case (2)
|
||||
call lammps_error_all (ptr, FLERR, 'You cannot extract a fix''s &
|
||||
&per-atom/local array (rank 2) into a scalar.')
|
||||
case default
|
||||
call lammps_error_all (ptr, FLERR, 'Invalid extract_fix style/&
|
||||
&type combination.')
|
||||
end select
|
||||
return
|
||||
end if
|
||||
Cptr = lammps_extract_fix_Cptr (ptr, id, style, type, i, j)
|
||||
call C_F_pointer (Cptr, Fptr)
|
||||
fix = Fptr
|
||||
nullify (Fptr)
|
||||
! Memory is only allocated for "global" fix variables
|
||||
if ( style == 0 ) call lammps_free (Cptr)
|
||||
end subroutine lammps_extract_fix_dp
|
||||
subroutine lammps_extract_fix_dpa (fix, ptr, id, style, type, i, j)
|
||||
real (C_double), dimension(:), pointer, intent(out) :: fix
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: id
|
||||
integer, intent(in) :: style, type, i, j
|
||||
type (C_ptr) :: Cptr
|
||||
integer :: fix_len
|
||||
! Check for the correct dimensionality
|
||||
if ( style == 0 ) then
|
||||
call lammps_error_all (ptr, FLERR, 'You can''t extract the&
|
||||
& whole vector from global fix data')
|
||||
return
|
||||
else if ( type == 0 ) then
|
||||
call lammps_error_all (ptr, FLERR, 'You can''t extract a fix&
|
||||
& scalar into a rank 1 variable')
|
||||
return
|
||||
else if ( type == 2 ) then
|
||||
call lammps_error_all (ptr, FLERR, 'You cannot extract a fix&
|
||||
& array into a rank 1 variable.')
|
||||
return
|
||||
else if ( type /= 1 ) then
|
||||
call lammps_error_all (ptr, FLERR, 'Invalid type for fix extraction.')
|
||||
return
|
||||
end if
|
||||
fix_len = lammps_extract_fix_vectorsize (ptr, id, style)
|
||||
call C_F_pointer (Cptr, fix, (/fix_len/))
|
||||
! Memory is only allocated for "global" fix variables, which we should
|
||||
! never get here, so no need to call lammps_free!
|
||||
end subroutine lammps_extract_fix_dpa
|
||||
subroutine lammps_extract_fix_dp2a (fix, ptr, id, style, type, i, j)
|
||||
real (C_double), dimension(:,:), pointer, intent(out) :: fix
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: id
|
||||
integer, intent(in) :: style, type, i, j
|
||||
type (C_ptr) :: Cptr
|
||||
type (C_ptr), pointer, dimension(:) :: Cfix
|
||||
integer :: nr, nc
|
||||
! Check for the correct dimensionality
|
||||
if ( style == 0 ) then
|
||||
call lammps_error_all (ptr, FLERR, 'It is not possible to extract the&
|
||||
& entire array from global fix data.')
|
||||
return
|
||||
else if ( type == 0 ) then
|
||||
call lammps_error_all (ptr, FLERR, 'You cannot extract a fix&
|
||||
& scalar (rank 0) into a rank 2 variable.')
|
||||
return
|
||||
else if ( type == 1 ) then
|
||||
call lammps_error_all (ptr, FLERR, 'You cannot extract a fix&
|
||||
& vector (rank 1) into a rank 2 variable.')
|
||||
return
|
||||
end if
|
||||
call lammps_extract_fix_arraysize (ptr, id, style, nr, nc)
|
||||
! Extract pointer to first element as Cfix(1)
|
||||
call C_F_pointer (Cptr, Cfix, (/nr/))
|
||||
! Now extract the array, which is transposed
|
||||
call C_F_pointer (Cfix(1), fix, (/nc, nr/))
|
||||
end subroutine lammps_extract_fix_dp2a
|
||||
|
||||
!-----------------------------------------------------------------------------
|
||||
|
||||
! lammps_extract_variable {{{2
|
||||
function lammps_extract_variable_Cptr (ptr, name, group) result (variable)
|
||||
type (C_ptr) :: ptr, variable
|
||||
character (len=*) :: name
|
||||
character (len=*), optional :: group
|
||||
character (kind=C_char), dimension(len_trim(name)+1) :: Cname
|
||||
character (kind=C_char), dimension(:), allocatable :: Cgroup
|
||||
Cname = string2Cstring (name)
|
||||
if ( present(group) ) then
|
||||
allocate (Cgroup(len_trim(group)+1))
|
||||
Cgroup = string2Cstring (group)
|
||||
else
|
||||
allocate (Cgroup(1))
|
||||
Cgroup(1) = C_NULL_CHAR
|
||||
end if
|
||||
variable = lammps_actual_extract_variable (ptr, Cname, Cgroup)
|
||||
deallocate (Cgroup)
|
||||
end function lammps_extract_variable_Cptr
|
||||
subroutine lammps_extract_variable_dp (variable, ptr, name, group)
|
||||
real (C_double), intent(out) :: variable
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: name
|
||||
character (len=*), intent(in), optional :: group
|
||||
type (C_ptr) :: Cptr
|
||||
real (C_double), pointer :: Fptr
|
||||
if ( present(group) ) then
|
||||
Cptr = lammps_extract_variable_Cptr (ptr, name, group)
|
||||
else
|
||||
Cptr = lammps_extract_variable_Cptr (ptr, name)
|
||||
end if
|
||||
call C_F_pointer (Cptr, Fptr)
|
||||
variable = Fptr
|
||||
nullify (Fptr)
|
||||
call lammps_free (Cptr)
|
||||
end subroutine lammps_extract_variable_dp
|
||||
subroutine lammps_extract_variable_dpa (variable, ptr, name, group)
|
||||
real (C_double), dimension(:), allocatable, intent(out) :: variable
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: name
|
||||
character (len=*), intent(in), optional :: group
|
||||
type (C_ptr) :: Cptr
|
||||
real (C_double), dimension(:), pointer :: Fptr
|
||||
integer :: natoms
|
||||
if ( present(group) ) then
|
||||
Cptr = lammps_extract_variable_Cptr (ptr, name, group)
|
||||
else
|
||||
Cptr = lammps_extract_variable_Cptr (ptr, name)
|
||||
end if
|
||||
natoms = lammps_get_natoms (ptr)
|
||||
allocate (variable(natoms))
|
||||
call C_F_pointer (Cptr, Fptr, (/natoms/))
|
||||
variable = Fptr
|
||||
nullify (Fptr)
|
||||
call lammps_free (Cptr)
|
||||
end subroutine lammps_extract_variable_dpa
|
||||
|
||||
!-------------------------------------------------------------------------2}}}
|
||||
|
||||
subroutine lammps_gather_atoms_ia (ptr, name, count, data)
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: name
|
||||
integer, intent(in) :: count
|
||||
integer, dimension(:), allocatable, intent(out) :: data
|
||||
type (C_ptr) :: Cdata
|
||||
integer (C_int), dimension(:), pointer :: Fdata
|
||||
integer (C_int) :: natoms
|
||||
character (kind=C_char), dimension(len_trim(name)+1) :: Cname
|
||||
integer (C_int), parameter :: Ctype = 0_C_int
|
||||
integer (C_int) :: Ccount
|
||||
natoms = lammps_get_natoms (ptr)
|
||||
Cname = string2Cstring (name)
|
||||
if ( count /= 1 .and. count /= 3 ) then
|
||||
call lammps_error_all (ptr, FLERR, 'lammps_gather_atoms requires&
|
||||
& count to be either 1 or 3')
|
||||
else
|
||||
Ccount = count
|
||||
end if
|
||||
allocate ( Fdata(count*natoms) )
|
||||
allocate ( data(count*natoms) )
|
||||
Cdata = C_loc (Fdata(1))
|
||||
call lammps_actual_gather_atoms (ptr, Cname, Ctype, Ccount, Cdata)
|
||||
data = Fdata
|
||||
deallocate (Fdata)
|
||||
end subroutine lammps_gather_atoms_ia
|
||||
subroutine lammps_gather_atoms_dpa (ptr, name, count, data)
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: name
|
||||
integer, intent(in) :: count
|
||||
double precision, dimension(:), allocatable, intent(out) :: data
|
||||
type (C_ptr) :: Cdata
|
||||
real (C_double), dimension(:), pointer :: Fdata
|
||||
integer (C_int) :: natoms
|
||||
character (kind=C_char), dimension(len_trim(name)+1) :: Cname
|
||||
integer (C_int), parameter :: Ctype = 1_C_int
|
||||
integer (C_int) :: Ccount
|
||||
natoms = lammps_get_natoms (ptr)
|
||||
Cname = string2Cstring (name)
|
||||
if ( count /= 1 .and. count /= 3 ) then
|
||||
call lammps_error_all (ptr, FLERR, 'lammps_gather_atoms requires&
|
||||
& count to be either 1 or 3')
|
||||
else
|
||||
Ccount = count
|
||||
end if
|
||||
allocate ( Fdata(count*natoms) )
|
||||
allocate ( data(count*natoms) )
|
||||
Cdata = C_loc (Fdata(1))
|
||||
call lammps_actual_gather_atoms (ptr, Cname, Ctype, Ccount, Cdata)
|
||||
data = Fdata(:)
|
||||
deallocate (Fdata)
|
||||
end subroutine lammps_gather_atoms_dpa
|
||||
|
||||
!-----------------------------------------------------------------------------
|
||||
|
||||
subroutine lammps_scatter_atoms_ia (ptr, name, data)
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: name
|
||||
integer, dimension(:), intent(in) :: data
|
||||
integer (kind=C_int) :: natoms, Ccount
|
||||
integer (kind=C_int), parameter :: Ctype = 0_C_int
|
||||
character (kind=C_char), dimension(len_trim(name)+1) :: Cname
|
||||
integer (C_int), dimension(size(data)), target :: Fdata
|
||||
type (C_ptr) :: Cdata
|
||||
natoms = lammps_get_natoms (ptr)
|
||||
Cname = string2Cstring (name)
|
||||
Ccount = size(data) / natoms
|
||||
if ( Ccount /= 1 .and. Ccount /= 3 ) &
|
||||
call lammps_error_all (ptr, FLERR, 'lammps_gather_atoms requires&
|
||||
& count to be either 1 or 3')
|
||||
Fdata = data
|
||||
Cdata = C_loc (Fdata(1))
|
||||
call lammps_actual_scatter_atoms (ptr, Cname, Ctype, Ccount, Cdata)
|
||||
end subroutine lammps_scatter_atoms_ia
|
||||
subroutine lammps_scatter_atoms_dpa (ptr, name, data)
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: name
|
||||
double precision, dimension(:), intent(in) :: data
|
||||
integer (kind=C_int) :: natoms, Ccount
|
||||
integer (kind=C_int), parameter :: Ctype = 1_C_int
|
||||
character (kind=C_char), dimension(len_trim(name)+1) :: Cname
|
||||
real (C_double), dimension(size(data)), target :: Fdata
|
||||
type (C_ptr) :: Cdata
|
||||
natoms = lammps_get_natoms (ptr)
|
||||
Cname = string2Cstring (name)
|
||||
Ccount = size(data) / natoms
|
||||
if ( Ccount /= 1 .and. Ccount /= 3 ) &
|
||||
call lammps_error_all (ptr, FLERR, 'lammps_gather_atoms requires&
|
||||
& count to be either 1 or 3')
|
||||
Fdata = data
|
||||
Cdata = C_loc (Fdata(1))
|
||||
call lammps_actual_scatter_atoms (ptr, Cname, Ctype, Ccount, Cdata)
|
||||
end subroutine lammps_scatter_atoms_dpa
|
||||
|
||||
!-----------------------------------------------------------------------------
|
||||
|
||||
function lammps_extract_compute_vectorsize (ptr, id, style) &
|
||||
result (vectorsize)
|
||||
integer :: vectorsize
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: id
|
||||
integer, intent(in) :: style
|
||||
integer (C_int) :: Cvectorsize, Cstyle
|
||||
character (kind=C_char), dimension(len_trim(id)+1) :: Cid
|
||||
Cid = string2Cstring (id)
|
||||
Cstyle = int(style, C_int)
|
||||
Cvectorsize = lammps_actual_extract_compute_vectorsize (ptr, Cid, Cstyle)
|
||||
vectorsize = int(Cvectorsize, kind(vectorsize))
|
||||
end function lammps_extract_compute_vectorsize
|
||||
|
||||
!-----------------------------------------------------------------------------
|
||||
|
||||
function lammps_extract_fix_vectorsize (ptr, id, style) &
|
||||
result (vectorsize)
|
||||
integer :: vectorsize
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: id
|
||||
integer, intent(in) :: style
|
||||
integer (C_int) :: Cvectorsize, Cstyle
|
||||
character (kind=C_char), dimension(len_trim(id)+1) :: Cid
|
||||
Cid = string2Cstring (id)
|
||||
Cstyle = int(style, C_int)
|
||||
Cvectorsize = lammps_actual_extract_fix_vectorsize (ptr, Cid, Cstyle)
|
||||
vectorsize = int(Cvectorsize, kind(vectorsize))
|
||||
end function lammps_extract_fix_vectorsize
|
||||
|
||||
!-----------------------------------------------------------------------------
|
||||
|
||||
subroutine lammps_extract_compute_arraysize (ptr, id, style, nrows, ncols)
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: id
|
||||
integer, intent(in) :: style
|
||||
integer, intent(out) :: nrows, ncols
|
||||
integer (C_int) :: Cstyle, Cnrows, Cncols
|
||||
character (kind=C_char), dimension(len_trim(id)+1) :: Cid
|
||||
Cid = string2Cstring (id)
|
||||
Cstyle = int (style, C_int)
|
||||
call lammps_actual_extract_compute_arraysize (ptr, Cid, Cstyle, &
|
||||
Cnrows, Cncols)
|
||||
nrows = int (Cnrows, kind(nrows))
|
||||
ncols = int (Cncols, kind(ncols))
|
||||
end subroutine lammps_extract_compute_arraysize
|
||||
|
||||
!-----------------------------------------------------------------------------
|
||||
|
||||
subroutine lammps_extract_fix_arraysize (ptr, id, style, nrows, ncols)
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: id
|
||||
integer, intent(in) :: style
|
||||
integer, intent(out) :: nrows, ncols
|
||||
integer (C_int) :: Cstyle, Cnrows, Cncols
|
||||
character (kind=C_char), dimension(len_trim(id)+1) :: Cid
|
||||
Cid = string2Cstring (id)
|
||||
Cstyle = int (style, kind(Cstyle))
|
||||
call lammps_actual_extract_fix_arraysize (ptr, Cid, Cstyle, &
|
||||
Cnrows, Cncols)
|
||||
nrows = int (Cnrows, kind(nrows))
|
||||
ncols = int (Cncols, kind(ncols))
|
||||
end subroutine lammps_extract_fix_arraysize
|
||||
|
||||
!-----------------------------------------------------------------------------
|
||||
|
||||
subroutine lammps_error_all (ptr, file, line, str)
|
||||
type (C_ptr), intent(in) :: ptr
|
||||
character (len=*), intent(in) :: file, str
|
||||
integer, intent(in) :: line
|
||||
character (kind=C_char), dimension(len_trim(file)+1) :: Cfile
|
||||
character (kind=C_char), dimension(len_trim(str)+1) :: Cstr
|
||||
integer (C_int) :: Cline
|
||||
Cline = int(line, kind(Cline))
|
||||
Cfile = string2Cstring (file)
|
||||
Cstr = string2Cstring (str)
|
||||
call lammps_actual_error_all (ptr, Cfile, Cline, Cstr)
|
||||
end subroutine lammps_error_all
|
||||
|
||||
!-----------------------------------------------------------------------------
|
||||
|
||||
! Locally defined helper functions {{{1
|
||||
|
||||
pure function string2Cstring (string) result (C_string)
|
||||
use, intrinsic :: ISO_C_binding, only : C_char, C_NULL_CHAR
|
||||
character (len=*), intent(in) :: string
|
||||
character (len=1, kind=C_char) :: C_string (len_trim(string)+1)
|
||||
integer :: i, n
|
||||
n = len_trim (string)
|
||||
forall (i = 1:n)
|
||||
C_string(i) = string(i:i)
|
||||
end forall
|
||||
C_string(n+1) = C_NULL_CHAR
|
||||
end function string2Cstring
|
||||
|
||||
!-----------------------------------------------------------------------------
|
||||
|
||||
subroutine Cstring2argcargv (Cstring, argc, argv)
|
||||
!! Converts a C-style string to argc and argv, that is, words in Cstring
|
||||
!! become C-style strings in argv. IMPORTANT: Cstring is modified by
|
||||
!! this routine! I would make Cstring local TO this routine and accept
|
||||
!! a Fortran-style string instead, but we run into scoping and
|
||||
!! allocation problems that way. This routine assumes the string is
|
||||
!! null-terminated, as all C-style strings must be.
|
||||
|
||||
character (kind=C_char), dimension(*), target, intent(inout) :: Cstring
|
||||
integer (C_int), intent(out) :: argc
|
||||
type (C_ptr), dimension(:), allocatable, intent(out) :: argv
|
||||
|
||||
integer :: StringStart, SpaceIndex, strlen, argnum
|
||||
|
||||
argc = 1_C_int
|
||||
|
||||
! Find the length of the string
|
||||
strlen = 1
|
||||
do while ( Cstring(strlen) /= C_NULL_CHAR )
|
||||
strlen = strlen + 1
|
||||
end do
|
||||
|
||||
! Find the number of non-escaped spaces
|
||||
SpaceIndex = 2
|
||||
do while ( SpaceIndex < strlen )
|
||||
if ( Cstring(SpaceIndex) == ' ' .and. &
|
||||
Cstring(SpaceIndex-1) /= '\' ) then
|
||||
argc = argc + 1_C_int
|
||||
! Find the next non-space character
|
||||
do while ( Cstring(SpaceIndex+1) == ' ')
|
||||
SpaceIndex = SpaceIndex + 1
|
||||
end do
|
||||
end if
|
||||
SpaceIndex = SpaceIndex + 1
|
||||
end do
|
||||
|
||||
! Now allocate memory for argv
|
||||
allocate (argv(argc))
|
||||
|
||||
! Now find the string starting and ending locations
|
||||
StringStart = 1
|
||||
SpaceIndex = 2
|
||||
argnum = 1
|
||||
do while ( SpaceIndex < strlen )
|
||||
if ( Cstring(SpaceIndex) == ' ' .and. &
|
||||
Cstring(SpaceIndex-1) /= '\' ) then
|
||||
! Found a real space => split strings and store this one
|
||||
Cstring(Spaceindex) = C_NULL_CHAR ! Replaces space with NULL
|
||||
argv(argnum) = C_loc(Cstring(StringStart))
|
||||
argnum = argnum + 1
|
||||
! Find the next non-space character
|
||||
do while ( Cstring(SpaceIndex+1) == ' ')
|
||||
SpaceIndex = SpaceIndex + 1
|
||||
end do
|
||||
StringStart = SpaceIndex + 1
|
||||
else if ( Cstring(SpaceIndex) == ' ' .and. &
|
||||
Cstring(SpaceIndex-1) == '\' ) then
|
||||
! Escaped space => remove backslash and move rest of array
|
||||
Cstring(SpaceIndex-1:strlen-1) = Cstring(SpaceIndex:strlen)
|
||||
strlen = strlen - 1 ! Last character is still C_NULL_CHAR
|
||||
end if
|
||||
SpaceIndex = SpaceIndex + 1
|
||||
end do
|
||||
! Now handle the last argument
|
||||
argv(argnum) = C_loc(Cstring(StringStart))
|
||||
|
||||
end subroutine Cstring2argcargv
|
||||
|
||||
! 1}}}
|
||||
|
||||
end module LAMMPS
|
||||
|
||||
! vim: foldmethod=marker tabstop=3 softtabstop=3 shiftwidth=3 expandtab
|
||||
@ -1,37 +0,0 @@
|
||||
This directory has an example of using a callback function to obtain
|
||||
forces from a fortran code for a LAMMPS simulation. The reader should
|
||||
refer to the README file in COUPLE/fortran2 before proceeding. Here,
|
||||
the LAMMPS.F90 file has been modified slightly and additional files
|
||||
named LAMMPS-wrapper2.h and LAMMPS-wrapper2.cpp have been included in
|
||||
order to supply wrapper functions to set the LAMMPS callback function,
|
||||
total energy, virial, and electronic entropy contribution (needed for
|
||||
MSST simulations with a quantum code).
|
||||
|
||||
In this example, the callback function is set to run the
|
||||
semi-empirical quantum code DFTB+ in serial and then read in the total
|
||||
energy, forces, and stress tensor from file. In this case, nlocal =
|
||||
the total number of atoms in the system, so particle positions can be
|
||||
read from the pos array directly, and DFTB+ forces can simply be
|
||||
included via the fext array. The user should take care in the case of
|
||||
a parallel calculation, where LAMMPS can assign different particules
|
||||
to each processor. For example, the user should use functions such as
|
||||
lammps_gather_atoms() and lammps_scatter_atoms() in the case where the
|
||||
fortran force calculating code requires the positions of all atoms,
|
||||
etc.
|
||||
|
||||
A few more important notes:
|
||||
|
||||
-Calling the subroutine lammps_set_callback() is required in order to set
|
||||
a pointer to the callback function in LAMMPS.
|
||||
-The subroutine lammps_set_user_energy() passes in the potential energy
|
||||
from DFTB+ to LAMMPS. Similarly, lammps_set_user_virial passes the stress tensor.
|
||||
|
||||
-The electronic entropy contribution is set via lammps_set_external_vector(). Their needs
|
||||
to be a call to lammps_set_external_vector_length() before this value can be
|
||||
passed to LAMMPS.
|
||||
|
||||
This example was created by Nir Goldman, whom you can contact with
|
||||
questions:
|
||||
|
||||
Nir Goldman, LLNL
|
||||
ngoldman@llnl.gov
|
||||
@ -1,148 +0,0 @@
|
||||
# Position data file
|
||||
|
||||
64 atoms
|
||||
1 atom types
|
||||
|
||||
0 7.134 xlo xhi
|
||||
0 7.134 ylo yhi
|
||||
0 7.134 zlo zhi
|
||||
|
||||
0.00000000 0.00000000 0.00000000 xy xz yz
|
||||
|
||||
Masses
|
||||
|
||||
1 12.010000
|
||||
|
||||
Atoms
|
||||
|
||||
1 1 0 0 0 0
|
||||
2 1 0 0.89175 0.89175 0.89175
|
||||
3 1 0 1.7835 1.7835 0
|
||||
4 1 0 2.67525 2.67525 0.89175
|
||||
5 1 0 0 1.7835 1.7835
|
||||
6 1 0 0.89175 2.67525 2.67525
|
||||
7 1 0 1.7835 0 1.7835
|
||||
8 1 0 2.67525 0.89175 2.67525
|
||||
9 1 0 0 0 3.567
|
||||
10 1 0 0.89175 0.89175 4.45875
|
||||
11 1 0 1.7835 1.7835 3.567
|
||||
12 1 0 2.67525 2.67525 4.45875
|
||||
13 1 0 0 1.7835 5.3505
|
||||
14 1 0 0.89175 2.67525 6.24225
|
||||
15 1 0 1.7835 0 5.3505
|
||||
16 1 0 2.67525 0.89175 6.24225
|
||||
17 1 0 0 3.567 0
|
||||
18 1 0 0.89175 4.45875 0.89175
|
||||
19 1 0 1.7835 5.3505 0
|
||||
20 1 0 2.67525 6.24225 0.89175
|
||||
21 1 0 0 5.3505 1.7835
|
||||
22 1 0 0.89175 6.24225 2.67525
|
||||
23 1 0 1.7835 3.567 1.7835
|
||||
24 1 0 2.67525 4.45875 2.67525
|
||||
25 1 0 0 3.567 3.567
|
||||
26 1 0 0.89175 4.45875 4.45875
|
||||
27 1 0 1.7835 5.3505 3.567
|
||||
28 1 0 2.67525 6.24225 4.45875
|
||||
29 1 0 0 5.3505 5.3505
|
||||
30 1 0 0.89175 6.24225 6.24225
|
||||
31 1 0 1.7835 3.567 5.3505
|
||||
32 1 0 2.67525 4.45875 6.24225
|
||||
33 1 0 3.567 0 0
|
||||
34 1 0 4.45875 0.89175 0.89175
|
||||
35 1 0 5.3505 1.7835 0
|
||||
36 1 0 6.24225 2.67525 0.89175
|
||||
37 1 0 3.567 1.7835 1.7835
|
||||
38 1 0 4.45875 2.67525 2.67525
|
||||
39 1 0 5.3505 0 1.7835
|
||||
40 1 0 6.24225 0.89175 2.67525
|
||||
41 1 0 3.567 0 3.567
|
||||
42 1 0 4.45875 0.89175 4.45875
|
||||
43 1 0 5.3505 1.7835 3.567
|
||||
44 1 0 6.24225 2.67525 4.45875
|
||||
45 1 0 3.567 1.7835 5.3505
|
||||
46 1 0 4.45875 2.67525 6.24225
|
||||
47 1 0 5.3505 0 5.3505
|
||||
48 1 0 6.24225 0.89175 6.24225
|
||||
49 1 0 3.567 3.567 0
|
||||
50 1 0 4.45875 4.45875 0.89175
|
||||
51 1 0 5.3505 5.3505 0
|
||||
52 1 0 6.24225 6.24225 0.89175
|
||||
53 1 0 3.567 5.3505 1.7835
|
||||
54 1 0 4.45875 6.24225 2.67525
|
||||
55 1 0 5.3505 3.567 1.7835
|
||||
56 1 0 6.24225 4.45875 2.67525
|
||||
57 1 0 3.567 3.567 3.567
|
||||
58 1 0 4.45875 4.45875 4.45875
|
||||
59 1 0 5.3505 5.3505 3.567
|
||||
60 1 0 6.24225 6.24225 4.45875
|
||||
61 1 0 3.567 5.3505 5.3505
|
||||
62 1 0 4.45875 6.24225 6.24225
|
||||
63 1 0 5.3505 3.567 5.3505
|
||||
64 1 0 6.24225 4.45875 6.24225
|
||||
|
||||
Velocities
|
||||
|
||||
1 -0.00733742 -0.0040297 -0.00315229
|
||||
2 -0.00788609 -0.00567535 -0.00199152
|
||||
3 -0.00239042 0.00710139 -0.00335049
|
||||
4 0.00678551 0.0019976 0.00219289
|
||||
5 0.00413717 0.00275709 0.000937637
|
||||
6 -0.00126313 0.00485636 0.00727862
|
||||
7 0.00337547 -0.00234623 -0.000922223
|
||||
8 -0.00792183 -0.00509186 -0.00104168
|
||||
9 0.00414091 0.00390285 0.000845961
|
||||
10 -0.000284543 0.0010771 -0.00458404
|
||||
11 -0.00394968 -0.00446363 -0.00361688
|
||||
12 0.00067088 -0.00655175 -0.00752464
|
||||
13 0.00306632 -0.00245545 -0.00183867
|
||||
14 -0.0082145 -0.00564127 0.000281191
|
||||
15 0.00504454 0.0045835 0.000495763
|
||||
16 0.0035767 0.00320441 -0.00486426
|
||||
17 0.00420597 0.00262005 -0.0049459
|
||||
18 0.00440579 -1.76783e-05 0.00449311
|
||||
19 -0.00406463 0.00613304 0.00285599
|
||||
20 0.00171215 -0.00517887 0.00124326
|
||||
21 0.0011118 0.00334129 -0.0015222
|
||||
22 -0.00838394 -0.00112906 -0.00353379
|
||||
23 -0.00578527 -0.00415501 0.00297043
|
||||
24 -0.00211466 0.000964108 -0.00716523
|
||||
25 -0.000204107 -0.00380986 0.00681648
|
||||
26 0.00677838 0.00540935 0.0044354
|
||||
27 -0.00266809 -0.00358382 -0.00241889
|
||||
28 -0.0003973 0.00236566 0.00558871
|
||||
29 0.000754103 0.00457797 0.000105531
|
||||
30 -0.00246049 0.00110428 0.00511088
|
||||
31 0.00248891 0.00623314 0.00461597
|
||||
32 -0.00509423 0.000570503 0.00720856
|
||||
33 -0.00244427 -0.00374384 0.00618767
|
||||
34 -0.000360752 -8.10558e-05 0.00314052
|
||||
35 0.00435313 -0.00630587 -0.0070309
|
||||
36 0.00651087 -0.00389833 3.72525e-05
|
||||
37 0.00631828 -0.00316064 0.00231522
|
||||
38 -0.00579624 -0.00345068 -0.000277486
|
||||
39 0.00483974 0.000715028 0.000206355
|
||||
40 -0.00388164 -0.00189242 -0.00554862
|
||||
41 0.00398115 0.00152915 0.00756919
|
||||
42 -0.000552263 0.00352025 -0.000246143
|
||||
43 -0.00800284 0.00555703 0.00425716
|
||||
44 -0.00734405 -0.00752512 0.00667173
|
||||
45 -0.00545636 0.00421035 0.00399552
|
||||
46 0.00480246 0.00621147 -0.00492715
|
||||
47 -0.00424168 0.00621818 -9.37733e-05
|
||||
48 -0.00649561 0.00612908 -0.0020753
|
||||
49 -0.0075007 -0.00384737 -0.00687913
|
||||
50 -0.00203903 -0.00764372 0.0023883
|
||||
51 0.00442642 0.00744072 -0.0049344
|
||||
52 -0.00280486 -0.00509128 -0.00678045
|
||||
53 0.00679491 0.00583493 0.00333875
|
||||
54 0.00574665 -0.00521074 0.00523475
|
||||
55 0.00305618 -0.00320094 0.00341297
|
||||
56 0.004304 0.000615544 -0.00668787
|
||||
57 0.00564532 0.00327373 0.00388611
|
||||
58 0.000676899 0.00210326 0.00495295
|
||||
59 0.000160781 -0.00744313 -0.00279828
|
||||
60 0.00623521 0.00371301 0.00178015
|
||||
61 0.00520759 0.000642669 0.00207913
|
||||
62 0.00398042 0.0046438 -0.00359978
|
||||
63 -0.00478071 -0.00304932 -0.00765125
|
||||
64 0.00282671 -0.00548392 -0.00692691
|
||||
@ -1,40 +0,0 @@
|
||||
#sample DFTB+ script to run this test code
|
||||
Geometry = GenFormat {
|
||||
<<< "lammps.gen"
|
||||
}
|
||||
|
||||
Driver = {
|
||||
}
|
||||
|
||||
Hamiltonian = DFTB {
|
||||
LAMMPS = Yes # keyword to print energy, forces, and stress tensor to file(results.out)
|
||||
SCC = No
|
||||
MaxAngularMomentum = {
|
||||
C = "p"
|
||||
}
|
||||
Charge = 0.0
|
||||
Eigensolver = Standard {}
|
||||
Filling = Fermi {
|
||||
Temperature [Kelvin] = 298.0
|
||||
}
|
||||
SlaterKosterFiles = Type2FileNames {
|
||||
Prefix = "~/slako/mio-1-1/" # the user must define the location of the skf files
|
||||
Separator = "-"
|
||||
Suffix = ".skf"
|
||||
LowerCaseTypeName = No
|
||||
}
|
||||
KPointsAndWeights = {
|
||||
0.0000000000000 0.0000000000000 0.0000000000000 1.00000000000000
|
||||
}
|
||||
}
|
||||
|
||||
Options = {
|
||||
CalculateForces = Yes
|
||||
WriteDetailedOut = No
|
||||
WriteBandOut = No
|
||||
RandomSeed = 12345
|
||||
}
|
||||
|
||||
ParserOptions = {
|
||||
ParserVersion = 3
|
||||
}
|
||||
@ -1,129 +0,0 @@
|
||||
Geometry = GenFormat {
|
||||
64 S
|
||||
C
|
||||
1 1 7.099007 7.117657 7.119139
|
||||
2 1 0.858709 0.867233 0.882294
|
||||
3 1 1.772527 1.811776 7.120239
|
||||
4 1 2.702145 2.681271 0.901362
|
||||
5 1 0.017539 1.794455 1.788454
|
||||
6 1 0.885593 2.694118 2.707994
|
||||
7 1 1.795055 7.120787 1.777896
|
||||
8 1 2.642849 0.868278 2.670699
|
||||
9 1 0.016060 0.017156 3.568644
|
||||
10 1 0.891891 0.896406 4.439286
|
||||
11 1 1.766086 1.764402 3.550134
|
||||
12 1 2.677349 2.648926 4.427174
|
||||
13 1 0.010133 1.771283 5.342173
|
||||
14 1 0.858153 2.653565 6.241596
|
||||
15 1 1.804087 0.020636 5.353268
|
||||
16 1 2.689680 0.907188 6.224575
|
||||
17 1 0.017845 3.577563 7.113016
|
||||
18 1 0.910027 4.459286 0.910286
|
||||
19 1 1.766394 5.376046 0.015526
|
||||
20 1 2.683727 6.220728 0.898553
|
||||
21 1 0.003357 5.363423 1.774139
|
||||
22 1 0.856735 6.238324 2.660213
|
||||
23 1 1.761079 3.549776 1.797054
|
||||
24 1 2.667227 4.463441 2.646074
|
||||
25 1 7.132499 3.551558 3.599764
|
||||
26 1 0.920387 4.482191 4.479257
|
||||
27 1 1.772194 5.337132 3.555569
|
||||
28 1 2.675010 6.251629 4.483124
|
||||
29 1 0.005702 5.371095 5.351147
|
||||
30 1 0.880807 6.249819 6.264231
|
||||
31 1 1.793177 3.592396 5.369939
|
||||
32 1 2.653179 4.463595 6.274044
|
||||
33 1 3.557243 7.118913 0.026006
|
||||
34 1 4.458971 0.889331 0.904950
|
||||
35 1 5.367903 1.759757 7.104941
|
||||
36 1 6.271565 2.658454 0.890168
|
||||
37 1 3.591915 1.768681 1.793880
|
||||
38 1 4.435612 2.662184 2.676722
|
||||
39 1 5.371040 0.000196 1.783464
|
||||
40 1 6.226453 0.886640 2.653384
|
||||
41 1 3.583339 0.005449 3.600177
|
||||
42 1 4.453692 0.909417 4.459713
|
||||
43 1 5.314554 1.805409 3.584215
|
||||
44 1 6.210181 2.642660 4.486206
|
||||
45 1 3.545704 1.802745 5.365369
|
||||
46 1 4.476660 2.701226 6.220451
|
||||
47 1 5.332820 0.029557 5.347965
|
||||
48 1 6.215725 0.915081 6.230289
|
||||
49 1 3.536446 3.551469 7.106600
|
||||
50 1 4.451181 4.426439 0.900180
|
||||
51 1 5.368735 5.377996 7.109524
|
||||
52 1 6.230666 6.220985 0.862175
|
||||
53 1 3.596626 5.372822 1.797613
|
||||
54 1 4.485613 6.221252 2.699652
|
||||
55 1 5.364421 3.549838 1.796281
|
||||
56 1 6.261739 4.459046 2.648152
|
||||
57 1 3.588752 3.581054 3.581755
|
||||
58 1 4.462342 4.467270 4.478800
|
||||
59 1 5.355202 5.318323 3.556531
|
||||
60 1 6.268570 6.259831 4.465795
|
||||
61 1 3.588636 5.354278 5.362327
|
||||
62 1 4.475747 6.263866 6.227803
|
||||
63 1 5.331158 3.554349 5.318368
|
||||
64 1 6.254581 4.436344 6.209681
|
||||
0.0 0.0 0.0
|
||||
7.13400000000000 0 0
|
||||
0 7.13400000000000 0
|
||||
0 0 7.13400000000000
|
||||
}
|
||||
Driver = {}
|
||||
Hamiltonian = DFTB {
|
||||
LAMMPS = Yes
|
||||
SCC = No
|
||||
MaxAngularMomentum = {
|
||||
C = "p"
|
||||
}
|
||||
Charge = 0.0
|
||||
Eigensolver = Standard {}
|
||||
Filling = Fermi {
|
||||
Temperature [Kelvin] = 298.0
|
||||
IndependentKFilling = No
|
||||
}
|
||||
SlaterKosterFiles = Type2FileNames {
|
||||
Prefix = "~/slako/mio-1-1/"
|
||||
Separator = "-"
|
||||
Suffix = ".skf"
|
||||
LowerCaseTypeName = No
|
||||
}
|
||||
KPointsAndWeights = {
|
||||
0.0000000000000 0.0000000000000 0.0000000000000 1.00000000000000
|
||||
}
|
||||
PolynomialRepulsive = {}
|
||||
OldRepulsiveSum = No
|
||||
OrbitalResolvedSCC = No
|
||||
OldSKInterpolation = No
|
||||
NoErep = No
|
||||
Dispersion = {}
|
||||
ThirdOrder = No
|
||||
ThirdOrderFull = No
|
||||
}
|
||||
Options = {
|
||||
CalculateForces = Yes
|
||||
WriteDetailedOut = No
|
||||
WriteBandOut = No
|
||||
RandomSeed = 12345
|
||||
MullikenAnalysis = No
|
||||
WriteEigenvectors = No
|
||||
WriteAutotestTag = No
|
||||
WriteDetailedXML = No
|
||||
WriteResultsTag = No
|
||||
AtomResolvedEnergies = No
|
||||
WriteHS = No
|
||||
WriteRealHS = No
|
||||
MinimiseMemoryUsage = No
|
||||
ShowFoldedCoords = No
|
||||
}
|
||||
ParserOptions = {
|
||||
ParserVersion = 3
|
||||
WriteHSDInput = Yes
|
||||
WriteXMLInput = No
|
||||
StopAfterParsing = No
|
||||
IgnoreUnprocessedNodes = No
|
||||
}
|
||||
Analysis = {
|
||||
ProjectStates = {}
|
||||
}
|
||||
@ -1,16 +0,0 @@
|
||||
units real
|
||||
atom_style charge
|
||||
atom_modify map array
|
||||
atom_modify sort 0 0.0
|
||||
read_data data.diamond
|
||||
neighbor 1.0 bin
|
||||
neigh_modify delay 0 every 5 check no
|
||||
fix 1 all nve
|
||||
fix 2 all external pf/callback 1 1
|
||||
|
||||
fix_modify 2 energy yes
|
||||
thermo_style custom step temp etotal ke pe lx ly lz pxx pyy pzz press
|
||||
|
||||
thermo 1
|
||||
timestep 0.5
|
||||
|
||||
@ -1,71 +0,0 @@
|
||||
LAMMPS (6 Jul 2017)
|
||||
units real
|
||||
atom_style charge
|
||||
atom_modify map array
|
||||
atom_modify sort 0 0.0
|
||||
read_data data.diamond
|
||||
triclinic box = (0 0 0) to (7.134 7.134 7.134) with tilt (0 0 0)
|
||||
1 by 1 by 1 MPI processor grid
|
||||
reading atoms ...
|
||||
64 atoms
|
||||
reading velocities ...
|
||||
64 velocities
|
||||
neighbor 1.0 bin
|
||||
neigh_modify delay 0 every 5 check no
|
||||
fix 1 all nve
|
||||
fix 2 all external pf/callback 1 1
|
||||
|
||||
fix_modify 2 energy yes
|
||||
thermo_style custom step temp etotal ke pe lx ly lz pxx pyy pzz press
|
||||
|
||||
thermo 1
|
||||
timestep 0.5
|
||||
|
||||
run 10
|
||||
Neighbor list info ...
|
||||
update every 5 steps, delay 0 steps, check no
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 0
|
||||
ghost atom cutoff = 0
|
||||
binsize = 7.134, bins = 1 1 1
|
||||
0 neighbor lists, perpetual/occasional/extra = 0 0 0
|
||||
Per MPI rank memory allocation (min/avg/max) = 2.3 | 2.3 | 2.3 Mbytes
|
||||
Step Temp TotEng KinEng PotEng Lx Ly Lz Pxx Pyy Pzz Press
|
||||
0 298.24835 -69593.587 56.008365 -69649.595 7.134 7.134 7.134 -19980.19 -21024.038 -21097.458 -20700.562
|
||||
1 295.24358 -69593.585 55.444098 -69649.029 7.134 7.134 7.134 -19778.833 -20799.657 -20854.156 -20477.549
|
||||
2 286.37211 -69593.58 53.778115 -69647.358 7.134 7.134 7.134 -19227.52 -20177.28 -20176.12 -19860.306
|
||||
3 272.062 -69593.572 51.090804 -69644.663 7.134 7.134 7.134 -18360.869 -19189.684 -19100.021 -18883.525
|
||||
4 253.01834 -69593.561 47.514575 -69641.075 7.134 7.134 7.134 -17198.143 -17855.03 -17652.036 -17568.403
|
||||
5 230.19242 -69593.547 43.228073 -69636.775 7.134 7.134 7.134 -15750.247 -16183.764 -15854.145 -15929.386
|
||||
6 204.71787 -69593.533 38.44418 -69631.977 7.134 7.134 7.134 -14083.498 -14247.434 -13789.835 -14040.256
|
||||
7 177.82397 -69593.518 33.393748 -69626.911 7.134 7.134 7.134 -12340.963 -12202.878 -11623.171 -12055.671
|
||||
8 150.76736 -69593.503 28.312758 -69621.816 7.134 7.134 7.134 -10637.824 -10180.827 -9495.0496 -10104.567
|
||||
9 124.7737 -69593.49 23.431383 -69616.921 7.134 7.134 7.134 -9113.3842 -8339.0492 -7572.8076 -8341.747
|
||||
10 100.98183 -69593.478 18.963481 -69612.442 7.134 7.134 7.134 -7833.9349 -6756.9749 -5945.8968 -6845.6022
|
||||
Loop time of 2.20497 on 1 procs for 10 steps with 64 atoms
|
||||
|
||||
Performance: 0.196 ns/day, 122.499 hours/ns, 4.535 timesteps/s
|
||||
0.2% 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 | 0 | 0 | 0.0 | 0.00
|
||||
Neigh | 1.4305e-06 | 1.4305e-06 | 1.4305e-06 | 0.0 | 0.00
|
||||
Comm | 4.22e-05 | 4.22e-05 | 4.22e-05 | 0.0 | 0.00
|
||||
Output | 0.00067687 | 0.00067687 | 0.00067687 | 0.0 | 0.03
|
||||
Modify | 2.2042 | 2.2042 | 2.2042 | 0.0 | 99.96
|
||||
Other | | 6.533e-05 | | | 0.00
|
||||
|
||||
Nlocal: 64 ave 64 max 64 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 0 ave 0 max 0 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
|
||||
Neighbor list builds = 2
|
||||
Dangerous builds not checked
|
||||
Total wall time: 0:00:02
|
||||
@ -1,45 +0,0 @@
|
||||
SHELL = /bin/sh
|
||||
|
||||
# Path to LAMMPS extraction directory
|
||||
LAMMPS_ROOT = ../../..
|
||||
LAMMPS_SRC = $(LAMMPS_ROOT)/src
|
||||
|
||||
# Uncomment the line below if using the MPI stubs library
|
||||
MPI_STUBS = #-I$(LAMMPS_SRC)/STUBS
|
||||
|
||||
FC = mpif90 # replace with your Fortran compiler
|
||||
CXX = mpicc # replace with your C++ compiler
|
||||
|
||||
# Flags for Fortran compiler, C++ compiler, and C preprocessor, respectively
|
||||
FFLAGS = -O2 -fPIC
|
||||
CXXFLAGS = -O2 -fPIC
|
||||
CPPFLAGS = -DOMPI_SKIP_MPICXX=1 -DMPICH_SKIP_MPICXX
|
||||
|
||||
all : liblammps_fortran.a liblammps_fortran.so simpleF.x
|
||||
|
||||
liblammps_fortran.so : LAMMPS.o LAMMPS-wrapper.o LAMMPS-wrapper2.o
|
||||
$(FC) $(FFLAGS) -shared -o $@ $^
|
||||
|
||||
simpleF.x: simple.o LAMMPS.o LAMMPS-wrapper.o LAMMPS-wrapper2.o
|
||||
$(FC) $(FFLAGS) simple.o -o simpleF.x liblammps_fortran.a $(LAMMPS_SRC)/liblammps_mvapich.a -lstdc++ /usr/lib64/libfftw3.a
|
||||
|
||||
liblammps_fortran.a : LAMMPS.o LAMMPS-wrapper.o LAMMPS-wrapper2.o
|
||||
$(AR) rs $@ $^
|
||||
|
||||
LAMMPS.o lammps.mod : LAMMPS.F90
|
||||
$(FC) $(CPPFLAGS) $(FFLAGS) -c $<
|
||||
|
||||
simple.o : simple.f90
|
||||
$(FC) $(FFLAGS) -c $<
|
||||
|
||||
LAMMPS-wrapper.o : LAMMPS-wrapper.cpp LAMMPS-wrapper.h
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -I$(LAMMPS_SRC) $(MPI_STUBS)
|
||||
|
||||
LAMMPS-wrapper2.o : LAMMPS-wrapper2.cpp LAMMPS-wrapper2.h
|
||||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -I$(LAMMPS_SRC) $(MPI_STUBS)
|
||||
|
||||
clean :
|
||||
$(RM) *.o *.mod liblammps_fortran.a liblammps_fortran.so
|
||||
|
||||
dist :
|
||||
tar -czvf fortran-interface-callback.tar.gz LAMMPS-wrapper.h LAMMPS-wrapper.cpp LAMMPS-wrapper2.h LAMMPS-wrapper2.cpp LAMMPS.F90 makefile README simple.f90
|
||||
@ -1,110 +0,0 @@
|
||||
module callback
|
||||
implicit none
|
||||
contains
|
||||
subroutine fortran_callback(lmp, timestep, nlocal, ids, c_pos, c_fext) &
|
||||
& bind(C, name='f_callback')
|
||||
use, intrinsic :: ISO_C_binding
|
||||
use LAMMPS
|
||||
implicit none
|
||||
type (C_ptr), value :: lmp
|
||||
integer(C_int64_t), intent(in), value :: timestep
|
||||
integer(C_int), intent(in), value :: nlocal
|
||||
real (C_double), dimension(:,:), pointer :: x
|
||||
type(c_ptr) :: c_pos, c_fext, c_ids
|
||||
double precision, pointer :: fext(:,:), pos(:,:)
|
||||
integer, intent(in) :: ids(nlocal)
|
||||
real(C_double) :: virial(6)
|
||||
real (C_double) :: etot
|
||||
real(C_double), pointer :: ts_lmp
|
||||
double precision :: stress(3,3), ts_dftb
|
||||
integer :: natom , i
|
||||
real (C_double), parameter :: econv = 627.4947284155114 ! converts from Ha to
|
||||
double precision, parameter :: fconv = 1185.793095983065 ! converts from Ha/bohr to
|
||||
double precision, parameter :: autoatm = 2.9037166638E8
|
||||
double precision lx, ly, lz
|
||||
real (C_double), pointer :: boxxlo, boxxhi
|
||||
real (C_double), pointer :: boxylo, boxyhi
|
||||
real (C_double), pointer :: boxzlo, boxzhi
|
||||
double precision, parameter :: nktv2p = 68568.4149999999935972
|
||||
double precision :: volume
|
||||
type (C_ptr) :: Cptr
|
||||
type (C_ptr), pointer, dimension(:) :: Catom
|
||||
|
||||
call c_f_pointer(c_pos, pos, [3,nlocal])
|
||||
call c_f_pointer(c_fext, fext, [3,nlocal])
|
||||
call lammps_extract_global(boxxlo, lmp, 'boxxlo')
|
||||
call lammps_extract_global(boxxhi, lmp, 'boxxhi')
|
||||
call lammps_extract_global(boxylo, lmp, 'boxylo')
|
||||
call lammps_extract_global(boxyhi, lmp, 'boxyhi')
|
||||
call lammps_extract_global(boxzlo, lmp, 'boxzlo')
|
||||
call lammps_extract_global(boxzhi, lmp, 'boxzhi')
|
||||
lx = boxxhi - boxxlo
|
||||
ly = boxyhi - boxylo
|
||||
lz = boxzhi - boxzlo
|
||||
volume = lx*ly*lz
|
||||
open (unit = 10, status = 'replace', action = 'write', file='lammps.gen')
|
||||
write(10,*)nlocal,"S"
|
||||
write(10,*) "C"
|
||||
do i = 1, nlocal
|
||||
write(10,'(2I,3F15.6)')i,1,pos(:,ids(i))
|
||||
enddo
|
||||
write(10,*)"0.0 0.0 0.0"
|
||||
write(10,*)lx,0,0
|
||||
write(10,*)0,ly,0
|
||||
write(10,*)0,0,lz
|
||||
close(10)
|
||||
call system("./dftb+ > dftb.out")
|
||||
open (unit = 10, status = 'old', file = 'results.out')
|
||||
read(10,*)etot
|
||||
read(10,*)ts_dftb
|
||||
do i = 1, 3
|
||||
read(10,*)stress(i,:)
|
||||
enddo
|
||||
stress (:,:) = stress(:,:)*autoatm
|
||||
virial(1) = stress(1,1)/(nktv2p/volume)
|
||||
virial(2) = stress(2,2)/(nktv2p/volume)
|
||||
virial(3) = stress(3,3)/(nktv2p/volume)
|
||||
virial(4) = stress(1,2)/(nktv2p/volume)
|
||||
virial(5) = stress(1,3)/(nktv2p/volume)
|
||||
virial(6) = stress(2,3)/(nktv2p/volume)
|
||||
etot = etot*econv
|
||||
call lammps_set_external_vector(lmp,1,ts_dftb*econv)
|
||||
do i = 1, nlocal
|
||||
read(10,*)fext(:,ids(i))
|
||||
fext(:,ids(i)) = fext(:,ids(i))*fconv
|
||||
enddo
|
||||
close(10)
|
||||
call lammps_set_user_energy (lmp, etot)
|
||||
call lammps_set_user_virial (lmp, virial)
|
||||
|
||||
end subroutine
|
||||
end module callback
|
||||
|
||||
|
||||
program simple_fortran_callback
|
||||
|
||||
use MPI
|
||||
use LAMMPS
|
||||
use callback
|
||||
use, intrinsic :: ISO_C_binding, only : C_double, C_ptr, C_int, C_FUNPTR
|
||||
implicit none
|
||||
type (C_ptr) :: lmp
|
||||
integer :: error, narg, me, nprocs
|
||||
|
||||
call MPI_Init (error)
|
||||
call MPI_Comm_rank (MPI_COMM_WORLD, me, error)
|
||||
call MPI_Comm_size (MPI_COMM_WORLD, nprocs, error)
|
||||
|
||||
call lammps_open_no_mpi ('lmp -log log.simple', lmp)
|
||||
call lammps_file (lmp, 'in.simple')
|
||||
call lammps_set_callback(lmp)
|
||||
call lammps_set_external_vector_length(lmp,2)
|
||||
|
||||
call lammps_command (lmp, 'run 10')
|
||||
call lammps_close (lmp)
|
||||
call MPI_Finalize (error)
|
||||
|
||||
|
||||
end program simple_fortran_callback
|
||||
|
||||
|
||||
@ -1,47 +0,0 @@
|
||||
# Makefile for MD with quantum forces via LAMMPS <-> Quest coupling
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
# System-specific settings
|
||||
|
||||
LAMMPS = /home/sjplimp/lammps
|
||||
|
||||
CC = g++
|
||||
CCFLAGS = -g -O -DMPICH_IGNORE_CXX_SEEK -I../library
|
||||
DEPFLAGS = -M
|
||||
LINK = g++
|
||||
LINKFLAGS = -g -O -L../library -L${LAMMPS}/src
|
||||
USRLIB = -lcouple -llammps_g++
|
||||
SYSLIB = -lfftw -lmpich -lpthread
|
||||
ARCHIVE = ar
|
||||
ARFLAGS = -rc
|
||||
SIZE = size
|
||||
|
||||
# Files
|
||||
|
||||
EXE = lmpqst
|
||||
SRC = $(wildcard *.cpp)
|
||||
INC = $(wildcard *.h)
|
||||
OBJ = $(SRC:.cpp=.o)
|
||||
|
||||
# Targets
|
||||
|
||||
$(EXE): $(OBJ)
|
||||
$(LINK) $(LINKFLAGS) $(OBJ) $(USRLIB) $(SYSLIB) -o $(EXE)
|
||||
$(SIZE) $(EXE)
|
||||
|
||||
clean:
|
||||
rm $(EXE) *.o
|
||||
|
||||
# Compilation rules
|
||||
|
||||
%.o:%.cpp
|
||||
$(CC) $(CCFLAGS) -c $<
|
||||
|
||||
%.d:%.cpp
|
||||
$(CC) $(CCFLAGS) $(DEPFLAGS) $< > $@
|
||||
|
||||
# Individual dependencies
|
||||
|
||||
DEPENDS = $(OBJ:.o=.d)
|
||||
include $(DEPENDS)
|
||||
@ -1,70 +0,0 @@
|
||||
IMPORTANT NOTE: This example has not been updated since 2014,
|
||||
so it is not likely to work anymore out of the box. There have
|
||||
been changes to LAMMPS and its library interface that would need
|
||||
to be applied. Please see the manual for the documentation of
|
||||
the library interface.
|
||||
|
||||
This directory has an application that runs classical MD via LAMMPS,
|
||||
but uses quantum forces calculated by the Quest DFT (density
|
||||
functional) code in place of the usual classical MD forces calculated
|
||||
by a pair style in LAMMPS.
|
||||
|
||||
lmpqst.cpp main program
|
||||
it links LAMMPS as a library
|
||||
it invokes Quest as an executable
|
||||
in.lammps LAMMPS input script, without the run command
|
||||
si_111.in Quest input script for an 8-atom Si unit cell
|
||||
lmppath.h contains path to LAMMPS home directory
|
||||
qstexe.h contains full pathname to Quest executable
|
||||
|
||||
After editing the Makefile, lmppath.h, and qstexe.h to make them
|
||||
suitable for your box, type:
|
||||
|
||||
make -f Makefile.g++
|
||||
|
||||
and you should get the lmpqst executable.
|
||||
|
||||
NOTE: To run this coupled application, you must of course, have Quest
|
||||
built on your system. It's WWW site is http://dft.sandia.gov/Quest.
|
||||
It is not an open-source code, buy you can contact its authors to
|
||||
obtain a copy.
|
||||
|
||||
You can run lmpqst in serial or parallel as:
|
||||
|
||||
% lmpqst Niter in.lammps in.quest
|
||||
% mpirun -np 4 lmpqst Niter in.lammps in.quest
|
||||
|
||||
where
|
||||
|
||||
Niter = # of MD iterations
|
||||
in.lammps = LAMMPS input script
|
||||
in.quest = Quest input script
|
||||
|
||||
The log files are for this run:
|
||||
|
||||
% lmpqst 10 in.lammps si_111.in
|
||||
|
||||
This application is an example of a coupling where the driver code
|
||||
(lmpqst) runs one code (LAMMPS) as an outer code and facilitates it
|
||||
calling the other code (Quest) as an inner code. Specifically, the
|
||||
driver (lmpqst) invokes one code (LAMMPS) to perform its timestep
|
||||
loop, and grabs information from the other code (Quest) during its
|
||||
timestep. This is done in LAMMPS using the fix external command,
|
||||
which makes a "callback" to the driver application (lmpqst), which in
|
||||
turn invokes Quest with new atom coordinates, lets Quest compute
|
||||
forces, and returns those forces to the LAMMPS fix external.
|
||||
|
||||
The driver code launches LAMMPS in parallel. But Quest is only run on
|
||||
a single processor. It would be possible to change this by using a
|
||||
parallel build of Quest.
|
||||
|
||||
Since Quest does not currently have a library interface, the driver
|
||||
code interfaces with Quest via input and output files.
|
||||
|
||||
Note that essentially 100% of the run time for this coupled
|
||||
application is spent in Quest, as the quantum calculation of forces
|
||||
dominates the calculation.
|
||||
|
||||
You can look at the log files in the directory to see sample LAMMPS
|
||||
output for this simulation. Dump files produced by LAMMPS are stored
|
||||
as dump.md.
|
||||
@ -1,20 +0,0 @@
|
||||
# LAMMPS input for coupling MD/Quantum
|
||||
|
||||
units metal
|
||||
dimension 3
|
||||
atom_style atomic
|
||||
atom_modify sort 0 0.0
|
||||
|
||||
lattice diamond 5.43
|
||||
region box block 0 1 0 1 0 1
|
||||
create_box 1 box
|
||||
create_atoms 1 box
|
||||
mass 1 28.08
|
||||
|
||||
velocity all create 300.0 87293 loop geom
|
||||
|
||||
fix 1 all nve
|
||||
fix 2 all external pf/callback 1 1
|
||||
|
||||
dump 1 all custom 1 dump.md id type x y z fx fy fz
|
||||
thermo 1
|
||||
@ -1 +0,0 @@
|
||||
#define LMPPATH /home/sjplimp/lammps
|
||||
@ -1,270 +0,0 @@
|
||||
// lmpqst = umbrella driver to couple LAMMPS + Quest
|
||||
// for MD using quantum forces
|
||||
|
||||
// Syntax: lmpqst Niter in.lammps in.quest
|
||||
// Niter = # of MD iterations
|
||||
// in.lammps = LAMMPS input script
|
||||
// in.quest = Quest input script
|
||||
|
||||
#include <mpi.h>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include "stdint.h"
|
||||
|
||||
#include "many2one.h"
|
||||
#include "one2many.h"
|
||||
#include "files.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
|
||||
#define QUOTE_(x) #x
|
||||
#define QUOTE(x) QUOTE_(x)
|
||||
|
||||
#include "lmppath.h"
|
||||
#include QUOTE(LMPPATH/src/lammps.h)
|
||||
#include QUOTE(LMPPATH/src/library.h)
|
||||
#include QUOTE(LMPPATH/src/input.h)
|
||||
#include QUOTE(LMPPATH/src/modify.h)
|
||||
#include QUOTE(LMPPATH/src/fix.h)
|
||||
#include QUOTE(LMPPATH/src/fix_external.h)
|
||||
|
||||
#include "qstexe.h"
|
||||
|
||||
using namespace LAMMPS_NS;
|
||||
|
||||
#define ANGSTROM_per_BOHR 0.529
|
||||
#define EV_per_RYDBERG 13.6056923
|
||||
|
||||
void quest_callback(void *, bigint, int, int *, double **, double **);
|
||||
|
||||
struct Info {
|
||||
int me;
|
||||
Memory *memory;
|
||||
LAMMPS *lmp;
|
||||
char *quest_input;
|
||||
};
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
int main(int narg, char **arg)
|
||||
{
|
||||
int n;
|
||||
char str[128];
|
||||
|
||||
// setup MPI
|
||||
|
||||
MPI_Init(&narg,&arg);
|
||||
MPI_Comm comm = MPI_COMM_WORLD;
|
||||
|
||||
int me,nprocs;
|
||||
MPI_Comm_rank(comm,&me);
|
||||
MPI_Comm_size(comm,&nprocs);
|
||||
|
||||
Memory *memory = new Memory(comm);
|
||||
Error *error = new Error(comm);
|
||||
|
||||
// command-line args
|
||||
|
||||
if (narg != 4) error->all("Syntax: lmpqst Niter in.lammps in.quest");
|
||||
|
||||
int niter = atoi(arg[1]);
|
||||
n = strlen(arg[2]) + 1;
|
||||
char *lammps_input = new char[n];
|
||||
strcpy(lammps_input,arg[2]);
|
||||
n = strlen(arg[3]) + 1;
|
||||
char *quest_input = new char[n];
|
||||
strcpy(quest_input,arg[3]);
|
||||
|
||||
// instantiate LAMMPS
|
||||
|
||||
LAMMPS *lmp = new LAMMPS(0,NULL,MPI_COMM_WORLD);
|
||||
|
||||
// create simulation in LAMMPS from in.lammps
|
||||
|
||||
lmp->input->file(lammps_input);
|
||||
|
||||
// make info available to callback function
|
||||
|
||||
Info info;
|
||||
info.me = me;
|
||||
info.memory = memory;
|
||||
info.lmp = lmp;
|
||||
info.quest_input = quest_input;
|
||||
|
||||
// set callback to Quest inside fix external
|
||||
// this could also be done thru Python, using a ctypes callback
|
||||
|
||||
int ifix = lmp->modify->find_fix("2");
|
||||
FixExternal *fix = (FixExternal *) lmp->modify->fix[ifix];
|
||||
fix->set_callback(quest_callback,&info);
|
||||
|
||||
// run LAMMPS for Niter
|
||||
// each time it needs forces, it will invoke quest_callback
|
||||
|
||||
sprintf(str,"run %d",niter);
|
||||
lmp->input->one(str);
|
||||
|
||||
// clean up
|
||||
|
||||
delete lmp;
|
||||
|
||||
delete memory;
|
||||
delete error;
|
||||
|
||||
delete [] lammps_input;
|
||||
delete [] quest_input;
|
||||
|
||||
MPI_Finalize();
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
callback to Quest with atom IDs and coords from each proc
|
||||
invoke Quest to compute forces, load them into f for LAMMPS to use
|
||||
f can be NULL if proc owns no atoms
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void quest_callback(void *ptr, bigint ntimestep,
|
||||
int nlocal, int *id, double **x, double **f)
|
||||
{
|
||||
int i,j;
|
||||
char str[128];
|
||||
|
||||
Info *info = (Info *) ptr;
|
||||
|
||||
// boxlines = LAMMPS box size converted into Quest lattice vectors
|
||||
|
||||
char **boxlines = NULL;
|
||||
if (info->me == 0) {
|
||||
boxlines = new char*[3];
|
||||
for (i = 0; i < 3; i++) boxlines[i] = new char[128];
|
||||
}
|
||||
|
||||
double boxxlo = *((double *) lammps_extract_global(info->lmp,"boxxlo"));
|
||||
double boxxhi = *((double *) lammps_extract_global(info->lmp,"boxxhi"));
|
||||
double boxylo = *((double *) lammps_extract_global(info->lmp,"boxylo"));
|
||||
double boxyhi = *((double *) lammps_extract_global(info->lmp,"boxyhi"));
|
||||
double boxzlo = *((double *) lammps_extract_global(info->lmp,"boxzlo"));
|
||||
double boxzhi = *((double *) lammps_extract_global(info->lmp,"boxzhi"));
|
||||
double boxxy = *((double *) lammps_extract_global(info->lmp,"xy"));
|
||||
double boxxz = *((double *) lammps_extract_global(info->lmp,"xz"));
|
||||
double boxyz = *((double *) lammps_extract_global(info->lmp,"yz"));
|
||||
|
||||
double xprd = (boxxhi-boxxlo)/ANGSTROM_per_BOHR;
|
||||
double yprd = (boxyhi-boxylo)/ANGSTROM_per_BOHR;
|
||||
double zprd = (boxzhi-boxzlo)/ANGSTROM_per_BOHR;
|
||||
double xy = boxxy/ANGSTROM_per_BOHR;
|
||||
double xz = boxxz/ANGSTROM_per_BOHR;
|
||||
double yz = boxyz/ANGSTROM_per_BOHR;
|
||||
|
||||
if (info->me == 0) {
|
||||
sprintf(boxlines[0],"%g %g %g\n",xprd,0.0,0.0);
|
||||
sprintf(boxlines[1],"%g %g %g\n",xy,yprd,0.0);
|
||||
sprintf(boxlines[2],"%g %g %g\n",xz,yz,zprd);
|
||||
}
|
||||
|
||||
// xlines = x for atoms on each proc converted to text lines
|
||||
// xlines is suitable for insertion into Quest input file
|
||||
// convert LAMMPS Angstroms to Quest bohr
|
||||
|
||||
int natoms;
|
||||
MPI_Allreduce(&nlocal,&natoms,1,MPI_INT,MPI_SUM,MPI_COMM_WORLD);
|
||||
|
||||
Many2One *lmp2qst = new Many2One(MPI_COMM_WORLD);
|
||||
lmp2qst->setup(nlocal,id,natoms);
|
||||
|
||||
char **xlines = NULL;
|
||||
double **xquest = NULL;
|
||||
if (info->me == 0) {
|
||||
xquest = info->memory->create_2d_double_array(natoms,3,"lmpqst:xquest");
|
||||
xlines = new char*[natoms];
|
||||
for (i = 0; i < natoms; i++) xlines[i] = new char[128];
|
||||
}
|
||||
|
||||
if (info->me == 0) lmp2qst->gather(&x[0][0],3,&xquest[0][0]);
|
||||
else lmp2qst->gather(&x[0][0],3,NULL);
|
||||
|
||||
if (info->me == 0) {
|
||||
for (i = 0; i < natoms; i++) {
|
||||
xquest[i][0] /= ANGSTROM_per_BOHR;
|
||||
xquest[i][1] /= ANGSTROM_per_BOHR;
|
||||
xquest[i][2] /= ANGSTROM_per_BOHR;
|
||||
}
|
||||
for (i = 0; i < natoms; i++) {
|
||||
sprintf(xlines[i],"%d %d %g %g %g\n",i+1,1,
|
||||
xquest[i][0],xquest[i][1],xquest[i][2]);
|
||||
}
|
||||
}
|
||||
|
||||
// one-processor tasks:
|
||||
// whack all lcao.* files
|
||||
// cp quest_input to lcao.in
|
||||
// replace atom coords section of lcao.in with new atom coords
|
||||
// run Quest on one proc, save screen output to file
|
||||
// flines = atom forces extracted from Quest screen file
|
||||
// fquest = atom forces
|
||||
// convert Quest Ryd/bohr to LAMMPS eV/Angstrom
|
||||
|
||||
char **flines = NULL;
|
||||
double **fquest = NULL;
|
||||
if (info->me == 0) {
|
||||
fquest = info->memory->create_2d_double_array(natoms,3,"lmpqst:fquest");
|
||||
flines = new char*[natoms];
|
||||
for (i = 0; i < natoms; i++) flines[i] = new char[128];
|
||||
}
|
||||
|
||||
if (info->me == 0) {
|
||||
system("rm lcao.*");
|
||||
sprintf(str,"cp %s lcao.in",info->quest_input);
|
||||
system(str);
|
||||
sprintf(str,"cp %s lcao.x",QUOTE(QUEST));
|
||||
system(str);
|
||||
replace("lcao.in","primitive lattice vectors",3,boxlines);
|
||||
replace("lcao.in","atom, type, position vector",natoms,xlines);
|
||||
system("lcao.x > lcao.screen");
|
||||
extract("lcao.screen","atom x force "
|
||||
"y force z force",natoms,flines);
|
||||
|
||||
int itmp;
|
||||
for (i = 0; i < natoms; i++)
|
||||
sscanf(flines[i],"%d %lg %lg %lg",&itmp,
|
||||
&fquest[i][0],&fquest[i][1],&fquest[i][2]);
|
||||
|
||||
for (i = 0; i < natoms; i++) {
|
||||
fquest[i][0] *= EV_per_RYDBERG / ANGSTROM_per_BOHR;
|
||||
fquest[i][1] *= EV_per_RYDBERG / ANGSTROM_per_BOHR;
|
||||
fquest[i][2] *= EV_per_RYDBERG / ANGSTROM_per_BOHR;
|
||||
}
|
||||
}
|
||||
|
||||
// convert fquest on one proc into f for atoms on each proc
|
||||
|
||||
One2Many *qst2lmp = new One2Many(MPI_COMM_WORLD);
|
||||
qst2lmp->setup(natoms,nlocal,id);
|
||||
double *fvec = NULL;
|
||||
if (f) fvec = &f[0][0];
|
||||
if (info->me == 0) qst2lmp->scatter(&fquest[0][0],3,fvec);
|
||||
else qst2lmp->scatter(NULL,3,fvec);
|
||||
|
||||
// clean up
|
||||
// some data only exists on proc 0
|
||||
|
||||
delete lmp2qst;
|
||||
delete qst2lmp;
|
||||
|
||||
info->memory->destroy_2d_double_array(xquest);
|
||||
info->memory->destroy_2d_double_array(fquest);
|
||||
|
||||
if (boxlines) {
|
||||
for (i = 0; i < 3; i++) delete [] boxlines[i];
|
||||
delete [] boxlines;
|
||||
}
|
||||
if (xlines) {
|
||||
for (i = 0; i < natoms; i++) delete [] xlines[i];
|
||||
delete [] xlines;
|
||||
}
|
||||
if (flines) {
|
||||
for (i = 0; i < natoms; i++) delete [] flines[i];
|
||||
delete [] flines;
|
||||
}
|
||||
}
|
||||
@ -1,58 +0,0 @@
|
||||
LAMMPS (20 Sep 2010)
|
||||
# LAMMPS input for coupling MD/Quantum
|
||||
|
||||
units metal
|
||||
dimension 3
|
||||
atom_style atomic
|
||||
atom_modify sort 0 0.0
|
||||
|
||||
lattice diamond 5.43
|
||||
Lattice spacing in x,y,z = 5.43 5.43 5.43
|
||||
region box block 0 1 0 1 0 1
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0 0 0) to (5.43 5.43 5.43)
|
||||
1 by 1 by 1 processor grid
|
||||
create_atoms 1 box
|
||||
Created 8 atoms
|
||||
mass 1 28.08
|
||||
|
||||
velocity all create 300.0 87293 loop geom
|
||||
|
||||
fix 1 all nve
|
||||
fix 2 all external
|
||||
|
||||
dump 1 all custom 1 dump.md id type x y z fx fy fz
|
||||
thermo 1
|
||||
run 10
|
||||
Memory usage per processor = 1.25982 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 300 0 0 0.2714463 1810.9378
|
||||
1 298.22165 0 0 0.26983722 1800.2029
|
||||
2 293.2839 0 0 0.26536943 1770.3964
|
||||
3 286.18537 0 0 0.25894654 1727.5464
|
||||
4 277.61576 0 0 0.25119258 1675.8163
|
||||
5 267.3325 0 0 0.24188807 1613.7418
|
||||
6 254.94702 0 0 0.23068142 1538.9774
|
||||
7 240.91176 0 0 0.21798202 1454.2541
|
||||
8 226.27996 0 0 0.20474287 1365.9298
|
||||
9 212.1059 0 0 0.19191788 1280.3687
|
||||
10 199.27609 0 0 0.18030919 1202.922
|
||||
Loop time of 80.663 on 1 procs for 10 steps with 8 atoms
|
||||
|
||||
Pair time (%) = 0 (0)
|
||||
Neigh time (%) = 0 (0)
|
||||
Comm time (%) = 4.91142e-05 (6.08882e-05)
|
||||
Outpt time (%) = 0.00111485 (0.0013821)
|
||||
Other time (%) = 80.6618 (99.9986)
|
||||
|
||||
Nlocal: 8 ave 8 max 8 min
|
||||
Histogram: 1 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 10 ave 10 max 10 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
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
@ -1,58 +0,0 @@
|
||||
LAMMPS (20 Sep 2010)
|
||||
# LAMMPS input for coupling MD/Quantum
|
||||
|
||||
units metal
|
||||
dimension 3
|
||||
atom_style atomic
|
||||
atom_modify sort 0 0.0
|
||||
|
||||
lattice diamond 5.43
|
||||
Lattice spacing in x,y,z = 5.43 5.43 5.43
|
||||
region box block 0 1 0 1 0 1
|
||||
create_box 1 box
|
||||
Created orthogonal box = (0 0 0) to (5.43 5.43 5.43)
|
||||
1 by 2 by 2 processor grid
|
||||
create_atoms 1 box
|
||||
Created 8 atoms
|
||||
mass 1 28.08
|
||||
|
||||
velocity all create 300.0 87293 loop geom
|
||||
|
||||
fix 1 all nve
|
||||
fix 2 all external
|
||||
|
||||
dump 1 all custom 1 dump.md id type x y z fx fy fz
|
||||
thermo 1
|
||||
run 10
|
||||
Memory usage per processor = 1.25928 Mbytes
|
||||
Step Temp E_pair E_mol TotEng Press
|
||||
0 300 0 0 0.2714463 1810.9378
|
||||
1 298.22166 0 0 0.26983722 1800.2029
|
||||
2 293.28391 0 0 0.26536944 1770.3964
|
||||
3 286.18538 0 0 0.25894655 1727.5464
|
||||
4 277.61578 0 0 0.25119259 1675.8164
|
||||
5 267.33252 0 0 0.24188809 1613.7419
|
||||
6 254.94703 0 0 0.23068143 1538.9774
|
||||
7 240.91175 0 0 0.21798202 1454.254
|
||||
8 226.27997 0 0 0.20474287 1365.9299
|
||||
9 212.10594 0 0 0.19191791 1280.3689
|
||||
10 199.27613 0 0 0.18030923 1202.9223
|
||||
Loop time of 79.8256 on 4 procs for 10 steps with 8 atoms
|
||||
|
||||
Pair time (%) = 0 (0)
|
||||
Neigh time (%) = 0 (0)
|
||||
Comm time (%) = 0.000365376 (0.000457718)
|
||||
Outpt time (%) = 0.00169969 (0.00212925)
|
||||
Other time (%) = 79.8236 (99.9974)
|
||||
|
||||
Nlocal: 2 ave 2 max 2 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
Nghost: 5 ave 5 max 5 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
Neighs: 0 ave 0 max 0 min
|
||||
Histogram: 4 0 0 0 0 0 0 0 0 0
|
||||
|
||||
Total # of neighbors = 0
|
||||
Ave neighs/atom = 0
|
||||
Neighbor list builds = 0
|
||||
Dangerous builds = 0
|
||||
@ -1 +0,0 @@
|
||||
#define QUEST /home/sjplimp/csrf/quest/src/lcao.x
|
||||
@ -1,161 +0,0 @@
|
||||
do setup
|
||||
do iters
|
||||
do force
|
||||
no relax
|
||||
setup data
|
||||
title
|
||||
Si 1x1x1 unit cell
|
||||
functional
|
||||
PBE
|
||||
dimensions of system (0=cluster ... 3=bulk)
|
||||
3
|
||||
primitive lattice vectors
|
||||
10.261212 0.000000 0.000000
|
||||
0.000000 10.261212 0.000000
|
||||
0.000000 0.000000 10.261212
|
||||
grid dimensions
|
||||
10 10 10
|
||||
atom types
|
||||
1
|
||||
type number, label:
|
||||
1 Si_pbe
|
||||
notes5
|
||||
Originally constructed by Peter A. Schultz, 12Apr01
|
||||
potential generated by new Hamann program PUNSLDX
|
||||
Cite use with: D.R. Hamann, unpublished.
|
||||
Potential: "standard" setting out to l=2
|
||||
Basis: amended Jun05 for better (2d/1d not 1d/1d) d-function
|
||||
effective nuclear charge (s2p2 to 10.0)
|
||||
4.00000000d+00
|
||||
pseudopotentials: Lmax, and effective gaussian range
|
||||
2 0.86000000d+00
|
||||
functional type used in generating potential:
|
||||
PBE
|
||||
radial mesh: number of points for local and non-local pot integrals
|
||||
80 67
|
||||
mesh points for nuclear potential; ham2dh
|
||||
0.02500000 0.02696978 0.02909477 0.03138719 0.03386023 0.03652812
|
||||
0.03940622 0.04251109 0.04586060 0.04947402 0.05337215 0.05757741
|
||||
0.06211402 0.06700807 0.07228773 0.07798338 0.08412779 0.09075634
|
||||
0.09790716 0.10562140 0.11394345 0.12292121 0.13260635 0.14305458
|
||||
0.15432605 0.16648562 0.17960325 0.19375443 0.20902061 0.22548964
|
||||
0.24325628 0.26242278 0.28309943 0.30540522 0.32946852 0.35542780
|
||||
0.38343245 0.41364362 0.44623518 0.48139466 0.51932441 0.56024270
|
||||
0.60438500 0.65200533 0.70337773 0.75879783 0.81858456 0.88308197
|
||||
0.95266121 1.02772271 1.10869840 1.19605428 1.29029305 1.39195702
|
||||
1.50163124 1.61994684 1.74758469 1.88527930 2.03382306 2.19407079
|
||||
2.36694466 2.55343950 2.75462852 2.97166951 3.20581145 3.45840177
|
||||
3.73089402 4.02485632 4.34198031 4.68409093 5.05315693 5.45130215
|
||||
5.88081777 6.34417553 6.84404189 7.38329340 7.96503329 8.59260927
|
||||
9.26963282 10.00000000
|
||||
radwts: weights for radial points
|
||||
0.00189603 0.00204542 0.00220659 0.00238045 0.00256800 0.00277034
|
||||
0.00298862 0.00322410 0.00347813 0.00375218 0.00404781 0.00436675
|
||||
0.00471081 0.00508198 0.00548240 0.00591436 0.00638036 0.00688308
|
||||
0.00742541 0.00801047 0.00864162 0.00932251 0.01005704 0.01084945
|
||||
0.01170429 0.01262649 0.01362135 0.01469459 0.01585240 0.01710143
|
||||
0.01844888 0.01990249 0.02147064 0.02316234 0.02498733 0.02695611
|
||||
0.02908002 0.03137128 0.03384307 0.03650961 0.03938625 0.04248955
|
||||
0.04583736 0.04944895 0.05334510 0.05754823 0.06208254 0.06697411
|
||||
0.07225109 0.07794385 0.08408515 0.09071034 0.09785753 0.10556786
|
||||
0.11388570 0.12285891 0.13253914 0.14298208 0.15424783 0.16640123
|
||||
0.17951222 0.19365623 0.20891467 0.22537535 0.24313298 0.26228977
|
||||
0.28295594 0.30525043 0.32930153 0.35524766 0.38323811 0.41343397
|
||||
0.44600900 0.48115067 0.51906119 0.55995874 0.60407867 0.65167486
|
||||
0.70302122 0.75841323
|
||||
non-local potential: l,potential*integration weight
|
||||
0 0.62022930 0.62128855 0.62243016 0.62366033 0.62498568 0.62641328
|
||||
0.62795061 0.62960563 0.63138673 0.63330275 0.63536294 0.63757692
|
||||
0.63995464 0.64250630 0.64524218 0.64817253 0.65130735 0.65465605
|
||||
0.65822713 0.66202767 0.66606269 0.67033437 0.67484108 0.67957602
|
||||
0.68452576 0.68966817 0.69497006 0.70038419 0.70584566 0.71126756
|
||||
0.71653578 0.72150290 0.72598113 0.72973436 0.73246932 0.73382636
|
||||
0.73337030 0.73058243 0.72485505 0.71549107 0.70171167 0.68267654
|
||||
0.65752236 0.62542611 0.58570073 0.53792896 0.48213811 0.41900888
|
||||
0.35009536 0.27800640 0.20646172 0.14009458 0.08384960 0.04186877
|
||||
0.01596164 0.00423035 0.00115036 0.00066636 0.00047879 0.00029939
|
||||
0.00016329 0.00007995 0.00003517 0.00001362 0.00000445 0.00000111
|
||||
0.00000016 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
|
||||
0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
|
||||
0.00000000 0.00000000
|
||||
non-local potential: l,potential*integration weight
|
||||
1 0.59551624 0.59463303 0.59368033 0.59265268 0.59154422 0.59034862
|
||||
0.58905906 0.58766819 0.58616811 0.58455033 0.58280567 0.58092430
|
||||
0.57889565 0.57670833 0.57435015 0.57180802 0.56906791 0.56611482
|
||||
0.56293268 0.55950435 0.55581158 0.55183493 0.54755377 0.54294628
|
||||
0.53798942 0.53265896 0.52692951 0.52077458 0.51416671 0.50707751
|
||||
0.49947790 0.49133817 0.48262822 0.47331766 0.46337588 0.45277197
|
||||
0.44147437 0.42945016 0.41666374 0.40307468 0.38863443 0.37328165
|
||||
0.35693601 0.33949042 0.32080256 0.30068740 0.27891443 0.25521609
|
||||
0.22931791 0.20100526 0.17024474 0.13737521 0.10336405 0.07007167
|
||||
0.04035673 0.01767907 0.00470635 0.00076638 0.00047880 0.00029939
|
||||
0.00016329 0.00007995 0.00003517 0.00001362 0.00000445 0.00000111
|
||||
0.00000016 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
|
||||
0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
|
||||
0.00000000 0.00000000
|
||||
non-local potential: l,potential*integration weight
|
||||
2 0.56305372 0.55961728 0.55591134 0.55191498 0.54760572 0.54295941
|
||||
0.53795013 0.53255008 0.52672947 0.52045641 0.51369682 0.50641433
|
||||
0.49857022 0.49012333 0.48103004 0.47124429 0.46071759 0.44939919
|
||||
0.43723624 0.42417413 0.41015690 0.39512792 0.37903070 0.36181001
|
||||
0.34341340 0.32379300 0.30290805 0.28072780 0.25723539 0.23243242
|
||||
0.20634465 0.17902876 0.15058041 0.12114359 0.09092117 0.06018665
|
||||
0.02929636 -0.00129833 -0.03104046 -0.05926034 -0.08517498 -0.10789810
|
||||
-0.12646610 -0.13988656 -0.14721657 -0.14767751 -0.14080976 -0.12666296
|
||||
-0.10600305 -0.08049270 -0.05276798 -0.02629475 -0.00486427 0.00837657
|
||||
0.01228139 0.00892332 0.00342796 0.00074936 0.00047880 0.00029939
|
||||
0.00016329 0.00007995 0.00003517 0.00001362 0.00000445 0.00000111
|
||||
0.00000016 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
|
||||
0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000
|
||||
0.00000000 0.00000000
|
||||
number of radial functions **** Si PBE Ham-II basis 20Feb01-PAS ****
|
||||
5
|
||||
angular momentum, number of alphas
|
||||
0 4
|
||||
alphas - s - 4s/2/4s407 (bulk Si dzp Eopt+reopt c1)
|
||||
0.10460000d+00 0.27226300d+00 1.30050800d+00 2.60103000d+00
|
||||
wave function coefficients
|
||||
0.20995300d+00 0.55978200d+00 -0.99128200d+00 0.33487100d+00
|
||||
angular momentum, number of alphas
|
||||
1 3
|
||||
alphas - p - 3p/2/3p492 (bulk Si dzp Eopt + reopt c1)
|
||||
0.09424100d+00 0.31767900d+00 1.56114500d+00
|
||||
wave function coefficients
|
||||
0.06761600d+00 0.31821200d+00 -0.06638300d+00
|
||||
angular momentum, number of alphas
|
||||
0 1
|
||||
alphas - s - second zeta s polarization
|
||||
0.10460000d+00
|
||||
wave function coefficients
|
||||
1.00000000d+00
|
||||
angular momentum, number of alphas
|
||||
1 1
|
||||
alphas - p - second zeta p polarization
|
||||
0.09424100d+00
|
||||
wave function coefficients
|
||||
1.00000000d+00
|
||||
angular momentum, number of alphas
|
||||
2 2
|
||||
alphas - d - angular polarization (dzp Eopt)
|
||||
0.32000000d+00 1.40000000d+00
|
||||
wave function coefficients
|
||||
0.31557000d+00 1.00000000d+00
|
||||
shell occupancies for this silicon, Si: s(2.00)p(2.00)
|
||||
2.00000000 2.00000000 0.00000000 0.00000000 0.00000000 0.00000000
|
||||
end atom file
|
||||
number of atoms in unit cell
|
||||
8
|
||||
atom, type, position vector
|
||||
1 1 0.0000000000 0.0000000000 0.0000000000
|
||||
2 1 5.1306060590 5.1306060590 0.0000000000
|
||||
3 1 5.1306060590 0.0000000000 5.1306060590
|
||||
4 1 0.0000000000 5.1306060590 5.1306060590
|
||||
5 1 2.5653030295 2.5653030295 2.5653030295
|
||||
6 1 7.6959090885 7.6959090885 2.5653030295
|
||||
7 1 7.6959090885 2.5653030295 7.6959090885
|
||||
8 1 2.5653030295 7.6959090885 7.6959090885
|
||||
kgrid
|
||||
0 0 0
|
||||
end setup phase data
|
||||
run phase input data
|
||||
end of run phase data
|
||||
@ -2,18 +2,20 @@
|
||||
|
||||
SHELL = /bin/sh
|
||||
|
||||
# Paths to your local LAMMPS and SPPARKS home directories
|
||||
|
||||
LAMMPS = /home/sjplimp/lammps/git
|
||||
SPPARKS = /home/sjplimp/spparks/git
|
||||
|
||||
# System-specific settings
|
||||
|
||||
LAMMPS = /home/sjplimp/lammps
|
||||
SPPARKS = /home/sjplimp/spparks
|
||||
|
||||
CC = g++
|
||||
CC = mpicxx
|
||||
CCFLAGS = -g -O -DMPICH_IGNORE_CXX_SEEK -I../library
|
||||
DEPFLAGS = -M
|
||||
LINK = g++
|
||||
LINK = mpicxx
|
||||
LINKFLAGS = -g -O -L../library -L${LAMMPS}/src -L${SPPARKS}/src
|
||||
USRLIB = -lcouple -llmp_g++ -lspk_g++
|
||||
SYSLIB = -lfftw -lmpich -lpthread
|
||||
USRLIB = -lcouple -llammps_mpi -lspparks_mpi
|
||||
SYSLIB =
|
||||
ARCHIVE = ar
|
||||
ARFLAGS = -rc
|
||||
SIZE = size
|
||||
@ -1,44 +1,67 @@
|
||||
IMPORTANT NOTE: This example has not been updated since 2013,
|
||||
so it is not likely to work anymore out of the box. There have
|
||||
been changes to LAMMPS and its library interface that would need
|
||||
to be applied. Please see the manual for the documentation of
|
||||
the library interface.
|
||||
|
||||
This directory has an application that models grain growth in the
|
||||
presence of strain.
|
||||
|
||||
The grain growth is simulated by a Potts model in a kinetic Monte
|
||||
Carlo code SPPARKS. Clusters of like spins on a lattice represent
|
||||
grains. The Hamiltonian for the energy due of a collection of spins
|
||||
includes a strain term and is described on this page in the SPPARKS
|
||||
documentation:
|
||||
The grain growth is simulated by a Potts model in the kinetic Monte
|
||||
Carlo code SPPARKS -- https://spparks.github.io
|
||||
|
||||
http://spparks.sandia.gov/doc/app_potts_strain.html.
|
||||
Clusters of like spins on a lattice represent grains. The Hamiltonian
|
||||
for the energy due of a collection of spins includes a strain term and
|
||||
is described on this page in the SPPARKS documentation:
|
||||
|
||||
The strain is computed by the molecular dynamics code LAMMPS as a
|
||||
particle displacement where pairs of atoms across a grain boundary are
|
||||
of different types and thus push off from each other due to a
|
||||
Lennard-Jones sigma between particles of different types that is
|
||||
larger than the sigma between particles of the same type (interior to
|
||||
grains).
|
||||
https://spparks.github.io/doc/app_potts_strain.html
|
||||
|
||||
The strain is computed by the LAMMPS molecular dynamics code --
|
||||
https://www.lammps.org -- as a particle displacement where pairs of
|
||||
atoms across a grain boundary are of different types and thus push off
|
||||
from each other due to a Lennard-Jones sigma between particles of
|
||||
different types that is larger than the sigma between particles of the
|
||||
same type (interior to grains).
|
||||
|
||||
lmpspk.cpp main program
|
||||
it links LAMMPS and SPPARKS as libraries
|
||||
it links to LAMMPS and SPPARKS as libraries
|
||||
in.spparks SPPARKS input script, without the run command
|
||||
lmppath.h contains path to LAMMPS home directory
|
||||
spkpath.h contains path to SPPARKS home directory
|
||||
|
||||
After editing the Makefile, lmppath.h, and spkpath.h to make them
|
||||
suitable for your box, type:
|
||||
-----------------------------------
|
||||
|
||||
g++ -f Makefile.g++
|
||||
(1) To build and run this coupled application, you must have SPPARKS
|
||||
built on your system. It's WWW site is https://spparks.github.io and
|
||||
it can be downloaded as a tarball or cloned as a local Git repo.
|
||||
|
||||
and you should get the lmpspk executable.
|
||||
To build SPPARKS, do the following:
|
||||
|
||||
NOTE: To build and run this coupled application, you must of course,
|
||||
have SPPARKS built on your system. It's WWW site is
|
||||
http://www.sandia.gov/~sjplimp/spparks.html. It is an open-source
|
||||
code, written by two of the LAMMPS authors.
|
||||
% cd spparks/src
|
||||
% make mpi
|
||||
% make mode=lib mpi # build SPPARKS as a library
|
||||
|
||||
-----------------------------------
|
||||
|
||||
(2) You must also build the coupling library in
|
||||
lammps/examples/COUPLE/library.
|
||||
|
||||
To build the coupling library, do the following:
|
||||
|
||||
% cd lammps/examples/COUPLE/library
|
||||
% make -f Makefile.mpi
|
||||
|
||||
-----------------------------------
|
||||
|
||||
(3) Edit the Makefile.mpi, lmppath.h, and spkpath.h files in this
|
||||
directory to make them suitable for your box. Each of the 3 files
|
||||
has a comment telling you what to do.
|
||||
|
||||
-----------------------------------
|
||||
|
||||
(4) Build the coupled lmpspk application in this directory.
|
||||
|
||||
% make -f Makefile.mpi
|
||||
|
||||
This should give you a lmpspk executable.
|
||||
|
||||
-----------------------------------
|
||||
|
||||
(5) Run the test simulation
|
||||
|
||||
You can run lmpspk in serial or parallel as:
|
||||
|
||||
@ -52,7 +75,7 @@ Ndelta = time to run MC in each iteration
|
||||
Sfactor = multiplier on strain effect
|
||||
in.spparks = SPPARKS input script
|
||||
|
||||
The log files are for this run:
|
||||
The log files included in this directory are for this run:
|
||||
|
||||
% lmpspk 20 10.0 1 in.spparks
|
||||
|
||||
@ -70,11 +93,15 @@ The driver code launches both SPPARKS and LAMMPS in parallel and they
|
||||
both decompose their spatial domains in the same manner. The datums
|
||||
in SPPARKS (lattice sites) are the same as the datums in LAMMPS
|
||||
(coarse-grained particles). If this were not the case, more
|
||||
sophisticated inter-code communication could be performed.
|
||||
sophisticated inter-code communication could be performed. Note that
|
||||
the in.lammps and data.lammps files are not inputs; they are generated
|
||||
by the lmpspk driver.
|
||||
|
||||
You can look at the log files in the directory to see sample LAMMPS
|
||||
and SPPARKS output for this simulation. Dump files produced by the
|
||||
run are stored as dump.mc and dump.md. The image*.png files show
|
||||
snapshots from both the LAMMPS and SPPARKS output. Note that the
|
||||
in.lammps and data.lammps files are not inputs; they are generated by
|
||||
the lmpspk driver.
|
||||
You can look at the log files in the directory to see LAMMPS and
|
||||
SPPARKS output for this simulation run on 1 and 4 processors. Dump
|
||||
files produced by the run are named dump.mc and dump.md. The image
|
||||
PPM files show snapshots from the SPPARKS and LAMMPS output. Compare
|
||||
the image_spparks.0019.ppm and image_lammps.0190.ppm file. They were
|
||||
written at the same point in the simulation by both codes. The color
|
||||
maps for the 2 codes are not the same, but the morphology of the
|
||||
grains is.
|
||||
|
||||
@ -111,4 +111,6 @@ pair_coeff 100 100 1.0 1.0
|
||||
compute da all displace/atom
|
||||
|
||||
dump 1 all atom 10 dump.md
|
||||
dump 2 all image 10 image_lammps.*.ppm type type zoom 1.6
|
||||
dump_modify 2 pad 4 acolor * red/green/blue/aqua/magenta/yellow
|
||||
thermo 1
|
||||
|
||||
@ -20,4 +20,8 @@ diag_style energy
|
||||
temperature 1.0
|
||||
|
||||
stats 10.0
|
||||
dump 1 10.0 dump.mc
|
||||
dump 1 text 10.0 dump.mc id site x y
|
||||
|
||||
dump 2 image 1000 image_spparks.*.ppm site site view 0 0 box no 0.1 &
|
||||
crange 1 100 drange 1 1 shape cube zoom 1.5 size 512 512
|
||||
dump_modify 2 pad 4
|
||||
|
||||
@ -1 +1,3 @@
|
||||
#define LMPPATH /home/sjplimp/lammps
|
||||
// path to your LAMMPS home directory
|
||||
|
||||
#define LMPPATH /home/sjplimp/lammps/git
|
||||
|
||||
@ -14,8 +14,8 @@
|
||||
|
||||
#include "lammps_data_write.h"
|
||||
#include "many2many.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "memorylib.h"
|
||||
#include "errorlib.h"
|
||||
|
||||
#define QUOTE_(x) #x
|
||||
#define QUOTE(x) QUOTE_(x)
|
||||
@ -51,8 +51,8 @@ int main(int narg, char **arg)
|
||||
MPI_Comm_rank(comm,&me);
|
||||
MPI_Comm_size(comm,&nprocs);
|
||||
|
||||
Memory *memory = new Memory(comm);
|
||||
Error *error = new Error(comm);
|
||||
MemoryLib *memory = new MemoryLib(comm);
|
||||
ErrorLib *error = new ErrorLib(comm);
|
||||
|
||||
// command-line args
|
||||
|
||||
@ -83,28 +83,28 @@ int main(int narg, char **arg)
|
||||
double **xyz;
|
||||
double *strain;
|
||||
|
||||
dimension = *((int *) spparks_extract(spk,"dimension"));
|
||||
nglobal = *((int *) spparks_extract(spk,"nglobal"));
|
||||
nlocal_spparks = *((int *) spparks_extract(spk,"nlocal"));
|
||||
dimension = *((int *) spparks_extract(spk,(char *) "dimension"));
|
||||
nglobal = *((int *) spparks_extract(spk,(char *) "nglobal"));
|
||||
nlocal_spparks = *((int *) spparks_extract(spk,(char *) "nlocal"));
|
||||
|
||||
boxxlo = *((double *) spparks_extract(spk,"boxxlo"));
|
||||
boxxhi = *((double *) spparks_extract(spk,"boxxhi"));
|
||||
boxylo = *((double *) spparks_extract(spk,"boxylo"));
|
||||
boxyhi = *((double *) spparks_extract(spk,"boxyhi"));
|
||||
boxxlo = *((double *) spparks_extract(spk,(char *) "boxxlo"));
|
||||
boxxhi = *((double *) spparks_extract(spk,(char *) "boxxhi"));
|
||||
boxylo = *((double *) spparks_extract(spk,(char *) "boxylo"));
|
||||
boxyhi = *((double *) spparks_extract(spk,(char *) "boxyhi"));
|
||||
if (dimension == 3) {
|
||||
boxzlo = *((double *) spparks_extract(spk,"boxzlo"));
|
||||
boxzhi = *((double *) spparks_extract(spk,"boxzhi"));
|
||||
boxzlo = *((double *) spparks_extract(spk,(char *) "boxzlo"));
|
||||
boxzhi = *((double *) spparks_extract(spk,(char *) "boxzhi"));
|
||||
} else {
|
||||
boxzlo = -0.5;
|
||||
boxzhi = 0.5;
|
||||
}
|
||||
|
||||
id_spparks = (int *) spparks_extract(spk,"id");
|
||||
spins = (int *) spparks_extract(spk,"site");
|
||||
xyz = (double **) spparks_extract(spk,"xyz");
|
||||
id_spparks = (int *) spparks_extract(spk,(char *) "id");
|
||||
spins = (int *) spparks_extract(spk,(char *) "site");
|
||||
xyz = (double **) spparks_extract(spk,(char *) "xyz");
|
||||
|
||||
nspins = *((int *) spparks_extract(spk,"nspins"));
|
||||
strain = (double *) spparks_extract(spk,"strain");
|
||||
nspins = *((int *) spparks_extract(spk,(char *) "nspins"));
|
||||
strain = (double *) spparks_extract(spk,(char *) "strain");
|
||||
|
||||
// write a LAMMPS input script using SPPARKS params
|
||||
|
||||
@ -114,7 +114,7 @@ int main(int narg, char **arg)
|
||||
|
||||
fprintf(fp,"units lj\n");
|
||||
sprintf(str,"dimension %d\n",dimension);
|
||||
fprintf(fp,str);
|
||||
fprintf(fp,"%s",str);
|
||||
fprintf(fp,"atom_style atomic\n\n");
|
||||
|
||||
fprintf(fp,"read_data data.lammps\n");
|
||||
@ -124,12 +124,14 @@ int main(int narg, char **arg)
|
||||
fprintf(fp,"pair_coeff * * 1.0 1.2\n");
|
||||
for (i = 0; i < nspins; i++) {
|
||||
sprintf(str,"pair_coeff %d %d 1.0 1.0\n",i+1,i+1);
|
||||
fprintf(fp,str);
|
||||
fprintf(fp,"%s",str);
|
||||
}
|
||||
fprintf(fp,"\n");
|
||||
|
||||
fprintf(fp,"compute da all displace/atom\n\n");
|
||||
fprintf(fp,"dump 1 all atom 10 dump.md\n");
|
||||
fprintf(fp,"dump 2 all image 10 image_lammps.*.ppm type type zoom 1.6\n");
|
||||
fprintf(fp,"dump_modify 2 pad 4 acolor * red/green/blue/aqua/magenta/yellow\n");
|
||||
fprintf(fp,"thermo 1\n");
|
||||
|
||||
fclose(fp);
|
||||
@ -138,12 +140,12 @@ int main(int narg, char **arg)
|
||||
// write a LAMMPS data file using SPPARKS data
|
||||
|
||||
LAMMPSDataWrite *lwd = new LAMMPSDataWrite(MPI_COMM_WORLD);
|
||||
lwd->file("data.lammps");
|
||||
lwd->header("%d atoms",nglobal);
|
||||
lwd->header("%d atom types",nspins);
|
||||
lwd->header("%g %g xlo xhi",boxxlo,boxxhi);
|
||||
lwd->header("%g %g ylo yhi",boxylo,boxyhi);
|
||||
lwd->header("%g %g zlo zhi",boxzlo,boxzhi);
|
||||
lwd->file((char *) "data.lammps");
|
||||
lwd->header((char *) "%d atoms",nglobal);
|
||||
lwd->header((char *) "%d atom types",nspins);
|
||||
lwd->header((char *) "%g %g xlo xhi",boxxlo,boxxhi);
|
||||
lwd->header((char *) "%g %g ylo yhi",boxylo,boxyhi);
|
||||
lwd->header((char *) "%g %g zlo zhi",boxzlo,boxzhi);
|
||||
lwd->atoms(nlocal_spparks);
|
||||
lwd->atoms(id_spparks);
|
||||
lwd->atoms(spins);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
SPPARKS (26 Aug 2010)
|
||||
SPPARKS (19 Sept 2022)
|
||||
# SPPARKS input for coupling MD/MC
|
||||
|
||||
seed 56789
|
||||
@ -28,244 +28,246 @@ diag_style energy
|
||||
temperature 1.0
|
||||
|
||||
stats 10.0
|
||||
dump 1 10.0 dump.mc
|
||||
dump 1 text 10.0 dump.mc id site x y
|
||||
run 10Setting up run ...
|
||||
Running with 32-bit site IDs
|
||||
Memory usage per processor = 2.375 Mbytes
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
0 0 0 0 0 19766
|
||||
10 17929 0 0 0.0776 5324
|
||||
Loop time of 0.077626 on 1 procs
|
||||
10 18978 0 13 0.0259 5500
|
||||
Loop time of 0.0258905 on 1 procs
|
||||
|
||||
Solve time (%) = 0.0070138 (9.03537)
|
||||
Solve time (%) = 0.00155363 (6.00079)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.00146031 (1.88122)
|
||||
Outpt time (%) = 0.00415015 (5.34634)
|
||||
App time (%) = 0.0614648 (79.1807)
|
||||
Other time (%) = 0.00353694 (4.55639)
|
||||
Comm time (%) = 0.000642316 (2.4809)
|
||||
Outpt time (%) = 0.000680321 (2.62769)
|
||||
App time (%) = 0.0226682 (87.5542)
|
||||
Other time (%) = 0.000346003 (1.33641)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
10 17929 0 0 0 5324
|
||||
20 24582 0 0 0.0279 4750
|
||||
Loop time of 0.027904 on 1 procs
|
||||
10 18978 0 13 0 5500
|
||||
20 25374 0 18 0.00709 4552
|
||||
Loop time of 0.00708869 on 1 procs
|
||||
|
||||
Solve time (%) = 0.00271416 (9.72676)
|
||||
Solve time (%) = 0.000496193 (6.99978)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.000461817 (1.65502)
|
||||
Outpt time (%) = 0.0042181 (15.1165)
|
||||
App time (%) = 0.0191288 (68.5521)
|
||||
Other time (%) = 0.00138116 (4.94967)
|
||||
Comm time (%) = 0.000158039 (2.22945)
|
||||
Outpt time (%) = 0.0006739 (9.50669)
|
||||
App time (%) = 0.00564639 (79.6535)
|
||||
Other time (%) = 0.000114167 (1.61055)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
20 24582 0 0 0 4750
|
||||
30 30109 0 0 0.0234 4264
|
||||
Loop time of 0.023375 on 1 procs
|
||||
20 25374 0 18 0 4552
|
||||
30 30752 0 23 0.00575 4096
|
||||
Loop time of 0.00575649 on 1 procs
|
||||
|
||||
Solve time (%) = 0.00216675 (9.2695)
|
||||
Solve time (%) = 0.000415252 (7.21363)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.000342846 (1.46672)
|
||||
Outpt time (%) = 0.00416183 (17.8046)
|
||||
App time (%) = 0.015563 (66.5796)
|
||||
Other time (%) = 0.00114059 (4.87954)
|
||||
Comm time (%) = 0.00013092 (2.2743)
|
||||
Outpt time (%) = 0.000662723 (11.5126)
|
||||
App time (%) = 0.00445117 (77.3244)
|
||||
Other time (%) = 9.6422e-05 (1.67501)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
30 30109 0 0 0 4264
|
||||
40 35032 0 0 0.0208 3880
|
||||
Loop time of 0.020786 on 1 procs
|
||||
30 30752 0 23 0 4096
|
||||
40 35529 0 27 0.00589 3596
|
||||
Loop time of 0.00589801 on 1 procs
|
||||
|
||||
Solve time (%) = 0.0019896 (9.57182)
|
||||
Solve time (%) = 0.000424563 (7.19841)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.000316858 (1.52438)
|
||||
Outpt time (%) = 0.00413609 (19.8984)
|
||||
App time (%) = 0.0132952 (63.962)
|
||||
Other time (%) = 0.00104833 (5.04341)
|
||||
Comm time (%) = 0.000114131 (1.93508)
|
||||
Outpt time (%) = 0.000763593 (12.9466)
|
||||
App time (%) = 0.0044969 (76.2443)
|
||||
Other time (%) = 9.8828e-05 (1.67562)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
40 35032 0 0 0 3880
|
||||
50 39543 0 0 0.0193 3784
|
||||
Loop time of 0.0193491 on 1 procs
|
||||
40 35529 0 27 0 3596
|
||||
50 39736 0 31 0.00444 3298
|
||||
Loop time of 0.00444854 on 1 procs
|
||||
|
||||
Solve time (%) = 0.00185919 (9.60865)
|
||||
Solve time (%) = 0.000323247 (7.26637)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.000333071 (1.72138)
|
||||
Outpt time (%) = 0.00412297 (21.3083)
|
||||
App time (%) = 0.0120728 (62.3946)
|
||||
Other time (%) = 0.000961065 (4.96698)
|
||||
Comm time (%) = 9.6777e-05 (2.17548)
|
||||
Outpt time (%) = 0.000637529 (14.3312)
|
||||
App time (%) = 0.00331502 (74.5193)
|
||||
Other time (%) = 7.5967e-05 (1.70769)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
50 39543 0 0 0 3784
|
||||
60 43899 0 0 0.0187 3706
|
||||
Loop time of 0.018713 on 1 procs
|
||||
50 39736 0 31 0 3298
|
||||
60 43567 0 35 0.00507 3296
|
||||
Loop time of 0.0050729 on 1 procs
|
||||
|
||||
Solve time (%) = 0.00176001 (9.40526)
|
||||
Solve time (%) = 0.000354098 (6.98019)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.000314474 (1.68051)
|
||||
Outpt time (%) = 0.00413895 (22.118)
|
||||
App time (%) = 0.0116153 (62.0706)
|
||||
Other time (%) = 0.000884295 (4.72556)
|
||||
Comm time (%) = 0.000114818 (2.26336)
|
||||
Outpt time (%) = 0.000893366 (17.6106)
|
||||
App time (%) = 0.00362051 (71.3697)
|
||||
Other time (%) = 9.0105e-05 (1.7762)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
60 43899 0 0 0 3706
|
||||
70 48028 0 0 0.0179 3392
|
||||
Loop time of 0.0178769 on 1 procs
|
||||
60 43567 0 35 0 3296
|
||||
70 47305 0 39 0.00417 3174
|
||||
Loop time of 0.00417405 on 1 procs
|
||||
|
||||
Solve time (%) = 0.00174618 (9.76781)
|
||||
Solve time (%) = 0.00030627 (7.33747)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.000296593 (1.65909)
|
||||
Outpt time (%) = 0.00414801 (23.2032)
|
||||
App time (%) = 0.0108221 (60.5367)
|
||||
Other time (%) = 0.000864029 (4.83322)
|
||||
Comm time (%) = 9.1156e-05 (2.18387)
|
||||
Outpt time (%) = 0.000689193 (16.5114)
|
||||
App time (%) = 0.00301511 (72.2347)
|
||||
Other time (%) = 7.232e-05 (1.73261)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
70 48028 0 0 0 3392
|
||||
80 51900 0 0 0.017 3208
|
||||
Loop time of 0.0169971 on 1 procs
|
||||
70 47305 0 39 0 3174
|
||||
80 51214 0 43 0.00437 3252
|
||||
Loop time of 0.00437516 on 1 procs
|
||||
|
||||
Solve time (%) = 0.00157022 (9.23819)
|
||||
Solve time (%) = 0.000332427 (7.59805)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.000290394 (1.70849)
|
||||
Outpt time (%) = 0.00416803 (24.522)
|
||||
App time (%) = 0.0101995 (60.0076)
|
||||
Other time (%) = 0.0007689 (4.52371)
|
||||
Comm time (%) = 9.1593e-05 (2.09348)
|
||||
Outpt time (%) = 0.00064481 (14.738)
|
||||
App time (%) = 0.00323051 (73.8375)
|
||||
Other time (%) = 7.5822e-05 (1.73301)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
80 51900 0 0 0 3208
|
||||
90 55450 0 0 0.0159 3162
|
||||
Loop time of 0.0158761 on 1 procs
|
||||
80 51214 0 43 0 3252
|
||||
90 54863 0 47 0.00417 3016
|
||||
Loop time of 0.00417621 on 1 procs
|
||||
|
||||
Solve time (%) = 0.0014894 (9.38143)
|
||||
Solve time (%) = 0.000285188 (6.82887)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.000301123 (1.89671)
|
||||
Outpt time (%) = 0.00413799 (26.0644)
|
||||
App time (%) = 0.00924802 (58.2514)
|
||||
Other time (%) = 0.00069952 (4.40613)
|
||||
Comm time (%) = 9.0115e-05 (2.15782)
|
||||
Outpt time (%) = 0.000719767 (17.2349)
|
||||
App time (%) = 0.00301373 (72.1642)
|
||||
Other time (%) = 6.7413e-05 (1.61421)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
90 55450 0 0 0 3162
|
||||
100 59009 0 0 0.0158 3038
|
||||
Loop time of 0.0158172 on 1 procs
|
||||
90 54863 0 47 0 3016
|
||||
100 58060 0 51 0.00369 2766
|
||||
Loop time of 0.00369187 on 1 procs
|
||||
|
||||
Solve time (%) = 0.00142503 (9.00938)
|
||||
Solve time (%) = 0.000253511 (6.86674)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.000296831 (1.87664)
|
||||
Outpt time (%) = 0.00412178 (26.0589)
|
||||
App time (%) = 0.00923729 (58.4004)
|
||||
Other time (%) = 0.000736237 (4.65467)
|
||||
Comm time (%) = 8.878e-05 (2.40475)
|
||||
Outpt time (%) = 0.000686238 (18.5878)
|
||||
App time (%) = 0.00260318 (70.5111)
|
||||
Other time (%) = 6.0163e-05 (1.62961)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
100 59009 0 0 0 3038
|
||||
110 62454 0 0 0.0155 3066
|
||||
Loop time of 0.015537 on 1 procs
|
||||
100 58060 0 51 0 2766
|
||||
110 61110 0 55 0.00349 2840
|
||||
Loop time of 0.00349695 on 1 procs
|
||||
|
||||
Solve time (%) = 0.00135612 (8.72834)
|
||||
Solve time (%) = 0.000239587 (6.85131)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.000293732 (1.89053)
|
||||
Outpt time (%) = 0.00415182 (26.7221)
|
||||
App time (%) = 0.00904965 (58.2457)
|
||||
Other time (%) = 0.000685692 (4.41328)
|
||||
Comm time (%) = 8.1517e-05 (2.33109)
|
||||
Outpt time (%) = 0.000719507 (20.5753)
|
||||
App time (%) = 0.0023994 (68.614)
|
||||
Other time (%) = 5.6943e-05 (1.62836)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
110 62454 0 0 0 3066
|
||||
120 65856 0 0 0.0152 2898
|
||||
Loop time of 0.0152211 on 1 procs
|
||||
110 61110 0 55 0 2840
|
||||
120 64087 0 59 0.00325 2714
|
||||
Loop time of 0.00324861 on 1 procs
|
||||
|
||||
Solve time (%) = 0.00139046 (9.13505)
|
||||
Solve time (%) = 0.000225271 (6.93437)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.000291109 (1.91253)
|
||||
Outpt time (%) = 0.0041492 (27.2595)
|
||||
App time (%) = 0.00871038 (57.2257)
|
||||
Other time (%) = 0.00067997 (4.46728)
|
||||
Comm time (%) = 8.3445e-05 (2.56863)
|
||||
Outpt time (%) = 0.000647543 (19.9329)
|
||||
App time (%) = 0.00223748 (68.8748)
|
||||
Other time (%) = 5.4877e-05 (1.68924)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
120 65856 0 0 0 2898
|
||||
130 68856 0 0 0.0137 2798
|
||||
Loop time of 0.0137191 on 1 procs
|
||||
120 64087 0 59 0 2714
|
||||
130 67004 0 63 0.00333 2664
|
||||
Loop time of 0.00333198 on 1 procs
|
||||
|
||||
Solve time (%) = 0.00130701 (9.52695)
|
||||
Solve time (%) = 0.00022963 (6.89169)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.000296831 (2.16364)
|
||||
Outpt time (%) = 0.00412989 (30.1032)
|
||||
App time (%) = 0.00742817 (54.1448)
|
||||
Other time (%) = 0.000557184 (4.06138)
|
||||
Comm time (%) = 9.0368e-05 (2.71214)
|
||||
Outpt time (%) = 0.000650383 (19.5194)
|
||||
App time (%) = 0.00230627 (69.2163)
|
||||
Other time (%) = 5.5328e-05 (1.66051)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
130 68856 0 0 0 2798
|
||||
140 71967 0 0 0.0141 2700
|
||||
Loop time of 0.0141542 on 1 procs
|
||||
130 67004 0 63 0 2664
|
||||
140 69933 0 67 0.00324 2680
|
||||
Loop time of 0.00324401 on 1 procs
|
||||
|
||||
Solve time (%) = 0.00132799 (9.38232)
|
||||
Solve time (%) = 0.000227399 (7.00982)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.000284195 (2.00785)
|
||||
Outpt time (%) = 0.00414681 (29.2974)
|
||||
App time (%) = 0.00777125 (54.9042)
|
||||
Other time (%) = 0.000623941 (4.40817)
|
||||
Comm time (%) = 8.818e-05 (2.71824)
|
||||
Outpt time (%) = 0.000638812 (19.6921)
|
||||
App time (%) = 0.00223398 (68.8649)
|
||||
Other time (%) = 5.5635e-05 (1.71501)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
140 71967 0 0 0 2700
|
||||
150 74773 0 0 0.0132 2644
|
||||
Loop time of 0.0131881 on 1 procs
|
||||
140 69933 0 67 0 2680
|
||||
150 72830 0 71 0.00314 2664
|
||||
Loop time of 0.0031476 on 1 procs
|
||||
|
||||
Solve time (%) = 0.00111961 (8.48956)
|
||||
Solve time (%) = 0.000213509 (6.78324)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.000277758 (2.10612)
|
||||
Outpt time (%) = 0.00413394 (31.3459)
|
||||
App time (%) = 0.00711513 (53.951)
|
||||
Other time (%) = 0.000541687 (4.10738)
|
||||
Comm time (%) = 8.6263e-05 (2.7406)
|
||||
Outpt time (%) = 0.000676177 (21.4823)
|
||||
App time (%) = 0.00211915 (67.326)
|
||||
Other time (%) = 5.2495e-05 (1.66778)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
150 74773 0 0 0 2644
|
||||
160 77662 0 0 0.0134 2616
|
||||
Loop time of 0.0133891 on 1 procs
|
||||
150 72830 0 71 0 2664
|
||||
160 75877 0 75 0.00386 2640
|
||||
Loop time of 0.00386614 on 1 procs
|
||||
|
||||
Solve time (%) = 0.00116301 (8.68621)
|
||||
Solve time (%) = 0.000262699 (6.79487)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.00027895 (2.08341)
|
||||
Outpt time (%) = 0.00415397 (31.025)
|
||||
App time (%) = 0.00725079 (54.1544)
|
||||
Other time (%) = 0.000542402 (4.05107)
|
||||
Comm time (%) = 0.000115859 (2.99676)
|
||||
Outpt time (%) = 0.000745615 (19.2858)
|
||||
App time (%) = 0.00267785 (69.2643)
|
||||
Other time (%) = 6.4111e-05 (1.65827)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
160 77662 0 0 0 2616
|
||||
170 80475 0 0 0.0131 2538
|
||||
Loop time of 0.0130939 on 1 procs
|
||||
160 75877 0 75 0 2640
|
||||
170 78733 0 79 0.00555 2486
|
||||
Loop time of 0.0055484 on 1 procs
|
||||
|
||||
Solve time (%) = 0.00108457 (8.28296)
|
||||
Solve time (%) = 0.000407211 (7.33925)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.000279665 (2.13583)
|
||||
Outpt time (%) = 0.00412798 (31.5259)
|
||||
App time (%) = 0.00700951 (53.5324)
|
||||
Other time (%) = 0.000592232 (4.52294)
|
||||
Comm time (%) = 0.000168943 (3.04489)
|
||||
Outpt time (%) = 0.000823976 (14.8507)
|
||||
App time (%) = 0.00404893 (72.9746)
|
||||
Other time (%) = 9.9346e-05 (1.79053)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
170 80475 0 0 0 2538
|
||||
180 83407 0 0 0.0136 2660
|
||||
Loop time of 0.0136199 on 1 procs
|
||||
170 78733 0 79 0 2486
|
||||
180 81400 0 83 0.00291 2396
|
||||
Loop time of 0.00291697 on 1 procs
|
||||
|
||||
Solve time (%) = 0.00117278 (8.61079)
|
||||
Solve time (%) = 0.000197105 (6.75718)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.000262737 (1.92907)
|
||||
Outpt time (%) = 0.00413108 (30.3312)
|
||||
App time (%) = 0.0074532 (54.7229)
|
||||
Other time (%) = 0.0006001 (4.40605)
|
||||
Comm time (%) = 8.6733e-05 (2.97339)
|
||||
Outpt time (%) = 0.000641861 (22.0044)
|
||||
App time (%) = 0.00194335 (66.6221)
|
||||
Other time (%) = 4.7923e-05 (1.6429)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
180 83407 0 0 0 2660
|
||||
190 86407 0 0 0.0138 2656
|
||||
Loop time of 0.013859 on 1 procs
|
||||
180 81400 0 83 0 2396
|
||||
190 84097 0 86 0.00291 2418
|
||||
Loop time of 0.00290961 on 1 procs
|
||||
|
||||
Solve time (%) = 0.00119066 (8.59124)
|
||||
Solve time (%) = 0.000198685 (6.82859)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.000247717 (1.7874)
|
||||
Outpt time (%) = 0.00414801 (29.93)
|
||||
App time (%) = 0.00767326 (55.3665)
|
||||
Other time (%) = 0.000599384 (4.32486)
|
||||
Comm time (%) = 6.5496e-05 (2.25103)
|
||||
Outpt time (%) = 0.000671627 (23.0831)
|
||||
App time (%) = 0.00192582 (66.1883)
|
||||
Other time (%) = 4.7978e-05 (1.64895)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
190 86407 0 0 0 2656
|
||||
200 88961 0 0 0.0124 2374
|
||||
Loop time of 0.0124531 on 1 procs
|
||||
190 84097 0 86 0 2418
|
||||
200 86656 0 90 0.00332 2442
|
||||
Loop time of 0.00332468 on 1 procs
|
||||
|
||||
Solve time (%) = 0.00107932 (8.6671)
|
||||
Solve time (%) = 0.000220838 (6.64238)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.000233412 (1.87433)
|
||||
Outpt time (%) = 0.00414777 (33.3072)
|
||||
App time (%) = 0.00648117 (52.0447)
|
||||
Other time (%) = 0.000511408 (4.10668)
|
||||
Comm time (%) = 9.3912e-05 (2.82469)
|
||||
Outpt time (%) = 0.000744786 (22.4017)
|
||||
App time (%) = 0.00221113 (66.5064)
|
||||
Other time (%) = 5.402e-05 (1.62482)
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
SPPARKS (26 Aug 2010)
|
||||
SPPARKS (19 Sept 2022)
|
||||
# SPPARKS input for coupling MD/MC
|
||||
|
||||
seed 56789
|
||||
@ -28,244 +28,246 @@ diag_style energy
|
||||
temperature 1.0
|
||||
|
||||
stats 10.0
|
||||
dump 1 10.0 dump.mc
|
||||
dump 1 text 10.0 dump.mc id site x y
|
||||
run 10Setting up run ...
|
||||
Running with 32-bit site IDs
|
||||
Memory usage per processor = 2.375 Mbytes
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
0 0 0 0 0 19766
|
||||
10 18695 0 0 0.024 5696
|
||||
Loop time of 0.0240365 on 4 procs
|
||||
10 18709 0 14 0.00995 5410
|
||||
Loop time of 0.00996147 on 4 procs
|
||||
|
||||
Solve time (%) = 0.0017997 (7.48737)
|
||||
Solve time (%) = 0.000401817 (4.03371)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.00263286 (10.9536)
|
||||
Outpt time (%) = 0.00416493 (17.3275)
|
||||
App time (%) = 0.0137114 (57.044)
|
||||
Other time (%) = 0.00172764 (7.18756)
|
||||
Comm time (%) = 0.00184758 (18.5473)
|
||||
Outpt time (%) = 0.000835493 (8.38724)
|
||||
App time (%) = 0.00643178 (64.5665)
|
||||
Other time (%) = 0.000444804 (4.46524)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
10 18695 0 0 0 5696
|
||||
20 25730 0 0 0.0114 4806
|
||||
Loop time of 0.0113776 on 4 procs
|
||||
10 18709 0 14 0 5410
|
||||
20 25405 0 20 0.00348 4414
|
||||
Loop time of 0.00348928 on 4 procs
|
||||
|
||||
Solve time (%) = 0.000647247 (5.68877)
|
||||
Solve time (%) = 0.000145149 (4.15985)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.0013088 (11.5033)
|
||||
Outpt time (%) = 0.00417346 (36.6812)
|
||||
App time (%) = 0.0045594 (40.0733)
|
||||
Other time (%) = 0.000688732 (6.05338)
|
||||
Comm time (%) = 0.000562263 (16.114)
|
||||
Outpt time (%) = 0.0007944 (22.7669)
|
||||
App time (%) = 0.00176801 (50.6697)
|
||||
Other time (%) = 0.000219463 (6.28963)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
20 25730 0 0 0 4806
|
||||
30 31377 0 0 0.00985 4308
|
||||
Loop time of 0.00987101 on 4 procs
|
||||
20 25405 0 20 0 4414
|
||||
30 30724 0 25 0.00314 4092
|
||||
Loop time of 0.00314216 on 4 procs
|
||||
|
||||
Solve time (%) = 0.000525832 (5.32704)
|
||||
Solve time (%) = 0.000123228 (3.92176)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.0012235 (12.3949)
|
||||
Outpt time (%) = 0.00415748 (42.1181)
|
||||
App time (%) = 0.00343758 (34.825)
|
||||
Other time (%) = 0.000526607 (5.33489)
|
||||
Comm time (%) = 0.000561445 (17.8681)
|
||||
Outpt time (%) = 0.00079681 (25.3586)
|
||||
App time (%) = 0.00146373 (46.5835)
|
||||
Other time (%) = 0.000196952 (6.26804)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
30 31377 0 0 0 4308
|
||||
40 36311 0 0 0.0092 3840
|
||||
Loop time of 0.00922179 on 4 procs
|
||||
30 30724 0 25 0 4092
|
||||
40 35289 0 30 0.00256 3496
|
||||
Loop time of 0.0025659 on 4 procs
|
||||
|
||||
Solve time (%) = 0.000474155 (5.14168)
|
||||
Solve time (%) = 9.47535e-05 (3.6928)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.00114667 (12.4344)
|
||||
Outpt time (%) = 0.00414455 (44.943)
|
||||
App time (%) = 0.00293165 (31.7905)
|
||||
Other time (%) = 0.000524759 (5.69043)
|
||||
Comm time (%) = 0.000508415 (19.8143)
|
||||
Outpt time (%) = 0.000788757 (30.74)
|
||||
App time (%) = 0.00106383 (41.4604)
|
||||
Other time (%) = 0.000110143 (4.29259)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
40 36311 0 0 0 3840
|
||||
50 40886 0 0 0.00891 3534
|
||||
Loop time of 0.0089252 on 4 procs
|
||||
40 35289 0 30 0 3496
|
||||
50 39511 0 35 0.00252 3294
|
||||
Loop time of 0.00252512 on 4 procs
|
||||
|
||||
Solve time (%) = 0.000433862 (4.86109)
|
||||
Solve time (%) = 8.7092e-05 (3.44903)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.00113171 (12.68)
|
||||
Outpt time (%) = 0.00413698 (46.3517)
|
||||
App time (%) = 0.00268257 (30.0561)
|
||||
Other time (%) = 0.000540078 (6.05116)
|
||||
Comm time (%) = 0.000631729 (25.0178)
|
||||
Outpt time (%) = 0.000780138 (30.8952)
|
||||
App time (%) = 0.000963016 (38.1375)
|
||||
Other time (%) = 6.31405e-05 (2.5005)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
50 40886 0 0 0 3534
|
||||
60 44888 0 0 0.00831 3306
|
||||
Loop time of 0.00833625 on 4 procs
|
||||
50 39511 0 35 0 3294
|
||||
60 43241 0 40 0.00254 3158
|
||||
Loop time of 0.00254794 on 4 procs
|
||||
|
||||
Solve time (%) = 0.000383437 (4.59963)
|
||||
Solve time (%) = 8.5528e-05 (3.35675)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.00106108 (12.7285)
|
||||
Outpt time (%) = 0.00413227 (49.5699)
|
||||
App time (%) = 0.00232393 (27.8774)
|
||||
Other time (%) = 0.000435531 (5.22455)
|
||||
Comm time (%) = 0.000598337 (23.4831)
|
||||
Outpt time (%) = 0.000777931 (30.5317)
|
||||
App time (%) = 0.000940118 (36.8971)
|
||||
Other time (%) = 0.00014603 (5.73128)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
60 44888 0 0 0 3306
|
||||
70 48583 0 0 0.00806 3078
|
||||
Loop time of 0.0080772 on 4 procs
|
||||
60 43241 0 40 0 3158
|
||||
70 46797 0 44 0.00248 3060
|
||||
Loop time of 0.00248266 on 4 procs
|
||||
|
||||
Solve time (%) = 0.000353277 (4.37375)
|
||||
Solve time (%) = 8.14515e-05 (3.28081)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.00102895 (12.739)
|
||||
Outpt time (%) = 0.0041061 (50.8357)
|
||||
App time (%) = 0.00213838 (26.4742)
|
||||
Other time (%) = 0.000450492 (5.57732)
|
||||
Comm time (%) = 0.000482648 (19.4407)
|
||||
Outpt time (%) = 0.000991271 (39.9277)
|
||||
App time (%) = 0.00085854 (34.5814)
|
||||
Other time (%) = 6.87532e-05 (2.76933)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
70 48583 0 0 0 3078
|
||||
80 52044 0 0 0.00786 2998
|
||||
Loop time of 0.00788343 on 4 procs
|
||||
70 46797 0 44 0 3060
|
||||
80 50183 0 48 0.0024 3102
|
||||
Loop time of 0.00240397 on 4 procs
|
||||
|
||||
Solve time (%) = 0.000333607 (4.23175)
|
||||
Solve time (%) = 8.22802e-05 (3.42268)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.00101435 (12.8669)
|
||||
Outpt time (%) = 0.00420028 (53.2799)
|
||||
App time (%) = 0.00198931 (25.234)
|
||||
Other time (%) = 0.000345886 (4.3875)
|
||||
Comm time (%) = 0.000494873 (20.5856)
|
||||
Outpt time (%) = 0.00085299 (35.4825)
|
||||
App time (%) = 0.000883469 (36.7504)
|
||||
Other time (%) = 9.03613e-05 (3.75883)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
80 52044 0 0 0 2998
|
||||
90 55352 0 0 0.0083 3026
|
||||
Loop time of 0.00831437 on 4 procs
|
||||
80 50183 0 48 0 3102
|
||||
90 53732 0 52 0.00272 3028
|
||||
Loop time of 0.00272017 on 4 procs
|
||||
|
||||
Solve time (%) = 0.00031358 (3.77154)
|
||||
Solve time (%) = 9.94713e-05 (3.6568)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.00111783 (13.4445)
|
||||
Outpt time (%) = 0.00467652 (56.2462)
|
||||
App time (%) = 0.00188529 (22.6751)
|
||||
Other time (%) = 0.00032115 (3.86259)
|
||||
Comm time (%) = 0.000613542 (22.5553)
|
||||
Outpt time (%) = 0.000800183 (29.4166)
|
||||
App time (%) = 0.00108281 (39.8067)
|
||||
Other time (%) = 0.000124164 (4.56456)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
90 55352 0 0 0 3026
|
||||
100 58494 0 0 0.00733 2742
|
||||
Loop time of 0.00735307 on 4 procs
|
||||
90 53732 0 52 0 3028
|
||||
100 57112 0 56 0.0023 2942
|
||||
Loop time of 0.00230787 on 4 procs
|
||||
|
||||
Solve time (%) = 0.000297189 (4.0417)
|
||||
Solve time (%) = 7.58975e-05 (3.28864)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.000801027 (10.8938)
|
||||
Outpt time (%) = 0.00418043 (56.8529)
|
||||
App time (%) = 0.00179577 (24.422)
|
||||
Other time (%) = 0.000278652 (3.7896)
|
||||
Comm time (%) = 0.000502726 (21.7831)
|
||||
Outpt time (%) = 0.000796114 (34.4956)
|
||||
App time (%) = 0.000828819 (35.9127)
|
||||
Other time (%) = 0.000104316 (4.51999)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
100 58494 0 0 0 2742
|
||||
110 61498 0 0 0.00732 2636
|
||||
Loop time of 0.00733691 on 4 procs
|
||||
100 57112 0 56 0 2942
|
||||
110 60445 0 60 0.00192 2850
|
||||
Loop time of 0.00192261 on 4 procs
|
||||
|
||||
Solve time (%) = 0.000282168 (3.84587)
|
||||
Solve time (%) = 6.89883e-05 (3.58826)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.000877678 (11.9625)
|
||||
Outpt time (%) = 0.00414526 (56.4987)
|
||||
App time (%) = 0.00174332 (23.7609)
|
||||
Other time (%) = 0.000288486 (3.93199)
|
||||
Comm time (%) = 0.000257782 (13.4079)
|
||||
Outpt time (%) = 0.000791242 (41.1545)
|
||||
App time (%) = 0.000735212 (38.2403)
|
||||
Other time (%) = 6.9388e-05 (3.60905)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
110 61498 0 0 0 2636
|
||||
120 64343 0 0 0.00719 2518
|
||||
Loop time of 0.00721735 on 4 procs
|
||||
110 60445 0 60 0 2850
|
||||
120 63603 0 64 0.00193 2866
|
||||
Loop time of 0.00193198 on 4 procs
|
||||
|
||||
Solve time (%) = 0.000270605 (3.74937)
|
||||
Solve time (%) = 6.44032e-05 (3.33354)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.00078702 (10.9046)
|
||||
Outpt time (%) = 0.00416625 (57.7254)
|
||||
App time (%) = 0.00162369 (22.497)
|
||||
Other time (%) = 0.000369787 (5.12359)
|
||||
Comm time (%) = 0.00027428 (14.1969)
|
||||
Outpt time (%) = 0.000812462 (42.0534)
|
||||
App time (%) = 0.000682923 (35.3484)
|
||||
Other time (%) = 9.79088e-05 (5.0678)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
120 64343 0 0 0 2518
|
||||
130 66901 0 0 0.00709 2480
|
||||
Loop time of 0.00710845 on 4 procs
|
||||
120 63603 0 64 0 2866
|
||||
130 66749 0 68 0.0022 2710
|
||||
Loop time of 0.00220226 on 4 procs
|
||||
|
||||
Solve time (%) = 0.000247002 (3.47476)
|
||||
Solve time (%) = 8.013e-05 (3.63854)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.00100386 (14.1221)
|
||||
Outpt time (%) = 0.00416774 (58.6307)
|
||||
App time (%) = 0.00143349 (20.166)
|
||||
Other time (%) = 0.00025636 (3.60641)
|
||||
Comm time (%) = 0.000362387 (16.4552)
|
||||
Outpt time (%) = 0.000819649 (37.2186)
|
||||
App time (%) = 0.000844146 (38.3309)
|
||||
Other time (%) = 9.59462e-05 (4.35672)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
130 66901 0 0 0 2480
|
||||
140 69617 0 0 0.00723 2462
|
||||
Loop time of 0.00725645 on 4 procs
|
||||
130 66749 0 68 0 2710
|
||||
140 69868 0 72 0.00276 2822
|
||||
Loop time of 0.00276561 on 4 procs
|
||||
|
||||
Solve time (%) = 0.000262678 (3.61992)
|
||||
Solve time (%) = 8.8444e-05 (3.19799)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.000848353 (11.691)
|
||||
Outpt time (%) = 0.00418752 (57.7076)
|
||||
App time (%) = 0.00152171 (20.9704)
|
||||
Other time (%) = 0.000436187 (6.01102)
|
||||
Comm time (%) = 0.000566006 (20.4659)
|
||||
Outpt time (%) = 0.00100224 (36.2395)
|
||||
App time (%) = 0.000938724 (33.9427)
|
||||
Other time (%) = 0.000170192 (6.15388)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
140 69617 0 0 0 2462
|
||||
150 72516 0 0 0.0077 2368
|
||||
Loop time of 0.00771403 on 4 procs
|
||||
140 69868 0 72 0 2822
|
||||
150 72809 0 77 0.00203 2530
|
||||
Loop time of 0.00203296 on 4 procs
|
||||
|
||||
Solve time (%) = 0.000279188 (3.61922)
|
||||
Solve time (%) = 6.10922e-05 (3.00508)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.00115103 (14.9212)
|
||||
Outpt time (%) = 0.00420797 (54.5495)
|
||||
App time (%) = 0.00164241 (21.2911)
|
||||
Other time (%) = 0.000433445 (5.61892)
|
||||
Comm time (%) = 0.000430907 (21.196)
|
||||
Outpt time (%) = 0.000773949 (38.07)
|
||||
App time (%) = 0.000649508 (31.9488)
|
||||
Other time (%) = 0.000117508 (5.78011)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
150 72516 0 0 0 2368
|
||||
160 75201 0 0 0.00745 2384
|
||||
Loop time of 0.00747746 on 4 procs
|
||||
150 72809 0 77 0 2530
|
||||
160 75490 0 82 0.00243 2560
|
||||
Loop time of 0.00243939 on 4 procs
|
||||
|
||||
Solve time (%) = 0.00026089 (3.48901)
|
||||
Solve time (%) = 7.29237e-05 (2.98943)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.00115579 (15.457)
|
||||
Outpt time (%) = 0.00416714 (55.7293)
|
||||
App time (%) = 0.0015164 (20.2796)
|
||||
Other time (%) = 0.000377238 (5.045)
|
||||
Comm time (%) = 0.000533877 (21.8857)
|
||||
Outpt time (%) = 0.000900521 (36.9159)
|
||||
App time (%) = 0.000753532 (30.8902)
|
||||
Other time (%) = 0.000178534 (7.31879)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
160 75201 0 0 0 2384
|
||||
170 77794 0 0 0.00709 2286
|
||||
Loop time of 0.00710869 on 4 procs
|
||||
160 75490 0 82 0 2560
|
||||
170 78382 0 86 0.00203 2424
|
||||
Loop time of 0.00203432 on 4 procs
|
||||
|
||||
Solve time (%) = 0.000261724 (3.68175)
|
||||
Solve time (%) = 6.05745e-05 (2.97762)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.000879705 (12.3751)
|
||||
Outpt time (%) = 0.00419676 (59.0371)
|
||||
App time (%) = 0.00145274 (20.4362)
|
||||
Other time (%) = 0.000317752 (4.46992)
|
||||
Comm time (%) = 0.000357404 (17.5687)
|
||||
Outpt time (%) = 0.000830967 (40.8473)
|
||||
App time (%) = 0.000642883 (31.6018)
|
||||
Other time (%) = 0.000142495 (7.00454)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
170 77794 0 0 0 2286
|
||||
180 80320 0 0 0.00723 2186
|
||||
Loop time of 0.00725418 on 4 procs
|
||||
170 78382 0 86 0 2424
|
||||
180 81046 0 90 0.00266 2450
|
||||
Loop time of 0.00266286 on 4 procs
|
||||
|
||||
Solve time (%) = 0.000241041 (3.32279)
|
||||
Solve time (%) = 7.05732e-05 (2.65028)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.00100464 (13.8491)
|
||||
Outpt time (%) = 0.00413877 (57.0535)
|
||||
App time (%) = 0.00144053 (19.8579)
|
||||
Other time (%) = 0.000429213 (5.91677)
|
||||
Comm time (%) = 0.000638214 (23.9672)
|
||||
Outpt time (%) = 0.00102986 (38.6749)
|
||||
App time (%) = 0.000760398 (28.5557)
|
||||
Other time (%) = 0.000163817 (6.15191)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
180 80320 0 0 0 2186
|
||||
190 82621 0 0 0.00686 2204
|
||||
Loop time of 0.00687295 on 4 procs
|
||||
180 81046 0 90 0 2450
|
||||
190 83562 0 94 0.00216 2402
|
||||
Loop time of 0.0021675 on 4 procs
|
||||
|
||||
Solve time (%) = 0.000222385 (3.23565)
|
||||
Solve time (%) = 6.2358e-05 (2.87696)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.000860512 (12.5203)
|
||||
Outpt time (%) = 0.00418121 (60.8357)
|
||||
App time (%) = 0.00126499 (18.4053)
|
||||
Other time (%) = 0.000343859 (5.00308)
|
||||
Comm time (%) = 0.000536287 (24.7422)
|
||||
Outpt time (%) = 0.000802317 (37.0158)
|
||||
App time (%) = 0.000649124 (29.9481)
|
||||
Other time (%) = 0.000117412 (5.41694)
|
||||
run 10Setting up run ...
|
||||
Time Naccept Nreject Nsweeps CPU Energy
|
||||
190 82621 0 0 0 2204
|
||||
200 84907 0 0 0.00681 2276
|
||||
Loop time of 0.0068413 on 4 procs
|
||||
190 83562 0 94 0 2402
|
||||
200 86036 0 98 0.0021 2306
|
||||
Loop time of 0.00210625 on 4 procs
|
||||
|
||||
Solve time (%) = 0.000233412 (3.4118)
|
||||
Solve time (%) = 5.94018e-05 (2.82026)
|
||||
Update time (%) = 0 (0)
|
||||
Comm time (%) = 0.000758171 (11.0823)
|
||||
Outpt time (%) = 0.00421125 (61.5562)
|
||||
App time (%) = 0.00125164 (18.2953)
|
||||
Other time (%) = 0.000386834 (5.65439)
|
||||
Comm time (%) = 0.000492842 (23.399)
|
||||
Outpt time (%) = 0.000817012 (38.7899)
|
||||
App time (%) = 0.000597335 (28.3601)
|
||||
Other time (%) = 0.00013966 (6.63072)
|
||||
|
||||
@ -1 +1,3 @@
|
||||
#define SPKPATH /home/sjplimp/spparks
|
||||
// path to your SPPARKS home directory
|
||||
|
||||
#define SPKPATH /home/sjplimp/spparks/git
|
||||
|
||||
@ -6,7 +6,7 @@ SPPARKS applications in 2 sister directories.
|
||||
The library dir has a Makefile (which you may need to edit for your
|
||||
box). If you type
|
||||
|
||||
g++ -f Makefile.g++
|
||||
make -f Makefile.mpi
|
||||
|
||||
you should create libcouple.a, which the other coupled applications
|
||||
link to.
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
#include <mpi.h>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include "error.h"
|
||||
#include "errorlib.h"
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
Error::Error(MPI_Comm caller)
|
||||
ErrorLib::ErrorLib(MPI_Comm caller)
|
||||
{
|
||||
comm = caller;
|
||||
MPI_Comm_rank(comm,&me);
|
||||
@ -15,7 +15,7 @@ Error::Error(MPI_Comm caller)
|
||||
called by all procs
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Error::all(const char *str)
|
||||
void ErrorLib::all(const char *str)
|
||||
{
|
||||
if (me == 0) printf("ERROR: %s\n",str);
|
||||
MPI_Finalize();
|
||||
@ -26,7 +26,7 @@ void Error::all(const char *str)
|
||||
called by one proc
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Error::one(const char *str)
|
||||
void ErrorLib::one(const char *str)
|
||||
{
|
||||
printf("ERROR on proc %d: %s\n",me,str);
|
||||
MPI_Abort(comm,1);
|
||||
@ -36,7 +36,7 @@ void Error::one(const char *str)
|
||||
called by one proc
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Error::warning(const char *str)
|
||||
void ErrorLib::warning(const char *str)
|
||||
{
|
||||
printf("WARNING: %s\n",str);
|
||||
}
|
||||
@ -1,11 +1,11 @@
|
||||
#ifndef ERROR_H
|
||||
#define ERROR_H
|
||||
#ifndef ERRORLIB_H
|
||||
#define ERRORLIB_H
|
||||
|
||||
#include <mpi.h>
|
||||
|
||||
class Error {
|
||||
class ErrorLib {
|
||||
public:
|
||||
Error(MPI_Comm);
|
||||
ErrorLib(MPI_Comm);
|
||||
|
||||
void all(const char *);
|
||||
void one(const char *);
|
||||
@ -29,7 +29,7 @@ void replace(char *file, char *header, int n, char **lines)
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
char **extract(char *file, char *header, int n, char **lines)
|
||||
void extract(char *file, char *header, int n, char **lines)
|
||||
{
|
||||
FILE *fp = fopen(file,"r");
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
#ifndef FILES_H
|
||||
#define FILES_H
|
||||
void replace(char *, char *, int, char **);
|
||||
char **extract(char *, char *, int, char **);
|
||||
void extract(char *, char *, int, char **);
|
||||
#endif
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include "irregular.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "memorylib.h"
|
||||
#include "errorlib.h"
|
||||
|
||||
#define MAX(A,B) ((A) > (B)) ? (A) : (B)
|
||||
|
||||
@ -18,8 +18,8 @@ Irregular::Irregular(MPI_Comm caller)
|
||||
MPI_Comm_rank(comm,&me);
|
||||
MPI_Comm_size(comm,&nprocs);
|
||||
|
||||
memory = new Memory(comm);
|
||||
error = new Error(comm);
|
||||
memory = new MemoryLib(comm);
|
||||
error = new ErrorLib(comm);
|
||||
|
||||
init();
|
||||
|
||||
@ -119,7 +119,7 @@ void Irregular::pattern(int n, int *proclist)
|
||||
for (int i = 0; i < nrecv; i++)
|
||||
MPI_Irecv(&recvcount[i],1,MPI_INT,MPI_ANY_SOURCE,0,comm,&request[i]);
|
||||
|
||||
// barrier to insure receives are posted
|
||||
// barrier to ensure receives are posted
|
||||
|
||||
MPI_Barrier(comm);
|
||||
|
||||
@ -128,7 +128,7 @@ void Irregular::pattern(int n, int *proclist)
|
||||
for (int i = 0; i < nsend; i++)
|
||||
MPI_Send(&sendcount[i],1,MPI_INT,sendproc[i],0,comm);
|
||||
|
||||
// insure all MPI_ANY_SOURCE messages are received
|
||||
// ensure all MPI_ANY_SOURCE messages are received
|
||||
// set recvproc
|
||||
|
||||
if (nrecv) MPI_Waitall(nrecv,request,status);
|
||||
@ -270,7 +270,7 @@ void Irregular::exchange_same(char *sendbuf, char *recvbuf)
|
||||
|
||||
char *buf = (char *) memory->smalloc(nsendmax,"buf");
|
||||
|
||||
// barrier to insure receives are posted
|
||||
// barrier to ensure receives are posted
|
||||
|
||||
MPI_Barrier(comm);
|
||||
|
||||
@ -325,7 +325,7 @@ void Irregular::exchange_varying(char *sendbuf, char *recvbuf)
|
||||
|
||||
char *buf = (char *) memory->smalloc(nsendmax,"buf");
|
||||
|
||||
// barrier to insure receives are posted
|
||||
// barrier to ensure receives are posted
|
||||
|
||||
MPI_Barrier(comm);
|
||||
|
||||
|
||||
@ -46,8 +46,8 @@ class Irregular {
|
||||
MPI_Status *status; // MPI statuses for Waitall
|
||||
MPI_Comm comm; // MPI communicator for all communication
|
||||
|
||||
class Memory *memory;
|
||||
class Error *error;
|
||||
class MemoryLib *memory;
|
||||
class ErrorLib *error;
|
||||
|
||||
void exchange_same(char *, char *);
|
||||
void exchange_varying(char *, char *);
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include "lammps_data_write.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "memorylib.h"
|
||||
#include "errorlib.h"
|
||||
|
||||
#define DELTA 4;
|
||||
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
#include <cstdio>
|
||||
#include "many2many.h"
|
||||
#include "irregular.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "memorylib.h"
|
||||
#include "errorlib.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
@ -18,8 +18,8 @@ Many2Many::Many2Many(MPI_Comm caller)
|
||||
MPI_Comm_rank(comm,&me);
|
||||
MPI_Comm_size(comm,&nprocs);
|
||||
|
||||
memory = new Memory(comm);
|
||||
error = new Error(comm);
|
||||
memory = new MemoryLib(comm);
|
||||
error = new ErrorLib(comm);
|
||||
|
||||
src_own = dest_own = NULL;
|
||||
src_off = dest_off = NULL;
|
||||
|
||||
@ -15,8 +15,8 @@ class Many2Many {
|
||||
protected:
|
||||
int me,nprocs;
|
||||
MPI_Comm comm;
|
||||
class Memory *memory;
|
||||
class Error *error;
|
||||
class MemoryLib *memory;
|
||||
class ErrorLib *error;
|
||||
|
||||
int nown; // # of IDs common to src and dest
|
||||
int nsrc_off,ndest_off; // # of off-processor IDs
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include "many2one.h"
|
||||
#include "memory.h"
|
||||
#include "memorylib.h"
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -12,7 +12,7 @@ Many2One::Many2One(MPI_Comm caller_comm)
|
||||
MPI_Comm_rank(comm,&me);
|
||||
MPI_Comm_size(comm,&nprocs);
|
||||
|
||||
memory = new Memory(comm);
|
||||
memory = new MemoryLib(comm);
|
||||
|
||||
if (me == 0) {
|
||||
counts = new int[nprocs];
|
||||
|
||||
@ -14,7 +14,7 @@ class Many2One {
|
||||
protected:
|
||||
int me,nprocs;
|
||||
MPI_Comm comm;
|
||||
class Memory *memory;
|
||||
class MemoryLib *memory;
|
||||
|
||||
int nsrc,nall;
|
||||
int *counts,*multicounts;
|
||||
|
||||
@ -1,19 +1,19 @@
|
||||
#include <mpi.h>
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "memorylib.h"
|
||||
#include "errorlib.h"
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
Memory::Memory(MPI_Comm comm)
|
||||
MemoryLib::MemoryLib(MPI_Comm comm)
|
||||
{
|
||||
error = new Error(comm);
|
||||
error = new ErrorLib(comm);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
Memory::~Memory()
|
||||
MemoryLib::~MemoryLib()
|
||||
{
|
||||
delete error;
|
||||
}
|
||||
@ -22,7 +22,7 @@ Memory::~Memory()
|
||||
safe malloc
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void *Memory::smalloc(int n, const char *name)
|
||||
void *MemoryLib::smalloc(int n, const char *name)
|
||||
{
|
||||
if (n == 0) return NULL;
|
||||
void *ptr = malloc(n);
|
||||
@ -38,7 +38,7 @@ void *Memory::smalloc(int n, const char *name)
|
||||
safe free
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Memory::sfree(void *ptr)
|
||||
void MemoryLib::sfree(void *ptr)
|
||||
{
|
||||
if (ptr == NULL) return;
|
||||
free(ptr);
|
||||
@ -48,7 +48,7 @@ void Memory::sfree(void *ptr)
|
||||
safe realloc
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void *Memory::srealloc(void *ptr, int n, const char *name)
|
||||
void *MemoryLib::srealloc(void *ptr, int n, const char *name)
|
||||
{
|
||||
if (n == 0) {
|
||||
sfree(ptr);
|
||||
@ -68,7 +68,7 @@ void *Memory::srealloc(void *ptr, int n, const char *name)
|
||||
create a 2d double array
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
double **Memory::create_2d_double_array(int n1, int n2, const char *name)
|
||||
double **MemoryLib::create_2d_double_array(int n1, int n2, const char *name)
|
||||
|
||||
{
|
||||
double *data = (double *) smalloc(n1*n2*sizeof(double),name);
|
||||
@ -89,7 +89,7 @@ double **Memory::create_2d_double_array(int n1, int n2, const char *name)
|
||||
if either dim is 0, return NULL
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
double **Memory::grow_2d_double_array(double **array,
|
||||
double **MemoryLib::grow_2d_double_array(double **array,
|
||||
int n1, int n2, const char *name)
|
||||
|
||||
{
|
||||
@ -111,7 +111,7 @@ double **Memory::grow_2d_double_array(double **array,
|
||||
free a 2d double array
|
||||
------------------------------------------------------------------------- */
|
||||
|
||||
void Memory::destroy_2d_double_array(double **array)
|
||||
void MemoryLib::destroy_2d_double_array(double **array)
|
||||
|
||||
{
|
||||
if (array == NULL) return;
|
||||
@ -1,12 +1,12 @@
|
||||
#ifndef MEMORY_H
|
||||
#define MEMORY_H
|
||||
#ifndef MEMORY_LIB_H
|
||||
#define MEMORY_LIB_H
|
||||
|
||||
#include <mpi.h>
|
||||
|
||||
class Memory {
|
||||
class MemoryLib {
|
||||
public:
|
||||
Memory(MPI_Comm);
|
||||
~Memory();
|
||||
MemoryLib(MPI_Comm);
|
||||
~MemoryLib();
|
||||
|
||||
void *smalloc(int n, const char *);
|
||||
void sfree(void *);
|
||||
@ -17,7 +17,7 @@ class Memory {
|
||||
void destroy_2d_double_array(double **);
|
||||
|
||||
private:
|
||||
class Error *error;
|
||||
class ErrorLib *error;
|
||||
};
|
||||
|
||||
#endif
|
||||
@ -1,7 +1,7 @@
|
||||
#include <mpi.h>
|
||||
#include <cstdlib>
|
||||
#include "one2many.h"
|
||||
#include "memory.h"
|
||||
#include "memorylib.h"
|
||||
|
||||
#include <map>
|
||||
|
||||
@ -13,7 +13,7 @@ One2Many::One2Many(MPI_Comm caller_comm)
|
||||
MPI_Comm_rank(comm,&me);
|
||||
MPI_Comm_size(comm,&nprocs);
|
||||
|
||||
memory = new Memory(comm);
|
||||
memory = new MemoryLib(comm);
|
||||
hash = new std::map<int,int>();
|
||||
}
|
||||
|
||||
|
||||
@ -16,7 +16,7 @@ class One2Many {
|
||||
protected:
|
||||
int me,nprocs;
|
||||
MPI_Comm comm;
|
||||
class Memory *memory;
|
||||
class MemoryLib *memory;
|
||||
std::map<int,int> *hash;
|
||||
int nsrc;
|
||||
};
|
||||
|
||||
@ -2,8 +2,8 @@
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include "send2one.h"
|
||||
#include "memory.h"
|
||||
#include "error.h"
|
||||
#include "memorylib.h"
|
||||
#include "errorlib.h"
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -13,8 +13,8 @@ Send2One::Send2One(MPI_Comm caller_comm)
|
||||
MPI_Comm_rank(comm,&me);
|
||||
MPI_Comm_size(comm,&nprocs);
|
||||
|
||||
memory = new Memory(comm);
|
||||
error = new Error(comm);
|
||||
memory = new MemoryLib(comm);
|
||||
error = new ErrorLib(comm);
|
||||
|
||||
buf = NULL;
|
||||
maxbuf = 0;
|
||||
|
||||
@ -13,8 +13,8 @@ class Send2One {
|
||||
protected:
|
||||
int me,nprocs;
|
||||
MPI_Comm comm;
|
||||
class Memory *memory;
|
||||
class Error *error;
|
||||
class MemoryLib *memory;
|
||||
class ErrorLib *error;
|
||||
|
||||
int maxbuf;
|
||||
char *buf;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/
|
||||
Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
LAMMPS development team: developers@lammps.org
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
|
||||
1
examples/COUPLE/plugin/.gitignore
vendored
Normal file
1
examples/COUPLE/plugin/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/build
|
||||
44
examples/COUPLE/plugin/CMakeLists.txt
Normal file
44
examples/COUPLE/plugin/CMakeLists.txt
Normal file
@ -0,0 +1,44 @@
|
||||
# -*- CMake -*- file for example programs that use the LAMMPS library
|
||||
# where the library is loaded dynamically at runtime.
|
||||
##########################################
|
||||
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
# enforce out-of-source build
|
||||
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
message(FATAL_ERROR "In-source builds are not allowed. You must create and use a build directory. "
|
||||
"Please remove CMakeCache.txt and CMakeFiles first.")
|
||||
endif()
|
||||
|
||||
project(liblammpsplugin VERSION 1.0 LANGUAGES C)
|
||||
|
||||
# by default, install into $HOME/.local (not /usr/local),
|
||||
# so that no root access (and sudo) is needed
|
||||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/.local" CACHE PATH "Default install path" FORCE)
|
||||
endif()
|
||||
|
||||
# ugly hacks for MSVC which by default always reports an old C++ standard in the __cplusplus macro
|
||||
# and prints lots of pointless warnings about "unsafe" functions
|
||||
if(MSVC)
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
||||
add_compile_options(/EHsc)
|
||||
endif()
|
||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
find_package(MPI REQUIRED)
|
||||
# do not include the (obsolete) MPI C++ bindings which makes
|
||||
# for leaner object files and avoids namespace conflicts
|
||||
set(MPI_CXX_SKIP_MPICXX TRUE)
|
||||
|
||||
##########################
|
||||
|
||||
add_executable(simple-plugin simple.c liblammpsplugin.c)
|
||||
target_link_libraries(simple-plugin PRIVATE MPI::MPI_C)
|
||||
target_compile_definitions(simple-plugin PRIVATE LAMMPS_LIB_MPI)
|
||||
|
||||
# link with -ldl or equivalent for plugin loading; except on Windows
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} STREQUAL "Windows")
|
||||
target_link_libraries(simple-plugin PRIVATE ${CMAKE_DL_LIBS})
|
||||
endif()
|
||||
@ -11,32 +11,39 @@ liblammpsplugin.c is the LAMMPS library plugin loader
|
||||
You can then build the driver executable codes with a compile line
|
||||
like below.
|
||||
|
||||
mpicc -c -O -Wall -g -I$HOME/lammps/src liblammpsplugin.c
|
||||
mpicc -c -O -Wall -g simple.c
|
||||
mpicc simple.o liblammpsplugin.o -ldl -o simpleC
|
||||
mpicc -c -O -DLAMMPS_LIB_MPI -Wall -g liblammpsplugin.c
|
||||
mpicc -c -O -DLAMMPS_LIB_MPI -Wall -g simple.c
|
||||
mpicc simple.o liblammpsplugin.o -ldl -o simple-plugin
|
||||
|
||||
or using the provided CMake file with:
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
cmake ../
|
||||
cmake --build .
|
||||
|
||||
You also need to build LAMMPS as a shared library
|
||||
(see examples/COUPLE/README), e.g.
|
||||
(see examples/COUPLE/README), e.g.
|
||||
|
||||
cd $HOME/lammps/src
|
||||
make mode=shlib mpi
|
||||
|
||||
or
|
||||
or
|
||||
|
||||
cd $HOME/lammps
|
||||
mkdir build-shared
|
||||
cd build-shared
|
||||
cmake -D BUILD_LIB=on -D BUILD_SHARED_LIBS=on ../cmake
|
||||
cmake -D BUILD_MPI=on -D BUILD_SHARED_LIBS=on ../cmake
|
||||
make
|
||||
|
||||
You then run simpleC on a parallel machine
|
||||
You then run simple-plugin on a parallel machine
|
||||
on some number of processors Q with 3 arguments:
|
||||
|
||||
% mpirun -np Q simpleC P in.lj $HOME/lammps/src/liblammps.so
|
||||
% mpirun -np Q simple-plugin P in.lj $HOME/lammps/src/liblammps.so
|
||||
|
||||
or
|
||||
|
||||
% mpirun -np Q simpleC P in.lj $HOME/lammps/build-shared/liblammps.so
|
||||
% mpirun -np Q simple-plugin P in.lj $HOME/lammps/build-shared/liblammps.so
|
||||
|
||||
P is the number of procs you want LAMMPS to run on (must be <= Q) and
|
||||
in.lj is a LAMMPS input script and the last argument is the path to
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/ Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
LAMMPS development team: developers@lammps.org
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
@ -18,10 +18,29 @@
|
||||
a LAMMPS plugin to some other software.
|
||||
*/
|
||||
|
||||
#include "library.h"
|
||||
#include "liblammpsplugin.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32_WINNT)
|
||||
#undef _WIN32_WINNT
|
||||
#endif
|
||||
|
||||
// target Windows version is windows 7 and later
|
||||
#define _WIN32_WINNT _WIN32_WINNT_WIN7
|
||||
#define PSAPI_VERSION 2
|
||||
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
liblammpsplugin_t *liblammpsplugin_load(const char *lib)
|
||||
{
|
||||
@ -29,14 +48,30 @@ liblammpsplugin_t *liblammpsplugin_load(const char *lib)
|
||||
void *handle;
|
||||
|
||||
if (lib == NULL) return NULL;
|
||||
|
||||
#ifdef _WIN32
|
||||
handle = (void *) LoadLibrary(lib);
|
||||
#else
|
||||
handle = dlopen(lib,RTLD_NOW|RTLD_GLOBAL);
|
||||
#endif
|
||||
if (handle == NULL) return NULL;
|
||||
|
||||
lmp = (liblammpsplugin_t *) malloc(sizeof(liblammpsplugin_t));
|
||||
lmp = (liblammpsplugin_t *) calloc(1, sizeof(liblammpsplugin_t));
|
||||
lmp->abiversion = LAMMPSPLUGIN_ABI_VERSION;
|
||||
lmp->handle = handle;
|
||||
|
||||
#define ADDSYM(symbol) lmp->symbol = dlsym(handle,"lammps_" #symbol)
|
||||
#ifdef _WIN32
|
||||
#define ADDSYM(symbol) *(void **) (&lmp->symbol) = (void *) GetProcAddress((HINSTANCE) handle, "lammps_" #symbol)
|
||||
#else
|
||||
#define ADDSYM(symbol) *(void **) (&lmp->symbol) = dlsym(handle,"lammps_" #symbol)
|
||||
#endif
|
||||
|
||||
#if defined(LAMMPS_LIB_MPI)
|
||||
ADDSYM(open);
|
||||
#else
|
||||
lmp->open = NULL;
|
||||
#endif
|
||||
|
||||
ADDSYM(open_no_mpi);
|
||||
ADDSYM(open_fortran);
|
||||
ADDSYM(close);
|
||||
@ -46,6 +81,8 @@ liblammpsplugin_t *liblammpsplugin_load(const char *lib)
|
||||
ADDSYM(kokkos_finalize);
|
||||
ADDSYM(python_finalize);
|
||||
|
||||
ADDSYM(error);
|
||||
|
||||
ADDSYM(file);
|
||||
ADDSYM(command);
|
||||
ADDSYM(commands_list);
|
||||
@ -53,6 +90,7 @@ liblammpsplugin_t *liblammpsplugin_load(const char *lib)
|
||||
|
||||
ADDSYM(get_natoms);
|
||||
ADDSYM(get_thermo);
|
||||
ADDSYM(last_thermo);
|
||||
|
||||
ADDSYM(extract_box);
|
||||
ADDSYM(reset_box);
|
||||
@ -70,14 +108,26 @@ liblammpsplugin_t *liblammpsplugin_load(const char *lib)
|
||||
ADDSYM(extract_compute);
|
||||
ADDSYM(extract_fix);
|
||||
ADDSYM(extract_variable);
|
||||
ADDSYM(extract_variable_datatype);
|
||||
ADDSYM(set_variable);
|
||||
ADDSYM(variable_info);
|
||||
|
||||
ADDSYM(gather_atoms);
|
||||
ADDSYM(gather_atoms_concat);
|
||||
ADDSYM(gather_atoms_subset);
|
||||
ADDSYM(scatter_atoms);
|
||||
ADDSYM(scatter_atoms_subset);
|
||||
|
||||
ADDSYM(gather_bonds);
|
||||
ADDSYM(gather_angles);
|
||||
ADDSYM(gather_dihedrals);
|
||||
ADDSYM(gather_impropers);
|
||||
|
||||
ADDSYM(gather);
|
||||
ADDSYM(gather_concat);
|
||||
ADDSYM(gather_subset);
|
||||
ADDSYM(scatter);
|
||||
ADDSYM(scatter_subset);
|
||||
|
||||
ADDSYM(create_atoms);
|
||||
|
||||
@ -116,6 +166,9 @@ liblammpsplugin_t *liblammpsplugin_load(const char *lib)
|
||||
ADDSYM(plugin_count);
|
||||
ADDSYM(plugin_name);
|
||||
|
||||
ADDSYM(encode_image_flags);
|
||||
ADDSYM(decode_image_flags);
|
||||
|
||||
ADDSYM(set_fix_external_callback);
|
||||
ADDSYM(fix_external_get_force);
|
||||
ADDSYM(fix_external_set_energy_global);
|
||||
@ -125,20 +178,20 @@ liblammpsplugin_t *liblammpsplugin_load(const char *lib)
|
||||
ADDSYM(fix_external_set_vector_length);
|
||||
ADDSYM(fix_external_set_vector);
|
||||
|
||||
ADDSYM(flush_buffers);
|
||||
|
||||
ADDSYM(free);
|
||||
|
||||
ADDSYM(is_running);
|
||||
ADDSYM(force_timeout);
|
||||
|
||||
#ifdef LAMMPS_EXCEPTIONS
|
||||
lmp->has_exceptions = 1;
|
||||
ADDSYM(has_error);
|
||||
ADDSYM(get_last_error_message);
|
||||
#else
|
||||
lmp->has_exceptions = 0;
|
||||
lmp->has_error = NULL;
|
||||
lmp->get_last_error_message = NULL;
|
||||
#endif
|
||||
lmp->has_exceptions = lmp->config_has_exceptions();
|
||||
if (lmp->has_exceptions) {
|
||||
ADDSYM(has_error);
|
||||
ADDSYM(get_last_error_message);
|
||||
}
|
||||
|
||||
ADDSYM(python_api_version);
|
||||
return lmp;
|
||||
}
|
||||
|
||||
@ -147,7 +200,11 @@ int liblammpsplugin_release(liblammpsplugin_t *lmp)
|
||||
if (lmp == NULL) return 1;
|
||||
if (lmp->handle == NULL) return 2;
|
||||
|
||||
#ifdef _WIN32
|
||||
FreeLibrary((HINSTANCE) lmp->handle);
|
||||
#else
|
||||
dlclose(lmp->handle);
|
||||
#endif
|
||||
free((void *)lmp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* -*- c++ -*- ----------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/ Sandia National Laboratories
|
||||
Steve Plimpton, sjplimp@sandia.gov
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
LAMMPS development team: developers@lammps.org
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
@ -28,11 +28,72 @@
|
||||
#define LAMMPS_SMALLBIG
|
||||
#endif
|
||||
|
||||
#if defined(LAMMPS_LIB_MPI)
|
||||
#include <mpi.h>
|
||||
#if defined(LAMMPS_BIGBIG) || defined(LAMMPS_SMALLBIG)
|
||||
#include <inttypes.h> /* for int64_t */
|
||||
#endif
|
||||
|
||||
#if defined(LAMMPS_BIGBIG) || defined(LAMMPS_SMALLBIG)
|
||||
#include <stdint.h> /* for int64_t */
|
||||
#endif
|
||||
|
||||
/* The following enums must be kept in sync with the equivalent enums
|
||||
* or constants in src/library.h, src/lmptype.h, python/lammps/constants.py,
|
||||
* fortran/lammps.f90, and tools/swig/lammps.i */
|
||||
|
||||
/* Data type constants for extracting data from atoms, computes and fixes */
|
||||
|
||||
enum _LMP_DATATYPE_CONST {
|
||||
LAMMPS_NONE = -1, /*!< no data type assigned (yet) */
|
||||
LAMMPS_INT = 0, /*!< 32-bit integer (array) */
|
||||
LAMMPS_INT_2D = 1, /*!< two-dimensional 32-bit integer array */
|
||||
LAMMPS_DOUBLE = 2, /*!< 64-bit double (array) */
|
||||
LAMMPS_DOUBLE_2D = 3, /*!< two-dimensional 64-bit double array */
|
||||
LAMMPS_INT64 = 4, /*!< 64-bit integer (array) */
|
||||
LAMMPS_INT64_2D = 5, /*!< two-dimensional 64-bit integer array */
|
||||
LAMMPS_STRING = 6 /*!< C-String */
|
||||
};
|
||||
|
||||
/* Style constants for extracting data from computes and fixes. */
|
||||
|
||||
enum _LMP_STYLE_CONST {
|
||||
LMP_STYLE_GLOBAL = 0, /*!< return global data */
|
||||
LMP_STYLE_ATOM = 1, /*!< return per-atom data */
|
||||
LMP_STYLE_LOCAL = 2 /*!< return local data */
|
||||
};
|
||||
|
||||
/* Type and size constants for extracting data from computes and fixes. */
|
||||
|
||||
enum _LMP_TYPE_CONST {
|
||||
LMP_TYPE_SCALAR = 0, /*!< return scalar */
|
||||
LMP_TYPE_VECTOR = 1, /*!< return vector */
|
||||
LMP_TYPE_ARRAY = 2, /*!< return array */
|
||||
LMP_SIZE_VECTOR = 3, /*!< return length of vector */
|
||||
LMP_SIZE_ROWS = 4, /*!< return number of rows */
|
||||
LMP_SIZE_COLS = 5 /*!< return number of columns */
|
||||
};
|
||||
|
||||
/* Error codes to select the suitable function in the Error class */
|
||||
|
||||
enum _LMP_ERROR_CONST {
|
||||
LMP_ERROR_WARNING = 0, /*!< call Error::warning() */
|
||||
LMP_ERROR_ONE = 1, /*!< called from one MPI rank */
|
||||
LMP_ERROR_ALL = 2, /*!< called from all MPI ranks */
|
||||
LMP_ERROR_WORLD = 4, /*!< error on Comm::world */
|
||||
LMP_ERROR_UNIVERSE = 8 /*!< error on Comm::universe */
|
||||
};
|
||||
|
||||
/** Variable style constants for extracting data from variables.
|
||||
*
|
||||
* Must be kept in sync with the equivalent constants in python/lammps/constants.py,
|
||||
* fortran/lammps.f90, and tools/swig/lammps.i */
|
||||
|
||||
enum _LMP_VAR_CONST {
|
||||
LMP_VAR_EQUAL = 0, /*!< compatible with equal-style variables */
|
||||
LMP_VAR_ATOM = 1, /*!< compatible with atom-style variables */
|
||||
LMP_VAR_VECTOR = 2, /*!< compatible with vector-style variables */
|
||||
LMP_VAR_STRING = 3 /*!< return value will be a string (catch-all) */
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@ -45,11 +106,16 @@ typedef void (*FixExternalFnPtr)(void *, int, int, int *, double **, double **);
|
||||
typedef void (*FixExternalFnPtr)(void *, int64_t, int, int *, double **, double **);
|
||||
#endif
|
||||
|
||||
#define LAMMPSPLUGIN_ABI_VERSION 2
|
||||
struct _liblammpsplugin {
|
||||
int abiversion;
|
||||
int has_exceptions;
|
||||
void *handle;
|
||||
#if defined(LAMMPS_LIB_MPI)
|
||||
void *(*open)(int, char **, MPI_Comm, void **);
|
||||
#else
|
||||
void *open;
|
||||
#endif
|
||||
void *(*open_no_mpi)(int, char **, void **);
|
||||
void *(*open_fortran)(int, char **, void **, int);
|
||||
void (*close)(void *);
|
||||
@ -59,13 +125,16 @@ struct _liblammpsplugin {
|
||||
void (*kokkos_finalize)();
|
||||
void (*python_finalize)();
|
||||
|
||||
void (*file)(void *, char *);
|
||||
void (*error)(void *, int, const char *);
|
||||
|
||||
void (*file)(void *, const char *);
|
||||
char *(*command)(void *, const char *);
|
||||
void (*commands_list)(void *, int, const char **);
|
||||
void (*commands_string)(void *, const char *);
|
||||
|
||||
double (*get_natoms)(void *);
|
||||
double (*get_thermo)(void *, char *);
|
||||
double (*get_thermo)(void *, const char *);
|
||||
void *(*last_thermo)(void *, const char *, int);
|
||||
|
||||
void (*extract_box)(void *, double *, double *,
|
||||
double *, double *, double *, int *, int *);
|
||||
@ -78,37 +147,46 @@ struct _liblammpsplugin {
|
||||
int *(*extract_global_datatype)(void *, const char *);
|
||||
void *(*extract_global)(void *, const char *);
|
||||
|
||||
void *(*extract_atom_datatype)(void *, const char *);
|
||||
int *(*extract_atom_datatype)(void *, const char *);
|
||||
void *(*extract_atom)(void *, const char *);
|
||||
|
||||
void *(*extract_compute)(void *, const char *, int, int);
|
||||
void *(*extract_fix)(void *, const char *, int, int, int, int);
|
||||
void *(*extract_variable)(void *, const char *, char *);
|
||||
int (*extract_variable_datatype)(void *, const char *);
|
||||
int (*set_variable)(void *, char *, char *);
|
||||
int (*variable_info)(void *, int, char *, int);
|
||||
|
||||
void (*gather_atoms)(void *, char *, int, int, void *);
|
||||
void (*gather_atoms_concat)(void *, char *, int, int, void *);
|
||||
void (*gather_atoms_subset)(void *, char *, int, int, int, int *, void *);
|
||||
void (*scatter_atoms)(void *, char *, int, int, void *);
|
||||
void (*scatter_atoms_subset)(void *, char *, int, int, int, int *, void *);
|
||||
void (*gather_atoms)(void *, const char *, int, int, void *);
|
||||
void (*gather_atoms_concat)(void *, const char *, int, int, void *);
|
||||
void (*gather_atoms_subset)(void *, const char *, int, int, int, int *, void *);
|
||||
void (*scatter_atoms)(void *, const char *, int, int, void *);
|
||||
void (*scatter_atoms_subset)(void *, const char *, int, int, int, int *, void *);
|
||||
|
||||
void (*gather_bonds)(void *, void *);
|
||||
|
||||
// lammps_create_atoms() takes tagint and imageint as args
|
||||
// ifdef insures they are compatible with rest of LAMMPS
|
||||
// caller must match to how LAMMPS library is built
|
||||
void (*gather_angles)(void *, void *);
|
||||
void (*gather_dihedrals)(void *, void *);
|
||||
void (*gather_impropers)(void *, void *);
|
||||
|
||||
void (*gather)(void *, const char *, int, int, void *);
|
||||
void (*gather_concat)(void *, const char *, int, int, void *);
|
||||
void (*gather_subset)(void *, const char *, int, int, int, int *,void *);
|
||||
void (*scatter)(void *, const char *, int, int, void *);
|
||||
void (*scatter_subset)(void *, const char *, int, int, int, int *, void *);
|
||||
|
||||
/* lammps_create_atoms() takes tagint and imageint as args
|
||||
* the ifdef ensures they are compatible with rest of LAMMPS
|
||||
* caller must match to how LAMMPS library is built */
|
||||
|
||||
#ifndef LAMMPS_BIGBIG
|
||||
void (*create_atoms)(void *, int, int *, int *, double *,
|
||||
double *, int *, int);
|
||||
int (*create_atoms)(void *, int, int *, int *, double *, double *, int *, int);
|
||||
#else
|
||||
void (*create_atoms)(void *, int, int64_t *, int *, double *,
|
||||
double *, int64_t *, int);
|
||||
int (*create_atoms)(void *, int, int64_t *, int *, double *, double *, int64_t *, int);
|
||||
#endif
|
||||
|
||||
int (*find_pair_neighlist)(void *, const char *, int, int, int);
|
||||
int (*find_fix_neighlist)(void *, const char *, int);
|
||||
int (*find_compute_neighlist)(void *, char *, int);
|
||||
int (*find_compute_neighlist)(void *, const char *, int);
|
||||
int (*neighlist_num_elements)(void *, int);
|
||||
void (*neighlist_element_neighbors)(void *, int, int, int *, int *, int **);
|
||||
|
||||
@ -141,8 +219,16 @@ struct _liblammpsplugin {
|
||||
int (*plugin_count)();
|
||||
int (*plugin_name)(int, char *, char *, int);
|
||||
|
||||
void (*set_fix_external_callback)(void *, const char *, FixExternalFnPtr, void*);
|
||||
void (*fix_external_get_force)(void *, const char *);
|
||||
#if !defined(LAMMPS_BIGBIG)
|
||||
int (*encode_image_flags)(int, int, int);
|
||||
void (*decode_image_flags)(int, int *);
|
||||
#else
|
||||
int64_t (*encode_image_flags)(int, int, int);
|
||||
void (*decode_image_flags)(int64_t, int *);
|
||||
#endif
|
||||
|
||||
void (*set_fix_external_callback)(void *, const char *, FixExternalFnPtr, void *);
|
||||
double **(*fix_external_get_force)(void *, const char *);
|
||||
void (*fix_external_set_energy_global)(void *, const char *, double);
|
||||
void (*fix_external_set_energy_peratom)(void *, const char *, double *);
|
||||
void (*fix_external_set_virial_global)(void *, const char *, double *);
|
||||
@ -150,13 +236,17 @@ struct _liblammpsplugin {
|
||||
void (*fix_external_set_vector_length)(void *, const char *, int);
|
||||
void (*fix_external_set_vector)(void *, const char *, int, double);
|
||||
|
||||
void (*flush_buffers)(void *);
|
||||
|
||||
void (*free)(void *);
|
||||
|
||||
void (*is_running)(void *);
|
||||
int (*is_running)(void *);
|
||||
void (*force_timeout)(void *);
|
||||
|
||||
int (*has_error)(void *);
|
||||
int (*get_last_error_message)(void *, char *, int);
|
||||
|
||||
int (*python_api_version)();
|
||||
};
|
||||
|
||||
typedef struct _liblammpsplugin liblammpsplugin_t;
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
www.cs.sandia.gov/~sjplimp/lammps.html
|
||||
Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories
|
||||
https://www.lammps.org, Sandia National Laboratories
|
||||
LAMMPS development team: developers@lammps.org
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
@ -19,10 +19,16 @@
|
||||
in.lammps = LAMMPS input script
|
||||
See README for compilation instructions */
|
||||
|
||||
#include <mpi.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <mpi.h>
|
||||
|
||||
/* define so interface to lammps_open() is available,
|
||||
since we will run on split communicator */
|
||||
#define LAMMPS_LIB_MPI 1
|
||||
|
||||
#include "liblammpsplugin.h" /* this is the include for the plugin loader */
|
||||
|
||||
int main(int narg, char **arg)
|
||||
@ -47,7 +53,7 @@ int main(int narg, char **arg)
|
||||
MPI_Init(&narg,&arg);
|
||||
|
||||
if (narg != 4) {
|
||||
printf("Syntax: simpleC P in.lammps /path/to/liblammps.so\n");
|
||||
printf("Syntax: %s P in.lammps /path/to/liblammps.so\n", arg[0]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -86,8 +92,20 @@ int main(int narg, char **arg)
|
||||
if (me == 0) printf("ERROR: Could not load shared LAMMPS library\n");
|
||||
MPI_Abort(MPI_COMM_WORLD,1);
|
||||
}
|
||||
/* must match the plugin ABI version */
|
||||
if (plugin->abiversion != LAMMPSPLUGIN_ABI_VERSION) {
|
||||
if (me == 0) printf("ERROR: Plugin abi version does not match: %d vs %d\n",
|
||||
plugin->abiversion, LAMMPSPLUGIN_ABI_VERSION);
|
||||
MPI_Abort(MPI_COMM_WORLD,1);
|
||||
}
|
||||
}
|
||||
if (lammps == 1) {
|
||||
if (plugin->open == NULL) {
|
||||
printf("ERROR: liblammpsmpi.c must be compiled with -DLAMMPS_LIB_MPI=1 for this program\n");
|
||||
MPI_Abort(MPI_COMM_WORLD,2);
|
||||
}
|
||||
lmp = plugin->open(0,NULL,comm_lammps,NULL);
|
||||
}
|
||||
if (lammps == 1) lmp = plugin->open(0,NULL,comm_lammps,NULL);
|
||||
|
||||
while (1) {
|
||||
if (me == 0) {
|
||||
@ -112,24 +130,25 @@ int main(int narg, char **arg)
|
||||
|
||||
int natoms = plugin->get_natoms(lmp);
|
||||
x = (double *) malloc(3*natoms*sizeof(double));
|
||||
plugin->gather_atoms(lmp,"x",1,3,x);
|
||||
plugin->gather_atoms(lmp,(char *)"x",1,3,x);
|
||||
v = (double *) malloc(3*natoms*sizeof(double));
|
||||
plugin->gather_atoms(lmp,"v",1,3,v);
|
||||
plugin->gather_atoms(lmp,(char *)"v",1,3,v);
|
||||
double epsilon = 0.1;
|
||||
x[0] += epsilon;
|
||||
plugin->scatter_atoms(lmp,"x",1,3,x);
|
||||
plugin->scatter_atoms(lmp,(char *)"x",1,3,x);
|
||||
|
||||
plugin->command(lmp,"run 1");
|
||||
}
|
||||
|
||||
// extract force on single atom two different ways
|
||||
/* extract force on single atom two different ways */
|
||||
|
||||
if (lammps == 1) {
|
||||
double **f = (double **) plugin->extract_atom(lmp,"f");
|
||||
printf("Force on 1 atom via extract_atom: %g\n",f[0][0]);
|
||||
|
||||
double *fx = (double *) plugin->extract_variable(lmp,"fx","all");
|
||||
double *fx = (double *) plugin->extract_variable(lmp,"fx",(char *)"all");
|
||||
printf("Force on 1 atom via extract_variable: %g\n",fx[0]);
|
||||
plugin->free(fx);
|
||||
}
|
||||
|
||||
/* use commands_string() and commands_list() to invoke more commands */
|
||||
@ -160,7 +179,7 @@ int main(int narg, char **arg)
|
||||
if (v) free(v);
|
||||
if (type) free(type);
|
||||
|
||||
// close down LAMMPS
|
||||
/* close down LAMMPS */
|
||||
|
||||
if (lammps == 1) {
|
||||
plugin->close(lmp);
|
||||
|
||||
@ -1,17 +1,88 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(simple CXX)
|
||||
# -*- CMake -*- file for simple examples using the LAMMPS library interface
|
||||
|
||||
set(LAMMPS_SRC_DIRECTORY "" CACHE PATH "Path for lammps source")
|
||||
if(NOT LAMMPS_SRC_DIRECTORY STREQUAL "" AND EXISTS ${LAMMPS_SRC_DIRECTORY}/cmake/CMakeLists.txt)
|
||||
option(BUILD_LIB "Build LAMMPS library" ON)
|
||||
add_subdirectory(${LAMMPS_SRC_DIRECTORY}/cmake lammps)
|
||||
else()
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
# enforce out-of-source build
|
||||
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
|
||||
message(FATAL_ERROR "In-source builds are not allowed. You must create and use a build directory. "
|
||||
"Please remove CMakeCache.txt and CMakeFiles first.")
|
||||
endif()
|
||||
|
||||
project(couple-simple VERSION 1.0 LANGUAGES C CXX)
|
||||
|
||||
# by default, install into $HOME/.local (not /usr/local),
|
||||
# so that no root access (and sudo) is needed
|
||||
if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
|
||||
set(CMAKE_INSTALL_PREFIX "$ENV{HOME}/.local" CACHE PATH "Default install path" FORCE)
|
||||
endif()
|
||||
|
||||
# ugly hacks for MSVC which by default always reports an old C++ standard in the __cplusplus macro
|
||||
# and prints lots of pointless warnings about "unsafe" functions
|
||||
if(MSVC)
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
||||
add_compile_options(/EHsc)
|
||||
endif()
|
||||
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||
endif()
|
||||
|
||||
find_package(MPI QUIET)
|
||||
# do not include the (obsolete) MPI C++ bindings which makes
|
||||
# for leaner object files and avoids namespace conflicts
|
||||
set(MPI_CXX_SKIP_MPICXX TRUE)
|
||||
|
||||
##########################
|
||||
|
||||
# build within LAMMPS build system
|
||||
if(NOT LAMMPS_SOURCE_DIR)
|
||||
find_package(LAMMPS REQUIRED)
|
||||
endif()
|
||||
|
||||
add_executable(simpleCC simple.cpp)
|
||||
target_link_libraries(simpleCC LAMMPS::lammps)
|
||||
target_link_libraries(simpleCC PRIVATE LAMMPS::lammps MPI::MPI_CXX)
|
||||
|
||||
enable_language(C)
|
||||
add_executable(simpleC simple.c)
|
||||
target_link_libraries(simpleC LAMMPS::lammps)
|
||||
target_link_libraries(simpleC PRIVATE LAMMPS::lammps MPI::MPI_C)
|
||||
|
||||
if(LAMMPS_SOURCE_DIR)
|
||||
include(CheckGeneratorSupport)
|
||||
if(NOT CMAKE_GENERATOR_SUPPORT_FORTRAN)
|
||||
message(STATUS "Skipping Test for the LAMMPS Fortran Module Coupling: no Fortran support in build tool")
|
||||
return()
|
||||
endif()
|
||||
|
||||
include(CheckLanguage)
|
||||
check_language(Fortran)
|
||||
if(CMAKE_Fortran_COMPILER)
|
||||
enable_language(Fortran)
|
||||
# need to check for MPI again to include Fortran components, since Fortran wasn't enabled before
|
||||
find_package(MPI QUIET COMPONENTS Fortran)
|
||||
|
||||
if(NOT (MPI_Fortran_FOUND AND MPI_Fortran_HAVE_F90_MODULE))
|
||||
message(STATUS "Insufficient MPI Fortran support. Skipping building simpleF90")
|
||||
return()
|
||||
endif()
|
||||
|
||||
# GNU Fortran 4.8.x on RHEL/CentOS 7.x is not sufficient to compile the Fortran module.
|
||||
# GNU Fortran 7.x on Ubuntu 18.04LTS fails as well.
|
||||
# Work around flang being detected as GNU
|
||||
get_filename_component(_tmp_fc ${CMAKE_Fortran_COMPILER} NAME)
|
||||
if((CMAKE_Fortran_COMPILER_ID STREQUAL "GNU") AND (CMAKE_Fortran_COMPILER_VERSION VERSION_LESS 9.0) AND NOT (_tmp_fc STREQUAL "flang"))
|
||||
message(STATUS "Need GNU Fortran compiler version 9.x or later for LAMMPS Fortran module")
|
||||
return()
|
||||
endif()
|
||||
|
||||
get_filename_component(LAMMPS_FORTRAN_MODULE ${LAMMPS_SOURCE_DIR}/../fortran/lammps.f90 ABSOLUTE)
|
||||
add_executable(simpleF90 ${LAMMPS_FORTRAN_MODULE} simple.f90)
|
||||
target_link_libraries(simpleF90 PRIVATE MPI::MPI_Fortran LAMMPS::lammps)
|
||||
|
||||
get_filename_component(_tmp_fc ${CMAKE_Fortran_COMPILER} NAME)
|
||||
if (_tmp_fc STREQUAL "flang")
|
||||
target_link_libraries(simpleF90 PRIVATE gfortran)
|
||||
endif()
|
||||
include(CheckFortranCompilerFlag)
|
||||
check_fortran_compiler_flag(-fallow-argument-mismatch HAS_MISMATCH)
|
||||
if(HAS_MISMATCH)
|
||||
target_compile_options(simpleF90 PRIVATE -fallow-argument-mismatch)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -8,9 +8,8 @@ code to perform a coupled calculation.
|
||||
simple.cpp is the C++ driver
|
||||
simple.c is the C driver
|
||||
simple.f90 is the Fortran driver using the new Fortran module
|
||||
simple_f77.f90 is the Fortran driver using the legacy Fortran wrapper
|
||||
|
||||
The 4 codes do the same thing, so you can compare them to see how to
|
||||
The 3 codes do the same thing, so you can compare them to see how to
|
||||
drive LAMMPS from each language. See python/example/simple.py
|
||||
to do something similar from Python. The new Fortran driver requires
|
||||
a Fortran module that uses the Fortran 03 ISO_C_BINDING module to
|
||||
@ -45,12 +44,7 @@ the fortran directory:
|
||||
|
||||
mpifort -L${HOME}/lammps/src ../../../fortran/lammps.f90 simple.f90 -llammps -o simpleF
|
||||
|
||||
This builds the legacy Fortran wrapper and driver with the LAMMPS library
|
||||
using the mpifort (Fortran) MPI compiler wrapper (assuming GNU gfortran).
|
||||
|
||||
mpifort -std=legacy -L${HOME}/lammps/src ../fortran/libfwrapper.c simple.f90 -llammps -o simpleF77
|
||||
|
||||
You then run simpleCC, simpleC, simpleF, or simpleF77 on a parallel machine
|
||||
You then run simpleCC, simpleC, or simpleF on a parallel machine
|
||||
on some number of processors Q with 2 arguments:
|
||||
|
||||
% mpirun -np Q simpleCC P in.lj
|
||||
@ -72,8 +66,7 @@ of LAMMPS. You could add any functions you wish to this file to
|
||||
manipulate LAMMPS data however you wish.
|
||||
|
||||
The Fortran driver is using the Fortran 03 module which uses a derived
|
||||
type with type bound subroutines. Only a small subset of the C library
|
||||
functions are currently accessible through the Fortran module.
|
||||
type with type bound subroutines.
|
||||
|
||||
The C++ driver does the same thing, except that it instantiates LAMMPS
|
||||
as an object first. Some of the functions in src/library.cpp can be
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
www.cs.sandia.gov/~sjplimp/lammps.html
|
||||
Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
LAMMPS development team: developers@lammps.org
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
@ -35,7 +35,7 @@ int main(int narg, char **arg)
|
||||
MPI_Init(&narg,&arg);
|
||||
|
||||
if (narg != 3) {
|
||||
printf("Syntax: simpleC P in.lammps\n");
|
||||
printf("Syntax: %s P in.lammps\n", arg[0]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -121,6 +121,7 @@ int main(int narg, char **arg)
|
||||
|
||||
double *fx = (double *) lammps_extract_variable(lmp,"fx","all");
|
||||
printf("Force on 1 atom via extract_variable: %g\n",fx[0]);
|
||||
lammps_free(fx);
|
||||
}
|
||||
|
||||
/* use commands_string() and commands_list() to invoke more commands */
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
/* ----------------------------------------------------------------------
|
||||
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
https://www.lammps.org/
|
||||
Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories
|
||||
https://www.lammps.org/, Sandia National Laboratories
|
||||
LAMMPS development team: developers@lammps.org
|
||||
|
||||
Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
@ -41,7 +41,7 @@ int main(int narg, char **arg)
|
||||
MPI_Init(&narg,&arg);
|
||||
|
||||
if (narg != 3) {
|
||||
printf("Syntax: simpleCC P in.lammps\n");
|
||||
printf("Syntax: %s P in.lammps\n", arg[0]);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@ -67,7 +67,7 @@ int main(int narg, char **arg)
|
||||
FILE *fp;
|
||||
if (me == 0) {
|
||||
fp = fopen(arg[2],"r");
|
||||
if (fp == NULL) {
|
||||
if (fp == nullptr) {
|
||||
printf("ERROR: Could not open LAMMPS input script\n");
|
||||
MPI_Abort(MPI_COMM_WORLD,1);
|
||||
}
|
||||
@ -78,14 +78,14 @@ int main(int narg, char **arg)
|
||||
// (could just send it to proc 0 of comm_lammps and let it Bcast)
|
||||
// all LAMMPS procs call input->one() on the line
|
||||
|
||||
LAMMPS *lmp = NULL;
|
||||
if (lammps == 1) lmp = new LAMMPS(0,NULL,comm_lammps);
|
||||
LAMMPS *lmp = nullptr;
|
||||
if (lammps == 1) lmp = new LAMMPS(0,nullptr,comm_lammps);
|
||||
|
||||
int n;
|
||||
char line[1024];
|
||||
while (1) {
|
||||
while (true) {
|
||||
if (me == 0) {
|
||||
if (fgets(line,1024,fp) == NULL) n = 0;
|
||||
if (fgets(line,1024,fp) == nullptr) n = 0;
|
||||
else n = strlen(line) + 1;
|
||||
if (n == 0) fclose(fp);
|
||||
}
|
||||
@ -101,8 +101,8 @@ int main(int narg, char **arg)
|
||||
// put coords back into LAMMPS
|
||||
// run a single step with changed coords
|
||||
|
||||
double *x = NULL;
|
||||
double *v = NULL;
|
||||
double *x = nullptr;
|
||||
double *v = nullptr;
|
||||
|
||||
if (lammps == 1) {
|
||||
lmp->input->one("run 10");
|
||||
@ -125,12 +125,12 @@ int main(int narg, char **arg)
|
||||
// extract force on single atom two different ways
|
||||
|
||||
if (lammps == 1) {
|
||||
double **f = (double **) lammps_extract_atom(lmp,(char *) "f");
|
||||
double **f = (double **) lammps_extract_atom(lmp, "f");
|
||||
printf("Force on 1 atom via extract_atom: %g\n",f[0][0]);
|
||||
|
||||
double *fx = (double *)
|
||||
lammps_extract_variable(lmp,(char *) "fx",(char *) "all");
|
||||
double *fx = (double *) lammps_extract_variable(lmp, "fx", "all");
|
||||
printf("Force on 1 atom via extract_variable: %g\n",fx[0]);
|
||||
lammps_free(fx);
|
||||
}
|
||||
|
||||
// use commands_string() and commands_list() to invoke more commands
|
||||
@ -147,7 +147,7 @@ int main(int narg, char **arg)
|
||||
// create_atoms() to create new ones with old coords, vels
|
||||
// initial thermo should be same as step 20
|
||||
|
||||
int *type = NULL;
|
||||
int *type = nullptr;
|
||||
|
||||
if (lammps == 1) {
|
||||
int natoms = static_cast<int> (lmp->atom->natoms);
|
||||
@ -155,7 +155,7 @@ int main(int narg, char **arg)
|
||||
for (int i = 0; i < natoms; i++) type[i] = 1;
|
||||
|
||||
lmp->input->one("delete_atoms group all");
|
||||
lammps_create_atoms(lmp,natoms,NULL,type,x,v,NULL,0);
|
||||
lammps_create_atoms(lmp,natoms,nullptr,type,x,v,nullptr,0);
|
||||
lmp->input->one("run 10");
|
||||
}
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
! LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
! www.cs.sandia.gov/~sjplimp/lammps.html
|
||||
! Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories
|
||||
! https://www.lammps.org/, Sandia National Laboratories
|
||||
! LAMMPS development team: developers@lammps.org
|
||||
!
|
||||
! Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
! DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
@ -18,8 +18,8 @@
|
||||
! See README for compilation instructions
|
||||
|
||||
PROGRAM f_driver
|
||||
USE mpi
|
||||
USE liblammps
|
||||
USE mpi
|
||||
IMPLICIT NONE
|
||||
|
||||
INTEGER, PARAMETER :: fp=20
|
||||
@ -30,7 +30,7 @@ PROGRAM f_driver
|
||||
REAL (kind=8), ALLOCATABLE :: x(:)
|
||||
REAL (kind=8), PARAMETER :: epsilon=0.1
|
||||
|
||||
CHARACTER (len=64) :: arg
|
||||
CHARACTER (len=1024) :: arg
|
||||
CHARACTER (len=1024) :: line
|
||||
|
||||
! setup MPI and various communicators
|
||||
@ -129,7 +129,10 @@ PROGRAM f_driver
|
||||
|
||||
! free LAMMPS object
|
||||
|
||||
IF (color == 1) CALL lmp%close()
|
||||
IF (color == 1) THEN
|
||||
CALL lmp%CLOSE()
|
||||
CALL mpi_comm_free(comm_lammps,ierr)
|
||||
END IF
|
||||
|
||||
! close down MPI
|
||||
|
||||
|
||||
@ -1,125 +0,0 @@
|
||||
! LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
|
||||
! www.cs.sandia.gov/~sjplimp/lammps.html
|
||||
! Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories
|
||||
!
|
||||
! Copyright (2003) Sandia Corporation. Under the terms of Contract
|
||||
! DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
|
||||
! certain rights in this software. This software is distributed under
|
||||
! the GNU General Public License.
|
||||
!
|
||||
! See the README file in the top-level LAMMPS directory.
|
||||
|
||||
! f_driver = simple example of how an umbrella program
|
||||
! can invoke LAMMPS as a library on some subset of procs
|
||||
! Syntax: simpleF P in.lammps
|
||||
! P = # of procs to run LAMMPS on
|
||||
! must be <= # of procs the driver code itself runs on
|
||||
! in.lammps = LAMMPS input script
|
||||
! See README for compilation instructions
|
||||
|
||||
PROGRAM f_driver
|
||||
IMPLICIT NONE
|
||||
INCLUDE 'mpif.h'
|
||||
|
||||
INTEGER, PARAMETER :: fp=20
|
||||
INTEGER :: n, narg, ierr, me, nprocs, natoms
|
||||
INTEGER :: lammps, nprocs_lammps, comm_lammps
|
||||
INTEGER (kind=8) :: ptr
|
||||
|
||||
REAL (kind=8), ALLOCATABLE :: x(:)
|
||||
REAL (kind=8), PARAMETER :: epsilon=0.1
|
||||
|
||||
CHARACTER (len=64) :: arg
|
||||
CHARACTER (len=1024) :: line
|
||||
|
||||
! setup MPI and various communicators
|
||||
! driver runs on all procs in MPI_COMM_WORLD
|
||||
! comm_lammps only has 1st P procs (could be all or any subset)
|
||||
|
||||
CALL mpi_init(ierr)
|
||||
|
||||
narg = command_argument_count()
|
||||
|
||||
IF (narg /= 2) THEN
|
||||
PRINT *, 'Syntax: simpleF P in.lammps'
|
||||
CALL mpi_abort(MPI_COMM_WORLD,1,ierr)
|
||||
END IF
|
||||
|
||||
CALL mpi_comm_rank(MPI_COMM_WORLD,me,ierr);
|
||||
CALL mpi_comm_size(MPI_COMM_WORLD,nprocs,ierr);
|
||||
|
||||
CALL get_command_argument(1,arg)
|
||||
READ (arg,'(I10)') nprocs_lammps
|
||||
|
||||
IF (nprocs_lammps > nprocs) THEN
|
||||
IF (me == 0) THEN
|
||||
PRINT *, 'ERROR: LAMMPS cannot use more procs than available'
|
||||
CALL mpi_abort(MPI_COMM_WORLD,2,ierr)
|
||||
END IF
|
||||
END IF
|
||||
|
||||
lammps = 0
|
||||
IF (me < nprocs_lammps) THEN
|
||||
lammps = 1
|
||||
ELSE
|
||||
lammps = MPI_UNDEFINED
|
||||
END IF
|
||||
|
||||
CALL mpi_comm_split(MPI_COMM_WORLD,lammps,0,comm_lammps,ierr)
|
||||
|
||||
! open LAMMPS input script on rank zero
|
||||
|
||||
CALL get_command_argument(2,arg)
|
||||
OPEN(UNIT=fp, FILE=arg, ACTION='READ', STATUS='OLD', IOSTAT=ierr)
|
||||
IF (ierr /= 0) THEN
|
||||
PRINT *, 'ERROR: Could not open LAMMPS input script'
|
||||
CALL mpi_abort(MPI_COMM_WORLD,3,ierr);
|
||||
END IF
|
||||
|
||||
! run the input script thru LAMMPS one line at a time until end-of-file
|
||||
! driver proc 0 reads a line, Bcasts it to all procs
|
||||
! (could just send it to proc 0 of comm_lammps and let it Bcast)
|
||||
! all LAMMPS procs call lammps_command() on the line */
|
||||
|
||||
IF (lammps == 1) CALL lammps_open(comm_lammps,ptr)
|
||||
|
||||
n = 0
|
||||
DO
|
||||
IF (me == 0) THEN
|
||||
READ (UNIT=fp, FMT='(A)', IOSTAT=ierr) line
|
||||
n = 0
|
||||
IF (ierr == 0) THEN
|
||||
n = LEN(TRIM(line))
|
||||
IF (n == 0 ) THEN
|
||||
line = ' '
|
||||
n = 1
|
||||
END IF
|
||||
END IF
|
||||
END IF
|
||||
CALL mpi_bcast(n,1,MPI_INTEGER,0,MPI_COMM_WORLD,ierr)
|
||||
IF (n == 0) EXIT
|
||||
CALL mpi_bcast(line,n,MPI_CHARACTER,0,MPI_COMM_WORLD,ierr)
|
||||
IF (lammps == 1) CALL lammps_command(ptr,line,n)
|
||||
END DO
|
||||
CLOSE(UNIT=fp)
|
||||
|
||||
! run 10 more steps followed by a single step */
|
||||
|
||||
IF (lammps == 1) THEN
|
||||
CALL lammps_command(ptr,'run 10',6)
|
||||
|
||||
CALL lammps_get_natoms(ptr,natoms)
|
||||
print*,'natoms=',natoms
|
||||
|
||||
CALL lammps_command(ptr,'run 1',5);
|
||||
END IF
|
||||
|
||||
! free LAMMPS object
|
||||
|
||||
IF (lammps == 1) CALL lammps_close(ptr);
|
||||
|
||||
! close down MPI
|
||||
|
||||
CALL mpi_finalize(ierr)
|
||||
|
||||
END PROGRAM f_driver
|
||||
@ -1,7 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import numpy as np
|
||||
|
||||
def reduce_Born(Cf):
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import numpy as np
|
||||
|
||||
def reduce_Born(Cf):
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import numpy as np
|
||||
from lammps import lammps, LAMMPS_INT, LMP_STYLE_GLOBAL, LMP_VAR_EQUAL, LMP_VAR_ATOM
|
||||
from lammps import lammps, LMP_VAR_EQUAL
|
||||
|
||||
# method for rotating elastic constants
|
||||
|
||||
|
||||
1
examples/PACKAGES/alchemy/AlCu.eam.alloy
Symbolic link
1
examples/PACKAGES/alchemy/AlCu.eam.alloy
Symbolic link
@ -0,0 +1 @@
|
||||
../../../potentials/AlCu.eam.alloy
|
||||
62
examples/PACKAGES/alchemy/h2o.mol
Normal file
62
examples/PACKAGES/alchemy/h2o.mol
Normal file
@ -0,0 +1,62 @@
|
||||
# Water molecule. SPC/E model.
|
||||
|
||||
3 atoms
|
||||
2 bonds
|
||||
1 angles
|
||||
|
||||
Coords
|
||||
|
||||
1 1.12456 0.09298 1.27452
|
||||
2 1.53683 0.75606 1.89928
|
||||
3 0.49482 0.56390 0.65678
|
||||
|
||||
Types
|
||||
|
||||
1 1
|
||||
2 2
|
||||
3 2
|
||||
|
||||
Charges
|
||||
|
||||
1 -0.8472
|
||||
2 0.4236
|
||||
3 0.4236
|
||||
|
||||
Bonds
|
||||
|
||||
1 1 1 2
|
||||
2 1 1 3
|
||||
|
||||
Angles
|
||||
|
||||
1 1 2 1 3
|
||||
|
||||
Shake Flags
|
||||
|
||||
1 1
|
||||
2 1
|
||||
3 1
|
||||
|
||||
Shake Atoms
|
||||
|
||||
1 1 2 3
|
||||
2 1 2 3
|
||||
3 1 2 3
|
||||
|
||||
Shake Bond Types
|
||||
|
||||
1 1 1 1
|
||||
2 1 1 1
|
||||
3 1 1 1
|
||||
|
||||
Special Bond Counts
|
||||
|
||||
1 2 0 0
|
||||
2 1 1 0
|
||||
3 1 1 0
|
||||
|
||||
Special Bonds
|
||||
|
||||
1 2 3
|
||||
2 1 3
|
||||
3 1 2
|
||||
45
examples/PACKAGES/alchemy/in.alloy
Normal file
45
examples/PACKAGES/alchemy/in.alloy
Normal file
@ -0,0 +1,45 @@
|
||||
# Example for an alchemical transformation simulation of pure copper into an aluminium bronze
|
||||
|
||||
# set up different names for two partitions
|
||||
variable name world pure alloy
|
||||
|
||||
# create pure copper system
|
||||
units metal
|
||||
lattice fcc 3.75
|
||||
region box block 0 6 0 6 0 6
|
||||
create_box 2 box
|
||||
|
||||
timestep 0.002
|
||||
create_atoms 1 box
|
||||
displace_atoms all random 0.3 0.3 0.3 57845645
|
||||
pair_style eam/alloy
|
||||
pair_coeff * * AlCu.eam.alloy Cu Al
|
||||
|
||||
# replace 5% of copper with aluminium on the second partition only
|
||||
if "${name} == alloy" then &
|
||||
"set type 1 type/fraction 2 0.05 6745234"
|
||||
|
||||
# define ramp variable to combine the two different partitions
|
||||
if "${name} == pure" then &
|
||||
"variable ramp equal ramp(1.0,0.0)" &
|
||||
else &
|
||||
"variable ramp equal ramp(0.0,1.0)"
|
||||
|
||||
velocity all create 5000.0 6567345
|
||||
fix 1 all nvt temp 2500.0 500.0 0.002
|
||||
fix 2 all alchemy v_ramp
|
||||
|
||||
compute pressure all pressure/alchemy 2
|
||||
|
||||
# only need to output a dump file from one partition
|
||||
#if "${name} == alloy" then &
|
||||
# "dump 1 all custom 100 ${name}.lammpstrj id type element x y z" &
|
||||
# "dump_modify 1 element Cu Al"
|
||||
|
||||
thermo_style custom step temp press etotal density pe ke f_2 f_2[3]
|
||||
thermo_modify colname f_2 lambda colname f_2[3] EPot_mixed
|
||||
thermo_modify press pressure
|
||||
|
||||
thermo 100
|
||||
run 10000 post no
|
||||
|
||||
100
examples/PACKAGES/alchemy/in.twowater
Normal file
100
examples/PACKAGES/alchemy/in.twowater
Normal file
@ -0,0 +1,100 @@
|
||||
# Example for an alchemical transformation of two water molecules into a hydronium and hydroxyl ion
|
||||
# WARNING: This input is intended for demonstrating the method only,
|
||||
# the force field parameters are mostly made up and NOT suitable for production simulations.
|
||||
|
||||
# set up different names for two partitions
|
||||
variable name world twowater twoions
|
||||
|
||||
units real
|
||||
atom_style full
|
||||
atom_modify map array
|
||||
region box block -5 5 -5 5 -5 5
|
||||
boundary p p p
|
||||
create_box 2 box bond/types 2 angle/types 2 &
|
||||
extra/bond/per/atom 3 extra/angle/per/atom 3 extra/special/per/atom 3
|
||||
|
||||
mass 1 15.9994
|
||||
mass 2 1.008
|
||||
|
||||
pair_style lj/cut/coul/cut 10.0
|
||||
pair_coeff 1 1 0.1553 3.166
|
||||
pair_coeff 1 2 0.0 1.0
|
||||
pair_coeff 2 2 0.0 1.0
|
||||
|
||||
bond_style harmonic
|
||||
bond_coeff * 1000.0 1.0
|
||||
|
||||
angle_style harmonic
|
||||
angle_coeff * 100.0 109.47
|
||||
|
||||
molecule water h2o.mol
|
||||
|
||||
# create the two molecules we want to transform ...
|
||||
create_atoms 0 single -2.0 0.0 0.0 mol water 453624
|
||||
create_atoms 0 single 2.0 0.0 0.0 mol water 767353
|
||||
|
||||
# ... and put them in a group
|
||||
group transform id 1:6
|
||||
|
||||
# now fill the rest of the box with more water
|
||||
create_atoms 0 random 32 34564 NULL mol water 25367 overlap 1.33
|
||||
|
||||
# change topology and settings for the two states
|
||||
# we cannot simply create a different topology directly or
|
||||
# load a different data file because the order and position
|
||||
# of all atoms must be maintained across both replica
|
||||
|
||||
# we first have to remove all topology data in the transform group
|
||||
delete_bonds transform bond 1
|
||||
delete_bonds transform angle 1 remove
|
||||
|
||||
# then generate different topologies for the two partitions. select by name.
|
||||
if "${name} == twowater" then &
|
||||
"create_bonds single/bond 2 1 2" &
|
||||
"create_bonds single/bond 2 1 3" &
|
||||
"create_bonds single/bond 2 4 5" &
|
||||
"create_bonds single/bond 2 4 6" &
|
||||
"create_bonds single/angle 2 2 1 3" &
|
||||
"create_bonds single/angle 2 5 4 6" &
|
||||
else &
|
||||
"create_bonds single/bond 2 1 2" &
|
||||
"create_bonds single/bond 2 3 4" &
|
||||
"create_bonds single/bond 2 4 5" &
|
||||
"create_bonds single/bond 2 4 6" &
|
||||
"create_bonds single/angle 2 3 4 5" &
|
||||
"create_bonds single/angle 2 5 4 6" &
|
||||
"create_bonds single/angle 2 3 4 6" &
|
||||
"set atom 1 charge -1.1354" &
|
||||
"set atom 2 charge 0.1354" &
|
||||
"set atom 3 charge 0.56775" &
|
||||
"set atom 4 charge -0.70305" &
|
||||
"set atom 5*6 charge 0.56775"
|
||||
|
||||
velocity all create 300.0 5463576
|
||||
timestep 0.2
|
||||
|
||||
# define ramp variable to combine the two different partitions
|
||||
if "${name} == twowater" then &
|
||||
"variable ramp equal ramp(1.0,0.0)" &
|
||||
else &
|
||||
"variable ramp equal ramp(0.0,1.0)"
|
||||
|
||||
# since the trajectory and forces are kept identical through fix alchemy,
|
||||
# we can do fix npt simulations, but we must use the "mixed" pressure
|
||||
|
||||
fix integrate all npt temp 300 300 1.0 iso 1.0 1.0 10.0
|
||||
fix transform all alchemy v_ramp
|
||||
compute pressure all pressure/alchemy transform
|
||||
fix_modify integrate press pressure
|
||||
|
||||
# only need to output a dump file from one partition
|
||||
# if "${name} == twowater" then &
|
||||
# "dump 1 all atom 100 ${name}.lammpstrj" &
|
||||
# "dump_modify 1 sort id"
|
||||
|
||||
thermo_style custom step temp press etotal density pe ke f_transform f_transform[3]
|
||||
thermo_modify colname f_transform lambda colname f_transform[3] EPot_mixed
|
||||
thermo_modify press pressure
|
||||
|
||||
thermo 100
|
||||
run 20000
|
||||
13
examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4
Normal file
13
examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4
Normal file
@ -0,0 +1,13 @@
|
||||
LAMMPS (8 Feb 2023)
|
||||
Running on 2 partitions of processors
|
||||
Starting alchemical transformation at 0%
|
||||
Alchemical transformation progress: 10%
|
||||
Alchemical transformation progress: 20%
|
||||
Alchemical transformation progress: 30%
|
||||
Alchemical transformation progress: 40%
|
||||
Alchemical transformation progress: 50%
|
||||
Alchemical transformation progress: 60%
|
||||
Alchemical transformation progress: 70%
|
||||
Alchemical transformation progress: 80%
|
||||
Alchemical transformation progress: 90%
|
||||
Alchemical transformation progress: 100%
|
||||
169
examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4.0
Normal file
169
examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4.0
Normal file
@ -0,0 +1,169 @@
|
||||
LAMMPS (8 Feb 2023)
|
||||
Processor partition = 0
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# Example for an alchemical transformation simulation of pure copper into an aluminium bronze
|
||||
|
||||
# set up different names for two partitions
|
||||
variable name world pure alloy
|
||||
|
||||
# create pure copper system
|
||||
units metal
|
||||
lattice fcc 3.75
|
||||
Lattice spacing in x,y,z = 3.75 3.75 3.75
|
||||
region box block 0 6 0 6 0 6
|
||||
create_box 2 box
|
||||
Created orthogonal box = (0 0 0) to (22.5 22.5 22.5)
|
||||
1 by 1 by 2 MPI processor grid
|
||||
|
||||
timestep 0.002
|
||||
create_atoms 1 box
|
||||
Created 864 atoms
|
||||
using lattice units in orthogonal box = (0 0 0) to (22.5 22.5 22.5)
|
||||
create_atoms CPU = 0.001 seconds
|
||||
displace_atoms all random 0.3 0.3 0.3 57845645
|
||||
Displacing atoms ...
|
||||
pair_style eam/alloy
|
||||
pair_coeff * * AlCu.eam.alloy Cu Al
|
||||
Reading eam/alloy potential file AlCu.eam.alloy with DATE: 2008-10-01
|
||||
|
||||
# replace 5% of copper with aluminium on the second partition only
|
||||
if "${name} == alloy" then "set type 1 type/fraction 2 0.05 6745234"
|
||||
|
||||
# define ramp variable to combine the two different partitions
|
||||
if "${name} == pure" then "variable ramp equal ramp(1.0,0.0)" else "variable ramp equal ramp(0.0,1.0)"
|
||||
variable ramp equal ramp(1.0,0.0)
|
||||
|
||||
velocity all create 5000.0 6567345
|
||||
fix 1 all nvt temp 2500.0 500.0 0.002
|
||||
fix 2 all alchemy v_ramp
|
||||
|
||||
compute pressure all pressure/alchemy 2
|
||||
|
||||
# only need to output a dump file from one partition
|
||||
#if "${name} == alloy" then # "dump 1 all custom 100 ${name}.lammpstrj id type element x y z" # "dump_modify 1 element Cu Al"
|
||||
|
||||
thermo_style custom step temp press etotal density pe ke f_2 f_2[3]
|
||||
thermo_modify colname f_2 lambda colname f_2[3] EPot_mixed
|
||||
thermo_modify press pressure
|
||||
|
||||
thermo 100
|
||||
run 10000 post no
|
||||
Neighbor list info ...
|
||||
update: every = 1 steps, delay = 0 steps, check = yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 8.6825
|
||||
ghost atom cutoff = 8.6825
|
||||
binsize = 4.34125, bins = 6 6 6
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair eam/alloy, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/atomonly/newton
|
||||
stencil: half/bin/3d
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 3.474 | 3.474 | 3.474 Mbytes
|
||||
Step Temp Press TotEng Density PotEng KinEng lambda EPot_mixed
|
||||
0 5000 2135632.8 10911.637 8.0039334 10353.88 557.75753 1 10353.88
|
||||
100 2424.8703 98461.445 -2402.724 8.0039334 -2673.222 270.49793 0.99 -2673.3837
|
||||
200 2404.4922 111478.55 -2381.5114 8.0039334 -2649.7361 268.22473 0.98 -2650.057
|
||||
300 2388.2899 109429.75 -2387.7985 8.0039334 -2654.2158 266.41733 0.97 -2654.7075
|
||||
400 2377.6418 97114.07 -2409.7114 8.0039334 -2674.9409 265.22953 0.96 -2675.755
|
||||
500 2371.5028 98285.746 -2408.3248 8.0039334 -2672.8695 264.54471 0.95 -2673.6895
|
||||
600 2368.0363 101125.13 -2402.9816 8.0039334 -2667.1396 264.15802 0.94 -2668.238
|
||||
700 2364.8386 96916.491 -2410.1795 8.0039334 -2673.9808 263.80131 0.93 -2675.3394
|
||||
800 2361.5815 101050.97 -2404.7579 8.0039334 -2668.1958 263.43797 0.92 -2669.6797
|
||||
900 2355.1085 95290.542 -2416.4508 8.0039334 -2679.1667 262.7159 0.91 -2681.0381
|
||||
1000 2344.579 90348.199 -2430.3553 8.0039334 -2691.8966 261.54132 0.9 -2693.7969
|
||||
1100 2328.7808 87089.44 -2435.1426 8.0039334 -2694.9216 259.779 0.89 -2696.9199
|
||||
1200 2310.0924 89628.642 -2438.4943 8.0039334 -2696.1886 257.69429 0.88 -2698.4983
|
||||
1300 2288.2762 92771.824 -2430.0042 8.0039334 -2685.2648 255.26065 0.87 -2687.6406
|
||||
1400 2258.3028 83029.221 -2451.9432 8.0039334 -2703.8603 251.91707 0.86 -2706.638
|
||||
1500 2226.5131 83386 -2452.9658 8.0039334 -2701.3367 248.37089 0.85 -2704.0915
|
||||
1600 2192.5777 81801.467 -2460.6692 8.0039334 -2705.2546 244.58535 0.84 -2708.3304
|
||||
1700 2158.7421 84933.294 -2456.2782 8.0039334 -2697.0891 240.81093 0.83 -2700.142
|
||||
1800 2123.8912 76700.779 -2474.2534 8.0039334 -2711.1767 236.92327 0.82 -2714.6978
|
||||
1900 2091.3912 82568.985 -2469.6316 8.0039334 -2702.9295 233.29783 0.81 -2706.5643
|
||||
2000 2061.868 79024.983 -2476.3262 8.0039334 -2706.3307 230.00448 0.8 -2710.7
|
||||
2100 2036.179 72408.502 -2493.6936 8.0039334 -2720.8324 227.13884 0.79 -2725.1617
|
||||
2200 2014.0161 81172.694 -2479.0525 8.0039334 -2703.719 224.66652 0.78 -2708.4618
|
||||
2300 1996.2707 78029.129 -2485.3835 8.0039334 -2708.0706 222.687 0.77 -2712.5894
|
||||
2400 1982.6409 79691.571 -2483.2441 8.0039334 -2704.4107 221.16658 0.76 -2709.4434
|
||||
2500 1971.6774 75015.359 -2493.8754 8.0039334 -2713.819 219.94358 0.75 -2719.4159
|
||||
2600 1963.0369 74845.99 -2493.3203 8.0039334 -2712.3 218.97972 0.74 -2718.1619
|
||||
2700 1955.2025 76756.042 -2491.6282 8.0039334 -2709.7339 218.10578 0.73 -2716.0963
|
||||
2800 1947.4326 70627.84 -2507.5853 8.0039334 -2724.8243 217.23904 0.72 -2730.7999
|
||||
2900 1939.4308 70852.114 -2508.8277 8.0039334 -2725.1742 216.34642 0.71 -2731.5024
|
||||
3000 1929.3184 75867.616 -2497.0826 8.0039334 -2712.301 215.21837 0.7 -2718.4146
|
||||
3100 1916.202 68984.855 -2517.8316 8.0039334 -2731.5868 213.75522 0.69 -2738.0966
|
||||
3200 1901.363 73304.621 -2508.0281 8.0039334 -2720.128 212.09991 0.68 -2727.1933
|
||||
3300 1881.196 69447.29 -2513.9782 8.0039334 -2723.8285 209.85024 0.67 -2730.768
|
||||
3400 1856.1833 64973.868 -2526.8095 8.0039334 -2733.8695 207.06004 0.66 -2741.4173
|
||||
3500 1829.7246 64688.566 -2528.8664 8.0039334 -2732.9749 204.10853 0.65 -2740.986
|
||||
3600 1800.1245 56451.766 -2547.6377 8.0039334 -2748.4443 200.80659 0.64 -2756.4626
|
||||
3700 1771.5886 68268.147 -2530.5906 8.0039334 -2728.214 197.62337 0.63 -2735.8618
|
||||
3800 1740.3894 64187.24 -2539.0772 8.0039334 -2733.2202 194.14306 0.62 -2742.67
|
||||
3900 1709.6971 61697.296 -2548.5651 8.0039334 -2739.2844 190.71928 0.61 -2748.648
|
||||
4000 1680.6126 58960.336 -2557.3154 8.0039334 -2744.7902 187.47487 0.6 -2753.7317
|
||||
4100 1653.386 49607.708 -2575.5217 8.0039334 -2759.9594 184.43769 0.59 -2769.1633
|
||||
4200 1628.5806 59615.376 -2562.3155 8.0039334 -2743.9861 181.67062 0.58 -2753.41
|
||||
4300 1605.7638 57213.496 -2568.9241 8.0039334 -2748.0495 179.12536 0.57 -2758.0401
|
||||
4400 1586.3539 57319.854 -2567.3656 8.0039334 -2744.3258 176.96016 0.56 -2754.0451
|
||||
4500 1569.1762 51130.713 -2581.1996 8.0039334 -2756.2435 175.04397 0.55 -2767.0321
|
||||
4600 1554.2279 51209.179 -2582.5415 8.0039334 -2755.918 173.37646 0.54 -2767.2662
|
||||
4700 1541.2064 51391.73 -2584.9958 8.0039334 -2756.9197 171.92389 0.53 -2768.7565
|
||||
4800 1529.3566 48164.466 -2590.6042 8.0039334 -2761.2062 170.60203 0.52 -2773.7243
|
||||
4900 1517.8359 47270.397 -2595.8724 8.0039334 -2765.1893 169.31688 0.51 -2777.023
|
||||
5000 1506.2157 46127.507 -2595.6789 8.0039334 -2763.6995 168.02063 0.5 -2777.2298
|
||||
5100 1494.4675 45092.69 -2600.075 8.0039334 -2766.7851 166.7101 0.49 -2779.7181
|
||||
5200 1480.2051 41485.775 -2607.0151 8.0039334 -2772.1342 165.1191 0.48 -2785.5483
|
||||
5300 1465.1748 39849.775 -2612.3292 8.0039334 -2775.7716 163.44246 0.47 -2788.9493
|
||||
5400 1447.9857 39330.898 -2615.0485 8.0039334 -2776.5735 161.52498 0.46 -2790.3996
|
||||
5500 1427.9752 35674.647 -2624.4226 8.0039334 -2783.7154 159.29278 0.45 -2797.922
|
||||
5600 1406.1138 33960.907 -2630.1163 8.0039334 -2786.9704 156.85411 0.44 -2801.8887
|
||||
5700 1383.2834 39122.559 -2621.0951 8.0039334 -2775.4025 154.30734 0.43 -2790.3487
|
||||
5800 1357.4953 34996.372 -2632.2759 8.0039334 -2783.7065 151.43064 0.42 -2798.8306
|
||||
5900 1331.345 30380.598 -2640.9488 8.0039334 -2789.4624 148.51354 0.41 -2804.9873
|
||||
6000 1304.5621 26910.214 -2652.7787 8.0039334 -2798.3046 145.52587 0.4 -2814.8623
|
||||
6100 1278.2361 34273.343 -2642.9208 8.0039334 -2785.51 142.58917 0.39 -2801.9949
|
||||
6200 1251.7315 29640.216 -2651.6543 8.0039334 -2791.2868 139.63253 0.38 -2807.555
|
||||
6300 1226.3243 25302.881 -2660.8448 8.0039334 -2797.6431 136.79832 0.37 -2815.3412
|
||||
6400 1202.0501 23978.218 -2668.9812 8.0039334 -2803.0717 134.09049 0.36 -2820.0498
|
||||
6500 1178.656 25315.547 -2668.8266 8.0039334 -2800.3074 131.48085 0.35 -2817.3114
|
||||
6600 1156.9362 22676.36 -2673.1256 8.0039334 -2802.1835 129.05797 0.34 -2819.6239
|
||||
6700 1163.8953 22497.41 -2674.4164 8.0039334 -2804.2506 129.83427 0.33 -2821.3556
|
||||
6800 1123.3867 18193.925 -2685.3997 8.0039334 -2810.7152 125.31548 0.32 -2830.2267
|
||||
6900 1147.6164 19451.295 -2682.5112 8.0039334 -2810.5295 128.01834 0.31 -2830.1189
|
||||
7000 1096.0437 16757.031 -2689.5567 8.0039334 -2811.822 122.26532 0.3 -2832.475
|
||||
7100 1065.1232 11734.429 -2703.0123 8.0039334 -2821.8284 118.8161 0.29 -2841.8886
|
||||
7200 1048.459 15187.579 -2697.6953 8.0039334 -2814.6525 116.95718 0.28 -2834.2885
|
||||
7300 1067.9311 13697.721 -2698.4027 8.0039334 -2817.532 119.12932 0.27 -2838.9073
|
||||
7400 998.4963 13330.213 -2707.915 8.0039334 -2819.2987 111.38377 0.26 -2840.2979
|
||||
7500 1023.6105 7070.7227 -2712.3293 8.0039334 -2826.5146 114.18529 0.25 -2848.8706
|
||||
7600 970.8256 7694.074 -2717.03 8.0039334 -2825.3271 108.29706 0.24 -2848.0154
|
||||
7700 966.64807 2336.6244 -2727.1914 8.0039334 -2835.0224 107.83105 0.23 -2858.6468
|
||||
7800 961.41051 564.58952 -2731.2826 8.0039334 -2838.5294 107.24679 0.22 -2862.4362
|
||||
7900 880.63112 3569.7496 -2734.8614 8.0039334 -2833.0971 98.235727 0.21 -2857.2329
|
||||
8000 904.4189 -883.03123 -2738.386 8.0039334 -2839.2753 100.88929 0.2 -2864.1778
|
||||
8100 901.36129 -977.71992 -2739.797 8.0039334 -2840.3452 100.54821 0.19 -2864.7239
|
||||
8200 834.53102 2535.4088 -2741.7378 8.0039334 -2834.831 93.093191 0.18 -2859.9007
|
||||
8300 830.12299 -6039.909 -2755.2151 8.0039334 -2847.8166 92.601469 0.17 -2873.9613
|
||||
8400 807.63492 -5386.015 -2755.7433 8.0039334 -2845.8362 90.092891 0.16 -2872.8494
|
||||
8500 792.64609 -6372.4363 -2758.8515 8.0039334 -2847.2724 88.420864 0.15 -2874.8424
|
||||
8600 758.58937 -11610.225 -2770.2002 8.0039334 -2854.822 84.621786 0.14 -2882.1413
|
||||
8700 758.23023 -10178.597 -2769.9169 8.0039334 -2854.4986 84.581724 0.13 -2881.6683
|
||||
8800 743.6008 -12026.268 -2776.0268 8.0039334 -2858.9766 82.949788 0.12 -2886.1335
|
||||
8900 734.90694 -17472.954 -2783.3532 8.0039334 -2865.3332 81.979975 0.11 -2893.7244
|
||||
9000 707.10989 -17006.609 -2785.8037 8.0039334 -2864.6829 78.879173 0.1 -2893.2911
|
||||
9100 695.13334 -20282.325 -2793.2101 8.0039334 -2870.7532 77.543171 0.09 -2899.891
|
||||
9200 642.26078 -20368.748 -2798.1031 8.0039334 -2869.7483 71.645157 0.08 -2899.7706
|
||||
9300 641.79203 -21031.839 -2798.6175 8.0039334 -2870.2104 71.592866 0.07 -2901.0899
|
||||
9400 640.84125 -20243.066 -2799.2216 8.0039334 -2870.7084 71.486807 0.06 -2901.4655
|
||||
9500 609.96498 -23936.746 -2809.3896 8.0039334 -2877.4321 68.042512 0.05 -2908.2797
|
||||
9600 574.1911 -26956.034 -2817.6178 8.0039334 -2881.6696 64.051882 0.04 -2912.6742
|
||||
9700 567.47641 -28321.949 -2818.8602 8.0039334 -2882.163 63.302848 0.03 -2914.4223
|
||||
9800 520.37758 -31000.6 -2828.0252 8.0039334 -2886.0741 58.048903 0.02 -2918.4921
|
||||
9900 506.49368 -32223.744 -2830.1705 8.0039334 -2886.6706 56.500132 0.01 -2920.4741
|
||||
10000 507.13597 -33930.476 -2834.3236 8.0039334 -2890.8954 56.571781 0 -2924.5423
|
||||
Loop time of 17.7279 on 2 procs for 10000 steps with 864 atoms
|
||||
|
||||
|
||||
Total wall time: 0:00:17
|
||||
172
examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4.1
Normal file
172
examples/PACKAGES/alchemy/log.25Feb23.alloy.g++.4.1
Normal file
@ -0,0 +1,172 @@
|
||||
LAMMPS (8 Feb 2023)
|
||||
Processor partition = 1
|
||||
using 1 OpenMP thread(s) per MPI task
|
||||
# Example for an alchemical transformation simulation of pure copper into an aluminium bronze
|
||||
|
||||
# set up different names for two partitions
|
||||
variable name world pure alloy
|
||||
|
||||
# create pure copper system
|
||||
units metal
|
||||
lattice fcc 3.75
|
||||
Lattice spacing in x,y,z = 3.75 3.75 3.75
|
||||
region box block 0 6 0 6 0 6
|
||||
create_box 2 box
|
||||
Created orthogonal box = (0 0 0) to (22.5 22.5 22.5)
|
||||
1 by 1 by 2 MPI processor grid
|
||||
|
||||
timestep 0.002
|
||||
create_atoms 1 box
|
||||
Created 864 atoms
|
||||
using lattice units in orthogonal box = (0 0 0) to (22.5 22.5 22.5)
|
||||
create_atoms CPU = 0.000 seconds
|
||||
displace_atoms all random 0.3 0.3 0.3 57845645
|
||||
Displacing atoms ...
|
||||
pair_style eam/alloy
|
||||
pair_coeff * * AlCu.eam.alloy Cu Al
|
||||
Reading eam/alloy potential file AlCu.eam.alloy with DATE: 2008-10-01
|
||||
|
||||
# replace 5% of copper with aluminium on the second partition only
|
||||
if "${name} == alloy" then "set type 1 type/fraction 2 0.05 6745234"
|
||||
set type 1 type/fraction 2 0.05 6745234
|
||||
Setting atom values ...
|
||||
37 settings made for type/fraction
|
||||
|
||||
# define ramp variable to combine the two different partitions
|
||||
if "${name} == pure" then "variable ramp equal ramp(1.0,0.0)" else "variable ramp equal ramp(0.0,1.0)"
|
||||
variable ramp equal ramp(0.0,1.0)
|
||||
|
||||
velocity all create 5000.0 6567345
|
||||
fix 1 all nvt temp 2500.0 500.0 0.002
|
||||
fix 2 all alchemy v_ramp
|
||||
|
||||
compute pressure all pressure/alchemy 2
|
||||
|
||||
# only need to output a dump file from one partition
|
||||
#if "${name} == alloy" then # "dump 1 all custom 100 ${name}.lammpstrj id type element x y z" # "dump_modify 1 element Cu Al"
|
||||
|
||||
thermo_style custom step temp press etotal density pe ke f_2 f_2[3]
|
||||
thermo_modify colname f_2 lambda colname f_2[3] EPot_mixed
|
||||
thermo_modify press pressure
|
||||
|
||||
thermo 100
|
||||
run 10000 post no
|
||||
Neighbor list info ...
|
||||
update: every = 1 steps, delay = 0 steps, check = yes
|
||||
max neighbors/atom: 2000, page size: 100000
|
||||
master list distance cutoff = 8.6825
|
||||
ghost atom cutoff = 8.6825
|
||||
binsize = 4.34125, bins = 6 6 6
|
||||
1 neighbor lists, perpetual/occasional/extra = 1 0 0
|
||||
(1) pair eam/alloy, perpetual
|
||||
attributes: half, newton on
|
||||
pair build: half/bin/atomonly/newton
|
||||
stencil: half/bin/3d
|
||||
bin: standard
|
||||
Per MPI rank memory allocation (min/avg/max) = 3.474 | 3.474 | 3.474 Mbytes
|
||||
Step Temp Press TotEng Density PotEng KinEng lambda EPot_mixed
|
||||
0 5000 2135632.8 11134.401 7.8067107 10576.643 557.75753 0 10353.88
|
||||
100 2502.4638 98461.445 -2410.2394 7.8067107 -2689.393 279.1536 0.01 -2673.3837
|
||||
200 2471.2133 111478.55 -2390.1144 7.8067107 -2665.7819 275.66756 0.02 -2650.057
|
||||
300 2442.869 109429.75 -2398.101 7.8067107 -2670.6067 272.50571 0.03 -2654.7075
|
||||
400 2420.4514 97114.07 -2425.2882 7.8067107 -2695.2932 270.005 0.04 -2675.755
|
||||
500 2403.3496 98285.746 -2421.1707 7.8067107 -2689.268 268.09727 0.05 -2673.6895
|
||||
600 2388.6644 101125.13 -2418.9873 7.8067107 -2685.4464 266.45911 0.06 -2668.238
|
||||
700 2372.4091 96916.491 -2428.7444 7.8067107 -2693.3902 264.64581 0.07 -2675.3394
|
||||
800 2356.5786 101050.97 -2423.8648 7.8067107 -2686.7446 262.87989 0.08 -2669.6797
|
||||
900 2337.3256 95290.542 -2439.2282 7.8067107 -2699.9604 260.73219 0.09 -2681.0381
|
||||
1000 2314.6552 90348.199 -2452.6965 7.8067107 -2710.8998 258.20327 0.1 -2693.7969
|
||||
1100 2288.9862 87089.44 -2457.7481 7.8067107 -2713.088 255.33986 0.11 -2696.9199
|
||||
1200 2263.1553 89628.642 -2462.9772 7.8067107 -2715.4356 252.45838 0.12 -2698.4983
|
||||
1300 2238.1696 92771.824 -2453.8691 7.8067107 -2703.5403 249.67118 0.13 -2687.6406
|
||||
1400 2209.3333 83029.221 -2477.2462 7.8067107 -2723.7006 246.45446 0.14 -2706.638
|
||||
1500 2181.9468 83386 -2476.3027 7.8067107 -2719.7022 243.39945 0.15 -2704.0915
|
||||
1600 2156.3929 81801.467 -2483.9294 7.8067107 -2724.4783 240.54887 0.16 -2708.3304
|
||||
1700 2133.221 84933.294 -2477.0832 7.8067107 -2715.0473 237.96401 0.17 -2700.142
|
||||
1800 2110.4496 76700.779 -2495.3147 7.8067107 -2730.7386 235.42383 0.18 -2714.6978
|
||||
1900 2091.8774 82568.985 -2488.7082 7.8067107 -2722.0603 233.35207 0.19 -2706.5643
|
||||
2000 2074.8972 79024.983 -2496.7194 7.8067107 -2728.1773 231.45791 0.2 -2710.7
|
||||
2100 2059.7023 72408.502 -2511.6849 7.8067107 -2741.4478 229.76289 0.21 -2725.1617
|
||||
2200 2046.5649 81172.694 -2496.9796 7.8067107 -2725.277 228.2974 0.22 -2708.4618
|
||||
2300 2033.9024 78029.129 -2500.8329 7.8067107 -2727.7178 226.88488 0.23 -2712.5894
|
||||
2400 2022.0535 79691.571 -2499.8173 7.8067107 -2725.3804 225.56311 0.24 -2709.4434
|
||||
2500 2008.7841 75015.359 -2512.1238 7.8067107 -2736.2067 224.08289 0.25 -2719.4159
|
||||
2600 1995.175 74845.99 -2512.2807 7.8067107 -2734.8455 222.56477 0.26 -2718.1619
|
||||
2700 1979.2542 76756.042 -2512.5095 7.8067107 -2733.2983 220.78879 0.27 -2716.0963
|
||||
2800 1961.2518 70627.84 -2527.3853 7.8067107 -2746.1659 218.78059 0.28 -2730.7999
|
||||
2900 1942.4706 70852.114 -2530.3101 7.8067107 -2746.9956 216.68552 0.29 -2731.5024
|
||||
3000 1922.0973 75867.616 -2518.2668 7.8067107 -2732.6796 214.41284 0.3 -2718.4146
|
||||
3100 1898.9538 68984.855 -2540.7552 7.8067107 -2752.5863 211.83116 0.31 -2738.0966
|
||||
3200 1874.9107 73304.621 -2533.0578 7.8067107 -2742.2069 209.14911 0.32 -2727.1933
|
||||
3300 1848.9824 69447.29 -2538.6006 7.8067107 -2744.8574 206.25677 0.33 -2730.768
|
||||
3400 1821.4108 64973.868 -2552.8877 7.8067107 -2756.0688 203.18111 0.34 -2741.4173
|
||||
3500 1795.4926 64688.566 -2555.5739 7.8067107 -2755.8638 200.2899 0.35 -2740.986
|
||||
3600 1769.4009 56451.766 -2573.338 7.8067107 -2770.7174 197.37934 0.36 -2756.4626
|
||||
3700 1745.5646 68268.147 -2554.1634 7.8067107 -2748.8838 194.72036 0.37 -2735.8618
|
||||
3800 1721.4956 64187.24 -2566.0526 7.8067107 -2758.088 192.03542 0.38 -2742.67
|
||||
3900 1699.517 61697.296 -2573.7098 7.8067107 -2763.2935 189.58368 0.39 -2748.648
|
||||
4000 1680.2819 58960.336 -2579.7058 7.8067107 -2767.1438 187.43798 0.4 -2753.7317
|
||||
4100 1662.2079 49607.708 -2596.9862 7.8067107 -2782.408 185.42179 0.41 -2769.1633
|
||||
4200 1645.509 59615.376 -2582.865 7.8067107 -2766.424 183.55901 0.42 -2753.41
|
||||
4300 1628.9336 57213.496 -2589.5734 7.8067107 -2771.2834 181.71 0.43 -2758.0401
|
||||
4400 1614.2369 57319.854 -2586.3446 7.8067107 -2766.4151 180.07055 0.44 -2754.0451
|
||||
4500 1598.6946 51130.713 -2601.8813 7.8067107 -2780.2181 178.33679 0.45 -2767.0321
|
||||
4600 1583.2816 51209.179 -2603.9706 7.8067107 -2780.5881 176.61745 0.46 -2767.2662
|
||||
4700 1567.3743 51391.73 -2607.2614 7.8067107 -2782.1044 174.84296 0.47 -2768.7565
|
||||
4800 1550.9245 48164.466 -2614.2775 7.8067107 -2787.2854 173.00797 0.48 -2773.7243
|
||||
4900 1532.697 47270.397 -2618.365 7.8067107 -2789.3397 170.97466 0.49 -2777.023
|
||||
5000 1513.7604 46127.507 -2621.8979 7.8067107 -2790.7601 168.86225 0.5 -2777.2298
|
||||
5100 1494.431 45092.69 -2625.438 7.8067107 -2792.144 166.70602 0.51 -2779.7181
|
||||
5200 1472.5263 41485.775 -2633.6681 7.8067107 -2797.9306 164.26252 0.52 -2785.5483
|
||||
5300 1450.7978 39849.775 -2638.7965 7.8067107 -2800.6352 161.83868 0.53 -2788.9493
|
||||
5400 1428.063 39330.898 -2642.8749 7.8067107 -2802.1774 159.30258 0.54 -2790.3996
|
||||
5500 1404.4139 35674.647 -2652.8811 7.8067107 -2809.5456 156.66449 0.55 -2797.922
|
||||
5600 1380.8619 33960.907 -2659.5731 7.8067107 -2813.6103 154.03722 0.56 -2801.8887
|
||||
5700 1357.9957 39122.559 -2650.1374 7.8067107 -2801.6239 151.48646 0.57 -2790.3487
|
||||
5800 1334.8385 34996.372 -2660.8794 7.8067107 -2809.7826 148.90324 0.58 -2798.8306
|
||||
5900 1312.6203 30380.598 -2669.3511 7.8067107 -2815.7758 146.42476 0.59 -2804.9873
|
||||
6000 1290.7337 26910.214 -2681.9175 7.8067107 -2825.9008 143.98328 0.6 -2814.8623
|
||||
6100 1269.6552 34273.343 -2670.9025 7.8067107 -2812.5345 141.63195 0.61 -2801.9949
|
||||
6200 1249.4502 29640.216 -2678.1477 7.8067107 -2817.5258 139.37805 0.62 -2807.555
|
||||
6300 1229.8377 25302.881 -2688.545 7.8067107 -2825.7352 137.19025 0.63 -2815.3412
|
||||
6400 1211.0142 23978.218 -2694.5096 7.8067107 -2829.6 135.09045 0.64 -2820.0498
|
||||
6500 1192.3094 25315.547 -2693.4635 7.8067107 -2826.4674 133.0039 0.65 -2817.3114
|
||||
6600 1174.741 22676.36 -2697.5642 7.8067107 -2828.6083 131.04413 0.66 -2819.6239
|
||||
6700 1117.0829 22497.41 -2705.1682 7.8067107 -2829.7804 124.61228 0.67 -2821.3556
|
||||
6800 1125.4062 18193.925 -2713.8679 7.8067107 -2839.4086 125.54075 0.68 -2830.2267
|
||||
6900 1142.0728 19451.295 -2711.5199 7.8067107 -2838.9199 127.39994 0.69 -2830.1189
|
||||
7000 1148.9469 16757.031 -2713.1595 7.8067107 -2841.3263 128.16676 0.7 -2832.475
|
||||
7100 1044.2332 11734.429 -2733.5965 7.8067107 -2850.0822 116.48578 0.71 -2841.8886
|
||||
7200 1052.3967 15187.579 -2724.5284 7.8067107 -2841.9248 117.39644 0.72 -2834.2885
|
||||
7300 1045.9123 13697.721 -2730.1401 7.8067107 -2846.8132 116.67309 0.73 -2838.9073
|
||||
7400 1082.9806 13330.213 -2726.8679 7.8067107 -2847.676 120.80812 0.74 -2840.2979
|
||||
7500 980.30736 7070.7227 -2746.9678 7.8067107 -2856.3226 109.35476 0.75 -2848.8706
|
||||
7600 982.86602 7694.074 -2745.5399 7.8067107 -2855.1801 109.64018 0.76 -2848.0154
|
||||
7700 958.27863 2336.6244 -2758.806 7.8067107 -2865.7035 106.89742 0.77 -2858.6468
|
||||
7800 991.25495 564.58952 -2758.6032 7.8067107 -2869.1791 110.57598 0.78 -2862.4362
|
||||
7900 901.65217 3569.7496 -2763.0681 7.8067107 -2863.6488 100.58066 0.79 -2857.2329
|
||||
8000 871.00782 -883.03123 -2773.2412 7.8067107 -2870.4035 97.162233 0.8 -2864.1778
|
||||
8100 873.73598 -977.71992 -2772.9758 7.8067107 -2870.4424 97.466563 0.81 -2864.7239
|
||||
8200 859.27838 2535.4088 -2769.5501 7.8067107 -2865.4039 95.853797 0.82 -2859.9007
|
||||
8300 874.88664 -6039.909 -2781.7213 7.8067107 -2879.3163 97.594921 0.83 -2873.9613
|
||||
8400 810.33098 -5386.015 -2787.6011 7.8067107 -2877.9947 90.393641 0.84 -2872.8494
|
||||
8500 812.50682 -6372.4363 -2789.0713 7.8067107 -2879.7077 90.636359 0.85 -2874.8424
|
||||
8600 792.27145 -11610.225 -2798.2095 7.8067107 -2886.5886 88.379073 0.86 -2882.1413
|
||||
8700 737.92522 -10178.597 -2803.4114 7.8067107 -2885.7281 82.316669 0.87 -2881.6683
|
||||
8800 744.31065 -12026.268 -2806.8078 7.8067107 -2889.8367 83.028973 0.88 -2886.1335
|
||||
8900 709.31385 -17472.954 -2818.1084 7.8067107 -2897.2334 79.125027 0.89 -2893.7244
|
||||
9000 704.20763 -17006.609 -2817.9144 7.8067107 -2896.4698 78.555422 0.9 -2893.2911
|
||||
9100 697.72956 -20282.325 -2824.94 7.8067107 -2902.7728 77.832782 0.91 -2899.891
|
||||
9200 696.15397 -20368.748 -2824.7243 7.8067107 -2902.3813 77.657023 0.92 -2899.7706
|
||||
9300 627.98752 -21031.839 -2833.3613 7.8067107 -2903.4142 70.052953 0.93 -2901.0899
|
||||
9400 603.4933 -20243.066 -2836.1082 7.8067107 -2903.4288 67.320586 0.94 -2901.4655
|
||||
9500 599.69375 -23936.746 -2843.0066 7.8067107 -2909.9033 66.89674 0.95 -2908.2797
|
||||
9600 587.42611 -26956.034 -2848.4377 7.8067107 -2913.966 65.528267 0.96 -2912.6742
|
||||
9700 567.47718 -28321.949 -2852.1171 7.8067107 -2915.42 63.302933 0.97 -2914.4223
|
||||
9800 524.81105 -31000.6 -2860.6103 7.8067107 -2919.1537 58.543462 0.98 -2918.4921
|
||||
9900 507.60008 -32223.744 -2864.192 7.8067107 -2920.8155 56.623552 0.99 -2920.4741
|
||||
10000 521.28866 -33930.476 -2866.3918 7.8067107 -2924.5423 58.150534 1 -2924.5423
|
||||
Loop time of 17.7277 on 2 procs for 10000 steps with 864 atoms
|
||||
|
||||
|
||||
Total wall time: 0:00:17
|
||||
13
examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4
Normal file
13
examples/PACKAGES/alchemy/log.25Feb23.twowater.g++.4
Normal file
@ -0,0 +1,13 @@
|
||||
LAMMPS (8 Feb 2023)
|
||||
Running on 2 partitions of processors
|
||||
Starting alchemical transformation at 0%
|
||||
Alchemical transformation progress: 10%
|
||||
Alchemical transformation progress: 20%
|
||||
Alchemical transformation progress: 30%
|
||||
Alchemical transformation progress: 40%
|
||||
Alchemical transformation progress: 50%
|
||||
Alchemical transformation progress: 60%
|
||||
Alchemical transformation progress: 70%
|
||||
Alchemical transformation progress: 80%
|
||||
Alchemical transformation progress: 90%
|
||||
Alchemical transformation progress: 100%
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user