Repository navigation
Compute thermal displacements from thermal displacement matrices - #1131
Merged
Merged
Conversation
ThermalDisplacements and ThermalDisplacementMatrices had separate loops over the mesh and the modes. One loop now sums the matrices, and the thermal displacements are their diagonal elements or their projections. Unused code is removed. IterMesh diagonalizes dynamical matrices by diagonalize_dynamical_matrices as Mesh does. This also fixes UnboundLocalError with with_eigenvectors=False.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1131 +/- ##
==========================================
+ Coverage 87.37% 87.40% +0.02%
==========================================
Files 247 247
Lines 42569 42564 -5
==========================================
+ Hits 37196 37203 +7
+ Misses 5373 5361 -12 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ThermalDisplacementsandThermalDisplacementMatriceshad separateloops over the mesh and the modes, and the warning on the acoustic modes
at Gamma had a third. One loop in
ThermalMotionnow sums the thermaldisplacement matrices, with the modes at a q-point computed together,
and the thermal displacements are their diagonal elements or their
projections along the given direction. Unused code
(
_project_eigenvectorsand its attributes) is removed.IterMeshnow diagonalizes the dynamical matrix at each q-point withdiagonalize_dynamical_matrices, asMeshdoes, instead ofnumpy.linalg.eigh. Withwith_eigenvectors=False,IterMeshraisedUnboundLocalError; this is fixed.The results agree with those before the change within 4e-14 (relative)
for Si and SnO2 with and without the options. New tests check the
thermal displacements against the matrices and
IterMeshwithouteigenvectors.
This follows #1121 by @rpinho, which batched the modes in
ThermalDisplacements.