From: Scott C. <cl...@be...> - 2004-03-11 01:46:22
|
Begin forwarded message: > From: Scott Classen <cl...@be...> > Date: March 10, 2004 4:20:53 PM PST > To: Warren DeLano <wa...@de...> > Cc: pym...@li... > Subject: Is exporting CGOs vertices possible? > > Hello Fellow PyMOLers, > I am interested in using another program (Blender) to do some more=20 > complicated animations/rendering of molecules. Unfortunately Blender=20= > does not import very many types of files. I have been able to use=20 > Gerard Kleywegts MOLEMAN2 to convert my PDB to a VRML1 file and import=20= > that into Blender, but this is very limited in its abilities. > > I would love to be able to get the beautiful cartoons, ribbons,=20 > sticks, and other shapes from PyMOL and then import them into Blender.=20= > Is there a way to get a file from PyMOL that contains all the vertices=20= > that construct objects. i.e the vertices that describe a ribbon=20 > representation of my protein. > > I understand that PyMOL generates CGOs that it feeds to the internal=20= > ray-tracer. Can PyMOL write out these vertices to a file instead? I=20 > would then have to write a python script or something that would parse=20= > the PyMOL vertices into a file that is importable into Blender (that's=20= > a whole other can of worms). > > Thanks, > > Scott Hello PyMOLers, I also think it is important to know which vertices are connected to=20 each other in order to form the proper faces. I'm looking into the=20 Blender API a bit more and it looks like it needs the vertex x,y,z=20 coordinates and the "face data" in order to connect the vertices in a=20 meaningful way. These are the two entries I think are important. Vert(x=3D0, y=3D0, z=3D0) Get a new vertex object. Parameters: x - The x coordinate of the vertex. =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (type=3Dfloat) y - The y coordinate of the vertex. =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (type=3Dfloat) z - The z coordinate of the vertex. =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (type=3Dfloat) Returns: A new NMVert object. =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (type=3DNMVert) Face(vertexList=3DNone) Get a new face object. Parameters: vertexList - A list of up to 4 NMVerts (mesh vertex objects). =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (type=3Dlist) Returns: A new NMFace object. =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 (type=3DNMFace) I think it would be sufficient to have a txt file that looks like this=20= with the vertex coord followed by a list of the vertices that make up=20 relevent faces. xyz xyz xyz xyz xyz abcd abcd abcd abcd abcd > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Scott Classen, Ph.D. ACS Postdoctoral Fellow Department of Molecular & Cell Biology University of California, Berkeley 237 Hildebrand Hall #3206 Berkeley, CA 94720-3206 LAB 510.643.9491 FAX 510.643.9290 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |