Gromacs: How Do I Move A Box?
1
6
Entering edit mode
13.0 years ago
Adobe ▴ 210

I've made a simulation with a periodic boundary conditions - but lipid bilayer got assembled in such a way - that water (which is not shown in the picture below) stacked in the center of the box:

alt text

How do I move the box - so to make bilayer look more like a bilayer - in my cell-box?

Edit:

A warm thanks goes to comcon1.

In case one doesn't remember - one can find a box size by

gmxdump -f traj.trr | less

or

gmxdump -f traj.trr | vim -

to browse it in vim.

It said me that the initial box size was 7.5 7.5 7.5

So I've made a script to run through a range of x values (you must have confout.gro and topol.tpr files in the dir):

#!/usr/bin/python2.7

from numpy import arange
from os import system

for i in arange(-1.05, 5.05, 0.1):
    system("editconf -f confout.gro -translate %g 0 0 -o edtOut%g.gro" %(i, i))
    system("echo 0 | trjconv -f edtOut%g.gro -trans %g 0 0 -pbc res -o trjOut%g.gro" %(i, i, i))

This way I found that the bilayer is alright after the translations ranging from 0.05 to 3.25. So I've choosen 1.65 as a middle value. Than I've moved trajectory by:

echo 0 | trjconv -o trjOut1.65.trr -trans 1.65 0 0 -pbc res

To rotate a gro file - one should also first -rotate it with editconf, and then trjconv it with -pbc res:

editconf -f confout.gro -rotate 0 90 0 -o  edtOut.gro
echo 0 | trjconv -f edtOut.gro -pbc res -o trjOut.gro

Of cource one can combine rotate and translate in the same shot.

It looks like there's no utility written to rotate trajectory trr file.

molecular • 11k views
ADD COMMENT
0
Entering edit mode

This is a very specialist question. Have you tried the Gromacs mailing list? - http://www.gromacs.org/Support

ADD REPLY
0
Entering edit mode

I went on to write a PyMOL script (here) - which translates the structure (either gro or pdb) to a given vector and generates the picture. Typical usage: bk-pymol-pic.py -f confout.gro -s "resi 1-128" -x "-2" -y "-3" -z "0".

ADD REPLY
4
Entering edit mode
13.0 years ago
Comcon1 ▴ 50

You can simply translate your system with editconf -translate x y z. You need to use x=boxx/2. It makes the system with one half will be in the periodic box and other half - out of periodic box. Then use 'trjconv -f .gro -o .gro -pbc res'. This command collects all residues into the box keeping residues uncut.

ADD COMMENT
1
Entering edit mode

@Adobe: I don't know the real answer, but one way to get an idea is to go into Graphics > Representations, then go to the Periodic tab and and some extra periodic images by checking the boxes. This will give you a good indication as long as there are molecules near the edges of the box.

ADD REPLY
1
Entering edit mode

To show the box boundaries in VMD, go into the VMD command line and type 'pbc box'

ADD REPLY
0
Entering edit mode

By the way - how can one display the periodic box boundaries in VMD?

ADD REPLY
0
Entering edit mode

@Greg P: thanks - it works!

ADD REPLY
0
Entering edit mode

And in PyMOL it is show cell.

ADD REPLY

Login before adding your answer.

Traffic: 876 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6