RE: [PyMOL] Macros...
Hi Simon, Before I start I have to say that I never ever used neither cctbx nor draw_cell.py. I installed Python 2.4.1 and cctbx 2005_08_18_0201 on my WinXP machine. I then had a look to the Roger Dodd's Solution and found out that I cannot work properly since the file c:\cctbx_source\libtbx\libtbx\assoc_ftype.py does NOT exist. So what I did is to go in the command line (cmd) and run the C:\cctbx_sources\libtbx\stdlib.py file, as well as the C:\cctbx_sources\libtbx\stdlib.pyc file. Do not ask me what it does and what those files are! I have no clue... Then I went to PyMol, ran the draw_cell.py file, opened a pdb file, and typed the command draw_cell(My_object, 0.2). I got another error message at line 35 of the script, but at least the environment cctbx seems to be loaded... Good luck with this and don't hesitate to post something if you went further! Best regards, Greg -Original Message- From: pymol-users-ad...@lists.sourceforge.net [mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of Simon Kolstoe Sent: lundi, 19. septembre 2005 18:22 To: pymol-users@lists.sourceforge.net Subject: [PyMOL] Macros... Hi everyone, sorry for perhaps an obvious question, however the pymol wiki doesn't seem to be helping me: I am trying to run the script draw_cell.py which requires cctbx. I followed the instructions on http://www.pymolwiki.org/index.php/CCTBX entitled Roger Dodd's Solution, installing everything as he says. Problem is everytime I run pymol (under windows XP) I get the following error: File C:\Program Files\DeLano Scientific\PyMOL/modules\pmg_tk\startup\draw_cell.py, line 3, in ? from cctbx import uctbx, sgtbx ImportError: No module named cctbx Error: unable to initialize plugin 'draw_cell'. Googling doesn't seem to find an understandable answer except for a similar question posted on this bulletin board in 2003 which went unanswered! Thanks for any help, Simon
[PyMOL] PyMOL and cctbx
Dear Simon and other pymolers, I have realised that the solution to getting cctbx working with pymol on windows I posted no longer works with recent builds of cctbx. I have found that the following solution works: 1. Download and install python (to the default location - C:\Python24) -- http://www.python.org/ftp/python/2.4.1/python-2.4.1.msi (1a. If you want to use the draw_symops.py or draw_symops_cctbx.py scripts you also need to install numarray after installing python -- http://prdownloads.sourceforge.net/numpy/numarray-1.3.3.win32-py2.4.exe?download) 2. Download cctbx *without* python included and unpack into C:\cctbx_build and C:\cctbx_sources -- http://cci.lbl.gov/cctbx_build/results/2005_08_18_0201/cctbx_win_xp_py24_pre.exe 3. Download pymol built against python 2.4 (but not including its own python) and install in the default location -- http://delsci.com/rel/0_98/pymol-0_98rc5-bin-win32-py24.zip (You cannot use the latest beta versions which include their own version of python to the best of my knowledge) 4. Create 2 files (use notepad or wordpad or any other text editor) and save in the C:\Program Files\Delano Scientific\PyMOL directory: a) pymol.cmd @python -x %~f0 %* exit /b import cctbx import pymol b) run.cmd CALL C:\cctbx_build\setpaths_all.bat CALL C:\Program Files\Delano Scientific\PyMOL\pymol.cmd 5. One other thing, it's important to have python in your path variable (which you can access by going to control panel|system|advanced|environment variables), just add C:\python24 to the end of the path variable, separated by a semi-colon. Hopefully this should work OK... I know it is working on at least one other system than my own. Let me know if it works for you. I'll post this up on the wiki ASAP. Cheers Roger begin:vcard fn:Roger Dodd n:Dodd;Roger org:University of Cambridge;Department of Medicine adr:Addenbrooke's Hospital, Hills Road;;CIMR, Wellcome Trust/MRC Building;Cambridge;Cambridgeshire;CB2 2XY;UK email;internet:rb...@cam.ac.uk title:Post-Doctoral Research Associate tel;work:+44-1223-762629 note;quoted-printable:MSN - rogerd...@hotmail.com=0d=0a= ICQ - 100657240=0D=0A= Skype - rogerdodd=0D=0A= Gizmo - rogerdodd=0D=0A= SIP (VoIP) - 17476057995 x-mozilla-html:TRUE url:http://www.cus.cam.ac.uk/~rbd22/ version:2.1 end:vcard
[PyMOL] alignment question
hello, is there any possibility to get a list of the pairs of atoms that are matched using the align command? cheers, marc
[PyMOL] cctbx woe's, continued
Hi, thanks for all the advice so far. I followed Roger Dodd's alternative instructions after uninstalling everything, however this time got the error: Exception in plugin 'draw_cell' -- Traceback follows... Traceback (most recent call last): File C:\Program Files\DeLano Scientific\PyMOL\modules\pmg_tk\PMGApp.py, line 143, in initialize_plugins __builtin__.__import__(mod_name) File C:\Program Files\DeLano Scientific\PyMOL\modules\pmg_tk\startup\draw_cell.py, line 3, in ? from cctbx import uctbx, sgtbx ImportError: No module named cctbx Error: unable to initialize plugin 'draw_cell'. I then tried to follow Peter Myers instructions by adding the cctbx directory to the sys.path, however as I have two directories called cctbx_build and cctbx_sources was not sure which should be added? Incidently this issue with getting cctbx running properly has been plaguing everyone in my lab for the last year. In the past we have just jumped to alternative software packages. Is there any way cctbx can be packaged with a pymol installation in the same way as python has been? Thanks again for all the help, Simon
Re: [PyMOL] cctbx woe's, continued
Simon, I then tried to follow Peter Myers instructions by adding the cctbx Meyer, not Myers (not that it matters much). directory to the sys.path, however as I have two directories called cctbx_build and cctbx_sources was not sure which should be added? Probably cctbx_build. If in doubt, add both. It'll be a directory with *.pyd, *.dll, *.py, or *.pyc files in it. Incidently this issue with getting cctbx running properly has been plaguing everyone in my lab for the last year. In the past we have just jumped to alternative software packages. Is there any way cctbx can be packaged with a pymol installation in the same way as python has been? Other peoples experience may vary, but building/packaging software on/for windows is problematic. This is particularly the case for software with multiple dependencies (aka if it can't be done within a single IDE, windows makes you jump through lots of hoops to get things working). ** Since I didn't foward my last response to the list (oops), here's the short version. ImportError means that the python interpeter can't find the needed modules. Adding the directories these modules are installed in to the system path lets the intepreter know where they are, and allows them to be imported. To add directories to the system path, at the pymol prompt: sys.path.append('c:\cctbx_build') sys.path.append('c:\cctbx_sources') The sources line may not be (probably isn't needed). Both assume that cctbx is installed in the listed directories (which probably isn't, but I haven't set up a windows cctbx install). Possibly this could be added to the pymolrc file (if it resolves the problem). This is more a work-around than a fix. Pete Pete Meyer Fu Lab BMCB grad student Cornell University
RE: [PyMOL] rot+trsl matrices
Dear Warren (and others who might be interested - Zac, Robert ?): Thank you for the cmd.get_object_matrix(object-name), this is what we were looking for. Or almost, here are a few comments : 1) We were also looking for an equivalent cmd_set_object_matrix or something like that, but could not find it. Does it exist somewhere ? 2) reset and undo do not seem to reinitialize the matrix 3) moving the molecule with the commands rotate/translate instead of with the rotF/movF from the mouse, the matrix does not get updated. 4) We get some numerical instabilities. For example, using the following function a few times (on a pdb file mono) gives values which are greater than 1 for the cos/sin of the rotation matrix, and then quickly diverge : from Numeric import * print cmd.get_object_matrix('mono') cmd.transform_object('mono',[cos(1.57), 0, -sin(1.57), 0.0, 0, 1, 0, 0.0, sin(1.57), 0, cos(1.57), 0.0, 0, 0, 0, 0.0]) print cmd.get_object_matrix('mono') cmd.transform_object('mono',cmd.get_object_matrix('mono'),0,0,'',0,1) print cmd.get_object_matrix('mono') Note that it diverges also but more slowly when replacing the second transform line by : cmd.transform_object('mono',[cos(1.57), 0, sin(1.57), 0.0, 0, 1, 0, 0.0, -sin(1.57), 0, cos(1.57), 0.0, 0, 0, 0, 0.0]) Can you help us with some of these issues ? Thank you very much. --Xavier (w/ Leandro and Stefano) ps : thank you Zac Robert for your help ! Provided objects are moved in their entiretly, recent PyMOL betas may provide what you want via cmd.get_object_matrix(object-name) Cheers, Warren -- Warren L. DeLano, Ph.D. Principal Scientist . DeLano Scientific LLC . 400 Oyster Point Blvd., Suite 213 . South San Francisco, CA 94080 USA . Biz:(650)-872-0942 Tech:(650)-872-0834 . Fax:(650)-872-0273 Cell:(650)-346-1154 . mailto:war...@delsci.com -Original Message- From: pymol-users-ad...@lists.sourceforge.net [mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of Xavier Siebert Sent: Friday, September 16, 2005 10:01 AM To: pymol-users@lists.sourceforge.net Subject: [PyMOL] rot+trsl matrices Hello, I would like to dock several molecules into a map and display a score in real time (i.e., as the molecules are moved around with the mouse). For that I have to retrieve the rotation+translation matrix for each molecule while it is being moved around, to feed it into a scoring algorithm. Do you know how to get these matrices ? Thank you ! --X. - Xavier Siebert, Ph.D. Laboratoire de Virologie Mole(c)culaire Structurale UMR 2472 CNRS-GIF 1 Av. de la Terrasse, Bat. 14 B 91198 Gif-sur-Yvette, FRANCE tel : (++33)-1-69.82.38.56 fax : (++33)-1-69.82.43.08 --- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42 plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php ___ PyMOL-users mailing list PyMOL-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pymol-users