You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When nwxc functional is used and range-separated functionals are specified, NWChem cannot recognize user-defined cam parameters.
Describe settings used
OS: Manjaro Linux 24.2.1
NWCHEM_MODULES="smallqm nwxc"
To Reproduce
Prepare the following input file:
start H2O
geometry units angstrom
O 0.00000000 0.00000000 0.11726921
H 0.75698224 0.00000000 -0.46907685
H -0.75698224 0.00000000 -0.46907685
end
basis spherical
* library cc-pvdz
end
dft
xc xcampbe96 1.0 cpbe96 1.0 HFexch 1.0
cam 0.30 cam_alpha 0.25 cam_beta 0.75
iterations 100
end
task dft energy
and run. Next, prepare another input file that is the same as above except that the dft block above is replaced with
set dft:gonwxc .true.
dft
xc new xcampbe96 1.0 cpbe96 1.0 #HFexch 1.0
cam 0.30 cam_alpha 0.25 cam_beta 0.75
iterations 100
end
This will trigger NWChem to use nwxc functionals. If you compare the output, they produce different results.
Note that it is not because of the commented-out hfexch keyword in the later input file. In fact, you need to ignore this keyword when nwxc is used to produce the same result as the old XC functional library. This undesired behavior appears to be caused by nwxc inability to allow user-defined cam parameters---it only allows the pre-defined set of cam parameters. In the output of the job above using nwxc, go to "Range-Separation Parameters" section, and you will see that the listed values of the cam parameters are different than what are specified in the input
Now, try running this input file with a different functional:
start H2O
geometry units angstrom
O 0.00000000 0.00000000 0.11726921
H 0.75698224 0.00000000 -0.46907685
H -0.75698224 0.00000000 -0.46907685
end
basis spherical
* library cc-pvdz
end
dft
xc xcamb88 1.00 lyp 0.81 vwn_5 0.19 hfexch 1.00
cam 0.33 cam_alpha 0.19 cam_beta 0.46
iterations 100
end
task dft energy
then rerun using the nwxc version of the functional, namely, with the dft section replaced with
set dft:gonwxc .true.
dft
xc new xcamb88 1.00 lyp 0.81 vwn_5 0.19 #hfexch 1.00
cam 0.33 cam_alpha 0.19 cam_beta 0.46
iterations 100
end
You will see that this time the two XC libraries produce the same results. This is most likely because the specified combination of functionals and cam parameters belongs to a pre-defined set (I took those values from NWChem user manual).
I have the fix in my repo branch https://github.com/iswhy/nwchem/tree/fix_nwxc in case some reference might be helpful. I am sorry though for the loads of changes, they are mostly due to the files that are not git-tracked in the upstream but are git-tracked in my repo. (like some compile-time-generated *.fh files) The actual debugger modifications are found in src/nwdft/input_dft/dft_input.F and src/nwxc/nwxc/nwxc_nwchem.F.
PS: At the moment I consider the need of the hfexch to be absent when nwxc is used as a feature instead of a bug. If it is a bug, however, it would be independent from the one currently addressed.
The text was updated successfully, but these errors were encountered:
@edoapra, thanks for your response.
Does that mean that the development of the nwxc module has stopped?
Despite the bugs, looking at the codes, the library looks extensive enough to be removed from the development line.
Mind telling us why it was developed to such an extent in the first place?
Describe the bug
When nwxc functional is used and range-separated functionals are specified, NWChem cannot recognize user-defined cam parameters.
Describe settings used
OS: Manjaro Linux 24.2.1
NWCHEM_MODULES="smallqm nwxc"
To Reproduce
Prepare the following input file:
and run. Next, prepare another input file that is the same as above except that the
dft
block above is replaced withThis will trigger NWChem to use nwxc functionals. If you compare the output, they produce different results.
Note that it is not because of the commented-out
hfexch
keyword in the later input file. In fact, you need to ignore this keyword when nwxc is used to produce the same result as the old XC functional library. This undesired behavior appears to be caused by nwxc inability to allow user-defined cam parameters---it only allows the pre-defined set of cam parameters. In the output of the job above using nwxc, go to "Range-Separation Parameters" section, and you will see that the listed values of the cam parameters are different than what are specified in the inputNow, try running this input file with a different functional:
then rerun using the nwxc version of the functional, namely, with the
dft
section replaced withYou will see that this time the two XC libraries produce the same results. This is most likely because the specified combination of functionals and cam parameters belongs to a pre-defined set (I took those values from NWChem user manual).
I have the fix in my repo branch https://github.com/iswhy/nwchem/tree/fix_nwxc in case some reference might be helpful. I am sorry though for the loads of changes, they are mostly due to the files that are not git-tracked in the upstream but are git-tracked in my repo. (like some compile-time-generated
*.fh
files) The actual debugger modifications are found insrc/nwdft/input_dft/dft_input.F
andsrc/nwxc/nwxc/nwxc_nwchem.F
.PS: At the moment I consider the need of the hfexch to be absent when nwxc is used as a feature instead of a bug. If it is a bug, however, it would be independent from the one currently addressed.
The text was updated successfully, but these errors were encountered: