Tools for AdResS

Purpose of Module

One purpose of our project is to promote GC-AdResS as a method. It is an advanced method, for people with experience, and once the simulation is done there are several properties and checks to consider to make sure that the simulation was successful.

This module provides little tools to make working with AdResS easier. Content:

  1. how to mask the configuration (output from a full atomistic simulation run) to generate the double resolution configuration.
  2. Quick and dirty: get the reference coordinate from the GROMACS input file
  3. Checks for the density (for both geometries currently implemented in GROMACS version 5.1.5)
  4. Check the temperature on the fly
  5. A short fortran code to calculate the distribution of the angles in slab-like AdResS simulation.

Source Code

Quick and fast data grab from the configuration file:

tail conf.gro | awk '(NF==3){print $1/2.0,$2/2.0,$3/2.0}'

How to mask the configuration for setting it up for the AdResS simulation. A straigh forward way is using VOTCA :

csg_map --cg mapping_scheme.xml --hybrid --trj input_file.gro --out output_file.gro --top atomistic_run/topol.tpr

Check temperature on the fly from the output md.log:

#!/bin/bash
grep -A 1 --no-group-separator Lambda md.log | grep -v Step | awk '{print $1}' >   mdlogging1
grep -A 1 --no-group-separator Temp md.log | grep -v Temp | awk '{print $2}' > mdlogging2
paste mdlogging1 mdlogging2
paste mdlogging1 mdlogging2 >temperature
rm mdlogging1 mdlogging2

Quick grab of the density in the xsplit (slab like) configuration. One way is using the tool from GROMACS:

gmx density -d X -f trajectory_file.xtc -sl 50

Quick grab of the density in the sphere configuration. We use VOTCA for it:

csg_density -- axis r -- rmax 10. --ref [x_ref,y_ref,z_ref] --trj trajectory_input.xtc --top topol.tpr --out SOL.dens.out

Collect the p(N) data and combine them in one file. For that we use VMD, it includes a script called topotools, which is used to handle the trajectory. This script can be run from the command line directly:

vmd -dispdev text -e extract_coord.tcl
grep -B1 "Frame" WCG.xyz > a
sed '/Frame/ {$!N;d;}' a > column2
grep -B0 "Frame" WCG.xyz > a
sed -i s/Frame// a
sed -i s/--// a
sed -i s/:// a
sed '/^$/d' a > column1
paste column1 column2|awk '{print $1, $2}' > dat.3nm.pn.WCG.dat

And the corresponding extract_coord.tcl:

package require topotools 1.2
mol new conf.gro
mol addfile traj_comp.xtc type xtc waitfor all first 0 last -1 step 1
topo writevarxyz WCG.xyz selmod "name WCG and (x>285 and x<315)"
exit

All the small scripts are available as files:

analysis tools source code