Skip to content

Commit 4565940

Browse files
authored
Merge pull request #180 from Setchatuan/patch-1
Fixed a Bug in molecule.py -> reoriented_molecule
2 parents 37db4d9 + ba5d11d commit 4565940

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pyxtal/molecule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1413,7 +1413,7 @@ def reoriented_molecule(mol): #, nested=False):
14131413
A = get_inertia_tensor(coords)
14141414
# Store the eigenvectors of the inertia tensor
14151415
P = np.linalg.eigh(A)[1]
1416-
if np.linalg.det(P) < 0: P[0] *= -1
1416+
if np.linalg.det(P) < 0: P[:,0] *= -1
14171417
coords = np.dot(coords, P)
14181418
return Molecule(numbers, coords), P
14191419

0 commit comments

Comments
 (0)