forked from tblite/tblite
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add exchange gradients and density broyden
- Loading branch information
1 parent
1665c59
commit 4ce7c8b
Showing
16 changed files
with
947 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
module tblite_exchange | ||
use mctc_env, only : wp | ||
use tblite_mulliken_kfock, only : mulliken_kfock_type, new_mulliken_exchange | ||
use mctc_io, only : structure_type | ||
use tblite_param_exchange, only : exchange_record | ||
use tblite_exchange_type, only : exchange_type | ||
use tblite_basis_type, only : basis_type | ||
implicit none | ||
private | ||
public :: new_exchange | ||
|
||
contains | ||
subroutine new_exchange(self, mol, hardness, par, bas) | ||
!> Instance of the multipole container | ||
class(exchange_type), allocatable ,intent(inout) :: self | ||
!> Molecular structure data | ||
type(structure_type), intent(in) :: mol | ||
real(wp), intent(in) :: hardness(:) | ||
type(exchange_record) :: par | ||
type(basis_type) :: bas | ||
|
||
if (par%mulliken) then | ||
block | ||
type(mulliken_kfock_type), allocatable :: tmp | ||
allocate(tmp) | ||
call new_mulliken_exchange(tmp, mol, hardness, .false., .false., par%frscale, & | ||
& par%omega, par%lrscale, par%average, par%expsmooth, bas) | ||
call move_alloc(tmp, self) | ||
end block | ||
end if | ||
end subroutine | ||
|
||
end module tblite_exchange |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
module tblite_exchange_cache | ||
use mctc_env, only : wp, dp | ||
use mctc_io, only : structure_type | ||
use tblite_coulomb_ewald, only : get_alpha | ||
use tblite_wignerseitz, only : wignerseitz_cell, new_wignerseitz_cell | ||
implicit none | ||
private | ||
|
||
public :: exchange_cache | ||
|
||
|
||
type :: exchange_cache | ||
real(dp), allocatable :: curr_D(:, :) | ||
real(dp), allocatable :: ref_D(:, :) | ||
real(dp), allocatable :: prev_F(:, :) | ||
real(dp), allocatable :: gamma_(:,:) | ||
contains | ||
procedure :: update | ||
end type exchange_cache | ||
|
||
|
||
contains | ||
|
||
|
||
subroutine update(self, mol) | ||
!> Instance of the electrostatic container | ||
class(exchange_cache), intent(inout) :: self | ||
!> Molecular structure data | ||
type(structure_type), intent(in) :: mol | ||
|
||
|
||
end subroutine update | ||
|
||
end module tblite_exchange_cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# This file is part of tblite. | ||
# SPDX-Identifier: LGPL-3.0-or-later | ||
# | ||
# tblite is free software: you can redistribute it and/or modify it under | ||
# the terms of the GNU Lesser General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# tblite is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public License | ||
# along with tblite. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
srcs += files( | ||
'cache.f90', | ||
'mulliken_kfock.f90', | ||
'type.f90' | ||
) |
Oops, something went wrong.