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

(refactoring) Clear separation of phonopy instances for phelel and for extra phonon #52

Merged
merged 4 commits into from
Jan 4, 2025

Conversation

atztogo
Copy link
Member

@atztogo atztogo commented Jan 4, 2025

Note: This is a major refactoring and so errors might be introduced.

Extra-phonon (e.g., different supercell size from that of phelel supercell) is rarely used, so in the future, this feature may be removed. The aim of this PR is to isolate extra-phonon related stuffs in Phelel class.

  • self._phelel_phonon is used both for phelel dataset and phonon with the same supercell size
  • self._phonon is used for the extra-phonon.
  • Getter and setter of self.force_constants access self._phelel_phonon.force_constants if self._phonon is None, else self._phonon.force_constants
  • Getter of self.nac_params accesses self._phelel_phonon.nac_params. Setter of self.nac_params accesses self._phelel_phonon.nac_params and, if self._phonon is not None, self._phonon.nac_params.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 76.31579% with 27 lines in your changes missing coverage. Please review.

Project coverage is 72.19%. Comparing base (3159f2e) to head (b45f30f).
Report is 35 commits behind head on develop.

Files with missing lines Patch % Lines
src/phelel/api_phelel.py 78.48% 17 Missing ⚠️
src/phelel/interface/vasp/derivatives.py 66.66% 6 Missing ⚠️
src/phelel/base/Dij_qij.py 50.00% 1 Missing ⚠️
src/phelel/base/local_potential.py 83.33% 1 Missing ⚠️
src/phelel/file_IO.py 75.00% 1 Missing ⚠️
src/phelel/interface/phelel_yaml.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #52      +/-   ##
===========================================
- Coverage    73.21%   72.19%   -1.02%     
===========================================
  Files           77       81       +4     
  Lines         5500     5687     +187     
===========================================
+ Hits          4027     4106      +79     
- Misses        1473     1581     +108     

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

@atztogo atztogo merged commit 86467bc into develop Jan 4, 2025
5 checks passed
@atztogo atztogo deleted the refactoring branch January 4, 2025 10:27
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.

2 participants