Changes between Version 3 and Version 4 of ChimeraAnimationTasks
- Timestamp:
- Dec 8, 2010, 4:17:19 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ChimeraAnimationTasks
v3 v4 4 4 Something like this gains access to a lot of view parameters: 5 5 {{{ 6 for n in dir(chimera.viewer): print n, eval('type(chimera.viewer.%s)' % n) 6 for n in dir(chimera.viewer): 7 print n, eval('type(chimera.viewer.%s)' % n) 7 8 }}} 8 9 … … 11 12 ==== openState attribute (from FAQ) ==== 12 13 13 Get the OpenState attributes of a model: {{{chimera.openModels.openState(id: int, subid: int)}}}14 Get the !OpenState attributes of a model: {{{chimera.openModels.openState(id: int, subid: int)}}} 14 15 15 The openState attribute of a Model controls whether that model is active for motion ('.active'), and contains the model's transformation matrix ('.xform') and center of rotation ('.cofr'). Since some models must move in synchrony (e.g. a molecule and its surface), OpenState instances may be shared among multiple models. If you create a model that needs a shared openState with another model, then when adding your model to the list of open models with chimera.openModels.add(), you should use the 'sameAs' keyword to specify the other model.16 The openState attribute of a Model controls whether that model is active for motion ('.active'), and contains the model's transformation matrix ('.xform') and center of rotation ('.cofr'). Since some models must move in synchrony (e.g. a molecule and its surface), !OpenState instances may be shared among multiple models. If you create a model that needs a shared openState with another model, then when adding your model to the list of open models with chimera.openModels.add(), you should use the 'sameAs' keyword to specify the other model. 16 17 17 18 ==== 'Active' models ==== … … 53 54 Take a look at the code for {{{chimera.update.checkForChanges()}}}. This may be helpful in checking the validity of state parameters and in automatically detecting changes for transitions. 54 55 55 Also, {{{chimera.OpenModels.addRemoveHandler(func, data)}}} might be used to add a trigger handler when removing models. This might be useful in the creation of a state instance as a way to maintain integrity or validity of the saved state. It may depend on whether the state instance keeps a reference or a copy of models in the saved state. For efficiency, it is better to keep a reference. For validity, it could be better to keep a copy. Perhaps a copy is required only when a model is removed, so the copy action could be triggered then. If a state instance that is registered as a handler is deleted, then call {{{chimera.OpenModels.deleteRemoveHandler(handler)}}} to delete the trigger handler. 56 56 Also, {{{chimera.openModels.addRemoveHandler(func, data)}}} might be used to add a trigger handler when removing models. This might be useful in the creation of a state instance as a way to maintain integrity or validity of the saved state. It may depend on whether the state instance keeps a reference or a copy of models in the saved state. For efficiency, it is better to keep a reference. For validity, it could be better to keep a copy. Perhaps a copy is required only when a model is removed, so the copy action could be triggered then. If a state instance that is registered as a handler is deleted, then call {{{chimera.openModels.deleteRemoveHandler(handler)}}} to delete the trigger handler.
![[Chimera Issue Tracking System]](/trac/chimera/chrome/site/chimera_logo.png)