Skip to content

Commit 904211f

Browse files
committed
Rename 'inertia' to 'identity'
This was originally called 'I' and during the PEP8 conversion around the py2 to py3 time, they were all renamed inertia, even though some of them represent the identity matrix not the moments of inertia
1 parent 7e86c4c commit 904211f

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

arkane/statmech.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,13 +1078,10 @@ def project_rotors(conformer, hessian, rotors, linear, is_ts, get_projected_out_
10781078
d[3 * i + 2, 5] = (p[i, 0] * inertia_xyz[2, 1] - p[i, 1] * inertia_xyz[2, 0]) * amass[i]
10791079

10801080
# Make sure projection matrix is orthonormal
1081-
1082-
inertia = np.identity(n_atoms * 3, float)
1083-
1081+
identity = np.identity(n_atoms * 3, float)
10841082
p = np.zeros((n_atoms * 3, 3 * n_atoms + external), float)
1085-
10861083
p[:, 0:external] = d[:, 0:external]
1087-
p[:, external:external + 3 * n_atoms] = inertia[:, 0:3 * n_atoms]
1084+
p[:, external:external + 3 * n_atoms] = identity[:, 0:3 * n_atoms]
10881085

10891086
for i in range(3 * n_atoms + external):
10901087
norm = 0.0
@@ -1234,8 +1231,8 @@ def project_rotors(conformer, hessian, rotors, linear, is_ts, get_projected_out_
12341231
# Do the projection
12351232
d_int_proj = np.dot(vmw.T, d_int)
12361233
proj = np.dot(d_int, d_int.T)
1237-
inertia = np.identity(n_atoms * 3, float)
1238-
proj = inertia - proj
1234+
identity = np.identity(n_atoms * 3, float)
1235+
proj = identity - proj
12391236
fm = np.dot(proj, np.dot(fm, proj))
12401237
# Get eigenvalues of mass-weighted force constant matrix
12411238
eig, v = np.linalg.eigh(fm)

0 commit comments

Comments
 (0)