Maximum number of constraints in CDFT


Clicked A Few Times
Hi,

The default maximum number of constraints in CDFT is 10. Is it possible to increase it to some larger value by simply changing the max_constr? Thanks


Best,

JT

Forum Vet
You can update max_constr in file cdft.fh in src/nwdft/include . After updating you will need to rekompile the dft directory, i.e. in src nwdft do a make (with all the options you normally use to kompile). Then, follow this by a "make link" at src to build the binary.


Bert

Clicked A Few Times
thanks!

Clicked A Few Times
Hi bert,

I made the suggested changes and recompiled everything, but it did not work. I got error messages like " Numerical result out of range" and "Segmentation Violation error, status=: 11". Any further suggestions?

best

JT

Forum Vet
Hmmm, the change in the include file might not have triggered a remake of all the files that use this file. You may have to:

in src/nwdft do a "make clean"
in src/nwdft do a make
in src/ do a make link

If this doesn't help, I strongly recommend doing a "make clean" in src/ and rebuild NWChem.

Bert


Quote:Jtravers Jul 24th 3:00 pm
Hi bert,

I made the suggested changes and recompiled everything, but it did not work. I got error messages like " Numerical result out of range" and "Segmentation Violation error, status=: 11". Any further suggestions?

best

JT

Clicked A Few Times
Hi Bert,

I did rebuild everything as you suggested. It still did not work! I really did not find other parameters that control this.

Best,

JT

Forum Vet
Bug Fix
JT
Please edit line 454 of $NWCHEM_TOP/src/nwdft/scf_dft/dft_scf.F and change it from

        if (.not.MA_alloc_Get(MT_DBL,nfock*nconstr,

to

        if (.not.MA_alloc_Get(MT_DBL,max(nfock,nconstr)*nconstr,

Clicked A Few Times
Hi Edoapra,

Thank you for the suggestion. In dft_scf.F, both line 454 and line 457 contain
" if (.not.MA_alloc_Get(MT_DBL,nfock*nconstr, "

if I only change line 454 and recompile the code, it does not work. But if I change both, it seems the code is working (I will need to do a few tests). Please let me know if I am on the right track. thanks!

Best,

JT



Quote:Edoapra Jul 27th 9:56 pm
JT
Please edit line 454 of $NWCHEM_TOP/src/nwdft/scf_dft/dft_scf.F and change it from

        if (.not.MA_alloc_Get(MT_DBL,nfock*nconstr,

to

        if (.not.MA_alloc_Get(MT_DBL,max(nfock,nconstr)*nconstr,[/quote]

Forum Vet
457 is right line number
JT,
You spotted the right line to change. 457 is the right line and not 454.
Sorry for the wrong information.
Please let me know if this fixes your issue.
Cheers, Edo

Clicked A Few Times
Hi
Quote:Edoapra Jul 30th 3:59 pm
JT,
You spotted the right line to change. 457 is the right line and not 454.
Sorry for the wrong information.
Please let me know if this fixes your issue.
Cheers, Edo




Hi Edo

  Actually my tests showed that I have to change both lines (454 and 457) to make it work. Any further suggestions?

Best

JT


Forum >> NWChem's corner >> NWChem functionality