-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Improved support for hierarchy schemes from OpenMM and PDBs #1404
Conversation
Looking great - I think this is the right direction to go in. Adding hierarchy schemes in code paths where users are loading from PDB seems helpful at best and harmless at worst! |
e53f2ad
to
91d231a
Compare
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
5d7df8e
to
f8d6b01
Compare
OK, I've added tests for the new behavior, updated the toolkit showcase to no longer use I think this is ready to go - tests are passing locally but I'll check later tonight that CI is happy! And I'm happy for this to be merged while I'm asleep, or I can merge it tomorrow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, @Yoshanuikabundi. The tuple thing is a good improvement but I was a bit confused seeing it without context - In the future it may be good to keep urgent PRs minimal to reduce overhead on review :-)
assert all( | ||
all([molecule.residues, molecule.chains]) for molecule in topology.molecules | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(not blocking) I don't understand the purpose of this - Is it checking that there are no Nones
in any of the HierarchyElements? Or no (None, None, None, None)
HierarchyElements? If the iterators weren't exposed at all this wouldn't need an assert since it would cause an AttributeError
. This could use a comment explaining it.
This adds residue and chain hierarchy scheme support to
Molecule.from_pdb_and_smiles
andTopology.from_openmm
.This is based on #1400 to avoid conflicts, so that should be merged first.
Fixes #1386.