JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for CCPEM Archives


CCPEM Archives

CCPEM Archives


CCPEM@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

CCPEM Home

CCPEM Home

CCPEM  May 2018

CCPEM May 2018

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: python mrcfile .map translation

From:

Colin Palmer - UKRI STFC <[log in to unmask]>

Reply-To:

Colin Palmer - UKRI STFC <[log in to unmask]>

Date:

Wed, 23 May 2018 18:11:15 +0000

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (155 lines)

Hi Tamas,


I remembered one more thing you should be aware of: the MRC header 'start' fields are measured in pixels (and must be integers), while 'origin' is measured in angstroms (and can take floating-point values). If you want to try and use the start fields to move your map by a distance in angstroms, you'll need to divide by the pixel spacing:


mrcf.header.nxstart = mrcf.header.nxstart - (100 / mrcf.voxel_size.x)


Also, a word of warning if you're using Chimera to check this - it seems to do some quite complicated tests to decide where to place the map, with results which I certainly found surprising. For example: if both nxstart and origin.x are set, Chimera seems to ignore the value of 'origin' and use the offset from 'nxstart' if the file extension is '.map', but if the file extension is '.mrc', it ignores 'nxstart' and uses the offset from 'origin' instead! So, if you are using Chimera, I'd suggest you leave nxstart = nystart = nzstart = 0, use the 'origin' field to apply any offset you need, and make sure all of your files are named with a '.mrc' extension.


Best wishes,

Colin


________________________________
From: Collaborative Computational Project in Electron cryo-Microscopy <[log in to unmask]> on behalf of Colin Palmer - UKRI STFC <[log in to unmask]>
Sent: 23 May 2018 11:02:00
To: [log in to unmask]
Subject: Re: [ccpem] python mrcfile .map translation

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<http://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

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

April 2024
March 2024
February 2024
January 2024
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager