[Chimera-users] Place marker at centre of volume box python command

Elaine Meng meng at cgl.ucsf.edu
Fri Jun 1 12:30:38 PDT 2018

Hi Kyle,
This is not a python answer (as I don’t know python) but you can calculate the coordinates of the center from the information shown in Volume Viewer, Features… Coordinates.

Origin index refers to the grid indices of the XYZ origin (coordinates 0,0,0) and Voxel size is the spacing of grid points. You would also need to know the number of grid points in each dimension, which is given above the histogram in Volume Viewer.

If you want the visual of a dummy at that center, could use command “shape sphere” with the “center” option giving your previously calculated x,y,z coordinates.

Or, you could use command “cofr” specifying the x,y,z coordinates to set rotation center to that point and then show center of rotation crosshatch with “set showcofr”

I hope this helps,
Elaine C. Meng, Ph.D.                       
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco

> On Jun 1, 2018, at 11:57 AM, Kyle Morris <kylelmorris at berkeley.edu> wrote:
> Hi Chimera dev,
> Is there a python command to place a marker at the precise centre of a volume’s box, regardless of the centre of mass of the volume in the box?
> I have played with creating dummy volumes and measuring their centres but it’s clunky and got a bit stuck with doing this. A single command would be cleaner, if it’s possible.
> As always thanks for your help!
> Best wishes,
> Kyle

More information about the Chimera-users mailing list