Skip to content

Commit

Permalink
Pimd (#61)
Browse files Browse the repository at this point in the history
* An example for path integral simulations of water
An example of running PIMD simulations using i-PI, LAMMPS and visualizing them in chemiscope, including some fancy tricks
  • Loading branch information
ceriottm authored May 6, 2024
1 parent 94ef0c7 commit d1bfc9f
Show file tree
Hide file tree
Showing 11 changed files with 794 additions and 3 deletions.
7 changes: 7 additions & 0 deletions examples/path-integrals/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Running, analizing and visualizing a path integral MD simulation
================================================================

This example shows how to run a path integral molecular dynamics
simulation using ``i-PI``, analyze the output and visualize the
trajectory in ``chemiscope``. It uses `LAMMPS <http://lammps.org>`_
as the driver to simulate the q-TIP4P/f water model.
12 changes: 12 additions & 0 deletions examples/path-integrals/environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
channels:
- conda-forge
dependencies:
- python=3.11
- pip
- lammps
- pip:
- ase
- ipi
- chemiscope
- matplotlib
- skmatter
33 changes: 33 additions & 0 deletions examples/path-integrals/in.lmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
units electron
atom_style full

#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 water_32_data.lmp
pair_coeff * * 0 0
pair_coeff 1 1 0.000295147 5.96946

neighbor 2.0 bin

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 h2o-lammps 32342 unix


#dump 1 all xyz 25 dump.xyz

run 100000000

40 changes: 40 additions & 0 deletions examples/path-integrals/input_piglet.xml

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions examples/path-integrals/input_pimd.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<simulation verbosity='medium' safe_stride='100'>
<output prefix='simulation'>
<properties stride='1' filename='out'> [ step, time{picosecond}, conserved{electronvolt}, temperature{kelvin}, kinetic_cv{electronvolt}, potential{electronvolt}, pressure_cv{megapascal}, kinetic_td{electronvolt} ] </properties>
<trajectory filename='pos' stride='20'> positions </trajectory>
<trajectory filename='kin' stride='20'> kinetic_cv </trajectory>
<trajectory filename='kod' stride='20'> kinetic_od </trajectory>
</output>
<total_steps> 200 </total_steps>
<prng>
<seed> 32342 </seed>
</prng>
<ffsocket name='lmpserial' mode='unix'>
<address>h2o-lammps</address> <latency> 1e-4 </latency>
</ffsocket>
<system>
<initialize nbeads='8'>
<file mode='pdb'> water_32.pdb </file>
<velocities mode='thermal' units='kelvin'> 298 </velocities>
</initialize>
<forces>
<force forcefield='lmpserial'> lmpserial </force>
</forces>
<ensemble>
<temperature units='kelvin'>298</temperature>
</ensemble>
<motion mode='dynamics'>
<dynamics mode='nvt'>
<thermostat mode='pile_g'>
<tau units="femtosecond"> 5.0 </tau>
</thermostat>
<timestep units='femtosecond'> 0.5 </timestep>
</dynamics>
</motion>
</system>
</simulation>
Loading

0 comments on commit d1bfc9f

Please sign in to comment.