Print

Print


Hi Tamas,

An alternative to setting nxstart etc. is to set the origin field instead. To match your example:

mrcf.header.origin.x = mrcf.header.origin.x - 100  (and the same for y and z)

As Steve said, different software packages can handle MRC files differently, so you might need to swap the sign of the origin offset, or use it in combination with the n[xyz]start fields, to make the map behave as you want in the particular package you're aiming to use.

Best wishes,
Colin


--
Dr. Colin Palmer
CCP-EM | www.ccpem.ac.uk | @ccp_em

Research Complex at Harwell
STFC Rutherford Appleton Laboratory
Didcot OX11 0FA, UK
+44 1235 567864




________________________________
From: Collaborative Computational Project in Electron cryo-Microscopy <[log in to unmask]> on behalf of Tamas Hegedus <[log in to unmask]>
Sent: 23 May 2018 10:03:26
To: [log in to unmask]
Subject: Re: [ccpem] python mrcfile .map translation

Thanks, very helpful.
This sounds awful (inconsistent interpretation of the origin).

On 05/23/2018 03:09 AM, Daniel Asarnow wrote:
> If you have aligned your map and model in UCSF Chimera, you can resample
> the model on its own grid to get one that will stay "aligned" if you
> save it and re-open it.
>
> After fitting, run the chimera command
> vop resample #N ongrid #N
> where N is the model number of your map.
>
> This is covered in the Chimera documentation and the Chimera users
> mailing list archives.
>
> Best,
> -da
>
> On Tue, May 22, 2018 at 5:56 PM, Ludtke, Steven J <[log in to unmask]
> <mailto:[log in to unmask]>> wrote:
>
>     Unfortunately there isn't really such a thing as an "aligned .map
>     and .pdb" unless you are talking about one specific software
>     package. .map files (also known as .mrc files) live in pixel space,
>     and unfortunately the interpretation of the origin isn't completely
>     self-consistent among software packages. So, you could make, for
>     example, a Chimera session where a map and model are nicely overlaid
>     on top of each other for visualization purposes, but if you then
>     tried to convert the PDB to a density map for computing the FSC or
>     somesuch, unless you generate the density map within Chimera, you
>     are unlikely to see the same alignment. Some software packages have
>     put a bit of effort into synchronizing these things, and there ARE
>     some published standards, but the practical reality is that it's a
>     bit of a mess.
>
>     --------------------------------------------------------------------------------------
>     Steven Ludtke, Ph.D. <[log in to unmask] <mailto:[log in to unmask]>>
>                       Baylor College of Medicine
>     Charles C. Bell Jr., Professor of Structural Biology
>     Dept. of Biochemistry and Molecular Biology
>       (<http://>www.bcm.edu/biochem <http://www.bcm.edu/biochem>)
>     Academic Director, CryoEM Core
>       (cryoem.bcm.edu <http://cryoem.bcm.edu>)
>     Co-Director CIBR Center
>       (<http://>www.bcm.edu/research/cibr <http://www.bcm.edu/research/cibr>)
>     Co-Director National Center For Macromolecular Imaging
>         (ncmi.bcm.edu <http://ncmi.bcm.edu>)
>
>
>
>>     On May 22, 2018, at 5:56 PM, Tamas Hegedus <[log in to unmask]
>>     <mailto:[log in to unmask]>> wrote:
>>
>>     Hi,
>>
>>     I have an aligned .map and .pdb.
>>
>>     I translate the all atom structure by (-100,-100,-100).
>>
>>     I also try to translate the map using python mrcfile by setting the
>>
>>     mrcf.header.nxstart = mrcf.header.nxstart - 100 (and also for
>>     nystart and nzstart).
>>
>>     mrcf.close()
>>
>>
>>     The translation is done, however, the new .map and new .pdb are
>>     significantly off.
>>
>>     I think that I miss something in .map file format and/or mrcfile
>>     usage.
>>
>>
>>     I appreciate any suggestion,
>>
>>     Tamas
>>
>>
>>     --
>>     Tamas Hegedus, PhD
>>     Senior Research Fellow
>>     MTA-SE Molecular Biophysics Research Group
>>     Hungarian Academy of Sciences  | phone: (36) 1-459 1500/60233
>>     Semmelweis University          | fax:   (36) 1-266 6656
>>     <https://maps.google.com/?q=1-266+6656+%0D%0ATuzolto+utca&entry=gmail&source=g>
>>     Tuzolto utca 37-47             | mailto:[log in to unmask]
>>     Budapest, 1094, Hungary        |
>>     https://urldefense.proofpoint.com/v2/url?u=http-3A__www.hegelab.org&d=DwICaQ&c=ZQs-KZ8oxEw0p81sqgiaRA&r=GWA2IF6nkq8sZMXHpp1Xpg&m=TFAc6Gfuna0piV5mZyGJz7JXbihKV29TbKTM8jSuJ3s&s=JZmBsCAMgKq7MNEgE9LZhzb8liwEgqIhPvA2ZXXwHag&e=
>>     <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.hegelab.org&d=DwICaQ&c=ZQs-KZ8oxEw0p81sqgiaRA&r=GWA2IF6nkq8sZMXHpp1Xpg&m=TFAc6Gfuna0piV5mZyGJz7JXbihKV29TbKTM8jSuJ3s&s=JZmBsCAMgKq7MNEgE9LZhzb8liwEgqIhPvA2ZXXwHag&e=>
>
>


--
Tamas Hegedus, PhD
Senior Research Fellow
Department of Biophysics and Radiation Biology
Semmelweis University     | phone: (36) 1-459 1500/60233
Tuzolto utca 37-47        | mailto:[log in to unmask]
Budapest, 1094, Hungary   | http://www.hegelab.org