Skip to content

Commit

Permalink
Merge pull request #180 from Setchatuan/patch-1
Browse files Browse the repository at this point in the history
Fixed a Bug in molecule.py -> reoriented_molecule
  • Loading branch information
qzhu2017 authored Dec 20, 2021
2 parents 37db4d9 + ba5d11d commit 4565940
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyxtal/molecule.py
Original file line number Diff line number Diff line change
Expand Up @@ -1413,7 +1413,7 @@ def reoriented_molecule(mol): #, nested=False):
A = get_inertia_tensor(coords)
# Store the eigenvectors of the inertia tensor
P = np.linalg.eigh(A)[1]
if np.linalg.det(P) < 0: P[0] *= -1
if np.linalg.det(P) < 0: P[:,0] *= -1
coords = np.dot(coords, P)
return Molecule(numbers, coords), P

Expand Down

0 comments on commit 4565940

Please sign in to comment.