[gmx-users] How to recenter solvent around solute
Mark Abraham
Mark.Abraham at anu.edu.au
Tue May 10 00:43:02 CEST 2011
On 10/05/2011 12:24 AM, Dimitar Pachov wrote:
>
>
> On Mon, May 9, 2011 at 1:39 AM, Mark Abraham <Mark.Abraham at anu.edu.au
> <mailto:Mark.Abraham at anu.edu.au>> wrote:
>
> On 9/05/2011 2:01 PM, Dimitar Pachov wrote:
>> Hi,
>>
>> On Sat, May 7, 2011 at 9:45 PM, Justin A. Lemkul <jalemkul at vt.edu
>> <mailto:jalemkul at vt.edu>> 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?
>
>
> Since I am new to Gromacs, there are certain things I do not quite
> understand. I do step #5 only because I need a *tpr file corresponding
> to the centered trajectory, which I need for step #6, i.e. to finally
> make the trajectory compact. As far as I understood, I couldn't use
> the very original *tpr file for the last step #6, correct?
The final call to trjconv uses the .tpr only to learn the definitions of
molecules, so I think the original one will do. That omits #5 altogether.
> And I need the centered trajectory in order to move to my final goal,
> i.e. the compact the trajectory at step #6. Again, I thought that the
> "centering" step was necessary after the "nojump" trajectory had been
> obtained...
I dunno - try with and without if you want to simplify.
> Also, can one use the trjconv -dump without a *tpr file? I do not
> think so.
The -s file (which sometimes doesn't need to be a .tpr file, see trjconv
-h for list of file types for -s) is just used for atom names and such.
So anything will do.
> Which *tpr file should I use in order to get the first frame from the
> centered trajectory, and where (and how) should I get this file from
> (unless I can use the very original one)?
The coordinates in the .tpr file matter only if they're being used, and
I think they're not being used in any of your steps.
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-users/attachments/20110510/a4cc1ae8/attachment.html>
More information about the gromacs.org_gmx-users
mailing list