Code

Some scripts I’ve written for my research might be useful for someone else, so I store them in my github repository. On this page I introduce some of them. Feel free to use and modify.

Xvg scripts

Simple scripts for modifying xvg-files (multi-column data file format used in Gromacs). My plan is to merge these scripts into one “swiss army knife of xvg-tools” at some point…

xvgio.py
Simple read/write module to import xvg-file as NumPy array
xvg_fixdeuter.py
Merge order parameter graphs for saturated and unsaturated atoms produced by g_order (a Gromacs tool).
xvg_intersection.py
Find the intersection point of two graphs.
xvg_cat.py
Join two xvg-files.
xvg_cumsum.py
Cumulative sum of columns.
xvg_mirror_axis.py
Mirror graph.
xvg_runningmean.py
Moving average of graphs.
xvg_scale.py
Scale x- or y-axis.

Fine grain

Map files for fine graining coarse grained Martini lipids to OPLS using backward-script:

Misc

init_umbrella.py
Automatically initialize umbrella sampling simulations.
ndx_leaflets.sh
Split GROMACS index.ndx file in half based on molecule coordinates.
check_chirals.py
Checks the R/S-handedness of molecules stereocenters based on the coordinates of the chiral center and four atoms bound to it.
ppm2mkv.sh
Use FFMPEG to create high quality video from ppm-images produced by VMD