how to work with more that 25000 point charges.


Click here for full thread
Just Got Here
Dear all,
I have to calculate a big system with about 40500 point charges using
the BQ FORCE directives.

NWChem is limited up to 25000 point charges, then I've changed the
max_nbq parameter on the $NWCHEM_TOP/src/bq/bq_input.F file and I've recompiled:

     max_nbq = 40500  ! default number
if (.not. rtdb_get(rtdb, 'bq:max_nbq', mt_int, 1, max_nbq))
$ max_nbq = 40500

With that change I've been able to run and obtain the Total energy of the calculation.
However, when it starts the gradient calculation I got the following error:

HF1D:  Insufficient scratch space.
needed 29099692
allocated 20000000
ALPHAp: 1
IPAIRp: 73
Ep  : 145
R0  : 9865
IJK  : 10585
R0C  : 10649
P  : 29096489
RS  : 29096597
PC  : 29096633
ff  : 29096741
Rj  : 29096813
------------------------------------------------------------------------
HF1D: Insufficient scratch space. -9099692
------------------------------------------------------------------------
------------------------------------------------------------------------
current input line :
40436: task dft gradient
------------------------------------------------------------------------
------------------------------------------------------------------------
This error has not yet been assigned to a category

I've tried several MEMORY directives using more memory but the text
"allocated 20000000" does not change. Attached you will found a simplified
input for this calculations (where many atoms and many bq point charges
have been deleted)

There is another code modification that has to be done ?
How can I solve this memory problem ?

Thanks for your help,


==NW INPUT ======
restart cu_f
memory total 1800 stack 400 heap 400 global 1000 mb
title cu_f
charge 4
GEOMETRY units angstroms print xyz autosym NOCENTER
SYMMETRY GROUP C1
O.BS1 33.438761650000004 35.300672950000006 39.38018720000001
O.BS1 34.88113495 35.68724615000001 40.85625840000001
CU.BS2 32.81214645 36.62260675000001 38.58060900000001
C.BS1 34.39896095 34.82646985000001 40.06481190000001
CU.BS2 35.24123325000001 37.21644055000001 41.470752000000005
H.BS1 33.72508235000001 32.809952550000006 40.41081510000001
...
...
...
H.BS1 35.34229098077928 32.99076812326108 40.7317751174629
H.BS1 29.22456449510626 38.359039448824404 37.0962182310083
END

BQ
FORCE
44.53566105 33.99067935000001 45.101969200000006 0.0
43.096241649999996 29.328776850000008 42.07119610000001 0.0
...
...
...
62.31138564999999 66.21294265 41.178433500000004 -0.834334299859232
38.98610275 4.106547850000007 42.66010370000001 0.41683285007038395
37.743266750000004 3.324788750000007 43.02779430000001 0.41683285007038395
38.107527149999996 4.2099676500000065 43.02567330000001 -0.834334299859232
46.88687164999999 53.74347725 46.1992409 0.41683285007038395
END

BASIS
C library 6-31G
S library 6-31G
H library 6-31G
O library 6-31G
N library 6-31G
Cu library lanl2dz_ecp
Ca library lanl2dz_ecp
END

ecp
Cu library lanl2dz_ecp
Ca library lanl2dz_ecp
end

scf
thresh 1e-8
semidirect memsize 2000000000 filesize 0
end

dft
xc b3lyp
iterations 150
direct
odft
mult 2
mulliken
grid medium
convergence energy 1e-8
convergence gradient 1e-6
end

task dft gradient