Skip to content
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
13 changes: 10 additions & 3 deletions src/initialisation_module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,8 @@ subroutine set_up(find_chdens,level)
nspin, min_layer, &
glob2node, flag_XLBOMD, &
flag_neutral_atom, flag_diagonalisation, &
flag_write_occ_mat, occ_mat, occ_mat_glob
flag_write_occ_mat, occ_mat, occ_mat_glob, &
flag_DFTplusU
use memory_module, only: reg_alloc_mem, reg_dealloc_mem, &
type_dbl, type_int
use group_module, only: parts
Expand Down Expand Up @@ -490,8 +491,14 @@ subroutine set_up(find_chdens,level)
if (inode == ionode .and. iprint_init > 2) &
write (io_lun,fmt='(4x,a)') trim(prefix)//'Made covering set for matrix multiplications'

allocate(occ_mat(7,7,bundle%n_prim,nspin))
if(flag_write_occ_mat) allocate(occ_mat_glob(7,7,ni_in_cell,nspin))
if(flag_DFTplusU) then
allocate(occ_mat(7,7,bundle%n_prim,nspin))
occ_mat = zero
if(flag_write_occ_mat) then
allocate(occ_mat_glob(7,7,ni_in_cell,nspin))
occ_mat_glob = zero
end if
end if
! Create all of the indexing required to perform matrix multiplications
! at a later point. This routine also identifies all the density
! matrix range interactions and hamiltonian range interactions
Expand Down
11 changes: 10 additions & 1 deletion src/move_atoms.module.f90
Original file line number Diff line number Diff line change
Expand Up @@ -3661,7 +3661,10 @@ subroutine update_H(fixed_potential)
flag_SFcoeffReuse, flag_diagonalisation, &
ne_spin_in_cell, &
ne_in_cell, spin_factor, &
ni_in_cell, area_moveatoms
ni_in_cell, area_moveatoms, &
flag_write_occ_mat, occ_mat, &
flag_DFTplusU
use primary_module, only: bundle
use density_module, only: set_atomic_density, &
density, set_density_pcc, &
get_electronic_density
Expand All @@ -3685,6 +3688,12 @@ subroutine update_H(fixed_potential)
integer :: spin_SF, spin, stat

call start_timer(tmr_l_tmp1,WITH_LEVEL)
! Update DFT+U occupation matrix
if(flag_DFTplusU) then
deallocate(occ_mat)
allocate(occ_mat(7,7,bundle%n_prim,nspin))
occ_mat = zero
end if
! (0) Pseudopotentials: choose correct form
select case (pseudo_type)
case (OLDPS)
Expand Down
2 changes: 1 addition & 1 deletion src/pao2blip.f90
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ subroutine blips_in_star(inode,ionode,sym_type,&
scal_prod_sym(n) = scal_prod(m)/coeff(n)
end do
if((inode == ionode).and.(iprint_basis >= 4)) then
write(unit=io_lun,fmt='(/6x" symmetric scalar product:"/)')
write(unit=io_lun,fmt='(/6x," symmetric scalar product:"/)')
do n = 1, n_star_in_sphere
write(unit=io_lun,fmt='(6x,3x,i5,3x,e15.6)') n, scal_prod_sym(n)
end do
Expand Down
Loading