dsehnal / BinaryCIF

BinaryCIF is a data format for storing text based CIF files using a more efficient binary encoding.
8 stars 0 forks source link

missing box margin #1

Open BobHanson opened 6 years ago

BobHanson commented 6 years ago

Issue: Note the missing data on the right side of my box.

image

I can see how it might be intentional to always start the data set outside the box (nearer 0 0 0) and then stop before the final box boundary, but I suggest that if I say I want the surface within a certain box, then I want to see everything in the box, which means that allowing the data to extend just a bit further than the box in all directions if necessary is the appropriate thing to do.

Jmol can truncate as necessary to truly fill the box, but only if the data are returned.

The request is that the box be fully within the localized data returned, not just partly within it.

This was created in Jmol 14.28.2 using:

load *1eve boundbox {e20:a} isosurface BOUNDBOX EDS AS "box.eds" isosurface "box.eds"

dsehnal commented 6 years ago

I can see how this could be perceived as a bug. It is probably caused by a rounding error, which are in general not avoidable (I might be wrong here, but it will require further investigation).

However, in LiteMol, I never query the exact bounding box of a residue I want the data for, but always an an extended box (say by 3-5 ang). This solves the issue, and as you correctly pointed out, the data can be truncated on client (say into a sphere as done for example by Coot).

The reason why the received data "skewed" are because of non-orthogonal frames of most space-groups.

Some future version of the DensityServer might do the filtering step directly on server, but for now I wanted to keep it "as simple as possible".


Hope this solves your issue for now :)

BobHanson commented 6 years ago

I also add 2-3 angstroms for atom selections, but Jmol also provides a user-definable bounding box. As you point out, the returned data is a parallelepiped in the coordinates of the unit cell of the data. So trimming will always be need.

But, still, it is not predictable from the client how much extra is needed to completely fill the box; only the server can ascertain that, and, so, I argue, the server should do that.

Please adjust the returned data set as necessary to completely fill the requested box.

dsehnal commented 6 years ago

OK, I will look into it more closely soon.

dsehnal commented 6 years ago

This should now be fixed (or at least behave better). To test it, please use the DensityServer instance at ds.litemol.org.

BobHanson commented 6 years ago

image

Perfection!