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.
_______________________________________________
gmx-users mailing list [email protected]
http://www.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at http://www.gromacs.org/search before posting!
Please don't post (un)subscribe requests to the list. Use the
www interface or send it to [EMAIL PROTECTED]
Can't post? Read http://www.gromacs.org/mailing_lists/users.php