[CP2K-user] [CP2K:21385] Re: Struggling to converge single atom calculation

Frederick Stein f.stein at hzdr.de
Thu Apr 17 14:44:46 UTC 2025


Dear Harry,
Yes, you need to use a mixed Coulomb-longranged potential (POTENTIAL 
[MIX_CL|MIX_CL_TRUNC]). CP2K provides only this combination to you. 
Alternatively, you can define two HF sections with separate interaction 
potentials, so one shortranged, one longranged and appropriate scaling 
factors. But this may increase the computational costs and memory demandy 
and not all features might be available in this case.
For the conversion between the mixed shortranged/longranged (sl) and mixed 
Coulomb/longranged (cl) potential, we have
("s" refers to the ratio of the shortranged potential, "l" for the ratio of 
the longranged and "c" for the ratio of the Coulomb potential (or truncated 
Coulomb in periodic systems).)
s_ls=c_cl
l_ls=c_cl+l_cl
Thus, we have
c_cl=s_ls
l_cl=l_ls-s_ls
If 0.678792 is the ratio of the short-ranged potential and the total 
longranged potential is 1, your provided amounts of Coulomb/longranged 
potential are correct.
A few remarks on the other parameters:
1. If you use a mixed interaction potential, I recommend to set FRACTION to 
1 to prevent accidentally incorrect interaction potentials. The final 
ratios of interaction potential are the ones provided by SCALE_* times 
FRACTION.
2. OMEGA is given by the functional.
3. EPS_SCHWARZ is chosen as low as necessary (for accuracy) and as high as 
possible (for performance). IIRC, the functionals of the wB97* were 
optimized with molecules and all-electron calculations and large basis 
sets. CP2K employs pseudopotentials. Thus, you will never obtain the same 
results anyways.
4. MIX_CL is for non-periodic systems (molecules in gas phase), 
MIX_CL_TRUNC is for periodic systems. TRUNC refers to a truncated Coulomb 
potential with the truncation radius given by CUTOFF_RADIUS. The scaling 
factor is SCALE_COULOMB for the Coulomb part of both interaction potentials.
5. If you want to switch to large systems, I recommend the application of 
the auxiliary density matrix method (ADMM, see 
https://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/AUXILIARY_DENSITY_MATRIX_METHOD.html) 
to accelerate the HF/hybrid calculations significantly. This requires you 
to choose an auxiliary basis set (BASIS AUX_FIT in the KIND section of each 
atom) for which you can try the ones in BASIS_ADMM* in CP2K's data 
directory.
HTH,
Frederick
Harry Richardson schrieb am Donnerstag, 17. April 2025 um 16:14:30 UTC+2:

> Hi Frederick, 
>
> Thank you so much for your support. I read the wb97X-D paper and came up 
> with the following settings for HF.    
>
>     &HF
>     FRACTION 0.22                ! From wB97X-D paper
>     &SCREENING
>       EPS_SCHWARZ 1.0E-10      ! affects convergence / accuracy? (choose 
> same as WB97X_2LP.sec)
>     &END SCREENING
>     &INTERACTION_POTENTIAL
>       POTENTIAL_TYPE TRUNCATED
>       CUTOFF_RADIUS 10.0           ! (didn't see mentioned in paper choose 
> same as WB97X_2LP.sec)
>       OMEGA 0.2                ! From wB97X-D paper
>     &END INTERACTION_POTENTIAL
>   &END HF
>
> With these settings the calculation has converged, the only thing i am not 
> sure about is if I need to scale the coulomb and longrange as is done 
> within WB97X_2TQZ.sec, do I need to use a mixed interaction potential? 
>
>           SCALE_COULOMB 0.678792
>           SCALE_LONGRANGE 0.321208
>
> the paper mentions:
> "one first defines long-range LR and short-range SR operators to partition 
> the Coulomb operator"
>
>  but i couldn't see exact values listed anywhere?
>
> Thanks again for all your help, I owe you a beer!
>
> On Thursday, April 17, 2025 at 12:42:02 PM UTC+1 Frederick Stein wrote:
>
>> Dear Harry,
>> Consider them an inspiration as wB97X-2 is a double-hybrid functional, 
>> i.e. it has an additional MP2 correlation contribution and requires a 
>> rather different amount of HF exchange. Read the paper defining wB97X (and 
>> potentially also wB97X-2) how to set up the parameters.
>> HTH,
>> Frederick
>>
>> Harry Richardson schrieb am Donnerstag, 17. April 2025 um 13:24:50 UTC+2:
>>
>>> Thank you very much for your response Frederick, 
>>>
>>> I see there are some xc_sections that use the omega97X-D functional, 
>>> Do you think either:
>>> WB97X_2LP.sec 
>>> <https://github.com/cp2k/cp2k/blob/master/data/xc_section/WB97X_2LP.sec> 
>>> or WB97X_2TQZ.sec 
>>> <https://github.com/cp2k/cp2k/blob/master/data/xc_section/WB97X_2TQZ.sec>
>>> may be suitable, or would it be better to define it myself. 
>>>
>>>
>>> Thanks again 
>>> Harry 
>>> On Thursday, April 17, 2025 at 12:04:05 PM UTC+1 Frederick Stein wrote:
>>>
>>>> Dear Harry,
>>>> You have to setup a suitable HF section (see 
>>>> https://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/XC/HF.html). 
>>>> CP2K will not do it by itself except of an available shortcut as stated in 
>>>> the manual (see 
>>>> https://manual.cp2k.org/trunk/CP2K_INPUT/FORCE_EVAL/DFT/XC/XC_FUNCTIONAL.html). 
>>>> Compare the already available xc_sections in the CP2K data directory (
>>>> https://github.com/cp2k/cp2k/tree/master/data/xc_section) for their 
>>>> setup.
>>>> Best,
>>>> Frederick
>>>>
>>>> Harry Richardson schrieb am Donnerstag, 17. April 2025 um 11:15:16 
>>>> UTC+2:
>>>>
>>>>> i have been suggested to use multiplicity 3, I have tried and does not 
>>>>> affect convergence, please see attached. 
>>>>>
>>>>> On Thursday, April 17, 2025 at 9:36:10 AM UTC+1 Harry Richardson wrote:
>>>>>
>>>>>> Hi all, I am pretty new to DFT and trying to run some single atom (C) 
>>>>>> DFT to use as a subtraction when fine tuning a machine learned force field 
>>>>>> for MD. As such it needs to be run at the same level of theory as my full 
>>>>>> system calculations. 
>>>>>>
>>>>>> I just need single point energies. 
>>>>>>
>>>>>> At the moment it is not converging, I have attached my input and 
>>>>>> output files, i am using the omega97X-D functional. 
>>>>>>
>>>>>> Some thing I have tried include: 
>>>>>>
>>>>>>    - Changing the box from periodic to non periodic
>>>>>>    - Reducing mixing
>>>>>>    - Increasing & decreasing the size of the box 
>>>>>>    - Changing multiplicity 
>>>>>>    - Reducing cutoff 
>>>>>>    
>>>>>> The energy change per step seems to reduce over steps but does not 
>>>>>> converge. 
>>>>>>
>>>>>> I am using the DZVP-MOLOPT basis set and GTH-PBE-q4 potential as 
>>>>>> suggested in here: https://www.cp2k.org/exercises:2018_uzh_cmest:faq 
>>>>>> potentially that is the issue? 
>>>>>>
>>>>>> Would appreciate any help you can provide 
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>

-- 
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+unsubscribe at googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cp2k/97810170-6090-4126-b59f-dbe65b57020fn%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20250417/37114a62/attachment.htm>


More information about the CP2K-user mailing list