[Chimera-users] mapping between MRC and PDB
Tom Goddard
goddard at sonic.net
Thu Feb 11 17:41:37 PST 2016
Hi Rongjian,
Here is some python that you can open in Chimera (File / Open) that will load an atomic model (PDB 1a0m) and density map (x-ray map for 1a0m) and print the density map grid index of each atom. The index is floating point since the atoms of course are not exactly at grid points.
The Chimera Python scripts web page has more example code
http://plato.cgl.ucsf.edu/trac/chimera/wiki/Scripts
Tom
> On Feb 11, 2016, at 5:16 PM, rongjian li wrote:
>
> Hi, Tom,
>
> Thank you so much for your patient reply.
>
> May I ask, is there any example code in Python, like you suggested, so that I could know how to run it more clearly?
>
> Thanks again.
>
> Best,
> Rongjian
>
> From: Tom Goddard
> Sent: Thursday, February 11, 2016 4:56 PM
> To: rongjian li
> Cc: chimera-users at cgl.ucsf.edu <mailto:chimera-users at cgl.ucsf.edu>
> Subject: Re: [Chimera-users] mapping between MRC and PDB
>
> Hi Rongjian,
>
> The volume rotation angle is almost always zero so the rotation axis does not effect the relation between grid indices and x,y,z positions in space. If you are working with x-ray crystallography maps, the cell angles will often not be 90 degrees, meaning that the rectangular box bounding the density map is skewed — you would have to use that.
>
> If you are writing a script in Python within Chimera you can directly access the mapping of grid index positions to x,y,z positions in the scene (ie atomic coordinates) using
>
> p = (12.34, -1.58, 27.7)
> i,j,k = v.data.xyz_to_ijk(p)
>
> where v is a Volume model. The v.data is a Grid_Data object which is defined in Python by the following code:
>
> http://plato.cgl.ucsf.edu/trac/chimera/browser/trunk/libs/VolumeData/griddata.py <http://plato.cgl.ucsf.edu/trac/chimera/browser/trunk/libs/VolumeData/griddata.py>
>
> which is part of your Chimera distribution in
>
> chimera/share/VolumeData/griddata.py
>
> or on Mac
>
> Chimera.app/Contents/Resources/share/VolumeData/griddata.py
>
> Tom
>
> On Feb 11, 2016, at 2:23 PM, rongjian li wrote:
>
> Hi,
>
> I am a beginner in using Chimera. I have a simple question for you experts and I really appreciate any guide for me.
>
> I am working on a project needs to create a one-to-one mapping between MRC grid and PDB atoms. For example, from the PDB file, I know the physical coordinates of each atom. I want to know whether each atom is out of the 3D volume of MRC or not. If it is inside the volume, I hope to know which voxel grid this atom is in.
>
> I have figured out the mapping between the physical origin of PDB system and its grid index in MRC using Chimera Volume Viewer -- > Features ---> Coordinates ----> Origin Index. But I am not sure whether the information of ‘Rotation axis’ is also very important, which is usually [0,0,1] in Chimera Volume Viewer -- > Features ---> Coordinates ----> Rotation axis.
>
> Thank you very much.
>
> Best,
> Rongjian
>
> _______________________________________________
> Chimera-users mailing list: Chimera-users at cgl.ucsf.edu <mailto:Chimera-users at cgl.ucsf.edu>
> Manage subscription: http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20160211/274c4fdb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: atomgrid.py
Type: text/x-python-script
Size: 366 bytes
Desc: not available
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20160211/274c4fdb/attachment.bin>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20160211/274c4fdb/attachment-0001.html>
More information about the Chimera-users
mailing list