Closed cyril-schroeder-ox closed 1 year ago
Wizards can act as callbacks on various events. Example:
from pymol import cmd
from pymol.wizard import Wizard
class StateCallbackWizard(Wizard):
def get_event_mask(self):
return Wizard.event_mask_state
def do_state(self, state):
self.cmd.select("atoms_with_negative_x", "x < 0", state=state, quiet=0)
cmd.set_wizard(StateCallbackWizard())
Closing since I believe Thomas has provided the best solution currently available.
Hi all,
I am trying to solve pretty much the same problem as issue #218 - also updating the selection to only display molecules which are in contact on a frame-by-frame basis. What would it take to directly access the Pymol event signals and run a function each time I move to a new frame by accessing these signals? So far I couldn't find anything of the sort and have to manually run my function each time.
Thanks a lot in advance for your help!
Best, Cyril