Skip to content

Commit

Permalink
Move ncoord and data to mctc-lib
Browse files Browse the repository at this point in the history
  • Loading branch information
thfroitzheim committed Nov 12, 2024
1 parent 1b74889 commit b0ddf19
Show file tree
Hide file tree
Showing 41 changed files with 84 additions and 2,660 deletions.
2 changes: 1 addition & 1 deletion app/test/gfn2-molmom.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ format = 1
wexp = 0.5000000000000000
kpol = 2.0000000000000000
enscale = 0.0200000000000000
cn = "gfn"
cn = "dexp"
[hamiltonian.xtb.shell]
ss = 1.8500000000000001
pp = 2.2300000000000000
Expand Down
2 changes: 1 addition & 1 deletion app/test/simple-xtb.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ format = 1
wexp = 5.0000000000000000E-01
kpol = 2.0000000000000000E+00
enscale = 2.0000000000000000E-02
cn = "gfn"
cn = "dexp"
[hamiltonian.xtb.shell]
ss = 1.8500000000000001E+00
pp = 2.2300000000000000E+00
Expand Down
4 changes: 2 additions & 2 deletions config/cmake/Findmctc-lib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

set(_lib "mctc-lib")
set(_pkg "MCTCLIB")
set(_url "https://github.com/grimme-lab/mctc-lib")
set(_rev "v0.3.2")
set(_url "https://github.com/thfroitzheim/mctc-lib")
set(_rev "ncoord")

if(NOT DEFINED "${_pkg}_FIND_METHOD")
if(DEFINED "${PROJECT_NAME}-dependency-method")
Expand Down
4 changes: 2 additions & 2 deletions fpm.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ link = ["lapack", "blas"]
auto-tests = false

[dependencies]
mctc-lib.git = "https://github.com/grimme-lab/mctc-lib"
mctc-lib.tag = "v0.3.2"
mctc-lib.git = "https://github.com/thfroitzheim/mctc-lib"
mctc-lib.tag = "ncoord"
multicharge.git = "https://github.com/grimme-lab/multicharge"
multicharge.tag = "v0.3.0"
dftd4.git = "https://github.com/dftd4/dftd4"
Expand Down
2 changes: 0 additions & 2 deletions src/tblite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ add_subdirectory("integral")
add_subdirectory("io")
add_subdirectory("lapack")
add_subdirectory("mesh")
add_subdirectory("ncoord")
add_subdirectory("output")
add_subdirectory("param")
add_subdirectory("post_processing")
Expand All @@ -57,7 +56,6 @@ list(
"${dir}/double_dictionary.f90"
"${dir}/disp.f90"
"${dir}/lapack.f90"
"${dir}/ncoord.f90"
"${dir}/os.F90"
"${dir}/param.f90"
"${dir}/repulsion.f90"
Expand Down
6 changes: 3 additions & 3 deletions src/tblite/ceh/ceh.f90
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
module tblite_ceh_ceh
use mctc_env, only : wp, error_type, fatal_error
use mctc_io, only: structure_type
use mctc_ncoord, only : new_ncoord
use tblite_basis_slater, only : slater_to_gauss
use tblite_coulomb_charge, only : new_effective_coulomb, effective_coulomb, &
& arithmetic_average
use tblite_coulomb_thirdorder, only : new_onsite_thirdorder
use tblite_basis_type, only : cgto_type, new_basis, basis_type
use tblite_ncoord, only : new_ncoord
use tblite_output_format, only: format_string
use tblite_integral_type, only : integral_type
use tblite_xtb_spec, only : tb_h0spec
Expand Down Expand Up @@ -972,7 +972,7 @@ subroutine add_ncoord(calc, mol)
type(structure_type), intent(in) :: mol

call new_ncoord(calc%ncoord, mol, cn_type="erf", &
& rcov=ceh_cov_radii(mol%num))
& rcov=ceh_cov_radii(mol%num))
end subroutine add_ncoord


Expand All @@ -983,7 +983,7 @@ subroutine add_ncoord_en(calc, mol)
type(structure_type), intent(in) :: mol

call new_ncoord(calc%ncoord_en, mol, cn_type="erf_en", &
& rcov=ceh_cov_radii(mol%num), en=pauling_en_ceh(mol%num))
& rcov=ceh_cov_radii(mol%num), en=pauling_en_ceh(mol%num))
end subroutine add_ncoord_en


Expand Down
2 changes: 1 addition & 1 deletion src/tblite/classical/halogen.f90
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
module tblite_classical_halogen
use mctc_env, only : wp
use mctc_io, only : structure_type
use mctc_data_atomicrad, only : get_atomic_rad
use tblite_container, only : container_cache
use tblite_cutoff, only : get_lattice_points
use tblite_data_atomicrad, only : get_atomic_rad
use tblite_repulsion_type, only : repulsion_type
implicit none
private
Expand Down
7 changes: 3 additions & 4 deletions src/tblite/coulomb/multipole.f90
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ module tblite_coulomb_multipole
use mctc_io, only : structure_type
use mctc_io_math, only : matdet_3x3, matinv_3x3
use mctc_io_constants, only : pi
use mctc_ncoord, only : new_ncoord, ncoord_type
use tblite_blas, only : dot, gemv, symv, gemm
use tblite_container_cache, only : container_cache
use tblite_coulomb_cache, only : coulomb_cache
use tblite_coulomb_ewald, only : get_dir_cutoff, get_rec_cutoff
use tblite_coulomb_type, only : coulomb_type
use tblite_cutoff, only : get_lattice_points
use tblite_ncoord_gfn, only : gfn_ncoord_type, new_gfn_ncoord
use tblite_scf_potential, only : potential_type
use tblite_wavefunction_type, only : wavefunction_type
use tblite_wignerseitz, only : wignerseitz_cell
Expand Down Expand Up @@ -62,7 +62,7 @@ module tblite_coulomb_multipole
real(wp), allocatable :: valence_cn(:)

!> Coordination number container for multipolar damping radii
type(gfn_ncoord_type), allocatable :: ncoord
class(ncoord_type), allocatable :: ncoord
contains
!> Update cache from container
procedure :: update
Expand Down Expand Up @@ -124,8 +124,7 @@ subroutine new_damped_multipole(self, mol, kdmp3, kdmp5, dkernel, qkernel, &
self%rad = rad
self%valence_cn = vcn

allocate(self%ncoord)
call new_gfn_ncoord(self%ncoord, mol)
call new_ncoord(self%ncoord, mol, "dexp")
end subroutine new_damped_multipole


Expand Down
5 changes: 1 addition & 4 deletions src/tblite/data.f90
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@

!> Proxy module for providing access to element data.
module tblite_data
use tblite_data_atomicrad, only : get_atomic_rad
use tblite_data_covrad, only : get_covalent_rad
use tblite_data_paulingen, only : get_pauling_en
use tblite_data_spin, only : get_spin_constant
implicit none

public :: get_atomic_rad, get_covalent_rad, get_pauling_en, get_spin_constant
public :: get_spin_constant
end module tblite_data
3 changes: 0 additions & 3 deletions src/tblite/data/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ set(dir "${CMAKE_CURRENT_SOURCE_DIR}")

list(
APPEND srcs
"${dir}/atomicrad.f90"
"${dir}/covrad.f90"
"${dir}/paulingen.f90"
"${dir}/spin.f90"
)

Expand Down
99 changes: 0 additions & 99 deletions src/tblite/data/atomicrad.f90

This file was deleted.

107 changes: 0 additions & 107 deletions src/tblite/data/covrad.f90

This file was deleted.

3 changes: 0 additions & 3 deletions src/tblite/data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,5 @@
# along with tblite. If not, see <https://www.gnu.org/licenses/>.

srcs += files(
'atomicrad.f90',
'covrad.f90',
'paulingen.f90',
'spin.f90',
)
Loading

0 comments on commit b0ddf19

Please sign in to comment.