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

Added actinide parameters. #24

Merged
merged 19 commits into from
Dec 19, 2023
Merged
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
30 changes: 21 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ jobs:
FC: ${{ matrix.compiler == 'intel' && 'ifort' || 'gfortran' }}
CC: ${{ matrix.compiler == 'intel' && 'icc' || 'gcc' }}
GCC_V: ${{ matrix.version }}
OMP_NUM_THREADS: 1,2,1
PYTHON_V: 3.8
OMP_NUM_THREADS: 1,2,1

steps:
- name: Checkout code
Expand All @@ -72,17 +72,21 @@ jobs:
- name: Install GCC (OSX)
if: ${{ contains(matrix.os, 'macos') && matrix.compiler == 'gnu' }}
run: |
brew install gcc@${{ env.GCC_V }}
ln -s /usr/local/bin/gfortran-${{ env.GCC_V }} /usr/local/bin/gfortran
ln -s /usr/local/bin/gcc-${{ env.GCC_V }} /usr/local/bin/gcc
ln -s /usr/local/bin/g++-${{ env.GCC_V }} /usr/local/bin/g++

- name: Install GCC (Linux)
if: ${{ contains(matrix.os, 'ubuntu') && matrix.compiler == 'gnu' }}
run: >-
sudo update-alternatives
--install /usr/bin/gcc gcc /usr/bin/gcc-${{ env.GCC_V }} 100
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${{ env.GCC_V }}
--slave /usr/bin/gcov gcov /usr/bin/gcov-${{ env.GCC_V }}
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y gcc-${{ env.GCC_V}} gfortran-${{ env.GCC_V }}
sudo update-alternatives \
--install /usr/bin/gcc gcc /usr/bin/gcc-${{ env.GCC_V }} 100 \
--slave /usr/bin/gfortran gfortran /usr/bin/gfortran-${{ env.GCC_V }} \
--slave /usr/bin/gcov gcov /usr/bin/gcov-${{ env.GCC_V }}

- name: Install GCC (Windows)
if: ${{ contains(matrix.os, 'windows') && matrix.compiler == 'msys' }}
Expand All @@ -92,12 +96,15 @@ jobs:
update: false
install: >-
git
mingw-w64-x86_64-python
mingw-w64-x86_64-python-pip
mingw-w64-x86_64-python-setuptools
mingw-w64-x86_64-gcc
mingw-w64-x86_64-gcc-fortran
mingw-w64-x86_64-openblas
mingw-w64-x86_64-lapack
mingw-w64-x86_64-cmake
mingw-w64-x86_64-python
mingw-w64-x86_64-python-pip
mingw-w64-x86_64-meson
mingw-w64-x86_64-ninja

- name: Prepare for cache restore
Expand Down Expand Up @@ -169,6 +176,7 @@ jobs:
if: ${{ matrix.compiler == 'intel' }}
run: |
source /opt/intel/oneapi/setvars.sh
source /opt/intel/oneapi/compiler/2024.0/env/vars.sh
printenv >> $GITHUB_ENV

- name: Install build and test dependencies
Expand Down Expand Up @@ -201,14 +209,18 @@ jobs:
-DCMAKE_BUILD_TYPE=Debug
-DCMAKE_INSTALL_PREFIX=$PWD/_dist
-DCMAKE_INSTALL_LIBDIR=lib
-DCMAKE_FORTRAN_COMPILER=${{ env.FC }}

- name: Build library
run: ninja -C ${{ env.BUILD_DIR }}

- name: Run unit tests
if: ${{ matrix.build == 'meson' }}
run: |
meson test -C ${{ env.BUILD_DIR }} --print-errorlogs --no-rebuild --num-processes 2 -t 2
meson test -C ${{ env.BUILD_DIR }} --print-errorlogs --no-rebuild
env:
OMP_NUM_THREADS: 1


- name: Run unit tests
if: ${{ matrix.build == 'cmake' }}
Expand Down
23 changes: 18 additions & 5 deletions src/multicharge/param/eeq2019.f90
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module multicharge_param_eeq2019


!> Maximum atomic number allowed in EEQ calculations
integer, parameter :: max_elem = 86
integer, parameter :: max_elem = 103


!> Element-specific electronegativity for the electronegativity equilibration charges.
Expand All @@ -75,7 +75,11 @@ module multicharge_param_eeq2019
& 0.56999999_wp, 0.87936784_wp, 1.02761808_wp, 0.93297476_wp, 1.10172128_wp, &
& 0.97350071_wp, 1.16695666_wp, 1.23997927_wp, 1.18464453_wp, 1.14191734_wp, &
& 1.12334192_wp, 1.01485321_wp, 1.12950808_wp, 1.30804834_wp, 1.33689961_wp, &
& 1.27465977_wp]
& 1.27465977_wp, 1.06598299_wp, 0.68184178_wp, 1.25994649_wp, 0.40030316_wp, &
& 0.29458157_wp, 0.75460678_wp, 0.42330605_wp, 0.53613714_wp, 0.58870880_wp, &
& 0.50349105_wp, 0.02647510_wp, 0.45350118_wp, 0.63133032_wp, 0.45995218_wp, &
& 1.01557723_wp, 1.17163176_wp, 0.23501195_wp]


!> Element-specific chemical hardnesses for the electronegativity equilibration charges.
real(wp), parameter :: eeq_eta(max_elem) = [&
Expand All @@ -96,7 +100,10 @@ module multicharge_param_eeq2019
& 0.11000000_wp,-0.02786741_wp, 0.01057858_wp,-0.03892226_wp,-0.04574364_wp, &
&-0.03874080_wp,-0.03782372_wp,-0.07046855_wp, 0.09546597_wp, 0.21953269_wp, &
& 0.02522348_wp, 0.15263050_wp, 0.08042611_wp, 0.01878626_wp, 0.08715453_wp, &
& 0.10500484_wp]
& 0.10500484_wp, 0.10034731_wp, 0.15801991_wp,-0.00995585_wp, 0.13654805_wp, &
& 0.15968516_wp, 0.12442023_wp, 0.13340491_wp, 0.11523968_wp, 0.12165907_wp, &
& 0.08181387_wp, 0.65060023_wp, 0.18634958_wp, 0.16685501_wp, 0.15080023_wp, &
& 0.10094112_wp, 0.10503808_wp, 0.68963544_wp]

!> Element-specific CN scaling constant for the electronegativity equilibration charges.
real(wp), parameter :: eeq_kcn(max_elem) = [&
Expand All @@ -117,7 +124,10 @@ module multicharge_param_eeq2019
&-0.11000000_wp,-0.03585873_wp,-0.03132400_wp,-0.05902379_wp,-0.02827592_wp, &
&-0.07606260_wp,-0.02123839_wp, 0.03814822_wp, 0.02146834_wp, 0.01580538_wp, &
&-0.00894298_wp,-0.05864876_wp,-0.01817842_wp, 0.07721851_wp, 0.07936083_wp, &
& 0.05849285_wp]
& 0.05849285_wp, 0.00013506_wp,-0.00020631_wp, 0.00328823_wp, 0.00419390_wp, &
& 0.00429264_wp, 0.00193300_wp, 0.00478177_wp, 0.00264040_wp, 0.00418168_wp, &
& 0.00399258_wp,-0.00293781_wp,-0.00195990_wp, 0.00148017_wp,-0.00011254_wp, &
& 0.00023249_wp,-0.00006144_wp,-0.02459107_wp]

!> Element-specific charge widths for the electronegativity equilibration charges.
real(wp), parameter :: eeq_rad(max_elem) = [&
Expand All @@ -138,7 +148,10 @@ module multicharge_param_eeq2019
& 1.63999999_wp, 1.47055223_wp, 1.81127084_wp, 1.40189963_wp, 1.54015481_wp, &
& 1.33721475_wp, 1.57165422_wp, 1.04815857_wp, 1.78342098_wp, 2.79106396_wp, &
& 1.78160840_wp, 2.47588882_wp, 2.37670734_wp, 1.76613217_wp, 2.66172302_wp, &
& 2.82773085_wp]
& 2.82773085_wp, 1.04059593_wp, 0.60550051_wp, 1.93854984_wp, 0.50189075_wp, &
& 0.58180664_wp, 0.73094166_wp, 0.49548126_wp, 0.67685715_wp, 0.59573917_wp, &
& 0.35345732_wp, 0.29902232_wp, 0.49626064_wp, 0.55816329_wp, 0.49019371_wp, &
& 1.05120718_wp, 0.95651052_wp, 0.35885251_wp]

