Closed OliviaViessmann closed 1 year ago
It appears you need to reset the camera view. Can you try this config? It works for me.
import graphein.protein as gp
config = gp.ProteinMeshConfig(pymol_commands=["show surface", "set_view (1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, -50.0, 0.0, 0.0, 0.0, 40.0, 100.0, -20.0)"])```
Cool, this indeed resets it! A question -- how did you chose the values for the matrix? Are these the defaults for the original view? Thanks a again for the help!
They came to me in a dream :)
Describe the bug I am using
create_mesh()
to generate surfaces. The background pymol commands generates an.obj
which contains the vertices and faces, but it centers the protein, so the original pdb coordinates and the mesh do not align. How can I transform the surface vertices to match the original pdb reference frame? After reading about the specific order of rotations and translations in pymol I adapted theget_obj_file()
in graphein using a transformation command from the pymol Q&A before the.obj
file is saved, but it doesn't do anything. I call the lines below afterpymol.load(pdb_file)
and beforepymol.save
Expected behavior Does anyone have any ideas how I can align the pdb residue coordinates and the graphein vertex coordinates?