Skip to content

Conversation

@leslie-zheng
Copy link

@leslie-zheng leslie-zheng commented Apr 17, 2025

Summary

Major changes:

  • feature 1: Create Pheasy branch to extract second, third and fourth, up to sixth order force constants.
  • feature 2: Implement FourPhonon to calculate the thermal conductivity considering 3ph and 4ph scattering processes.
  • fix 1: ...

Todos

If this is work in progress, what else needs to be done?

  • feature 2:
  • fix 2:

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

@rul048 rul048 changed the title Matcalc WIPAdd PheasyCalc class for higher order phonon calculations Apr 17, 2025
@rul048 rul048 changed the title WIPAdd PheasyCalc class for higher order phonon calculations [WIP] Add PheasyCalc class for higher order phonon calculations Apr 17, 2025
@shyuep shyuep requested a review from rul048 April 18, 2025 02:30
@shyuep
Copy link
Contributor

shyuep commented Apr 18, 2025

@rul048 You will take charge of reviewing PRs. But for now, I will be the one to merge them.

@codecov
Copy link

codecov bot commented Apr 24, 2025

Codecov Report

Attention: Patch coverage is 14.23358% with 235 lines in your changes missing coverage. Please review.

Project coverage is 80.49%. Comparing base (ecf79c4) to head (3c79210).

Files with missing lines Patch % Lines
src/matcalc/_pheasy.py 11.83% 149 Missing ⚠️
src/matcalc/_fourphonon.py 16.50% 86 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #65       +/-   ##
===========================================
- Coverage   96.26%   80.49%   -15.78%     
===========================================
  Files          22       24        +2     
  Lines        1151     1425      +274     
===========================================
+ Hits         1108     1147       +39     
- Misses         43      278      +235     

☔ 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.

@shyuep
Copy link
Contributor

shyuep commented May 11, 2025

@rul048 When are you going to review this? Are you actually interested in maintaining matcalc?

"""
A class for phonon, higher-order force constants and thermal property calculations using pheasy.

The `PhononCalc` class extends the `PropCalc` class to provide
Copy link
Contributor

Choose a reason for hiding this comment

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

Here should be PheasyCalc not PhononCalc.

if i apply it and will give a huge error in force calculation"""

# sga = SpacegroupAnalyzer(structure, symprec=self.symprec)
# structure_in = sga.get_primitive_standard_structure()
Copy link
Contributor

Choose a reason for hiding this comment

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

If the commented out codes here are not needed, we could remove them.

self.supercell_matrix = np.array(transformation.transformation_matrix.transpose().tolist())
# transfer it to array

# self.supercell_matrix = supercell.lattice.matrix
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above. If the commented out codes here are not needed, we could remove them.

subprocess.call(pheasy_cmd_1, shell=True)
subprocess.call(pheasy_cmd_2, shell=True)
subprocess.call(pheasy_cmd_3, shell=True)
subprocess.call(pheasy_cmd_4, shell=True)
Copy link
Contributor

@rul048 rul048 May 15, 2025

Choose a reason for hiding this comment

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

I recommend not using (plenty of) command lines internally unless necessary. If unavoidable, please give the command a clear and descriptive name that reflects its purpose.

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.

3 participants