## pymol-users

 [PyMOL] Showing periodic images From: Gianluca Santarossa - 2007-04-19 07:31:41 ```Dear all, is there a way to show the periodic images from a slab in PyMOL? Thanks, Gianluca =2D-=20 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Gianluca Santarossa Institute for Chemical and Bioengineering Department of Chemistry and Applied Biosciences ETH Zurich, H=F6nggerberg, HCI, 8093 Zurich Phone: +41 44 633 4232 E-Mail: gianluca.santarossa@... =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D ```
 Re: [PyMOL] Showing periodic images From: Tsjerk Wassenaar - 2007-04-20 06:30:22 Attachments: lattice.py ```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 lattic= e shift 0,1,0,ObjectCopy # make one shift over the second vector of the latti= ce 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 wrote: > Dear all, > is there a way to show the periodic images from a slab in PyMOL? > > Thanks, > Gianluca > -- > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > Gianluca Santarossa > Institute for Chemical and Bioengineering > Department of Chemistry and Applied Biosciences > ETH Zurich, H=F6nggerberg, HCI, 8093 Zurich > > Phone: +41 44 633 4232 > E-Mail: gianluca.santarossa@... > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > ------------------------------------------------------------------------- > 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@... > https://lists.sourceforge.net/lists/listinfo/pymol-users > --=20 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 ```
 Re: [PyMOL] Showing periodic images From: Tsjerk Wassenaar - 2007-04-21 11:29:18 ```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 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: mbfrolow@... > 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 > > wrote: > >> Dear all, > >> is there a way to show the periodic images from a slab in PyMOL? > >> > >> Thanks, > >> Gianluca > >> -- > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > >> Gianluca Santarossa > >> Institute for Chemical and Bioengineering > >> Department of Chemistry and Applied Biosciences > >> ETH Zurich, H=F6nggerberg, HCI, 8093 Zurich > >> > >> Phone: +41 44 633 4232 > >> E-Mail: gianluca.santarossa@... > >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > >> > >> --------------------------------------------------------------------- > >> ---- > >> 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@... > >> 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 > > > > ---------------------------------------------------------------------- > > --- > > 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@... > > https://lists.sourceforge.net/lists/listinfo/pymol-users > > --=20 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 ```