Help with Constrained DFT geometry optimization

59 views
Skip to first unread message

Vishnu Raghuraman

unread,
Jul 29, 2025, 3:31:01 AM7/29/25
to cp2k
Dear all,

I am trying to do a Constrained DFT geometry relaxation for a semiconductor-dopant pair. The aim is to put constrain a positive charge on the semiconductor (+1 for e.g) and an equivalent negative charge on the dopant (-1) while keeping the overall system neutral. 
However, when the code reaches the CDFT part it crashes without specifying the error.

CDFT EXTERNAL SCF WAVEFUNCTION OPTIMIZATION

---------------------------------- CDFT --------------------------------------

Optimizing a density constraint in an external SCF loop

Type of constraint: Hirshfeld

Number of constraints: 2

Using fragment densities: F

Calculating atomic CDFT charges


*******************************************************************************

* ___ *

* / \ *

* [ABORT] *

* \___/ *

* | *

* O/| *

* /| | *

* / \ qs_scf_output.F:976 *

*******************************************************************************

Typically CP2k gives a very clear error message, but here there is nothing. I have attached my input file and the full output till the error. The system has 78 atoms, with the first 58 atoms being the semiconductor, and the remaining 20 being dopant. My CP2K version is 8.2, built using GCC 11.2.0 on the Purdue Anvil supercomputer.

I am new to constrained DFT and CP2k, so apologies if there are some very basic mistakes that I've missed. 

Thank you, I am immensely grateful for any help. 

Regards,
Vishnu Raghuraman
Postdoctoral Research Associate, Chemistry Department
University of Illinois at Urbana-Champaign
opt.in
opt.out

Marcella Iannuzzi

unread,
Jul 29, 2025, 6:01:34 AM7/29/25
to cp2k
Hallo 

One of the problem of your input seems to be that no optimiser has been indicated in the outer_scf section. 
Regards
Marcella

Vishnu Raghuraman

unread,
Jul 30, 2025, 3:38:58 AM7/30/25
to cp2k
Hi,

Thanks for the help, I thought if I didn't specify an optimizer the code would use some default settings. I specified the NEWTON_LS optimizer and that did solve that problem.
I'll update if there are any more problems encountered. Thanks for your help.

Regards,
Vishnu
Reply all
Reply to author
Forward
0 new messages