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

[WIP] Lattice dynamics workflow using hiPhive #1062

Open
wants to merge 348 commits into
base: main
Choose a base branch
from

Conversation

hrushikesh-s
Copy link
Collaborator

Summary

Include a summary of major changes in bullet points:

  • Feature 1 -- Workflow for calculating harmonic & anharmonic properties of phonons using hiPhive.

Additional dependencies introduced (if any)

Checklist

Work-in-progress pull requests are encouraged, but please put [WIP] in the pull request
title.

Before a pull request can be merged, the following items must be checked:

  • Code is in the standard Python style.
    The easiest way to handle this is to run the following in the correct sequence on
    your local machine. Start with running ruff and ruff format on your new code. This will
    automatically reformat your code to PEP8 conventions and fix many linting issues.
  • Doc strings have been added in the Numpy docstring format.
    Run ruff on your code.
  • Type annotations are highly encouraged. Run mypy to
    type check your code.
  • Tests have been added for any new functionality or bug fixes.
  • All linting and tests pass.

Note that the CI system will run all the above checks. But it will be much more
efficient if you already fix most errors prior to submitting the PR. It is highly
recommended that you use the pre-commit hook provided in the repository. Simply run
pre-commit install and a check will be run prior to allowing commits.

hrushikesh-s and others added 30 commits March 4, 2024 15:14
1. using replace instead of add in hiphive_static_calcs job
2. ensuring that the given structure. in primitive, if not then converting to prim structure.
3. updated logic to write the FC_3rd order file
4. ruff fixes
5. added support of amabte, shengbte, and phono3py in LTC calculation
6. updated logic to only use lambda=0 for TI, when imag_modes_bool = False
1. ruff fixes
2. updated class attributes
3. added bulk modulus to the metadata
4. #TODO: Implement Quality Control Job
5. updated fireworks config for each job
6. updated definition to extract phonon dispersion
7. updated definition to extract LTC, depending upon whether or not renormalization was performed.
8. updated name of the flow
using tags in accordance with atomate LD workflow
1. supports shengBTE, almaBTE & phono3py as of now.
2. before running any of these calculators, make sure to successfully compile them as explained on their respective websites.
3.Also, remember to put the execution command for each of these calculators in atomate2.yaml file
the decision is now made based on whether n_imaginary > 0 from the fitting_data.json @ 0K
1. largest displacement is based on the avg row (periodic table) number of the compound.
2. displacements are skewed towards the large displacement
3. # of displaced structures to generate depends on the n_structures, which depends upon the symmetry of the primitive structure
4. smallest displacement is fixed at 0.01 Å
1. added a job that creates multiples sub jobs for each hiphive fitting and then collects the fitting data & the fcs. fcp, cluster space and other properties corresponding to the best cutoff!
2. setting the min # of displ to 4 & max # of displ to 60
Trying different strategies for perturbing the atoms in the supercell --
1. Fixed displacement
2. MC Rattle
3. MD informed displacements

Adding a penalty to the displacements that are generated out of the distribution.
1. selects cutoffs based on target DOFs for 2nd, 3rd and 4th order.
2. all the functions have doctrings.
3. modified the function that generates perturbed structures
4. updated def get_cutoffs -- generates a grid of cutoffs that satisfy the given # of required DOFs for 2nd, 3rd and 4th order interaction.
5. sequentially performs the linear regression for each cutoff.
6. modified the files that are saved during the execution of workflow
2. removed files that are not required to be saved during the workflow execution.
* Bump monty from 2024.2.2 to 2024.2.26

