From b24451a631ae954db358bbeda1d20ce642194049 Mon Sep 17 00:00:00 2001 From: Daniel <zyth0s@users.noreply.github.com> Date: Mon, 13 Jul 2020 22:37:30 +0200 Subject: [PATCH 1/4] Flip sign of non-diagonal intertia tensor elements A minus sign for non-diagonal elements was missing. --- Project#01/hints/step8-solution.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Project#01/hints/step8-solution.md b/Project#01/hints/step8-solution.md index 32a9ea8..f85cabf 100644 --- a/Project#01/hints/step8-solution.md +++ b/Project#01/hints/step8-solution.md @@ -94,9 +94,9 @@ int main() I(0,0) += mi * (mol.geom[i][1]*mol.geom[i][1] + mol.geom[i][2]*mol.geom[i][2]); I(1,1) += mi * (mol.geom[i][0]*mol.geom[i][0] + mol.geom[i][2]*mol.geom[i][2]); I(2,2) += mi * (mol.geom[i][0]*mol.geom[i][0] + mol.geom[i][1]*mol.geom[i][1]); - I(0,1) += mi * mol.geom[i][0]*mol.geom[i][1]; - I(0,2) += mi * mol.geom[i][0]*mol.geom[i][2]; - I(1,2) += mi * mol.geom[i][1]*mol.geom[i][2]; + I(0,1) -= mi * mol.geom[i][0]*mol.geom[i][1]; + I(0,2) -= mi * mol.geom[i][0]*mol.geom[i][2]; + I(1,2) -= mi * mol.geom[i][1]*mol.geom[i][2]; } I(1,0) = I(0,1); @@ -229,9 +229,9 @@ Torsional angles: Molecular center of mass: 0.64494926 0.00000000 2.31663792 Moment of inertia tensor (amu bohr^2): - 156.154091561645 0.000000000000 52.855584120568 + 156.154091561645 0.000000000000 -52.855584120568 0.000000000000 199.371126996236 0.000000000000 - 52.855584120568 0.000000000000 54.459548882464 + -52.855584120568 0.000000000000 54.459548882464 Principal moments of inertia (amu * bohr^2): 31.964078 178.649562 199.371127 From cdca18174fd35ca896dcf6525a4455d25fc2f6e0 Mon Sep 17 00:00:00 2001 From: Daniel <zyth0s@users.noreply.github.com> Date: Mon, 13 Jul 2020 22:44:56 +0200 Subject: [PATCH 2/4] Definition of non-diag I needs minus sign --- Project#01/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project#01/README.md b/Project#01/README.md index 946ff71..b6a1d47 100644 --- a/Project#01/README.md +++ b/Project#01/README.md @@ -97,7 +97,7 @@ Diagonal: <img src="./figures/inertia-diag.png" width="750"> -Off-diagonal: +Off-diagonal (add a negative sign): <img src="./figures/inertia-off-diag.png" width="600"> From 0089c39c1b74202f306a4ade3b20498eb42303f0 Mon Sep 17 00:00:00 2001 From: Daniel <zyth0s@users.noreply.github.com> Date: Mon, 13 Jul 2020 22:47:30 +0200 Subject: [PATCH 3/4] Propagate sign change of non-diag I --- Project#01/hints/step7-solution.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Project#01/hints/step7-solution.md b/Project#01/hints/step7-solution.md index 4f9515a..babca70 100644 --- a/Project#01/hints/step7-solution.md +++ b/Project#01/hints/step7-solution.md @@ -94,9 +94,9 @@ int main() I(0,0) += mi * (mol.geom[i][1]*mol.geom[i][1] + mol.geom[i][2]*mol.geom[i][2]); I(1,1) += mi * (mol.geom[i][0]*mol.geom[i][0] + mol.geom[i][2]*mol.geom[i][2]); I(2,2) += mi * (mol.geom[i][0]*mol.geom[i][0] + mol.geom[i][1]*mol.geom[i][1]); - I(0,1) += mi * mol.geom[i][0]*mol.geom[i][1]; - I(0,2) += mi * mol.geom[i][0]*mol.geom[i][2]; - I(1,2) += mi * mol.geom[i][1]*mol.geom[i][2]; + I(0,1) -= mi * mol.geom[i][0]*mol.geom[i][1]; + I(0,2) -= mi * mol.geom[i][0]*mol.geom[i][2]; + I(1,2) -= mi * mol.geom[i][1]*mol.geom[i][2]; } I(1,0) = I(0,1); @@ -215,9 +215,9 @@ Torsional angles: Molecular center of mass: 0.64494926 0.00000000 2.31663792 Moment of inertia tensor (amu bohr^2): - 156.154091561645 0.000000000000 52.855584120568 + 156.154091561645 0.000000000000 -52.855584120568 0.000000000000 199.371126996236 0.000000000000 - 52.855584120568 0.000000000000 54.459548882464 + -52.855584120568 0.000000000000 54.459548882464 Principal moments of inertia (amu * bohr^2): 31.964078 178.649562 199.371127 From 128cb2689c960eb61f4754aeffcd0313a8453211 Mon Sep 17 00:00:00 2001 From: Daniel <zyth0s@users.noreply.github.com> Date: Mon, 13 Jul 2020 22:49:34 +0200 Subject: [PATCH 4/4] Propagate sign of non-diag I to output --- Project#01/output/acetaldehyde_out.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Project#01/output/acetaldehyde_out.txt b/Project#01/output/acetaldehyde_out.txt index c5916c0..8ef02f9 100644 --- a/Project#01/output/acetaldehyde_out.txt +++ b/Project#01/output/acetaldehyde_out.txt @@ -77,9 +77,9 @@ Moment of inertia tensor: 1 2 3 - 1 156.1540916 0.0000000 52.8555841 + 1 156.1540916 0.0000000 -52.8555841 2 0.0000000 199.3711270 0.0000000 - 3 52.8555841 0.0000000 54.4595489 + 3 -52.8555841 0.0000000 54.4595489 Principal moments of inertia (amu * bohr^2): 31.964078 178.649562 199.371127