Changes between Version 3 and Version 4 of ChimeraAnimationTasks


Ignore:
Timestamp:
Dec 8, 2010, 4:17:19 PM (15 years ago)
Author:
Darren Weber
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ChimeraAnimationTasks

    v3 v4  
    44Something like this gains access to a lot of view parameters:
    55{{{
    6 for n in dir(chimera.viewer): print n, eval('type(chimera.viewer.%s)' % n)
     6for n in dir(chimera.viewer):
     7    print n, eval('type(chimera.viewer.%s)' % n)
    78}}}
    89
     
    1112==== openState attribute (from FAQ) ====
    1213
    13 Get the OpenState attributes of a model: {{{chimera.openModels.openState(id: int, subid: int)}}}
     14Get the !OpenState attributes of a model: {{{chimera.openModels.openState(id: int, subid: int)}}}
    1415
    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.
     16The 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.
    1617
    1718==== 'Active' models ====
     
    5354Take 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.
    5455
    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 
     56Also, {{{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.