Skip to content

Commit

Permalink
improve numerical stability of get_equivalent_displacement
Browse files Browse the repository at this point in the history
  • Loading branch information
wolearyc committed Aug 9, 2024
1 parent 86f9d33 commit 231f668
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ramannoodle/symmetry/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ def get_equivalent_displacements(
"""
displacement = symmetry_utils.apply_pbc_displacement(displacement)
# Scale the displacement for numerical reasons.
displacement = displacement / (np.linalg.norm(displacement) * 10)

ref_positions = symmetry_utils.displace_fractional_positions(
self._fractional_positions, displacement
Expand Down

0 comments on commit 231f668

Please sign in to comment.