<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" id="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=10.0,initial-scale=1.0" />
<style>
html{-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}h1{font-size:1.3em;line-height:1.2;margin:0}ul,ol{margin:0;padding:0}ul li,ol li,li li{margin:0 0 0 36px}[dir=rtl] li{margin:0 18px 0 0}blockquote{border-color:#dfdee1;border-style:solid;border-width:0 0 0 1px;margin:0;padding:0 0 0 1em}[dir=rtl] blockquote,blockquote[dir=rtl]{border-width:0 1px 0 0;padding:0 1em 0 0}pre{font-family:"SFMono-Regular",Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:.9em;margin:0;padding:1rem;background-color:#f6f5f3;white-space:pre-wrap;word-wrap:break-word;overflow:visible}.message-content{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";line-height:1.4}.attachment{display:inline-block;margin:0;padding:0}.attachment__caption{padding:0;text-align:center}.attachment__caption a[href]{text-decoration:none;color:#333}.attachment--preview{width:100%;text-align:center;margin:.625em 0}.attachment--preview img{border:1px solid #dfdee1;vertical-align:middle;width:auto;max-width:100%;max-height:640px}.attachment--preview .attachment__caption{color:#716d7b;font-size:.85em;margin-top:.625em}.attachment--file{color:#282138;line-height:1;margin:0 2px 2px 0;padding:.4em 1em;border:1px solid #dfdee1;border-radius:5px}.permalink{color:inherit}.txt--xx-small{font-size:14px}.flush{margin:0;padding:0}.push--bottom{margin-bottom:8px}.border--top{border-top:1px solid #ece9e6}.btn{padding:.2em .4em;font-weight:500;text-decoration:none;border-radius:3rem;white-space:nowrap;background:#5522fa;border-color:#5522fa;color:#fff}.btn--email{display:inline-block;text-align:center;font-weight:500;font-size:1em;text-decoration:none;border-radius:2em;white-space:nowrap;background:#5522fa;border-color:#5522fa;color:#fff;border-top:.3em solid #5522fa;border-left:1em solid #5522fa;border-bottom:.3em solid #5522fa;border-right:1em solid #5522fa}.shaded{padding:1em;border-radius:4px;background-color:#f6f5f3;border:1px solid #dfdee1}
</style>
</head>
<body>
<div class="message-content">
<div class="trix-content">
<div>Hi folks, <br>I recently installed Clipper, and on loading some example PDB and MTZ data, I'm seeing just a sphere of density data that does not cover the full protein model. This behaviour is not restricted to a single example. Is it expected? <br><br>The example files I used are in <a href="https://www.rcsb.org/structure/6DIL">6DIL</a>. I downloaded "PDB Format" and "Map Coefficients (MTZ Format)" from the drop-down menu. Loading the PDB by drag-and-drop into ChimeraX works as expected (coordinates do show). On loading the MTZ by drag-and-drop, and selecting the PDB model to import data into, I see the below representation. The density does not cover the full set of protein coordinates - it's limited to a sphere within the protein.<br><br>Curiously, I saw this on coot too - so maybe I'm just getting the options incorrect? I did try shifting the cutoffs in the "Volume Viewer" Tool, and the mesh does change but it's still limited to this sphere. Changing from a mesh surface to "Maximum" shows that the available data is limited to a <em>cube </em>that does not cover the protein. Is there a way to view the full density? <br><br>Out of interest, I also tried generating the mesh myself, but only got halfway. This at least shows that the data does cover the whole protein:<br><br></div><pre>import gemmi
import numpy as np
import meshplot as mp
from skimage.measure import marching_cubes
#run 'gemmi mtz2cif 6dil_phases.mtz 6dil_phases.cif' first
doc = gemmi.cif.read('/Users/ljmartin/Desktop/6dil_phases.cif')
rblocks = gemmi.as_refln_blocks(doc)
rblock = rblocks[0]
size = rblock.get_size_for_hkl(sample_rate=2.6)
full = rblock.get_f_phi_on_grid('pdbx_FWT', 'pdbx_PHWT', size)
array = np.array(full, copy=False)
complex_map = np.fft.ifftn(array.conj())
scale_factor = complex_map.size / full.unit_cell.volume
real_map = np.real(complex_map) * scale_factor
v,f,n,_ = marching_cubes(real_map, 0.05)
mp.plot(v, f)</pre><div><br> <figure class="attachment attachment--preview">
<img src="cid:BAh7CEkiCGdpZAY6BkVUSSI9Z2lkOi8vaGF5c3RhY2svQWN0aXZlU3RvcmFnZTo6QmxvYi8xMTE4MTM3NTM3P2V4cGlyZXNfaW4GOwBUSSIMcHVycG9zZQY7AFRJIg9hdHRhY2hhYmxlBjsAVEkiD2V4cGlyZXNfYXQGOwBUMA==--01e86535a508943bd8b1cc8c20cffd2a2b059928@hey.com" alt="Screenshot 2023-02-15 at 11.53.56 am.png">
</figure></div>
</div>
</div>
</body>
</html>