Use explicit item type map to determine field types and encodings #33
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is intended to address a current limitation in the conversion of mmCIF to BCIF for some data items.
Specifically, there's a bug when handling some uncommon data types such as
point_group
andfloat_range
.point_group
fails because it has "int" in the name (i.e., "point_group")float_range
fails because it has "float" in the name, so the code tries to encode it as a float, but really it's a string since the value contains a hyphenRather than having the code try to figure out what the type is and how to encode it based on substring matching, I've added a [current] complete list of possible types and what they should be encoded as. This is similar to the method being used by our Java encoder (e.g., see here).
Additionally, I made a minor adjustment to the
__molstar_forced_ints
object, in which I changed it to be a dictionary rather than a list to allow for O(1) efficiency.