Project

General

Profile

Actions

Bug #883

closed

Ace 2 does not properly write the MRC header file

Added by Neil Voss about 14 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Amber Herold
Category:
-
Target version:
Start date:
09/17/2010
Due date:
% Done:

100%

Estimated time:
Affected Version:
Pre-2.0
Show in known bugs:
No
Workaround:

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.

Actions #1

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.

Actions #2

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.

Actions #3

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?

Actions #4

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).

Actions #5

Updated by Amber Herold about 14 years ago

  • Deliverable set to 2.2 Bug Reduction
Actions #6

Updated by Amber Herold over 10 years ago

  • Status changed from In Test to Closed
Actions

Also available in: Atom PDF