Dear Felix,

One of the easiest ways to determine whether a point is inside a
triclinic box is by matrix multiplying the coordinates with the
inverse of the box matrix. Then, every point which has coordinates
within [0,1] will be inside the box. Furthermore, every point can be
mapped to the triclinic box of the unit cell by subtracting the
integer portions (keeping the fractions only, which indicate the
fractional coordinates in a box). The only difficult part in what you
desire seems to be determining the centers of mass of each molecule,
where you need to know what are the molecules in a selection given.
This must be in Pymol somewhere, but that one I pass to Warren (or
anyone else who knows it). With that it would be rather trivial and
maybe it's worth 15 minutes to make somebody's life perfect :) It is
to say that I already have some routines in python which will
transform coordinates to box coordinates and back, so it'll be putting
a few parts together.

Best,

Tsjerk

On 4/21/07, Felix Frolow <mbfro...@post.tau.ac.il> wrote:
Hi Tsjerk
To make our life perfect we need a script (we do it on this stage
manually)
to select molecules with the center of gravity inside the cell
Then, applying script you suggest it will be possible to show packing
arrangement
inside any box of multiple cell. Very much needed...
FF
Dr  Felix Frolow
Professor of Structural Biology and Biotechnology
Department of Molecular Microbiology
and Biotechnology
Tel Aviv University 69978, Israel

Acta Crystallographica D, co-editor

e-mail: mbfro...@post.tau.ac.il
Tel:  ++972-3640-8723
Fax: ++972-3640-9407


On Apr 20, 2007, at 9:30 AM, Tsjerk Wassenaar wrote:

> Hi Gianluca,
>
> Unfortunately, Pymol offers no such functionality intrinsically. But
> this is where python comes in handy. Attached you find a script I
> wrote for the purpose. It allows you to shift objects or selections
> over the periodic lattice:
>
> run lattice.py
> create ObjectCopy,MyObject
> shift 1,0,0,ObjectCopy # make one shift over the first vector of
> the lattice
> shift 0,1,0,ObjectCopy # make one shift over the second vector of
> the lattice
> shift 2,2,2,ObjectCopy # make two shifts over each of the vectors of
> the lattice
>
> Hope it helps,
>
> Tsjerk
>
> On 4/19/07, Gianluca Santarossa <gianluca.santaro...@chem.ethz.ch>
> wrote:
>> Dear all,
>> is there a way to show the periodic images from a slab in PyMOL?
>>
>> Thanks,
>> Gianluca
>> --
>> ==============================================================
>> Gianluca Santarossa
>> Institute for Chemical and Bioengineering
>> Department of Chemistry and Applied Biosciences
>> ETH Zurich, Hönggerberg, HCI, 8093 Zurich
>>
>> Phone: +41 44 633 4232
>> E-Mail: gianluca.santaro...@chem.ethz.ch
>> ==============================================================
>>
>> ---------------------------------------------------------------------
>> ----
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> PyMOL-users mailing list
>> PyMOL-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/pymol-users
>>
>
>
> --
> Tsjerk A. Wassenaar, Ph.D.
> Junior UD (post-doc)
> Biomolecular NMR, Bijvoet Center
> Utrecht University
> Padualaan 8
> 3584 CH Utrecht
> The Netherlands
> P: +31-30-2539931
> F: +31-30-2537623
> <lattice.py>
> ----------------------------------------------------------------------
> ---
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> PyMOL-users mailing list
> PyMOL-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pymol-users




--
Tsjerk A. Wassenaar, Ph.D.
Junior UD (post-doc)
Biomolecular NMR, Bijvoet Center
Utrecht University
Padualaan 8
3584 CH Utrecht
The Netherlands
P: +31-30-2539931
F: +31-30-2537623

Reply via email to