Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP] Fix multi-solvent MPcule building (#664)
* Make bonding not mandatory * Fix bug for case where no tasks are valid * Small type change * Disallow certain task types in Q-Chem builder by default * Add graph hashes to molecule document format * Change SMD parameters for G2 * change id format * Fixed bugs with graph hashes; added new ID class (needs to propagate through molecule world) * Working hard at getting new ID format working * Tests now pass on all builders; just need to make sure all corresponding tests pass in emmet-core (including remaking JSON files for summary) * Updated tests; everything (I think) passes; black * Now everything actually passes * Remove unused variable * mypy changes * ID didn't match - trying without? * Separate level of theory from solvent information; get rid of solvent names and instead create utility function to define a solvent string * Create composite lot_solvent concept (capturing what we used to do with LevelOfTheory with pre-defined solvents) * Updates to molecule doc (change to ID not done yet); now need to propagate to property documents * Core should be updated post-solvent LOT changes (surprisingly easy). Reminder: need to regenerate "builder_XXX_set.json" test files once builders are all done * Need to regenerate test files * Update thermo * Bundling networkx 2.8.5 networkx.algorithms.graph_hashing.py source code to ensure long-term fixity of graph hashes. * Tests * Add species as top-level attribute * Small change in filter_task_type; now arbitrary sorting functions can actually be used * Changes to ID helper function, molecule grouper helper function, and small associated changes to molecule association builder * MoleculeBuilder now updated to group based on the solvent used to optimize a molecule. Evaluation of different MoleculeDocs is based on the level of theory used to optimize as well as the overall "best lot" * Small tweak * Mostly black-ing, but also working on adding more detail about property docs * Update all property docs (not builders yet) except Redox (which will be tricker) * Expanded list of metals; small changes to redox builder * Bugfixes to utils * Update PartialChargesBuilder to allow, for a given molecule, different docs in different charges * PartialSpinsBuilder updated * Updated BondingBuilder; also made check for NBO7 more general across all instances * Updated OrbitalBuilder * Updated VibrationBuilder * Progress on thermo builder; black in builders * Still not done with ThermoBuilder, but need to change tack and go back to reaction land for now * New thermo builder, allowing for single-point energy corrections, is finally done * Some fixes for bugs found by @samblau * Safety on BondingDoc creation to ensure that some method is always used * RedoxDoc rewrite done; now need to update builder * Some progress on RedoxBuilder; this one is kinda hairy, once again * Draft of RedoxBuilder done * Emergency backup commit * Think this should update SummaryDoc constructor? * Ready to start testing; that was less painful than I was expecting * Minor fixes to core test based on changes to MPculeID format * Small fixes * Fixed ThermoBuilder (specifically dealing with edge case of single atoms) * Fixed tricky bug in RedoxBuilder caused by use of defaultdict * SummaryBuilder works; now just need to (re)write tests for all builders * Weird bug: MongoDB really doesn't like doc keys to have periods in them * Patched test for molecule builders; next need to rewrite tests for property builders * bugfix in redox builder - IE/EA tasks weren't being populated properly * Fixed redox emmet-core test * Redox emmet-builder tests also finished * Fixed summary builder tests; now just one more * Summary test passes; we're golden * Remove enums * (hopefully) fix core linting issues * Linting * Trying to deal with mypy * Now another linting change * More mypy changes * Re-adding test files (for now) * Shuffling files around * Re-add conftest * Slight tweaks to fix SummaryBuilder for molecules * Super broke things yesterday. Hoping this fixes them * Realized I was a fool; updating tests now * I think last test? * All (relevant) tests pass * Fix lint - also, really need to prevent enums from being added in changes * Going for it * mypy makes me want to break things sometimes * Pin numpy in emmet-api * Initial structuring of MPcules API * First attempt at an API for the MPcules molecules collection * Added some hint schemes; API for MPcules tasks collection * Builder bugfix * Testing import issues * Modify requirements * Seems the root of the issue is that eigen is missing? * One more attempt before I call in the big guns * Last try before I just gut these tests; not worth it * jkjk * Trying to figure out new bug on property builders - task docs apparently with no orig??? * Use debugger more effectively * Trying to catch an error again * Resolved issue? * Reverting testing change; think all is well in the world. * Floating validation on partial charges/spin docs * Fix for H1 specifically (I think) * Remove unnecessary printing * Starting work on bond query * Fix mypy issue * Draft MPcules bonds API * (limited) API for partial charges and spins (better API requires more detail in emmet-core docs) * Begun work on NBO query operators * Orbital query WIP * First-draft, very simple summary API * Working summary api endpoint * Rewriting MoleculeBuilder to collapse MoleculeDocs from different solvents * WIP - changing molecules builder * (for now) commenting out orbital routes; Adding tests for minimal MPcules API routes * Tests for mpcules/molecule route pass * Test for mpcules/bond query operators * Lint issues * Linters make code better and my life worse * Fix mypy issue * mypy issues * Linting * Mypy is a pain point * Pain continues * mypy was a mistake * What happened to duck typing? * Incorporating some changes from Sam Blau (@samblau); one bugfix, a couple of small tweaks * Small bugfixes to resources; made a new MPcules app * Fix mpcule_app * Draft of new molecule builder written; needs testing (tests need to be rewritten in general) * Small tweaks to property builders * Bugfix from Sam; debugging some weirdness with MoleculesBuilder * Fixed AssociationBuilder; deprecated molecules now processed appropriately * New MoleculesBuilder works as expected! * Looks like SummaryBuilders is working correctly now as well, though property builders may not be * I think we got it! Just had to change update keys for property builders * Updated builder tests * Linting * Found some more lint * mypy nonsense * The mypy gods were furious; hopefully this prayer appeases them * Fix failing test * Remove superfluous test file * remove debugging tools * Accounting for multiple possible task ID formats * Lint --------- Co-authored-by: Jason Munro <[email protected]>
- Loading branch information