From e566c9385ec735cf00a7e653846c0815fd0e44ee Mon Sep 17 00:00:00 2001 From: Morten Ledum Date: Thu, 26 Jan 2023 15:27:21 +0100 Subject: [PATCH 1/2] Remove non-UTF-8 characters in Fortran modules --- hymd/compute_angle_forces.f90 | 2 +- hymd/compute_angle_forces__double.f90 | 2 +- hymd/dipole_reconstruction.f90 | 16 ++++++++-------- hymd/dipole_reconstruction__double.f90 | 16 ++++++++-------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/hymd/compute_angle_forces.f90 b/hymd/compute_angle_forces.f90 index 7ad85861..99e26274 100644 --- a/hymd/compute_angle_forces.f90 +++ b/hymd/compute_angle_forces.f90 @@ -74,7 +74,7 @@ subroutine caf(f, r, box, a, b, c, t0, k, energy) xrasin = -ff / (norm_a * sinphi) xrcsin = -ff / (norm_c * sinphi) - ! 𝜕θ/𝜕cos(θ) * 𝜕cos(θ)/𝜕r + ! d theta / d cos(theta) * d cos(theta) / dr fa = (ec - cosphi * ea) * xrasin fc = (ea - cosphi * ec) * xrcsin diff --git a/hymd/compute_angle_forces__double.f90 b/hymd/compute_angle_forces__double.f90 index e5dbeae1..0abe5079 100644 --- a/hymd/compute_angle_forces__double.f90 +++ b/hymd/compute_angle_forces__double.f90 @@ -74,7 +74,7 @@ subroutine caf_d(f, r, box, a, b, c, t0, k, energy) xrasin = -ff / (norm_a * sinphi) xrcsin = -ff / (norm_c * sinphi) - ! 𝜕θ/𝜕cos(θ) * 𝜕cos(θ)/𝜕r + ! d theta / d cos(theta) * d cos(theta) / dr fa = (ec - cosphi * ea) * xrasin fc = (ea - cosphi * ec) * xrcsin diff --git a/hymd/dipole_reconstruction.f90 b/hymd/dipole_reconstruction.f90 index 6ff5c0e9..72836f59 100644 --- a/hymd/dipole_reconstruction.f90 +++ b/hymd/dipole_reconstruction.f90 @@ -111,13 +111,13 @@ subroutine reconstruct(rab, rb, rcb, box, c_k, d_k, phi, dipole_flag, energy_cbt if (sin_gamma < 0.1) then print *, "DIHEDRAL ROUTINE WARNING (bending potential):" - print '(a, f5.2, a)', "The angle γ =", gamm, " is too close to 0 or π." - print *, "There's probably something wrong with the simulation. Setting sin(γ) = 0.1" + print '(a, f5.2, a)', "The angle gamma =", gamm, " is too close to 0 or pi." + print *, "There's probably something wrong with the simulation. Setting sin(gamma) = 0.1" sin_gamma = 0.1 end if ! Bending "forces" == f_gamma_i in the paper - ! 1/sin(γ) ∂cos(γ)/∂γ + ! 1 / sin(gamma) d cos(gamma) / d gamma fa = (v - cos_gamma * w) / norm_a fc = (w - cos_gamma * v) / norm_c @@ -143,7 +143,7 @@ subroutine reconstruct(rab, rb, rcb, box, c_k, d_k, phi, dipole_flag, energy_cbt end if ! 2 - Dipole reconstruction - ! θ(γ) + ! theta(gamma) ! This function needs to be fit again fac = exp((gamm - 1.73d0) / 0.025d0) theta = -1.607d0 * gamm + 0.094d0 + 1.883d0 / (1.d0 + fac) @@ -186,7 +186,7 @@ subroutine reconstruct(rab, rb, rcb, box, c_k, d_k, phi, dipole_flag, energy_cbt ! Last term is 0 for N_a, second term is 0 for N_c (S19) ! Minus in the last term because inverse cross_matrix - ! 1 / sin(γ) is already inside fa, fb, and fc + ! 1 / sin(gamma) is already inside fa, fb, and fc N_a = (cos_gamma * outer_product(fa, n) + cross_matrix(W_a, v) ) / sin_gamma N_b = (cos_gamma * outer_product(fb, n) + cross_matrix(W_b, v) - cross_matrix(V_b, w)) / sin_gamma N_c = (cos_gamma * outer_product(fc, n) - cross_matrix(V_c, w)) / sin_gamma @@ -195,9 +195,9 @@ subroutine reconstruct(rab, rb, rcb, box, c_k, d_k, phi, dipole_flag, energy_cbt M_b = cross_matrix(N_b, v) - cross_matrix(V_b, n) M_c = cross_matrix(N_c, v) - cross_matrix(V_c, n) - ! A lot of terms in (S10) go away because ∂φ/∂γ = 0, - ! since φ = const. - ! 1 / sin(γ) is already inside fa, fb, and fc + ! A lot of terms in (S10) go away because d phi / d gamma = 0, + ! since phi = const. + ! 1 / sin(gamma) is already inside fa, fb, and fc FN_a = sin_theta * d_theta * outer_product(fa, n) FN_b = sin_theta * d_theta * outer_product(fb, n) FN_c = sin_theta * d_theta * outer_product(fc, n) diff --git a/hymd/dipole_reconstruction__double.f90 b/hymd/dipole_reconstruction__double.f90 index 76a758cc..25b789dc 100644 --- a/hymd/dipole_reconstruction__double.f90 +++ b/hymd/dipole_reconstruction__double.f90 @@ -111,13 +111,13 @@ subroutine reconstruct(rab, rb, rcb, box, c_k, d_k, phi, dipole_flag, energy_cbt if (sin_gamma < 0.1) then print *, "DIHEDRAL ROUTINE WARNING (bending potential):" - print '(a, f5.2, a)', "The angle γ =", gamm, " is too close to 0 or π." - print *, "There's probably something wrong with the simulation. Setting sin(γ) = 0.1" + print '(a, f5.2, a)', "The angle gamma =", gamm, " is too close to 0 or pi." + print *, "There's probably something wrong with the simulation. Setting sin(gamma) = 0.1" sin_gamma = 0.1 end if ! Bending "forces" == f_gamma_i in the paper - ! 1/sin(γ) ∂cos(γ)/∂γ + ! 1 / sin(gamma) d cos(gamma) / d gamma fa = (v - cos_gamma * w) / norm_a fc = (w - cos_gamma * v) / norm_c @@ -143,7 +143,7 @@ subroutine reconstruct(rab, rb, rcb, box, c_k, d_k, phi, dipole_flag, energy_cbt end if ! 2 - Dipole reconstruction - ! θ(γ) + ! theta(gamma) ! This function needs to be fit again fac = exp((gamm - 1.73d0) / 0.025d0) theta = -1.607d0 * gamm + 0.094d0 + 1.883d0 / (1.d0 + fac) @@ -186,7 +186,7 @@ subroutine reconstruct(rab, rb, rcb, box, c_k, d_k, phi, dipole_flag, energy_cbt ! Last term is 0 for N_a, second term is 0 for N_c (S19) ! Minus in the last term because inverse cross_matrix - ! 1 / sin(γ) is already inside fa, fb, and fc + ! 1 / sin(gamma) is already inside fa, fb, and fc N_a = (cos_gamma * outer_product(fa, n) + cross_matrix(W_a, v) ) / sin_gamma N_b = (cos_gamma * outer_product(fb, n) + cross_matrix(W_b, v) - cross_matrix(V_b, w)) / sin_gamma N_c = (cos_gamma * outer_product(fc, n) - cross_matrix(V_c, w)) / sin_gamma @@ -195,9 +195,9 @@ subroutine reconstruct(rab, rb, rcb, box, c_k, d_k, phi, dipole_flag, energy_cbt M_b = cross_matrix(N_b, v) - cross_matrix(V_b, n) M_c = cross_matrix(N_c, v) - cross_matrix(V_c, n) - ! A lot of terms in (S10) go away because ∂φ/∂γ = 0, - ! since φ = const. - ! 1 / sin(γ) is already inside fa, fb, and fc + ! A lot of terms in (S10) go away because d phi / d gamma = 0, + ! since phi = const. + ! 1 / sin(gamma) is already inside fa, fb, and fc FN_a = sin_theta * d_theta * outer_product(fa, n) FN_b = sin_theta * d_theta * outer_product(fb, n) FN_c = sin_theta * d_theta * outer_product(fc, n) From 02c8b24206ae9f7740b6bbcdd74d2ea4fe89fee8 Mon Sep 17 00:00:00 2001 From: Morten Ledum Date: Thu, 26 Jan 2023 17:09:19 +0100 Subject: [PATCH 2/2] Pin Jinja2 version to <3.1 to fix sphinx ImportError --- docs/docs_requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/docs_requirements.txt b/docs/docs_requirements.txt index 483053fc..96a239c2 100644 --- a/docs/docs_requirements.txt +++ b/docs/docs_requirements.txt @@ -6,3 +6,4 @@ sphinxcontrib.bibtex matplotlib numpy numpydoc +Jinja2<3.1