[gmx-users] how to strip velocities out of a .gro file

chris.neale at utoronto.ca chris.neale at utoronto.ca
Sat Jul 3 20:25:44 CEST 2010


If you have a directory full of .gro files that contain velocities,  
and if you don't need those velocities, then you're taking up too much  
space on your drive.

It's too bad, but trjconv -novel -f in.gro -o out.gro will still write  
the velocities to out.gro.

Here's a small script to strip the velocities out of a directory of  
.gro files. If anybody has a better idea of how to do this, then  
please post ;)

#!/bin/bash
for i in $(ls *.gro); do
   echo 0|trjconv -f $i -o a.xtc -novel -s $i;
   echo 0|trjconv -f a.xtc -novel -s $i -o a.gro;
   mv a.gro $i;
   rm a.xtc;
done




More information about the gromacs.org_gmx-users mailing list