[gmx-users] re: g_msd and make_ndx

chris.neale at utoronto.ca chris.neale at utoronto.ca
Thu Jun 7 19:53:52 CEST 2007


1. Put the following text in a file called makemolndx.sh

#!/bin/bash

## Set BEGIN and END variables as you please (molecule numbers)
## You can change the name 'mol.ndx' at the end of the file if you wish

BEGIN=1
END=1000

## Things below this line don't usually need to be changed
{
echo "[ MySelection ] "
for((i=BEGIN; i<=END; i++)); do
   echo -n "$i "
   n=`echo "$i % 15" | bc`
   if((n==0)); then
     echo ""
   fi
done
} > mol.ndx

####### EOF

2. chmod +x makemolndx.sh

3. ./makemolndx.sh

4. Run it a number of times and use cat to join them together if you want.




More information about the gromacs.org_gmx-users mailing list