
Hi Steve, The most common way to set an Xform is with the rotate() and translate() methods. You can also use the following Xform method static Xform xform(Real r00, Real r01, Real r02, Real t03, Real r10, Real r11, Real r12, Real t13, Real r20, Real r21, Real r22, Real t23, bool orthogonalize = false); You need to call it as chimera.Xform_xform() from Python. This underscore notation is what we are using for static methods. Perhaps we will provide chimera.Xform.xform() when Python 2.3 with class method support comes out. The getRotation() and getTranslation() Xform methods let you read out the transform. Unfortunately there is no method to directly read the Xform matrix elements because our Python wrapper program can't handle returning arrays. I will ask Greg Couch if there is anything that can be done to remedy this. I see the chimera/include directory I gave you had symbollic links to alot of header files. I've made that a new http://www.cgl.ucsf.edu/home/goddard/chiminc.tar.gz that includes all the files. The Xform class is defined in include/otf/Geom3d.h, but the real file that determines what Xform methods are available in Python is called pyinterface. I included it in the new chiminc.tar.gz as include/_chimera/pyinterface. Look at its Xform definition to find out what the Python methods are. Tom
Date: Mon, 12 May 2003 23:15:32 -0500 (CDT) From: Steve Ludtke <stevel@blake.3dem.bioch.bcm.tmc.edu> Reply-To: sludtke@bcm.tmc.edu To: Thomas Goddard <goddard@cgl.ucsf.edu>
Well, things are getting a lot better. The headers and tips you provided are a quantum leap forward. The otf headers weren't in the tarball you sent, but I found otf0.2 on your website and downloaded that. My problem now is access to the geometry. The Xform class is a nice abstraction of the transformation matrix, but I haven't found a good way to directly modify or extract the matrix elements. I'd like to generate a sequence of Xform matrices myself, but aside from converting them into rotation/translation sequences, I don't see a way to set the values. Even more important I don't see a good way to read out the matrix values. There is a print method, but it's rather annoying to have to convert the matrix to ascii only to convert it back into a 'real' matrix again. Is there a better way I'm missing ?
Thx for the continued assistance :^)
-- ---------------------------------------------------------------------------- Steven Ludtke, PhD | Baylor College of Medicine sludtke@bcm.tmc.edu | Co-Director stevel@alumni.caltech.edu | National Center For Macromolecular Imaging V: (713)798-6989 | Dept of Biochemistry and Mol. Biol. instant messenger: sludtke42 | * Those who do ARE * http://ncmi.bcm.tmc.edu/~stevel | The converse also holds
participants (1)
-
Thomas Goddard