Here is a script that will ask you what you want to center (be sure that it has a proper index in the topology file).
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 |
Happy centering.
No comments:
Post a Comment