Re: [PyMOL] Getting SCALE record within PyMOL

2009-07-20 Thread Warren DeLano
Stuart,

 

Sorry, there is no way to do this at present (short of manually editing
text files).  But thank you for the suggestion!


Cheers,

Warren

 



From: Stuart Ballard [mailto:srball...@wisc.edu] 
Sent: Saturday, July 18, 2009 1:58 PM
To: pymol-users
Subject: [PyMOL] Getting SCALE record within PyMOL

 

Hello Warren, all,


Is there any way to read the SCALE record from the PDB file of a protein
loaded into PyMOL either within PyMOL or in a script? Alternatively,
even getting the filepath from an object name so that the PDB can be
accessed directly by a script would be sufficient.


Thanks,
Stuart Ballard

--
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge___
PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net)
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net

Re: [PyMOL] [cctbxbb] draw_symops <-- cctbx(/phenix) broken due to boost segfault handling ?

2009-07-20 Thread Cameron Mura

Hi all,

In case anyone else runs into it, just wanted to let you know that I've 
solved the (possibly Fedora 10-specific) segfault-induced crashing 
described in the email below.  In a nutshell, it required editing the 
module in question (in this case, line 153 of "all_axes_new.py") so that 
it loops over the space group matrices of an sgtbx-returned object 
('mysg') by calling all_ops() to explicitly render the object iterable; 
i.e., loop over mysg.all_ops() rather than plain mysg.  In this case, 
change this:

  for smx in space_group_info.group():

to this:

  for smx in space_group_info.group().all_ops():


With best regards,
Cam

--
---
Cameron Mura
Assistant Professor
University of Virginia
Department of Chemistry
McCormick Road, Box 400319
Charlottesville, VA 22904-4319
Email: cm...@virginia.edu
Web: http://muralab.org
Tel: 434.924.7824
Fax: 434.924.3710
---


=== Cameron Mura wrote (on 07/05/2009 03:33 PM): ===

Hi all,

Apologies for the message to both mailing lists, but perhaps someone 
on either cctbxbb or pymol-users has had some recent experience with 
this...


The subject line more-or-less says it all: I'm wondering if anyone has 
recently used Rob Campbell's draw_symops (or draw_symops_cctbx) Python 
modules with a relatively recent (within past year) version of the 
cctbx (particularly the Boost C++ parts) ?  I succeeded in doing this 
a few years ago to generate images such as the ones near the top of 
http://muralab.org/~cmura/PyMOL/Sandbox/, but I can't get it to work 
on my present system (64-bit Fedora 10; Python 2.5.2 with Python 2.6 
coexisting).


Below is what happens when I...

1) Initiate a new PyMOL session (using a PyMOL v1.1 that I built 
in-place from source, so should be compatible with local python, 
system libs, etc)


2) load PDB files (tried with a few diff't files; verified that they 
contain proper CRYST specifications)


3) do the usual 'run draw_symops_cctbx.py'

4) call draw_symops() -- either implicitly, or by explicit 
specification of the u.c. params (i.e., using something like 
"draw_symops_param((45.2,45.2,70.8,90.,90.,120.),'p3121',0.5,0.1)")


...which crashes the pymol session and yields the following trace:

PyMOL>draw_symops_param((45.2,45.2,70.8,90.,90.,120.),'p3121',0.5,0.1)
libc backtrace (48 frames, most recent call last):
  /usr/bin/python [0x400649]
  /lib64/libc.so.6(__libc_start_main+0xe6) [0x344081e576]
  /usr/lib64/libpython2.5.so.1.0(Py_Main+0xb11) [0x34584e7ef1]
*
...
...
*
  /usr/lib64/libpython2.5.so.1.0(PyObject_Call+0x13) [0x345843d493]
  /root/cctbx/working/v4/cctbx_build/lib/libboost_python.so 
[0x7ff19691db16]
  
/root/cctbx/working/v4/cctbx_build/lib/libboost_python.so(boost::python::handle_exception_impl(boost::function0)+0x9f) 
[0x7ff19692a2ef]
  /root/cctbx/working/v4/cctbx_build/lib/libboost_python.so 
[0x7ff196920b08]
  
/root/cctbx/working/v4/cctbx_build/lib/libboost_python.so(boost::python::objects::function::call(_object*, 
_object*) const+0x125) [0x7ff196920635]
  
/root/cctbx/working/v4/cctbx_build/lib/cctbx_sgtbx_ext.so(boost::python::detail::caller_arity<2u>::impl(*)(cctbx::sgtbx::space_group const&, unsigned long), 
boost::python::default_call_policies, 
boost::mpl::vector3const&, unsigned long> >::operator()(_object*, _object*)+0x12a) 
[0x7ff18f820a3a]
  /root/cctbx/working/v4/cctbx_build/lib/cctbx_sgtbx_ext.so 
[0x7ff18f8034cc]
  
/root/cctbx/working/v4/cctbx_build/lib/libboost_python.so(boost::python::throw_error_already_set()+0xe) 
[0x7ff196929dde]

  /usr/lib64/libstdc++.so.6(__cxa_allocate_exception+0x2f) [0x3444cc2cdf]
  /lib64/libc.so.6 [0x3440832f90]
Segmentation fault (libc call stack above)
This crash may be due to a problem in any imported
Python module, including modules which are not part
of the cctbx project. To disable the traps leading
to this message, define these environment variables
(e.g. assign the value 1):
BOOST_ADAPTBX_FPE_DEFAULT
BOOST_ADAPTBX_SIGNALS_DEFAULT
This will NOT solve the problem, just mask it, but
may allow you to proceed in case it is not critical.
 PyMOL: abrupt program termination.
I tried the recommendation of setting the BOOST_ADAPTBX* env vars, but 
this doesn't remedy the problem.


Also, I tried accomplishing this with many combinations of workflows:
1) old cctbx (e.g., 2005_04_29_1615), latest stable release of cctbx 
(2009_02_15_2320), bleeding-edge cctbx (2009_07_04_0143)
2) pre-built cctbx binaries versus building myself from src (for each 
of the above), insuring, again, optimal match between local system libs...
3) cctbx alone, cctbx in the context of Phenix, cctbx +/- its own 
bundled Python (2.5 and 2.6)


Also, I tried this with different combinations of Rob's scripts -- 
e.g., the 'symop_axes.dat'-dependent "dra