pymol-open-source
pymol-open-source copied to clipboard
some options are not saved between scenes
It looks like some option settings are not saved along with scenes, e.g. grid_mode
, all_states
, cartoon_cylindrical_helices
. Is there a plan to include these along with scenes in the future? Is it something that I could help with a contribution?
Running: PyMOL(TM) 2.3.3 - Incentive Product
Scenes do not store any settings. It's a reasonable feature request and we certainly accept contributions.
Things to consider:
- What's a user friendly API? Automatically storing all currently changed global settings might be too much. A separate command (like
scene_set scenename, settingname, value
) could work. - float-type settings should probably support animation. In particular the
transparency
setting would be nice to interpolate. - Do we need to support object-level or atom-level settings? E.g. to cross-fade two objects with transparency, we'd need at least object-level support.
Thanks -- there's more to this than I'd considered at first.
-
I like a separate command for global settings that go along with a scene.
-
Would you suggest going about this by making a modification to the
MovieScene
class to hold settings? Or is there a python (cython?) class that wraps the C class by chance? I'm still pretty unfamiliar with the codebase.
https://github.com/schrodinger/pymol-open-source/blob/6974848242f7685243c2ed648a957fa2cceb6de8/layer3/MovieScene.cpp#L63-L82
Supporting animation and object-level support sounds reasonable...
Yes correct, I would suggest to modify the MovieScene
class, and maybe MovieSceneObject
to support object-level settings. There are two ways to store settings, either with an instance of CSetting
(used for global/object/object-state settings), or with a "unique setting" handle (used for atom settings). Using CSetting
is probably easier. See layer1/Setting.h.
There is no python wrapper for the MovieScene
class.