Bug #883
closedAce 2 does not properly write the MRC header file
100%
Description
I ran into this when writing a 3D file using the same code and then reading it into PyMOL. PyMOL rejects the file as not being an MRC file because of the missing 'MAP ' string.
source:trunk/programs/ace2/MRC.m#L224
When ACE2 writes the MRC header it sets four-byte 53 to 0, when it should equal 'MAP '. Documentation here: http://emg.nysbc.org/software/mrctools/mrc_specification.php
Old code:
header->map = 0;
Suggested replacement:
// "MAP " from ascii to little-endian integer: // ord('M')=77, ord('A')=65, ord('P')=80, ord(' ')=32 // reverse order and powers of 256 // 32*(256**3) + 80*(256**2) + 65*(256) + 77 header->map = 542130509;
I have fixed and tested the code, but I do not want to commit until given approval, because of the code freeze.
Updated by Amber Herold about 14 years ago
I would think that an Ace2 header is something that may be read by other programs as well. Neil, could you give us an idea of what things could be affected by the change to get an idea of the risk and testing that will be required? It looks like a simple change and is well commented so it would be nice to get it into this release if the risk is low. Otherwise, we can wait till 2.1.1.
Updated by Neil Voss about 14 years ago
- Status changed from Assigned to In Code Review
- Assignee changed from Neil Voss to Amber Herold
committed r14997.
Updated by Amber Herold about 14 years ago
- Status changed from In Code Review to In Test
Neil, could you give a test procedure...maybe just where to for the map string in the MRC file after running Ace2?
Updated by Neil Voss about 14 years ago
you could do a command like:
head -c 256 file.mrc | strings
you should see the word 'MAP ', any hex editor will work too.
My biggest concern would be to make sure that makestack2 can make a stack (I am sure it can).