Skip to content

Commit

Permalink
Initialize some variables for xtb/iff test (#1189)
Browse files Browse the repository at this point in the history
* Initialize er

Signed-off-by: Igor S. Gerasimov <[email protected]>

* Initialize sigma

Signed-off-by: Igor S. Gerasimov <[email protected]>

* Initialize dummy energy

Signed-off-by: Igor S. Gerasimov <[email protected]>

* Initialize arrays with zero

Signed-off-by: Igor S. Gerasimov <[email protected]>

---------

Signed-off-by: Igor S. Gerasimov <[email protected]>
  • Loading branch information
foxtran authored Feb 11, 2025
1 parent 40c757e commit c8c187c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/iff/iff_prepare.f90
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ subroutine precomp(env, iff_data, mol, etot, mol_num)

allocate (cn(mol%n), g(3, mol%n))

er = 0.0_wp

set%pr_lmo = .true.
set%silent = .true.

Expand Down
5 changes: 3 additions & 2 deletions src/local.f90
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,9 @@ subroutine local(nat,at,nbf,nao,ihomo,xyz,z,focc,s,p,cmo,eig,q,etot,gbsa,basis,r
qhl(1:nat,2)=0
endif

allocate(cca(nao*nao),xcen(n),lneigh(4,n),aneigh(2,n))
allocate(d(n,n),ecent(n,4),eiga(n),qcent(n,3),ecent2(n,4))
allocate(lneigh(4,n),aneigh(2,n), source=0)
allocate(cca(nao*nao),xcen(n), source=0.0_wp)
allocate(d(n,n),ecent(n,4),eiga(n),qcent(n,3),ecent2(n,4), source=0.0_wp)

! do only occ. ones
cca=0
Expand Down
2 changes: 2 additions & 0 deletions src/scf_module.F90
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ subroutine scf(env, mol, wfn, basis, pcem, xtbData, solvation, &
eat = 0.0_wp
egap = 0.0_wp
molpol = 0.0_wp
sigma = 0.0_wp

pr = prlevel.gt.1
minpr= prlevel.gt.0
Expand Down Expand Up @@ -764,6 +765,7 @@ subroutine scf(env, mol, wfn, basis, pcem, xtbData, solvation, &
call getCoordinationNumber(mol, trans, 40.0_wp, cnType%cov, &
& cn, dcndr, dcndL)
call latp%getLatticePoints(trans, 60.0_wp)
dum = 0.0_wp
call d4_gradient(mol, xtbData%dispersion%dispm, trans, &
& xtbData%dispersion%dpar, scD4%g_a, scD4%g_c, &
& scD4%wf, 60.0_wp, 40.0_wp, cn, dcndr, dcndL, wfn%q, &
Expand Down

0 comments on commit c8c187c

Please sign in to comment.