On 9/05/2011 2:01 PM, Dimitar Pachov wrote:
Hi,
On Sat, May 7, 2011 at 9:45 PM, Justin A. Lemkul <[email protected]
<mailto:[email protected]>> wrote:
Please clarify - do you wish to maintain the original triclinic
representation (as -ur tric does) or do you wish to see the
octahedral representation (as -pbc mol -ur compact gives)? My
answer was based on your request to "keep the original unit shape."
My original representation is truncated octahedron. Gromacs requires
triclinic vectors and does not care about unit cell shape at the
moment the md code starts. I wanted to keep MY original unit shape.
For complicated systems (or sometimes even for simple ones), it is
quite common that multiple iterations of trjconv are necessary. A
suggested workflow is indeed documented:
http://www.gromacs.org/Documentation/Terminology/Periodic_Boundary_Conditions#Suggested_trjconv_workflow
The documentation must remain somewhat generic, as there are a
number of specialty systems that can be considered.
I thought the guidelines given by the trjconv specific manual were
sufficient. I don't understand why people don't put this suggested
workflow in the trjconv manual. It is confusing otherwise. It never
came to me that one needed multiple usages of trjconv in order to
achieve recentering around solute.
Fair point. I've updated the trjconv documentation to provide this hint
and a suggestiong to consult the webpage.
I followed these instructions and got what I wanted. Basically, this
was my quick workflow:
=================================
psfinname="$prot-$shape-$flc"
topfile="$prot-$shape-$flc.top"
grofile="$shape-$fl-eq.gro"
inpfile="md.mdp"
name="run1"
newname="run1-recen"
indexfile="index-all.ndx"
tclfile="extr-frame-traj.tcl"
s="Protein-Nucleo"
indsolute=`cat $indexfile | awk -v site=$s '$1=="["{i++}$2==site{print
i-1}'`
cp $name.xtc $newname.xtc
#===> 1
intraj="$newname.xtc"
outtraj="traj/$newname-whole.xtc"
trjconv -f $intraj -s $name.tpr -n $indexfile -o $outtraj -pbc whole
> log1 2>&1 <<EOF1
0
EOF1
#===> 2
intraj="$outtraj"
outtraj="traj/$newname-cluster.xtc"
trjconv -f $intraj -s $name.tpr -n $indexfile -o $outtraj -pbc
cluster > log2 2>&1 <<EOF2
$indsolute
0
EOF2
#===> 3
intraj="$outtraj"
outtraj="traj/$newname-nojump.xtc"
trjconv -f $intraj -n $indexfile -o $outtraj -pbc nojump > log3 2>&1
<<EOF3
0
EOF3
#===> 4
intraj="$outtraj"
outtraj="traj/$newname-center.xtc"
trjconv -f $intraj -n $indexfile -o $outtraj -center > log4 2>&1 <<EOF4
$indsolute
0
EOF4
#===> 5
## Get first frame from centered .xtc
fr=1
pdbfilename="`echo $outtraj | awk 'BEGIN{FS="."}{print $1}'`"
pdbfile="$pdbfilename-${fr}ps.pdb"
`which vmd` -dispdev text -e $tclfile -args $fr
${pathpsfin}/${psfinname}.psf $outtraj $pdbfilename > /dev/null
cat $pdbfile | sed 's/TIP3/SOL /' | sed 's/ OH2 SOL/ OW SOL/' | sed
's/ H1 SOL/ HW1 SOL/' | sed 's/ H2 SOL/ HW2 SOL/' | sed 's/ SOD SOD/
NA NA /g' | sed 's/ CLA CLA/ CL CL /g' | sed 's/ HT1 MET/ H1 MET/'
| sed 's/ HT2 MET/ H2 MET/' | sed 's/ HT3 MET/ H3 MET/' >
$pdbfilename-${fr}ps-renamed.pdb
grompp -f $inpfile -c $pdbfilename-${fr}ps-renamed.pdb -n $indexfile
-p $topfile -o $newname-center.tpr > log5 2>&1
#===> 6
intraj="$outtraj"
outtraj="traj/$newname-compact.xtc"
trjconv -s $newname-center.tpr -f $intraj -n $indexfile -o $outtraj
-pbc mol -ur compact > log6 2>&1 <<EOF6
0
EOF6
=================================
However, it seems a long process, and if I have a large number of
trajectories, it might not be feasible. I actually do not know if all
steps are necessary. Particularly, I did step #5 just to get a new
*tpr file from the centered trajectory ... Is there a way to do that
in a simpler way within Gromacs?
What steps are necessary depends what your purpose is. trjconv -dump
should do step #5. What are you generating the centered trajectory for?
What are you generating another .tpr for?
Mark
--
gmx-users mailing list [email protected]
http://lists.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at
http://www.gromacs.org/Support/Mailing_Lists/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/Support/Mailing_Lists