Skip to content

Scripts for analyzing a GROMACS simulation of SPC/E water.

Notifications You must be signed in to change notification settings

formularin/water-box

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

water-box

Fortran and Python scripts that tell you everything there is to know about water (not even close).

Compilation

  • Install libgmxfort (depends on libxdrfile)
  • If on macOS, you may have to install pkg-config (most easily done from homebrew)
  • Run the command: make from the project home directory

Usage

Options are listed in the source file for each program.

Notes about default options:

  • Output goes to a directory called "results." It is assumed that this already exists.
  • Scripts use the GROMACS output from simulations/water/.

Fortran programs

  • Radial distribution function: bin/rdf
  • Diffusion constant: bin/diffusion
  • P(N) in a spherical volume: bin/count_waters
  • Number of hydrogen bonds: bin/hbonds

Python programs

Install dependencies using this command:

pip install -r requirements.txt
  • Radial distribution function: python3 scripts/rdf.py
  • Making plots for P(N) in a spherical volume: python3 scripts/count_waters.py

Running with other GROMACS simulations

  • All fortran scripts take the options -xtc and -ndx to specify GROMACS trajectory and index files.
  • Index files must contain "OW", "HW1", and "HW2" groups.
    • Make an index file using gmx make_ndx, passing in the .gro file of the production run.
    • Use the commands a OW, a HW1, and a HW2 to create the groups.

- This will work with any three-point water model, like SPC or TIP3P - `simulations/water/water_box.sh`, as well as `simulations/water/mdp/` are adapted from the [GASERI water tutorial](https://gaseri.org/en/tutorials/gromacs/1-tip4pew-water/)

About

Scripts for analyzing a GROMACS simulation of SPC/E water.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published