<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Ardan,<div class=""><br class=""></div><div class=""> Today I added an option "onGrid" to the molmap command so that the sum of Gaussians can be computed directly on the grid of a reference map, instead of having molmap determine the bounding grid automatically and then interpolating the calculated map on the grid of the reference map. This allows you to avoid the interpolation step.</div><div class=""><br class=""></div><div class=""> I tested this to see how much interpolation (vop resample command) changes the sum of atom Gaussians and I am shocked by the result. I told you that I thought the interpolation did not change the map much when molmap creates a grid that is 3 times finer than the requested resolution. I thought that that grid spacing was fine enough so the trilinear interpolation gave a good approximation to what you would get by exactly computing the sum of Gaussians.</div><div class=""><br class=""></div><div class=""> Here are my numbers. I made a 6A resolution molmap for PDB 1a0k with grid spacing 2A, then I shifted that grid by 1A in x, y, and z for my reference grid. So the reference grid has grid points located half way between the molmap grid points, a worst case for interpolating. I compared on this reference grid the interpolated molmap values (using vop resample) to the exact Gaussian sum on the reference grid using the new molmap onGrid option. Looking at the surfaces for the intepolated and exact maps on the reference grid it is clear that the interpolated one is smoothed some -- see attached image, interpolated is gray, exact is blue. The exact map contour surface pokes through the interpolated map surface at the atom bumps on the surface. To get them to look similar I tried doing an exact molmap at lower resolution. The shocking result was that the best match was at molmap resolution 7.7A. So it seems the interpolation in this test smoothed the map from 6 A resolution down to 7.7 A resolution -- a big change. Besides visually comparing I also subtracted the maps and looked at the histogram of the difference map to find the resolution of the exact map that minimizes the residual. Here's the set of Chimera commands in case you want to try this</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>open 1a0k</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>molmap #0 6 grid 1 model #1</div><div class=""># Now duplicate and shift map to create reference grid #2.</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>vop scale #1 model #2</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>move 1,1,1 model #2 coord #2</div><div class=""># Compute interpolated molmap #3</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>vop resample #1 on #2 model #3</div><div class=""># Compute exact molmap on reference grid.</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>molmap #0 6 on #3 model #4</div><div class=""># Compute lower resolution molmap to compare to interpolated map</div><div class=""><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>molmap #0 7.7 on #3 model #5</div></div><div class=""># Look at difference map</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>vop subtract #5 #3 model #6</div><div class=""><br class=""></div><div class=""> I tried the same test with resolution 6A but smaller grid spacing of 1A and shifting by 0.5A for the reference grid. There the interpolated map best matched the exact map resolution 6.4 A (almost an exact match visually). So the interpolation had the effect of reducing the resolution from 6 to 6.4 Angstroms with grid spacing 1/6 of resolution.</div><div class=""><br class=""></div><div class=""> These results may depend somewhat on the resolution 6 A, since the atoms are spaced about 2 A apart which sets an absolute length scale. If you think of interpolation as a smoothing operation (the trilinear interpolation is not exactly that, but it does use the 8 nearest neighbors), then these tests show the reduction in resolution by interpolating is significant.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space: pre;"> </span>Tom</div><div class=""><br class=""></div><div class=""><img height="716" width="716" apple-width="yes" apple-height="yes" apple-inline="yes" id="AAB4DF45-93A1-42AD-AD6E-581F0D8A01A6" src="cid:BFEDB3DD-71AA-401E-8884-3A81B7CE85B9" class=""></div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 27, 2016, at 1:20 AM, Ardan Patwardhan <<a href="mailto:ardan@ebi.ac.uk" class="">ardan@ebi.ac.uk</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=windows-1252" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Dear Tom and Elaine<div class=""><br class=""></div><div class="">The suggestion to use the vop resample command works very well - many thanks</div><div class=""><br class=""></div><div class="">@Tom: If we could have the script which does the map on the second grid without interpolation that would be very useful. We would like to run FSCs as well between the different ways maps are being derived from models and it would be interesting to see to what extent the interpolation affects things at different spatial frequencies.</div><div class=""><br class=""></div><div class="">Many thanks and best wishes</div><div class=""><br class=""><div class=""><div class="">On 26 May 2016, at 19:26, Tom Goddard <<a href="mailto:goddard@sonic.net" class="">goddard@sonic.net</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite" class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Ardan,<div class=""><br class=""></div><div class=""> Sounds like you want the molmap calculated map to have a grid that exactly matches a second map which is a cube centered on the molecule. The way to do that is compute the molmap in the normal way then use “vop resample” to interpolate the molmap map on exactly the grid of the second map. This is more reliable than trying to figure out the molecule center and make a matching cube map without using the second map. I can think of at least 3 reasonable ways to define the center (equal weighted atoms, mass weighted atoms, bounding box center) and it is just too easy to get a grid that doesn’t really match the second map. So if #0 is your molecule and #1 is your second map use</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>molmap #0 5 gridSpacing 1.3 model #2</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>vop resample #2 onGrid #1 model #3</div><div class=""><br class=""></div><div class="">then map #3 will exactly match the grid of map #1. The interpolation is trilinear (using nearest 8 grid points) and will be very close to the exact values you would obtain by using the second map grid to sum the atom Gaussians. If you really want the exact sum of Gaussians on the second map grid with no interpolation step I can give you a Chimera Python script that will do that.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Tom</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div class=""><blockquote type="cite" class=""><div class="">On May 26, 2016, at 12:43 AM, Ardan Patwardhan wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Dear all<div class=""><br class=""></div><div class="">We are using Chimera to align PDB models to maps, then creating maps from the models using the following command (as an example):</div><div class="">molmap #0 5 gridSpacing 1.3</div><div class=""><br class=""></div><div class="">This should create a map with the voxel spacing of 1.3A and a gaussian atom spread function with the width related to 5A resolution (<a href="https://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/molmap.html" class="">https://www.cgl.ucsf.edu/chimera/docs/UsersGuide/midas/molmap.html</a>).</div><div class=""><br class=""></div><div class="">Our problem is</div><div class="">a) the map that is created can have an arbitrary size - we need it to be cubic and have the same (known) dimensions as the second map against which it will be compared</div><div class="">b) we have tried padding it in other programs like bsoft but then we sometimes run into problems of centring the model.</div><div class=""><br class=""></div><div class="">I was wondering if there was a way to get a centred map of a certain size from a model directly from Chimera?</div><div class="">Perhaps there are certain parameters that can be used in molmap?</div><div class=""><br class=""></div><div class="">You thoughts and advice on this issue are much appreciated!</div><div class=""><br class=""></div><div class="">Many thanks and best wishes</div><div class=""><br class=""></div><div class=""><div class="">
<div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Ardan Patwardhan</div><div class="">Coordinator - cellular structure & PDBe production<br class="">Protein Data Bank in Europe (PDBe)</div><div class="">European Bioinformatics Institute (EMBL-EBI) European Molecular Biology Laboratory<br class="">Wellcome Trust Genome Campus<br class="">Hinxton, Cambridge CB10 1SD<br class="">Tel: +44 1223 492649</div></div></div>
</div>
<br class=""></div></div>_______________________________________________<br class="">Chimera-users mailing list: <a href="mailto:Chimera-users@cgl.ucsf.edu" class="">Chimera-users@cgl.ucsf.edu</a><br class="">Manage subscription: <a href="http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users" class="">http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-users</a><br class=""></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></body></html>