Skip to content

Commit

Permalink
Added a LAMMPS ideal gas example
Browse files Browse the repository at this point in the history
  • Loading branch information
ceriottm committed Apr 25, 2024
1 parent 8fdf525 commit 488c04f
Show file tree
Hide file tree
Showing 5 changed files with 4,170 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/clients/lammps/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@
reset args = none = reset electrostatics at each call

Check a more detailed documentation at https://docs.lammps.org/fix_ipi.html

`classical_md_gas` contains a basic setup in which LAMMPS does not compute any energy, and can be used to profile the overhead associated with i-PI communication, similar to what done in the `ipi_tests/profiling` folders using the built-in driver.
1 change: 1 addition & 0 deletions examples/clients/lammps/classical_md_gas/gas-4096.xyz
34 changes: 34 additions & 0 deletions examples/clients/lammps/classical_md_gas/gas.lmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
units electron
atom_style atomic

#pair_style lj/cut/coul/long 17.01
#pair_style lj/cut/tip4p/long 1 2 1 1 0.278072379 17.007
#bond_style harmonic
#bond_style class2
#angle_style harmonic
#kspace_style pppm 0.0001
#kspace_style pppm/tip4p 0.0001

#read_data data.lmp
region box block 0 10 0 10 0 10 units box
create_box 1 box
create_atoms 1 random 4096 123456 box
mass 1 1.0


timestep 0.00025

#velocity all create 298.0 2345187

#thermo_style multi
#thermo 1

#fix 1 all nvt temp 298.0 298.0 30.0 tchain 1
#fix 1 all nve
fix 1 all ipi gas 32345 unix


#dump 1 all xyz 25 dump.xyz

run 100000000

35 changes: 35 additions & 0 deletions examples/clients/lammps/classical_md_gas/input.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<simulation verbosity='medium' threading='false' safe_stride='100'>
<ffsocket mode='unix' name='driver' pbc='false'>
<latency> 1.00000000e-04</latency>
<address> gas </address>
<exit_on_disconnect> False </exit_on_disconnect>
</ffsocket>
<total_steps>10000</total_steps>
<output prefix='simulation'>
<trajectory stride='1000' filename='pos'> positions </trajectory>
<properties stride='1000'> [ step, time, conserved, temperature, kinetic_md, potential, pressure_md, volume ] </properties>
</output>
<prng>
<seed>18885</seed>
</prng>
<system>
<forces>
<force forcefield='driver'></force>
</forces>
<initialize nbeads='1'>
<file mode='xyz'> gas-4096.xyz</file>
<cell> [10.0, 0, 0, 0, 10.0, 0, 0, 0, 10.0] </cell>
<masses mode='manual'> [1.0] </masses>
<velocities mode='thermal'> 1 </velocities>
</initialize>
<ensemble>
<temperature> 1 </temperature>
</ensemble>
<motion mode='dynamics'>
<fixcom> False </fixcom>
<dynamics mode='nve'>
<timestep> 0.01 </timestep>
</dynamics>
</motion>
</system>
</simulation>
Loading

0 comments on commit 488c04f

Please sign in to comment.