-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Convert dielectric units * Subtract supercell dipole corr from Phonopy fc * Update NaCl fcs and add phonopy quartz test * Update NAC tests/logic - Don't require nac factor is in phonopy.yaml, even if born is present - Don't require nac factor is in BORN file - Raise KeyError if nac factor is in neither phonopy.yaml or BORN - Only try to dipole correct force constants if born is present - Add tests for the above combinations of nac in phonopy/BORN/neither - Update NaCl_prim/phonopy.yaml to have nac_factor (otherwise causes error) * Fix convert_fc_phases test convert_fc_phases only reindexes the force constants matrix, and doesn't remove the dipole from the force constants matrix (whereas the dipole is now removed when reading from phonopy files). So we cannot use the same NaCl_force_constants.json file as we use in the ForceConstants.from_phonopy tests. So instead use a new file NaCl_dipole_force_constants.json, which is reindexed, but doesn't have the dipole removed (this is actually the same as the original NaCl_force_constants.json file before the dipole fix was introduced). * Update NaCl phonon modes test data * Use NaCl-QE test case instead of quartz * Add subtract_fc_dipole func to util.py * Update NaCl script tests * Remove erroneously added docstring * Fix tests for old Pint versions Older versions of Pint strip the Quantity with some Numpy operations so use magnitudes and reapply units later to avoid this * Small Codacy updates * Convert calculate_dipole_correction to static method * Read from dipole dict in C * Cast force constants to real * Move dipole func to ForceConstants * Add test for from_long_ranged_dipole_fc * Add user documentation * Add docstring for static functions * Rename NaCl_dipole to NaCl_long_ranged for clarity * Changes from review - Change user docs and docstring to be more clear about 'total' vs. 'short-ranged' vs 'dipole-dipole' force constants - Update instead of merge Born dict in from_phonopy * Reorder force constants check It's better to check easy-to-diagnose attributes first (e.g. cell_origins, born charges) before testing the force constants themselves, as they are much more manageable and will reveal an issue much more easily than the effect this will have on the force constants, which will just be small differences in a large array of floating point numbers. * Rename from_long_ranged_dipole_fc to from_total_fc_with_dipole * Update changelog
- Loading branch information
1 parent
fde1945
commit ef49d8b
Showing
21 changed files
with
66,610 additions
and
57,351 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.