Skip to content

Commit

Permalink
Merge pull request #1449 from dongsenfo/nmr
Browse files Browse the repository at this point in the history
NMR symmetrize tensor update
  • Loading branch information
mkhorton committed May 9, 2019
2 parents f79a23c + ab35f54 commit 50e71ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pymatgen/analysis/nmr.py
Expand Up @@ -67,7 +67,7 @@ def principal_axis_system(self):
Returns a chemical shielding tensor aligned to the principle axis system
so that only the 3 diagnol components are non-zero
"""
return ChemicalShielding(np.diag(np.sort(np.linalg.eigvals(self))))
return ChemicalShielding(np.diag(np.sort(np.linalg.eigvals(self.symmetrized))))

@property
def haeberlen_values(self):
Expand Down
2 changes: 1 addition & 1 deletion pymatgen/analysis/tests/test_nmr.py
Expand Up @@ -20,7 +20,7 @@ def test_principal_axis_system(self):

cs = ChemicalShielding(np.arange(9).reshape((3, 3)))
self.assertArrayAlmostEqual(np.diag(cs.principal_axis_system),
[-1.3484692e+00, -1.1543332e-15, 1.3348469e+01], decimal=5)
[-1.74596669e+00, -1.53807726e-15, 1.37459667e+01], decimal=5)

def test_notations(self):
cs = ChemicalShielding.from_maryland_notation(
Expand Down

0 comments on commit 50e71ec

Please sign in to comment.