schrodinger / pymol-open-source

Open-source foundation of the user-sponsored PyMOL molecular visualization system.
https://pymol.org/
Other
1.2k stars 281 forks source link

Pymol2 python package and PyMOL GUI contain different rotamer libraries #297

Open seb124 opened 1 year ago

seb124 commented 1 year ago

When loading the PDB 5D38 into the PyMOL GUI and using the mutagenesis wizard to mutate ARG 154 to TRP, the GUI displays 8 possible rotamers:

image

However, when I attempt the same mutagenesis using the Python pymol2 package's cmd functions:

cmd.wizard("mutagenesis")
cmd.do("refresh_wizard")
cmd.get_wizard().set_mode("TRP")
cmd.get_wizard().do_select("A/154")
cmd.get_wizard().apply()

I get:

image

Which contains a different total number of rotamers and a different lowest strain (25.20 for the pymol2 cmd vs. 35.56 for the GUI).

For comparison, here are all the rotamers for the pymol2 package:

image

JarrettSJohnson commented 1 year ago

Hi. I can't seem to reproduce this issue running a new PyMOL instance with this script:

from pymol import cmd

cmd.fetch("5D38")
cmd.wizard("mutagenesis")
cmd.do("refresh_wizard")
cmd.get_wizard().set_mode("TRP")
cmd.get_wizard().do_select("A/154/")
print(cmd.count_states())

generates 8 instead of 9. I also had to modify the selection string to A/154/ since A/154 (without the trailing slash) did not seem to pick up the atoms