Repository navigation
Read lowercase bond orders and aromatic flags from chem_comp_bond - #952
Open
raashish1601 wants to merge 1 commit into
Open
raashish1601 wants to merge 1 commit into
raashish1601 wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #951.
The file in #951 writes
chem_comp_bondin lowercase (doub ... n n)._parse_intra_residue_bonds()already upper-casesvalue_order, but notpdbx_aromatic_flag, so the lookup key becomes e.g.("DOUB", "n"), which is not inCOMP_BOND_ORDER_TO_TYPE, and every intra-residue bond falls back toBondType.ANY. Both items are case-insensitive in the PDBx/mmCIF dictionary (ucode), so lowercase files are valid.get_component()has the same lookup without any upper-casing, so a component with lowercase values raises aKeyErrorthere.This upper-cases both values in both places.
Tests:
test_lowercase_bond_order(lowercases both columns of1l2y.cifand compares the bonds with the original) andtest_lowercase_bond_order_in_component(same forTYR.cifandget_component()). Both fail onmainand pass with the change. I rantests/structure/ioandtests/structure/test_info.pyin a Linux container (2167 passed, 1 skipped), using the CCD from the 1.7.1 wheel since the build there had no internet CCD setup.ruff checkandruff format --checkpass.