e2pdb2mrc.py without "--center" option

245 views
Skip to first unread message

Daron Standley

unread,
Dec 9, 2021, 10:05:47 PM12/9/21
to EMAN2
Hi, I'm using the e2pdb2mrc.py script (installed Nov. 24, 2021) to prepare mrc files from small fragments of PDB files.  When I use the "--center" argument, the map is generated, but it does not superimpose on the input PDB file (it can be translated manually in chimera, but I would like to automate this process because I need to prepare many such maps). Since, I suspected that the  "--center" argument was causing the translation, I also ran without this argument. However, in this case, the resulting map could not be properly rendered in chimera (or pymol). The standard output for the two e2pdb2mrc.py calculations looks identical:

52 atoms used with a total charge of 343 e- and a mass of 0 kDa

Atomic center at 85.9,37.9,189.5 (center of volume at 0,0,0)

Bounding box: x:   81.12 -   90.45

              y:   34.01 -   43.10

              z:  180.45 -  195.88

Conversion complete


Attached are the two maps and input PDB file. Your help would be greatly appreciated!
Daron
testfrag.zip

Muyuan Chen

unread,
Dec 9, 2021, 10:22:52 PM12/9/21
to em...@googlegroups.com
Have you tried using the center coordinates output by e2pdb2mrc as the center in chimera?

In chimera volume viewer, bring up the coordinates panel and put the numbers (85.9, 37.9, 189.5) in the center box. Maybe there is a minus sign somewhere or you have to add or substrate half of the box size, but I think the number that get them aligned correctly is outputted somewhere...

Otherwise, I think you can open both map and model in chimera, fit the model in map, then save the model in chimera again,  making sure it is set to relative to the coordinate system of the map in the save as window. Then you can do e2pdb2mrc again with the saved model without the center option and still see the density.

Muyuan
--
--
----------------------------------------------------------------------------------------------
You received this message because you are subscribed to the Google
Groups "EMAN2" group.
To post to this group, send email to em...@googlegroups.com
To unsubscribe from this group, send email to eman2+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/eman2

---
You received this message because you are subscribed to the Google Groups "EMAN2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eman2+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/eman2/9a42e533-c322-44e1-940d-85327d153b74n%40googlegroups.com.
<testfrag.zip>

Daron Standley

unread,
Dec 9, 2021, 10:32:42 PM12/9/21
to EMAN2
Hi Muyuan,
Many thanks for your quick reply.  I will try your idea of inputing the three numbers that are written to stdout into chimera, since this is a big improvement over manual superposition. But, my hope was to automate e2pdb2mrc.py inside another script such that the map and model are superimposed upon loading (in chimera or pymol) without such additional inputs. The reason is simply thatI have a lot of models to deal with.

My second question was: why am I unable to view the map that was built without the "--center" argument?

Put another way, if this argument is optional and default set to "False", is this a bug or have I inadvertently given  e2pdb2mrc.py  garbage input?

Ludtke, Steven J.

unread,
Dec 9, 2021, 10:47:31 PM12/9/21
to em...@googlegroups.com
Hi Daron,
chimera is originally a coordinate based program, with density maps added later in its development. Everything in chimera is focused on coordinates as they exist in a PDB file. A density map is a rectangular array of voxels. However, while those voxels have a size associated with them, it isn't always immediately obvious where they should go in space. When you run e2pdb2mrc with --center, it shifts the center of the PDB object to the center of the 3-D map. Many PDB coordinates are shifted well away from the origin in space. If you do e2pdb2mrc without --center, you have to make a box large enough to include the PDB wherever it is positioned in space, with the center of the density being at the origin.

So, in Chimera you can do one of:
- you can use a humongous box size for your density map (not advised) so the origin can still be at 0,0,0 and the PDB object is still within the box
- you can shift the PDB location to the center of the MRC file
- you can shift the MRC file to the center of the PDB

The MRC format does support specification of origin in 3-D space, but different groups have interpreted this in different ways, so it isn't always 100% self-consistent between software packages. 

Having said all that, e2pdb2mrc.py is supposed to set the origin in the MRC header automatically for you when you do this. It may be sensitive to specific options you use, I suppose...  If it's broken:

e2proc3d.py has a --origin option which allows you to specify the origin which chimera will see without impacting the density at all. That is, you could use e2pdb2mrc with --center, and then use
e2proc3d.py file.mrc file.mrc --origin=x,y,z
with the center coordinates from e2pdb2mrc.


--------------------------------------------------------------------------------------
Steven Ludtke, Ph.D. <slu...@bcm.edu>                      Baylor College of Medicine 
Charles C. Bell Jr., Professor of Structural Biology
Dept. of Biochemistry and Molecular Biology                      (www.bcm.edu/biochem)
Academic Director, CryoEM Core                                        (cryoem.bcm.edu)
Co-Director CIBR Center                                    (www.bcm.edu/research/cibr)




Muyuan Chen

unread,
Dec 9, 2021, 10:55:20 PM12/9/21
to em...@googlegroups.com
Without —center option the program should still output the correct map is your model is in the correct coordinates system. For example, if the coordinates of your pdb model spans from 10-50A, and you use a apix of 1 and box size of 64, you should see the density without —center, and it should align well with the model. In some cases, especially when your pdb is from a larger structure, the coordinates can range from, say 500-550A. Even if your protein is only 50A in size, you will need a box size of 550 at apix 1 so the protein will show up in your box (and it will lie on the edge of it). So if you save the model in chimera specifying the coordinates system of the map, you can then run e2pdb2mrc again, without the center option and still get the correct result. 

In the designed use case, if you build the model yourself from the density map, they should be in the same coordinate system from the beginning and don’t have to worry about the center option at all.
Reply all
Reply to author
Forward
0 new messages