Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expanded MPcule API #674

Merged
merged 198 commits into from
Mar 14, 2023
Merged

Conversation

espottesmith
Copy link
Contributor

The main purpose of this PR is to expand the MPcules API, adding endpoints for all relevant collections (not just "mpcules_summary").

In addition, there are some smaller improvements:

  • the MoleculesBuilder is now much faster because MoleculeGraphs do not need to be generated in the data collection stage
  • A mapping of SMD solvent parameters to common solvent names has been included (for @orionarcher)
  • Small bugs were fixed (like "open_shell" not being properly added to MoleculesSummaryDocs, num_atoms not being added to MoleculeDocs)

Work still needs to be done to make the API more useful and user-friendly. This will require adding new fields to the MPcules data model. For expediency, this is being pushed off to another PR. Also note that I'm still planning on adding some features to pymatgen, particularly for the parsing of additional properties (MOLDEN input, Raman spectra, etc.), construction and visualization of molecular optimization trajectories, etc.

Contributor Checklist

  • I have run the tests locally and they passed.
  • I have added tests, or extended existing tests, to cover any new features or bugs fixed in this PR

espottesmith and others added 30 commits May 5, 2022 15:52
…ing tests pass in emmet-core (including remaking JSON files for summary)
… names and instead create utility function to define a solvent string
Reminder: need to regenerate "builder_XXX_set.json" test files once builders are all done
…ode to ensure long-term fixity of graph hashes.
@codecov-commenter
Copy link

codecov-commenter commented Mar 9, 2023

Codecov Report

Patch coverage: 69.28% and project coverage change: -0.53 ⚠️

Comparison is base (229a1b1) 91.50% compared to head (e79ff70) 90.98%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #674      +/-   ##
==========================================
- Coverage   91.50%   90.98%   -0.53%     
==========================================
  Files         144      147       +3     
  Lines       10658    10898     +240     
==========================================
+ Hits         9753     9915     +162     
- Misses        905      983      +78     
Impacted Files Coverage Δ
emmet-core/emmet/core/structure.py 100.00% <ø> (ø)
emmet-builders/emmet/builders/molecules/thermo.py 75.00% <15.00%> (-6.33%) ⬇️
...et/api/routes/mpcules/molecules/query_operators.py 80.66% <17.64%> (-6.54%) ⬇️
emmet-core/emmet/core/molecules/thermo.py 87.50% <50.00%> (ø)
...met/api/routes/mpcules/orbitals/query_operators.py 64.06% <64.06%> (ø)
emmet-core/emmet/core/molecules/summary.py 95.45% <90.00%> (-2.03%) ⬇️
.../emmet/api/routes/mpcules/redox/query_operators.py 100.00% <100.00%> (ø)
...emmet/api/routes/mpcules/thermo/query_operators.py 100.00% <100.00%> (ø)
emmet-builders/emmet/builders/molecules/bonds.py 93.63% <100.00%> (ø)
emmet-builders/emmet/builders/molecules/redox.py 90.95% <100.00%> (ø)
... and 7 more

... and 2 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@espottesmith
Copy link
Contributor Author

espottesmith commented Mar 9, 2023

Hey @munrojm looks like tests are passing, but maybe I'm not hitting enough lines in my tests. Do you want me to bulk up testing before merge?

Also kind of confused how I could drop the number of files being tested by that much. I certainly didn't delete any tests...

@munrojm munrojm merged commit ef7d3fe into materialsproject:main Mar 14, 2023
@espottesmith espottesmith deleted the expanded_mpcule_api branch March 15, 2023 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants