Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove non-UTF-8 characters in Fortran modules #203

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/docs_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ sphinxcontrib.bibtex
matplotlib
numpy
numpydoc
Jinja2<3.1
2 changes: 1 addition & 1 deletion hymd/compute_angle_forces.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion hymd/compute_angle_forces__double.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 8 additions & 8 deletions hymd/dipole_reconstruction.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down
16 changes: 8 additions & 8 deletions hymd/dipole_reconstruction__double.f90
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down