Created
August 9, 2012 13:41
How to center a molecule from an MD-simulation in Gromacs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
TRAJIN=traj.xtc | |
TRAJOUT=trajfin.xtc | |
# delete the trajectory so gromacs wont display silly backup messages | |
if [ -e $TRAJOUT ] | |
then | |
rm -f $TRAJOUT | |
fi | |
# center molecule (you will be asked!) | |
trjconv -pbc mol -center -ur compact -s md.tpr -f $TRAJIN -o tmp.xtc | |
# make everything rotate and translate around that molecule (you will be asked!) | |
trjconv -fit rot+trans -s md.tpr -f tmp.xtc -o $TRAJOUT | |
rm -f tmp.xtc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment