Skip to content

Conversation

@Andrew-S-Rosen
Copy link
Contributor

@Andrew-S-Rosen Andrew-S-Rosen commented Aug 5, 2025

Summary

This PR adds support for IsotropicMTKNPT simulations. Closes #87.

In doing so, I have added the "npt_isotropic_mtk" option to the list of supported ensembles. I have also added keyword arguments for tchain, pchain, tloop, and ploop.

A unit test has been added for the npt_isotropic_mtk ensemble. Note that I updated the test by relying on the default values of taut and taup instead of 0.1 for both, as the latter results in a nan with npt_isotropic_mtk. Since it is usually the case that taut is 100 * timestep and taup * 1000 timestep, this is perhaps not too surprising.

Checklist

  • Google format doc strings added. Check with ruff.
  • Type annotations included. Check with mypy.
  • Tests added for new features/fixes.
  • If applicable, new classes/functions/modules have duecredit @due.dcite decorators to reference relevant papers by DOI (example)

Tip: Install pre-commit hooks to auto-check types and linting before every commit:

pip install -U pre-commit
pre-commit install

Adds support for IsotropicMTKNPT simulations
@Andrew-S-Rosen
Copy link
Contributor Author

@shyuep: Is there a way for you to approve workflows on this PR? I am having some trouble testing locally and might need a few iterations here before I'm confident in the outcome.

@Andrew-S-Rosen Andrew-S-Rosen changed the title [WIP] Add IsotropicMTKNPT Add IsotropicMTKNPT to _md.py Aug 5, 2025
@Andrew-S-Rosen
Copy link
Contributor Author

Alright, this should be ready for review @shyuep. If you don't like the change made to the test suite, just let me know. There should be no breaking changes in this PR.

@shyuep
Copy link
Contributor

shyuep commented Aug 5, 2025

Thanks!

@shyuep shyuep merged commit 46f2223 into materialyzeai:main Aug 5, 2025
1 of 3 checks passed
@Andrew-S-Rosen Andrew-S-Rosen deleted the mtk branch August 5, 2025 21:56
@codecov
Copy link

codecov bot commented Aug 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.28%. Comparing base (c75fb3a) to head (b902145).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #88      +/-   ##
==========================================
+ Coverage   96.26%   96.28%   +0.02%     
==========================================
  Files          22       22              
  Lines        1151     1158       +7     
==========================================
+ Hits         1108     1115       +7     
  Misses         43       43              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Andrew-S-Rosen added a commit to Andrew-S-Rosen/matcalc that referenced this pull request Aug 5, 2025
This is a follow-up to materialyzeai#88 to add support for `MTKNPT`. This is the newly recommended method for NPT simulations in ASE, with `npt` being deprecated (see https://gitlab.com/ase/ase/-/merge_requests/3765). In materialyzeai#88, I only added the isotropic version. I didn't see the regular `MTKNPT` until now.

Signed-off-by: Andrew S. Rosen <asrosen93@gmail.com>
@Andrew-S-Rosen Andrew-S-Rosen mentioned this pull request Aug 5, 2025
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: IsotropicMTKNPT

2 participants