Bumps [monty](https://github.com/materialsvirtuallab/monty) from 2024.2.2 to 2024.2.26.
- [Release notes](https://github.com/materialsvirtuallab/monty/releases)
- [Changelog](https://github.com/materialsvirtuallab/monty/blob/master/docs/changelog.md)
- [Commits](materialsvirtuallab/monty@v2024.2.2...v2024.2.26)

---
updated-dependencies:
- dependency-name: monty
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* bump pymatgen>=2024.3.1 to fix deprecation removal CI errors

---------

Co-authored-by: Janosh Riebesell <[email protected]>
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.0.2 to 8.1.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](pytest-dev/pytest@8.0.2...8.1.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [ipython](https://github.com/ipython/ipython) from 8.22.1 to 8.22.2.
- [Release notes](https://github.com/ipython/ipython/releases)
- [Commits](ipython/ipython@8.22.1...8.22.2)

---
updated-dependencies:
- dependency-name: ipython
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [chgnet](https://github.com/CederGroupHub/chgnet) from 0.3.4 to 0.3.5.
- [Release notes](https://github.com/CederGroupHub/chgnet/releases)
- [Commits](CederGroupHub/chgnet@v0.3.4...v0.3.5)

---
updated-dependencies:
- dependency-name: chgnet
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [pydantic](https://github.com/pydantic/pydantic) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/pydantic/pydantic/releases)
- [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md)
- [Commits](pydantic/pydantic@v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: pydantic
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [custodian](https://github.com/materialsproject/custodian) from 2024.2.15 to 2024.3.12.
- [Release notes](https://github.com/materialsproject/custodian/releases)
- [Changelog](https://github.com/materialsproject/custodian/blob/master/docs/changelog.md)
- [Commits](materialsproject/custodian@v2024.2.15...v2024.3.12)

---
updated-dependencies:
- dependency-name: custodian
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [phonopy](https://phonopy.github.io/phonopy/) from 2.21.2 to 2.22.0.

---
updated-dependencies:
- dependency-name: phonopy
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
dependabot bot and others added 15 commits November 15, 2024 16:55
…t#1051)

Updates the requirements on [versioningit](https://github.com/jwodder/versioningit) to permit the latest version.
- [Release notes](https://github.com/jwodder/versioningit/releases)
- [Changelog](https://github.com/jwodder/versioningit/blob/master/CHANGELOG.md)
- [Commits](jwodder/versioningit@v1.0.0...v3.1.2)

---
updated-dependencies:
- dependency-name: versioningit
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Added the Materials Virtual Lab GW Set to the repo and implemented the MVLGWSetGenerator

* add a Materials Virtual Lab GW band structure maker

* fix bug

* rename MVLGWMaker

* created a Flow that does all three stages (static, diag, gw) for a GW band structure calculation

* fixed bug

* update the mvl gw yaml file and explicity copy the magmon in it

* update the gw workflow

* Revert line 37 to original state and fixed a typo

* update the class doc of MVLGWSetGenerator

* rewrite job name

* rewrite job name

* make job and flow names short

* update job name

* change the method names to adjust for recent updates on the main branch

* explicitly specify files to copy

* copied all data files for gw test case

* add testcase for running MVL GW workflow

* modified the files needed to copy between jobs

* fixed wrong assertation

* added missing data files to run the tests

* add a warning in the GW workflow

* removed MVL GW set yaml file, instead, import from pymatgen

* reorganize the mvl jobs

* reorganize the mvl gw workflow

* update test case for mvl gw workflow and update the test data

* update the mvl gw workflow

* update test case for mvl gw workflow and corresponding test data

* Bump emmet-core from 0.84.2 to 0.84.3rc3

* updated test data for mvl g0w0

* removed MVLGWSetGenerator class; use MVLGWSet directly instead

* removed deprecate comments

* remove CONTCAR.gz, use CONTCAR instead
Bumps [monty](https://github.com/materialsvirtuallab/monty) from 2024.7.30 to 2024.10.21.
- [Release notes](https://github.com/materialsvirtuallab/monty/releases)
- [Changelog](https://github.com/materialsvirtuallab/monty/blob/master/docs/changelog.md)
- [Commits](https://github.com/materialsvirtuallab/monty/commits/v2024.10.21)

---
updated-dependencies:
- dependency-name: monty
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add trajectory reporter to openmm workflow

* respond to janosh review

* fix test

* slightly stricter asserts in test_trajectory_reporter

---------

Co-authored-by: Janosh Riebesell <[email protected]>
input & output VASP files
added the testing python file for hiphive
Copy link

codecov bot commented Nov 22, 2024

Codecov Report

Attention: Patch coverage is 0.27248% with 1098 lines in your changes missing coverage. Please review.

Project coverage is 3.85%. Comparing base (42bc7b8) to head (a97158f).
Report is 18 commits behind head on main.

Files with missing lines Patch % Lines
src/atomate2/common/schemas/hiphive.py 0.00% 829 Missing ⚠️
src/atomate2/common/flows/hiphive.py 0.00% 128 Missing ⚠️
src/atomate2/common/jobs/hiphive.py 0.00% 76 Missing ⚠️
src/atomate2/vasp/flows/hiphive.py 0.00% 23 Missing ⚠️
src/atomate2/forcefields/flows/hiphive.py 0.00% 18 Missing ⚠️
src/atomate2/vasp/files.py 0.00% 13 Missing ⚠️
src/atomate2/common/jobs/phonons.py 0.00% 9 Missing ⚠️
src/atomate2/vasp/schemas/hiphive.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main   #1062      +/-   ##
========================================
- Coverage   4.32%   3.85%   -0.48%     
========================================
  Files        178     193      +15     
  Lines      12911   14710    +1799     
  Branches    1278    1476     +198     
========================================
+ Hits         559     567       +8     
- Misses     12321   14112    +1791     
  Partials      31      31              
Files with missing lines Coverage Δ
src/atomate2/settings.py 88.75% <100.00%> (+0.43%) ⬆️
src/atomate2/vasp/schemas/hiphive.py 0.00% <0.00%> (ø)
src/atomate2/common/jobs/phonons.py 0.00% <0.00%> (ø)
src/atomate2/vasp/files.py 0.00% <0.00%> (ø)
src/atomate2/forcefields/flows/hiphive.py 0.00% <0.00%> (ø)
src/atomate2/vasp/flows/hiphive.py 0.00% <0.00%> (ø)
src/atomate2/common/jobs/hiphive.py 0.00% <0.00%> (ø)
src/atomate2/common/flows/hiphive.py 0.00% <0.00%> (ø)
src/atomate2/common/schemas/hiphive.py 0.00% <0.00%> (ø)
---- 🚨 Try these New Features:

@hrushikesh-s
Copy link
Collaborator Author

@janosh or @JaGeo , can you pls tell me how I can fix the following error --
testing / test-non-ase (3.11, 1) (pull_request) Failing after 2m

@janosh
Copy link
Member

janosh commented Nov 22, 2024

phono3py can't currently be installed with uv/pip. you can upvote phonopy/phono3py#295 which hopefully will make this possible soon 🤞

@hrushikesh-s hrushikesh-s changed the title Lattice dynamics workflow using hiPhive [WIP] Lattice dynamics workflow using hiPhive Nov 22, 2024
@hrushikesh-s
Copy link
Collaborator Author

Oh I see. Thanks for sharing that info!

phono3py can't currently be installed with uv/pip. you can upvote phonopy/phono3py#295 which hopefully will make this possible soon 🤞

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.