From: Jan Saam (saam_at_charite.de)
Date: Thu Oct 18 2007 - 01:14:31 CDT

Dear Matteo,

you cannot rotate molecules in PBC cells without breaking the linkage
between the cells.
Think about a brick wall were each brick represents a molecule (or
better your atoms in the PBC box): Rotating the box corresponds to
rotating each single brick around its center - what will happen to the
wall?!

You could in principle rotate the entire wall, which means that you
rotate the molecule *and* the pbc vectors, but there are restrictions on
the pbc vectors (by definition): A has to be parallel to the X axis, B
has to be in the XY-plane.

The only rotations that make sense for a PBC cell that come to my mind
are the following:
After you align all frames of a trajectory your PBC cell linkages will
be messed up. Suppose you want to know which atoms are close to one atom
X which is close to the box fringe, i.e. you need the positions of the
atoms in the neighboring cells. In this case you can create a copy of
your box and move it according to the *rotated* PBC vectors. Then you'll
get the atoms in the neighboring box in the correct relative position to
your original box. Rotated PBC vectors means that you rotate them with
the same matrix that was used to align the corresponding frame.

I asssume that you simply wanted a different orientation of your
molecule after you solvated it. You will achieve this if you first
rotate your molecule to the prefered orientation and solvate it after that.

I hope this helps,

Jan

John Stone schrieb:
> Hi,
> I'd suggest asking the PBCTools plugin authors about the
> correct way to do this given that the rotations you're performing
> seem to be conflicting (at least from your description) with the
> operations done by the PBC plugin in the calls your making.
>
> Cheers,
> John Stone
> vmd_at_ks.uiuc.edu
>
> On Tue, Oct 09, 2007 at 02:02:34PM +0200, Matteo Guglielmi wrote:
>
>> Dear All,
>>
>> recently I did try to rotate a protein fully
>> solvated by water molecules using the 'pcb'
>> plugin and the following simple script:
>>
>> # pdb file header:
>> # CRYST1 111.108 98.438 115.981 90.00 90.00 90.00
>> set sys [mol new RUN01.pdb]
>> set all [atomselect $sys all]
>> set com [measure center $all]
>> # 55.5484428406 49.2036247253 58.0394554138 ('set com...' outcome)
>> $all moveby [list -55.5484428406 -49.2036247253 -58.0394554138]
>> pbc set {111.108 98.438 115.981 90.00 90.00 90.00} -now
>> pbc box -center origin
>> set delta_deg 0.01
>> # rotate x by -15 deg
>> for {set x 0} {$x>-15} {set x [expr {$x - $delta_deg}]} {
>> $all move [transaxis x -$delta_deg]
>> pbc wrap -center origin
>> }
>> # rotate y by 40 deg
>> for {set x 0} {$x<40} {set x [expr {$x + $delta_deg}]} {
>> $all move [transaxis y $delta_deg]
>> pbc wrap -center origin
>> }
>> # rotate z by -55 deg
>> for {set x 0} {$x>-55} {set x [expr {$x - $delta_deg}]} {
>> $all move [transaxis z -$delta_deg]
>> pbc wrap -center origin
>> }
>> $all writepdb rotated.pdb
>>
>>
>> .... well, the pbc box was correctly placed
>> on top of the simulation box (volume) but
>> the resulting 'rotated.pdb' was not good at
>> all (water molecules close to the box edges
>> got wrongly placed in the 'rotated.pdb' file)
>>
>> To see the weird effect just try the script with
>> a simple water box.
>>
>> Do you know any better way to rotate a box
>> with the pbc plugin?
>>
>> Best,
>> MG.
>>
>
>

-- 
---------------------------
Jan Saam
Institute of Biochemistry
Charite Berlin
Monbijoustr. 2
10117 Berlin
Germany
+49 30 450-528-446
saam_at_charite.de