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:
How do I move the box - so to make bilayer look more like a bilayer - in my cell-box?
A warm thanks goes to comcon1.
In case one doesn't remember - one can find a box size by
gmxdump -f traj.trr | less
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
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
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