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
Nice to see how this works. It looks very nicely contained and structured in this way. Also the opening of the files looks nice with this conversion to a BufReader.
Small comments:
Technically speaking the residue sequence number is not unique, if coupled to the insertion code it is unique. This can be retrieved by using the Residue::id method. It is hard to return this type with wasm_bindgen, but be prepared to find a single PDB with duplicate residue sequence numbers. (Idea: just crash when you detect one of these, so it cannot go wrong in any other way.)
I found a nice crate in the meantime: https://crates.io/crates/serde-wasm-bindgen, this allows any struct that implements Serde::Serialize to be passed to the Java/typescript side. So that would enable you to directly throw the full PDB to the other side, or use more intricate structures Vec<String> in your PDBInfo.
The text was updated successfully, but these errors were encountered:
I hope you do not mind the uninvited commentary, I am just very interested in how this Wasm stuff works and if changes to pdbtbx are needed. And feel free to reach out (or tag me in an issue/PR) if you have questions about Rust stuff I would be happy to help.
Nice to see how this works. It looks very nicely contained and structured in this way. Also the opening of the files looks nice with this conversion to a
BufReader
.Small comments:
Residue::id
method. It is hard to return this type withwasm_bindgen
, but be prepared to find a single PDB with duplicate residue sequence numbers. (Idea: just crash when you detect one of these, so it cannot go wrong in any other way.)Serde::Serialize
to be passed to the Java/typescript side. So that would enable you to directly throw the fullPDB
to the other side, or use more intricate structuresVec<String>
in yourPDBInfo
.The text was updated successfully, but these errors were encountered: