[chimera-dev] changing the radius value on volumeEraser

Dougherty, Matthew T matthewd at bcm.edu
Fri Mar 7 14:12:45 PST 2014


not clear on the concept of radius and radius scale.  Why both?

now the next thing I want to try is to move the xyz coordinates.  I plan to move away from the mouse to get better control.


Matthew Dougherty
National Center for Macromolecular Imaging
Baylor College of Medicine
________________________________________
From: Tom Goddard [goddard at sonic.net]
Sent: Friday, March 07, 2014 12:29 PM
To: Dougherty, Matthew T
Cc: chimera-dev at cgl.ucsf.edu
Subject: Re: [chimera-dev] changing the radius value on volumeEraser

Hi Matt,

  If you call Volume_Eraser_Dialog() then you get a new dialog.  Here's the way to do it.

>>> from VolumeEraser import gui
>>> d = gui.volume_eraser_dialog(create = True)
>>> r = d.sphere_radius()
25.3500015259
>>> s = d.sphere_radius_scale.value()
25.3500015259
>>> rnew = 100
>>> d.sphere_radius_scale.set_value((rnew/r)*s)
>>> r = d.sphere_radius()
100.0

        Tom


On Mar 6, 2014, at 7:21 PM, "Dougherty, Matthew T" <matthewd at bcm.edu> wrote:

> Using python I would like to determine the eraser radius, calculate a new radius and update the widget.
>
> I can modify the radius value, but unable to update the parameter on the widget.
>
>
> Using this
>        from VolumeEraser.gui import Volume_Eraser_Dialog
>        v=Volume_Eraser_Dialog()
>        r=v.sphere_radius_scale.value()
>        print r
>        r=r*0.5
>        v.sphere_radius_scale.set_value(r)
>
> If I have a widget radius of 8000,it accesses a default value of 2 rather than the value in the dialog box, and changes the sphere radius to 1.
> printing v I get the impression that I am access a different widget/gui.
>
>
> Matthew Dougherty
> National Center for Macromolecular Imaging
> Baylor College of Medicine
> _______________________________________________
> Chimera-dev mailing list
> Chimera-dev at cgl.ucsf.edu
> http://www.rbvi.ucsf.edu/mailman/listinfo/chimera-dev
>





More information about the Chimera-dev mailing list