16
16
& cetobfr, tau, dttau, kske, Mmat, Mmat2,
17
17
& ldbw, fact, dtype, nconstr) ! Qin
19
c $Id: dftg_gridv0b.F,v 1.39 2008-08-14 06:31:58 niri Exp $
19
c $Id: dftg_gridv0b.F 21003 2011-08-18 18:00:55Z d3y133 $
22
22
#include "errquit.fh"
285
295
if (do_force) then
288
298
if (.not. MA_Push_Get(MT_Dbl, nqpts*mbf_ao*ipol,
289
299
& 'gradchi_ao2', l_ccdel,i_ccdel))call errquit
290
300
& (' exit dftggridv0b: insuff stack',9, 0)
293
if (odftps) call pstat_on(ps_qv0b)
294
call dftg_quadv0_b(ictr_buf, ldew, AO_bas_han, ipol,
295
& grad, kske, nbf_ao, mbf_ao, natoms,
297
& dbl_mb(ichi_ao), dbl_mb(idelchi_ao ),
298
& dbl_mb(iheschi_ao), Amat, Cmat, Mmat,
300
& ibf_ao, iniz, ifin, cetobfr,
302
& zzz, hh, iga_dens, force,
304
if (odftps) call pstat_off(ps_qv0b)
303
if (odftps) call pstat_on(ps_qv0b)
304
call dftg_quadv0_b(ictr_buf, ldew, AO_bas_han, ipol,
305
& grad, kske, nbf_ao, mbf_ao, natoms,
307
& dbl_mb(ichi_ao),dbl_mb(idelchi_ao),
308
& dbl_mb(iheschi_ao),Amat,Cmat,Mmat,
310
& ibf_ao, iniz, ifin, cetobfr,
312
& zzz, hh, iga_dens, force,
314
if (odftps) call pstat_off(ps_qv0b)
306
316
if (.not.ma_pop_stack(l_ccdel))
307
& call errquit('dftggv0b: pop stack ',1,0)
317
& call errquit('dftggv0b: pop stack ',1,0)
310
320
else if (do_hess) then
318
328
if (.not.MA_push_get(MT_DBL, ipol*nqpts*3,
319
329
& 'Acof2', l_Acof2, k_Acof2)) call
320
330
& errquit('dftg_gridv0b: cannot allocate Acof2',1,
323
333
if (.not.MA_push_get(MT_DBL, ipol*9*nqpts, 'CCof2',
324
334
& l_Ccof2, k_Ccof2)) call
325
335
& errquit('dftg_gridv0b: cant alloc Ccof2',1,
329
339
if (.not.MA_push_get(MT_DBL, ipol*3*nqpts, 'MCof2',
330
340
& l_Mcof2, k_Mcof2)) call
331
341
& errquit('dftg_gridv0b: cant alloc Mcof2',1,
335
345
call xc_d2expl(tol_rho,