From c2e61533c4d1054d80078bcdb3a3a01beb975f6f Mon Sep 17 00:00:00 2001 From: kousuke-nakano Date: Thu, 27 Jun 2024 09:40:41 +0900 Subject: [PATCH 1/2] Solved a corner case in makefort10.f90. --- src/a_makefort10/makefort10.f90 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/a_makefort10/makefort10.f90 b/src/a_makefort10/makefort10.f90 index 570052b..4176505 100644 --- a/src/a_makefort10/makefort10.f90 +++ b/src/a_makefort10/makefort10.f90 @@ -1462,9 +1462,10 @@ subroutine write_fort10 write (ufort10, *) '# Ion coordinates' do i1 = 1, ntotatoms zetaw = zeta(1, i1) - if ((int(zeta(1, i1)) .ne. 1 .and. int(zeta(1, i1)) .ne. 2 & - .and. int(zeta(1, i1)) .ne. 3 .and. int(zeta(1, i1)) .ne. 4) & - .or. nopseudo) then + ! K.N. on 27 June. 2024. Why .ge. 5? because for zeta .le. 4., there are pseudo potentials that + ! do not remove any core electrons. In such a case, zeta and zetaw should be different to tell + ! turborvb that valence electrons = atomic number for that atom, but a pseudo potential is assgined. + if ((int(zeta(1, i1)) .ge. 5) .or. nopseudo) then zetaw = int(zeta(1, i1)) end if write (ufort10, '(1f6.0,1f8.2,3f22.14)') zeta(2, i1), zetaw, (rion(j, i1), j=1, 3) From 880f8cece80737aba1e8df4d677520d32c95f8a5 Mon Sep 17 00:00:00 2001 From: kousuke-nakano Date: Thu, 27 Jun 2024 09:47:11 +0900 Subject: [PATCH 2/2] applied the linter --- src/a_makefort10/makefort10.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/a_makefort10/makefort10.f90 b/src/a_makefort10/makefort10.f90 index 4176505..5de964e 100644 --- a/src/a_makefort10/makefort10.f90 +++ b/src/a_makefort10/makefort10.f90 @@ -1463,8 +1463,8 @@ subroutine write_fort10 do i1 = 1, ntotatoms zetaw = zeta(1, i1) ! K.N. on 27 June. 2024. Why .ge. 5? because for zeta .le. 4., there are pseudo potentials that - ! do not remove any core electrons. In such a case, zeta and zetaw should be different to tell - ! turborvb that valence electrons = atomic number for that atom, but a pseudo potential is assgined. + ! do not remove any core electrons. In such a case, zeta and zetaw should be different to tell + ! turborvb that valence electrons = atomic number for that atom, but a pseudo potential is assgined. if ((int(zeta(1, i1)) .ge. 5) .or. nopseudo) then zetaw = int(zeta(1, i1)) end if