Skip to content

Conversation

@Andrew-S-Rosen
Copy link
Contributor

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

Closes #95 by making it possible to relax the unit cell before the MD run.

Andrew-S-Rosen and others added 3 commits August 15, 2025 13:13
Closes materialyzeai#95. Tests are still needed. Others are welcome to help with that if they feel so inclined; otherwise, I'll do so when I have a spare moment.

Signed-off-by: Andrew S. Rosen <asrosen93@gmail.com>
Signed-off-by: Andrew S. Rosen <asrosen93@gmail.com>
@Andrew-S-Rosen Andrew-S-Rosen changed the title Allow for RelaxCalc to be run with relax_cell=True [WIP] Allow for RelaxCalc to be run with relax_cell=True Aug 15, 2025
@codecov
Copy link

codecov bot commented Aug 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.29%. Comparing base (971197a) to head (945d676).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #96   +/-   ##
=======================================
  Coverage   96.29%   96.29%           
=======================================
  Files          22       22           
  Lines        1160     1161    +1     
=======================================
+ Hits         1117     1118    +1     
  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.

Signed-off-by: Andrew S. Rosen <asrosen93@gmail.com>
Signed-off-by: Andrew S. Rosen <asrosen93@gmail.com>
Signed-off-by: Andrew S. Rosen <asrosen93@gmail.com>
@Andrew-S-Rosen Andrew-S-Rosen changed the title [WIP] Allow for RelaxCalc to be run with relax_cell=True Allow for RelaxCalc to be run with relax_cell=True Aug 15, 2025
@Andrew-S-Rosen Andrew-S-Rosen changed the title Allow for RelaxCalc to be run with relax_cell=True Allow for MDCalc to be run with relax_cell=True Aug 15, 2025
@Andrew-S-Rosen Andrew-S-Rosen changed the title Allow for MDCalc to be run with relax_cell=True Allow for MDCalc to be run with relax_cell=True during the initial relaxation Aug 15, 2025
@Andrew-S-Rosen
Copy link
Contributor Author

@shyuep - This is ready for your review.

@shyuep
Copy link
Contributor

shyuep commented Aug 15, 2025

@rul048 you are the maintainer. Pls review and merge.

@Andrew-S-Rosen
Copy link
Contributor Author

Thanks, will ping @rul048 if there is anything going forward. 👍

Copy link
Contributor

@rul048 rul048 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello Prof. Rosen. Thank you for your contribution. The initial reason we set relax_cell=False while only allowing users to optimize the atomic positions was to achieve the similar functionality of the minimize command in LAMMPS within MDCalc.

This approach ensures that the volume of the input structure remains exactly the same as the one used for the subsequent MD simulation, especially for NVT/NVE ensembles. However, it does limit flexibility for users who wish to perform NPT simulations with a fully optimized structure.

Thank you again for pointing this out in issue #95. Your method offers a flexible solution, and the implementation looks good to me.

@rul048 rul048 merged commit 7e27439 into materialyzeai:main Aug 15, 2025
2 of 3 checks passed
@Andrew-S-Rosen
Copy link
Contributor Author

@rul048: Thank you for reviewing this PR and for your detailed explanation of the history, which certainly makes a lot of sense. I greatly appreciate it!

@Andrew-S-Rosen Andrew-S-Rosen deleted the patch-5 branch August 16, 2025 13:37
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.

[Bug]: MDCalc does not permit a relaxation with relax_cell=True

3 participants