Planar average potential along Z in &EXTERNAL_POTENTIAL

95 views
Skip to first unread message

xuan Garrett

unread,
Feb 26, 2025, 12:11:46 AMFeb 26
to cp2k
Dear cp2k,

I am trying to deal with the planar average potential under static electric field, which is realized by &EXTERNAL_POTENTIAL in &DFT section, and the dipole correction is switched on:
SURFACE_DIPOLE_CORRECTION T
SURF_DIP_DIR Z
&EXTERNAL_POTENTIAL
    FUNCTION (A/B)*Z
    VALUES [eV] 0.2 [angstrom] 1.0
    PARAMETERS A B
&END EXTERNAL_POTENTIAL 

However, by checking the hartree.cube in the field of 0.2 eV/Angstrom, the saw-tooth potential is not observable, while in VASP, the LOCPOT displays such saw-tooth potential. 

So, if there is the problem with such condition in CP2K? How to deal with this?
image.pngimage.png

Best regards,
Xuan

Quentin Pessemesse

unread,
Mar 2, 2025, 2:50:18 PMMar 2
to cp2k
I am not sure if this line is correct:
VALUES [eV] 0.2 [angstrom] 1.0
According to the manual, you should define units in another line with the keyword "UNITS eV angstrom". Maybe either or both of your values is not being read correctly.
Tell me if that works :)
Best,
Quentin

Ravi Kumar

unread,
Oct 24, 2025, 5:23:36 AM (5 days ago) Oct 24
to cp2k
Hi xuan Garrett,

I am also interested in applying a saw-tooth potential, as done in VASP, using CP2K and obtaining results similar to yours. 
Were you able to achieve the expected results with CP2K?

Best,
Ravi

xuan Garrett

unread,
Oct 24, 2025, 5:30:17 AM (5 days ago) Oct 24
to cp...@googlegroups.com
Hi,Ravi,
Yes,the problem is that the potential applied by efield is not written in V_hartree,but in &PRINT External_field cube. Then you should connect the two cubes to obtain the saw-tooth potential.
Best regards
Xuan

Ravi Kumar <ravikum...@gmail.com>于2025年10月24日 周五17:23写道:
--
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+uns...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cp2k/1778e6b9-240d-496e-9191-9b9f8f457979n%40googlegroups.com.

Ravi Kumar

unread,
Oct 24, 2025, 11:37:18 PM (5 days ago) Oct 24
to cp2k

Hi xuan Garrett,

Thanks a lot for the suggestion,  it works well now.

I have one more question for clarification:

&EXTERNAL_POTENTIAL
    FUNCTION (A/B)*Z
    VALUES [eV] 0.2 [angstrom] 1.0
    PARAMETERS A B
&END EXTERNAL_POTENTIAL

If I understand the notation correctly, the applied potential corresponds to 0.2 V/Å in the z-direction, right?

Best,
Ravi

xuan Garrett

unread,
Oct 25, 2025, 12:36:12 AM (5 days ago) Oct 25
to cp...@googlegroups.com
Hi,Ravi,
Yes,you got it. This example is also provided in the official website from cp2k,that is the summer school by Prof. Matt. You can check it.

Be aware that the direction of this static field is opposite to the traditional definition. 

Best regards,
Xuan

Ravi Kumar <ravikum...@gmail.com>于2025年10月25日 周六11:37写道:

Ravi Kumar

unread,
Oct 25, 2025, 1:28:01 AM (5 days ago) Oct 25
to cp...@googlegroups.com
Hi Xuan,

Thanks for the clarification.

Yes, I also noticed that. I used  VALUES [eV] -0.2 [angstrom] 1.0  in order to match with VASP/QE results.

Thank you very much for your kind help.

Best,
Ravi


xuan Garrett

unread,
Oct 25, 2025, 7:58:36 AM (4 days ago) Oct 25
to cp...@googlegroups.com
Hi Ravi,

I may think that this static field is applied to simulate the Electric-field for electrocatalytic peformance,as revealed by Prof. Jens K. Norskov. And,how to set this function in QE?via pw.x

Best regards,
Xuan


Ravi Kumar <ravikum...@gmail.com>于2025年10月25日 周六13:27写道:

Ravi Kumar

unread,
Oct 27, 2025, 9:30:10 PM (2 days ago) Oct 27
to cp...@googlegroups.com
Hi Xuan,

I am not a QE user, but I have QE input file tags applying the static field 

&control
calculation = 'scf'
prefix='C60onW100Lz6z01Ez001DC',
pseudo_dir = './',
outdir='./',
verbosity='high'
disk_io='low'
wf_collect=.true.
tefield = .true.
dipfield = .true.
/
&system
ibrav=  0,
nat=  140,
ntyp=   2,
A = 12.66088228,
ecutwfc =50.0,
ecutrho=475.0,
occupations='smearing',
smearing='m-p',
degauss=0.01
edir = 3,
emaxpos =0.80,
eopreg =0.90,
eamp = 0.009723452336177272
/
&electrons
   electron_maxstep = 400
   mixing_mode = 'plain'
   mixing_beta = 0.3
   conv_thr =  1.0d-8
/
CELL_PARAMETERS alat
 1.0  0.0  0.0
 0.0  1.0  0.0
 0.0  0.0  6.0
ATOMIC_SPECIES
 C   12.0107 C.pbe-n-kjpaw_psl.1.0.0.UPF
 W  183.84   W.pbe-spn-kjpaw_psl.1.0.0.UPF


Maybe this could be helpful for you. 

Best, 
Ravi

Reply all
Reply to author
Forward
0 new messages