[chimera-dev] Problem using: "openModels.add"

Eric Pettersen pett at cgl.ucsf.edu
Thu Dec 4 15:56:10 PST 2003


Hi Lars,
	You have found a bug in the way "shareXform" is handled.  If you 
specify "shareXform=0" to your second add(), it works okay.  shareXform 
controls whether the initial transformation matrix of the added model 
will set to be the same as another model:

	baseId specified:  the lowest subid model with that baseId  [the bug 
is in this case]
	baseId is not specified: the lowest numbered open model

	shareXform being true makes it so that if the user opens one model and 
moves it around, and then opens a second model that should be in the 
same reference frame (e.g. a bound ligand), the second model will be 
positioned in the correct relative position to the first model.
	So until we get the next snapshot release out (should be soon), you 
will need to specify shareXform=0 and set the transformation matrix "by 
hand" if you need to.

                         Eric Pettersen
                         UCSF Computer Graphics Lab
                         pett at cgl.ucsf.edu
                         http://www.cgl.ucsf.edu

On Thursday, December 4, 2003, at 03:33 AM, Lars Kunert wrote:

> Hi!
>
> I got a problem using openModel.add to add a model into a specified
> id/subid-slot.
>
>
> Python 2.2.3 (#1, Oct 29 2003, 07:35:58)
> [GCC 3.2 20020903 (Red Hat Linux 8.0 3.2-7)] on linux2
> Type "copyright", "credits" or "license" for more information.
> IDLE 0.8 -- press F1 for help
>>>>
> import chimera
>>>> m=chimera.Molecule()
>>>> chimera.openModels.add([m], baseId=0, subid=0 )
>
> up till here it worked nicely...
>
>>>> m=chimera.Molecule()
>>>> chimera.openModels.add([m], baseId=0, subid=1 )
> Traceback (most recent call last):
>   File "<pyshell#4>", line 1, in ?
>     chimera.openModels.add([m], baseId=0, subid=1 )
>   File "/usr/local/chimera/chimera-1.1872/share/chimera/__init__.py", 
> line
> 769, in add
>     shareXform, hidden, skipViewAll)
> error: unopen model
>
> adding a second, third... molecule/model to a slot gives an 
> error-message
> (see above)
> - no new entry will show up in the model-viewer, but...
>
>>>> m=chimera.Molecule()
>
> the next created Model will be shown in the model-viewer without even
> being added.
>
>
> It would be nice if you could tell me something about the
> shareXform-parameter of the add-command too.
>
>
> Thanks a lot for your help,
>
> Lars
> _______________________________________________
> Chimera-dev mailing list
> Chimera-dev at cgl.ucsf.edu
> http://www.cgl.ucsf.edu/mailman/listinfo/chimera-dev
>



More information about the Chimera-dev mailing list