From: Olivia V. <oli...@gm...> - 2023-02-11 20:46:32
|
Hi, I am using pymol to generate surface meshes from pdb source files. I would like to have the vertices in the same reference frame as the original pdb coordinates. However, when I save the obj file the object is centered at [0,0,0]. I tried to use the following code snippet to transform the surface, but it didn't do anything to the coordinates. What am I doing wrong, or is the command not behaving how supposed to? pymol.load(pdb_file) view = list(pymol.get_view()) M = view[0:3] + [-view[12]] + view[3:6] + [-view[13]] + view[6:9] + [-view[14]] + view[12:15] + [1.0] pymol.transform_selection("(all)", M, 0, 0, 0, 1) pymol.set_view([1, 0, 0, 0, 1, 0, 0, 0, 1] + view[9:]) Any help would be greatly appreciated. If there is a way to avoid the centering at the loading stage, that would be awesome too. Thanks Olivia |