Skip to content

Commit ba5d11d

Browse files
authored
Update molecule.py
The first collumn and not row should be multiplied with -1, otherwise it destroys the rotation along cartesian coordinates.
1 parent 06661e1 commit ba5d11d

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)