Hi Bob,
I tried it and think you're right about PyMOL centering on {0 0 0}.
Here is what I did:
PyMOL> load 3dqb.pdb
PyMOL> show surface
PyMOL> save 3dqb_sas.obj
Note: I did not move the protein in PyMOL
Jmol> load auto "file:///path/to/3dqb.pdb"
Jmol> isosurface OBJ "file:///path/to/3dqb_sas.obj"
This shows the surface somewhat translated so I followed your idea about
centering on {0 0 0}
(editconf is a tool from the GROMACS suite, but you can probably do it with
Jmol to)
editconf -f 3dqb.pdb -o 3dqb_c.pdb -center 0 0 0
Jmol> load auto "file:///path/to/3dqb_c.pdb"
Jmol> isosurface OBJ "file:///path/to/3dqb_sas.obj"
This shows the surface and the protein correctly superimposed
The files I used and created:
http://dl.dropbox.com/u/3778149/3dqb.tar.gz
While this solves my problem, I am not completely satisfied. When I want to
compare some PyMOL generated surfaces with other surfaces in Jmol (created by
Jmol or yet another tool) I need to change my pdb files, but I would rather do
it in the PyMOL-surface-pipeline.
Manipulating the pdb file before creating the surface with PyMOL does not work
because the PyMOL obj has no relation to the pdb coordinates. So the
manipulation can only take place after the obj is created. I thought about
translating the coordinates in the obj file. There basically three entries: v
for vertices, vn for normal and f for faces. f can be ignored, because that are
just indices to v or vn entries. v could be translated just be adding the
appropriate translation vector. For vn I am not so sure, but Google tells me
that using the inverse of the transformation matrix is the way to go.
Is there a way to translate an isosurface? I did not find anything in the docs,
but you never know. A 'translation vector' parameter for loading isosurfaces
would be nice.
Best
Alexander
----- Ursprüngliche Mail -----
> Von: "Robert Hanson" <[email protected]>
> An: [email protected]
> Gesendet: Dienstag, 23. November 2010 23:30:55
> Betreff: Re: [Jmol-users] obj surface files exported from pymol
> OK, that's set for Jmol 12.1.24 and Jmol 12.0.23. I note that the
> orientation and offset is off. It looks like PyMOL is centering the
> coordinates on {0 0 0} rather than their actual molecular coordinates,
> but I can't be sure if that is based on the protein or the surface,
> and it also looks like there is a rotation, so I suspect that PyMOL is
> using the current rotation of the model to generate the file. Thus,
> I'm not sure this is going to be satisfactory. But the surface looks
> pretty good (despite the poor resolution), and I'm able to strip out
> all the unnecessary repetitive vertices that PyMOL generates.
>
> See http://chemapps.stolaf.edu/jmol/docs/examples-12/Jmol-12.zip
>
> Good luck!
>
> Bob
>
>
>
> On Tue, Nov 23, 2010 at 1:47 PM, Robert Hanson < [email protected] >
> wrote:
>
>
> Jmol just hasn't been set up to read OBJ files written in quite that
> format (where the vertices and faces are intermixed that way). Please
> send me the file; I'll fix it in short order.
>
> Bob
>
>
>
>
>
> On Tue, Nov 23, 2010 at 1:00 PM, Alexander Rose <
> [email protected] > wrote:
>
>
> Hi,
>
> I tried to view obj files exported from pymol but could not get it to
> work. The obj file from pymol looks reasonable, i.e.
>
> # file: pymol.obj
> v 9.775413 -10.004283 -3.190735
> v 9.996734 -10.529106 -3.207321
> v 9.653004 -10.796073 -2.960678
> vn -0.552027 -0.351046 -0.756328
> vn -0.541946 -0.102013 -0.834199
> vn -0.554205 -0.070096 -0.829424
> f 1//1 2//2 3//3
> v 9.147324 -10.091957 -2.762634
> v 9.775413 -10.004283 -3.190735
> v 9.653004 -10.796073 -2.960678
> vn -0.329337 -0.334825 -0.882853
> vn -0.552027 -0.351046 -0.756328
> vn -0.554205 -0.070096 -0.829424
> f 4//4 5//5 6//6
> ... and more
>
> I tried it with some example file (a cube)
>
> # file cube.obj
> v 1 1 1
> v 1 1 -1
> v 1 -1 1
> v 1 -1 -1
> v -1 1 1
> v -1 1 -1
> v -1 -1 1
> v -1 -1 -1
> f 1 3 4 2
> f 5 7 8 6
> f 1 5 6 2
> f 3 7 8 4
> f 1 5 7 3
> f 2 6 8 4
>
> which works when load it with 'isosurface OBJ "/path/to/file.obj"',
> just opening it with the open gui in the application does not work
> (12.1.23)
>
> Do you experience the same behavior? Can you point me to some pdb for
> which jmol reads the exported obj surface?
>
>
> Best
> Alex
>
>
>
> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with
> the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for
> grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
>
> --
> Robert M. Hanson
> Professor of Chemistry
> St. Olaf College
> 1520 St. Olaf Ave.
> Northfield, MN 55057
> http://www.stolaf.edu/people/hansonr
> phone: 507-786-3107
>
>
> If nature does not answer first what we want,
> it is better to take what answer we get.
>
> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
>
>
>
> --
> Robert M. Hanson
> Professor of Chemistry
> St. Olaf College
> 1520 St. Olaf Ave.
> Northfield, MN 55057
> http://www.stolaf.edu/people/hansonr
> phone: 507-786-3107
>
>
> If nature does not answer first what we want,
> it is better to take what answer we get.
>
> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
>
> ------------------------------------------------------------------------------
> Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
> Tap into the largest installed PC base & get more eyes on your game by
> optimizing for Intel(R) Graphics Technology. Get started today with
> the
> Intel(R) Software Partner Program. Five $500 cash prizes are up for
> grabs.
> http://p.sf.net/sfu/intelisp-dev2dev
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users