Skip to content

Pass all init parameters in replicate and deprecate hermitianization option - #1130

Merged
atztogo merged 1 commit into
mainfrom
fix-replicate-init-parameters
Nov 24, 2026
Merged

atztogo merged 1 commit into
mainfrom
fix-replicate-init-parameters

Conversation

@atztogo

@atztogo atztogo commented Nov 24, 2026

Copy link
Copy Markdown
Member

Phonopy.replicate (and the methods using it) constructed the new
instance without distinguish_symbol_index and lang, so these took
their default values. For example, with distinguish_symbol_index=True,
atoms labeled with different symbols of the same element became
equivalent in the replica. Both are passed now.

hermitianize_dynamical_matrix of Phonopy, which was not passed
either, is deprecated instead and will be removed in v5. The dynamical
matrix is always Hermitianized; get_dynamical_matrix(..., hermitianize=False) remains for the dynamical matrix without it. The
test of the non-Hermitianized dynamical matrix now uses
get_dynamical_matrix directly.

The missing distinguish_symbol_index was reported by @rpinho in #1120.

…option

replicate did not pass distinguish_symbol_index and lang, so the new
instance used their defaults. hermitianize_dynamical_matrix of Phonopy
is deprecated: the dynamical matrix is always Hermitianized, and
get_dynamical_matrix keeps the option. Removed in v5.
@codecov

codecov Bot commented Nov 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.37%. Comparing base (2c8d10d) to head (b77f8be).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1130   +/-   ##
=======================================
  Coverage   87.37%   87.37%           
=======================================
  Files         247      247           
  Lines       42545    42569   +24     
=======================================
+ Hits        37172    37196   +24     
  Misses       5373     5373           

☔ View full report in Codecov by Harness.
📢 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.

@atztogo
atztogo merged commit d426668 into main Nov 24, 2026
10 checks passed
@atztogo
atztogo deleted the fix-replicate-init-parameters branch November 24, 2026 09:23
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.

1 participant