Skip to content

Commit

Permalink
Examples cleanup part 4 (i-pi#283)
Browse files Browse the repository at this point in the history
* use underscores rather than hyphen consistently: Done. Update some README.md and add note on conventions in the main README.md
* flatten examples structure
* move profiling to ipi_test folder. update the readme
* Fixed a warning in an obscure s-c-related property
* (partial) removal of LAMMPS dependency of the examples 

---------

Co-authored-by: Yair Litman <[email protected]>
  • Loading branch information
ceriottm and litman90 authored Jan 20, 2024
1 parent 5d8b6bd commit 005b77b
Show file tree
Hide file tree
Showing 441 changed files with 209 additions and 36,057 deletions.
4 changes: 4 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ If you want to add an example for a new feature, please respect the folder struc
- Keep the size of the example to the minimum. If you need large files to run the client (e.g. a pseudopotential, or the parameters of a ML potential) give instructions on how to download the file from a repository. If the file is shared by many examples, put it in `init_files` and make a symlink
- Include a README that briefly explains what the example is about, and what a user should be aware of when running it (what it does, what special setup is needed, etc.)

Notes on file naming conventions and formats:
- Please use lowercase names rather than Camel_Case
- Please use use underscores rather than hyphen
- Please use driver whenever possible
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions examples/clients/vasp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ define run_vasp
endef

h2o:
cd water-1-npt-md-vasp; $(IPI) input.xml & sleep 5; \
cd water_1_npt_md_vasp; $(IPI) input.xml & sleep 5; \
$(call run_vasp,1) \
wait

dia:
cd dia-npt-pimd-vasp; $(IPI) input.xml & sleep 5; \
cd dia_npt_pimd_vasp; $(IPI) input.xml & sleep 5; \
$(call run_vasp,4) \
wait

Expand Down
16 changes: 9 additions & 7 deletions examples/features/advanced_combinations/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
Full-fledged demos of i-PI performing actual calculations
=========================================================
Examples of advanced features
=============================

- Existing examples in alphabetical orderd:
This folder contains examples that are somewhat more complicated, requiring
either a particular setup of the drivers, or post-processing of the output.
More thoroughly-commented examples of advanced simulations can be found in the
`demos` folder: these are more minimalistic, and probably require careful study
of the reference papers to fully understand the simulation setup.

**cav_md**: Cavity molecular dynamics (CavMD) simulation of liquid water under vibrational strong coupling
**spatially_localized_rpc**: Spatially localized ring-polymer contraction
`cav_md`: Cavity molecular dynamics (CavMD) simulation of liquid water under vibrational strong coupling
`spatially_localized_rpc`: Spatially localized ring-polymer contraction

- Examples that need to be added
**COMPLETE HERE**
32 changes: 0 additions & 32 deletions examples/features/advanced_combinations/cav_md/in.lmp

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<trajectory filename='xc' stride='4' format='xyz'> x_centroid{angstrom} </trajectory>
<checkpoint filename='checkpoint' stride='4' overwrite='True'/>
</output>
<total_steps>40000</total_steps>
<total_steps>4000</total_steps>
<prng>
<seed>31415</seed>
</prng>
<ffcavphsocket name='lammps' mode='unix' pbc='True'>
<ffcavphsocket name='qtip4pf' mode='unix' pbc='False'>
<address>h2o-cl-cavmd</address>
<latency> 1e-3 </latency>
<apply_photon> True </apply_photon>
Expand All @@ -25,7 +25,7 @@
<velocities mode='thermal' units='kelvin'> 300 </velocities>
</initialize>
<forces>
<force forcefield='lammps'> </force>
<force forcefield='qtip4pf'> </force>
</forces>
<motion mode='dynamics'>
<dynamics mode='nve'>
Expand Down
16 changes: 16 additions & 0 deletions examples/features/advanced_combinations/cav_md_liquid_water/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
ipi=i-pi
driver="i-pi-driver -m qtip4pf -u -a h2o-cl-cavmd"
sleep_time=4

${ipi} input.xml > log.i-pi &
echo "# i-PI is running"

echo "# Waiting for ${sleep_time} (s) before executing driver"
sleep ${sleep_time}

${driver} > /dev/null &
echo "# Driver is running"

wait

echo "# Simulation complete"

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Spatially localized ring-polymer contraction
--------------------------------------------

NB: requires LAMMPS as a driver code

- Client code: Lammps
- Theory: Litman, et al. J. Chem. Phys. 148, 102320 (2018) https://doi.org/10.1063/1.5002537

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 005b77b

Please sign in to comment.