Comments (8)
Yeah it should. the spec could definitely use an overhaul.
from binarycif.
33 is for Float64 arrays
from binarycif.
This is my first time doing this kind of raw byte decoding, so I might be missing something here that is obvious, but why is this the case? Does 33 mean not 33? Are the data types specified as below?
ByteArray {
kind = "ByteArray"
type: Int8 | Int16 | Int32 | Uint8 | Uint16 | Uint32 | Float32 | Float64
# type: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 33
}
from binarycif.
Not sure it is in the spec. Here is the normative implementation... https://github.com/molstar/molstar/blob/master/src/mol-io/common/binary-cif/encoding.ts#L60-L72
from binarycif.
Okay thanks for the additional clarification. Should this be something that is specified in the spec, if it's the official implementation?
from binarycif.
Are there any other little 'gotchas' you can think of while I'm tackling this?
from binarycif.
I'd look at the molstar implementation or this minimal python implementation https://gist.github.com/dsehnal/b06f5555fa9145da69fe69abfeab6eaf
from binarycif.
Ah many thanks. I was also doing a minimal numpy implementation, and the example you linked does exactly what I am after but they've done it much more cleanly than I had come up with. Wish I had googled a bit harder and I would have saved myself a weekend of tinkering.
Would be useful to have that minimal implementation linked in the README also.
from binarycif.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from binarycif.