contains

Expand Down
49 changes: 49 additions & 0 deletions test/test_model.f90
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ subroutine collect_model(testsuite)
testsuite = [ &
& new_unittest("charges-mb01", test_q_mb01), &
& new_unittest("charges-mb02", test_q_mb02), &
& new_unittest("charges-actinides", test_q_actinides), &
& new_unittest("energy-mb03", test_e_mb03), &
& new_unittest("energy-mb04", test_e_mb04), &
& new_unittest("gradient-mb05", test_g_mb05), &
Expand Down Expand Up @@ -408,6 +409,54 @@ subroutine test_q_mb02(error)
end subroutine test_q_mb02


subroutine test_q_actinides(error)

!> Error handling
type(error_type), allocatable, intent(out) :: error

type(structure_type) :: mol

real(wp), parameter :: ref(17) = [&
&-3.30509539864000E-01_wp, 1.04514976082945E-01_wp,-1.77396038980278E+00_wp, &
& 3.33146719321694E-01_wp, 4.95141129349174E-01_wp, 4.70782337923003E-02_wp, &
& 2.74391145645531E-01_wp, 3.24692748232074E-01_wp, 1.42515975903486E-01_wp, &
& 1.41998267354686E-01_wp, 2.27799879597567E-01_wp, 2.17718820771047E-01_wp, &
& 1.06681646773478E-01_wp, 1.79629037301893E-01_wp,-2.97275399624992E-01_wp, &
&-3.75140594107334E-01_wp, 1.81577343273231E-01_wp]

!> Molecular structure data
mol%nat = 17
mol%nid = 17
mol%id = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, &
& 12, 13, 14, 15, 16, 17]
mol%num = [87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, &
& 98, 99, 100, 101, 102, 103]
mol%xyz = reshape([ &
& 0.98692316414074_wp, 6.12727238368797_wp,-6.67861597188102_wp, &
& 3.63898862390869_wp, 5.12109301182962_wp, 3.01908613326278_wp, &
& 5.14503571563551_wp,-3.97172984617710_wp, 3.82011791828867_wp, &
& 6.71986847575494_wp, 1.71382138402812_wp, 3.92749159076307_wp, &
& 4.13783589704826_wp,-2.10695793491818_wp, 0.19753203068899_wp, &
& 8.97685097698326_wp,-3.08813636191844_wp,-4.45568615593938_wp, &
& 12.5486412940776_wp,-1.77128765259458_wp, 0.59261498922861_wp, &
& 7.82051475868325_wp,-3.97159756604558_wp,-0.53637703616916_wp, &
&-0.43444574624893_wp,-1.69696511583960_wp,-1.65898182093050_wp, &
&-4.71270645149099_wp,-0.11534827468942_wp, 2.84863373521297_wp, &
&-2.52061680335614_wp, 1.82937752749537_wp,-2.10366982879172_wp, &
& 0.13551154616576_wp, 7.99805359235043_wp,-1.55508522619903_wp, &
& 3.91594542499717_wp,-1.72975169129597_wp,-5.07944366756113_wp, &
&-1.03393930231679_wp, 4.69307230054046_wp, 0.02656940927472_wp, &
& 6.20675384557240_wp, 4.24490721493632_wp,-0.71004195169885_wp, &
& 7.04586341131562_wp, 5.20053667939076_wp,-7.51972863675876_wp, &
& 2.01082807362334_wp, 1.34838807211157_wp,-4.70482633508447_wp],&
& [3, 17])
mol%periodic = [.false.]

call gen_test(error, mol, qref=ref)

end subroutine test_q_actinides


subroutine test_e_mb03(error)

!> Error handling
Expand Down
Loading