You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ncsOperatorList read as doubles - mmtf spec says should be floats. #53
When unpacking an mmtf file, this implementation expects doubles for the transformation matrices.
The specification outlines the float type as 32bit, and says this field is populated with floats.
Not sure if this should be changed - I suspect it might break parsing existing mmtf files, so maybe it needs to accept both types?
changed the title [-]`ncsOperatorList` read as a double - mmtf specification says this should be floats.[/-][+]`ncsOperatorList` read as doubles - mmtf spec says should be floats.[/+]on May 7, 2021
Unfortunately this is breaking cross compatibility with mmtf-python, which by default dumps everything as 64bit floats (doubles).
The msgpack-python implementation doesn't support packing a particular field (the transforms) as 64bit floats, and everything else as 32bit floats - see here.
Good catch @zacharyrs ! Thanks for the detailed report.
Changing the RCSB mmtf files is doable but as you say may cause quite some trouble. I like your python workaround as a solution. However, to be consistent the spec would have to officially acknowledge that ncsOperList uses doubles, right?
One important note. MMTF is now is in minimal maintenance mode. The preferred compressed format for PDB data is BinaryCIF.
The chemical component dictionary contains all intra-residue bond information. But it is not embedded within the structure BCIF files. We will consider offering the whole chemical component dictionary as one BCIF bundle that should make it more convenient to use.
Activity
[-]`ncsOperatorList` read as a double - mmtf specification says this should be floats.[/-][+]`ncsOperatorList` read as doubles - mmtf spec says should be floats.[/+]zacharyrs commentedon May 7, 2021
Unfortunately this is breaking cross compatibility with
mmtf-python, which by default dumps everything as 64bit floats (doubles).The
msgpack-pythonimplementation doesn't support packing a particular field (the transforms) as 64bit floats, and everything else as 32bit floats - see here.zacharyrs commentedon May 7, 2021
I have a partial workaround, by making
mmtf-pythonfollow the same decisions as here (all 32bit except the transforms list) - rcsb/mmtf-python#50.josemduarte commentedon May 19, 2021
Good catch @zacharyrs ! Thanks for the detailed report.
Changing the RCSB mmtf files is doable but as you say may cause quite some trouble. I like your python workaround as a solution. However, to be consistent the spec would have to officially acknowledge that ncsOperList uses doubles, right?
One important note. MMTF is now is in minimal maintenance mode. The preferred compressed format for PDB data is BinaryCIF.
zacharyrs commentedon May 19, 2021
Thanks @josemduarte!
Yes, the python solution basically just means both implementations violate the specification in the same way. It avoids the hassle of breaking things.
I didn't realise
mmtfhad been dropped to maintenance... I assumeBinaryCIFfollows theCIFspec, it's just encoded?I recall
CIFnot caring about bond information, which was what I liked aboutmmtf- I guess I'll have to read into it more.josemduarte commentedon May 19, 2021
Yes, that's correct
Bond information is available but indirectly via the chemical component dictionary
zacharyrs commentedon May 19, 2021
Is that guaranteed for all molecules or is it optional?
josemduarte commentedon May 20, 2021
The chemical component dictionary contains all intra-residue bond information. But it is not embedded within the structure BCIF files. We will consider offering the whole chemical component dictionary as one BCIF bundle that should make it more convenient to use.