Applying electric field

3,266 views
Skip to first unread message
Assigned to gqhe...@gmail.com by me

aarondesk

unread,
Aug 11, 2010, 3:51:02 PM8/11/10
to cp2k
Hello,
I am trying to apply an external electrical field to a DFT
(quickstep) calculation but am not having success. Please excuse my
ignorance. I have tried with a simple test molecule - CO - that I want
to apply an electrical field in the z direction.

Below is my input (based off the regtest input).

Unfortunately I get the same output whether the EFIELD section is
present or not, which leads me to believe that no external field is
being applied. Can you tell me what I'm doing wrong?

Also, I have two other issues. The job crashes whenever START_STEP
is set to 0 ("On entry to DLASCL parameter number 4 had an illegal
value"), but 0 is the default value. Second, I don't quite understand
the units for the field intensity. Manual says W/cm2, but if I convert
this correctly, 5E15 W/cm2 = 3.77E11 V/angs which is huge. I just
want an external field near 0.5 V/angs.

Thank you,
Aaron


&FORCE_EVAL
METHOD Quickstep
&DFT
UKS
BASIS_SET_FILE_NAME ./GTH_BASIS_SETS_5-12-10
POTENTIAL_FILE_NAME ./GTH_POTENTIALS_5-12-10
WFN_RESTART_FILE_NAME x-RESTART.wfn
&MGRID
CUTOFF 300
&END MGRID
&QS
WF_INTERPOLATION ASPC
EXTRAPOLATION_ORDER 3
&END QS
&SCF
EPS_SCF 1.E-6
SCF_GUESS RESTART
MAX_SCF 400
&OT T
PRECONDITIONER FULL_SINGLE_INVERSE
MINIMIZER DIIS
LINESEARCH 3PNT
&END OT
&END SCF
&XC
&XC_FUNCTIONAL PBE
&END XC_FUNCTIONAL
&END XC
&PRINT
&END PRINT
&EFIELD
INTENSITY 5E15
POLARISATION 0 0 1
#WAVELENGTH 210
ENVELOP CONSTANT
&CONSTANT_ENV
START_STEP 1
END_STEP 20
&END
&END
&END DFT
&SUBSYS
&CELL
ABC 8.965 8.965 8.965
&END CELL
&COORD
SCALED F
C 0.0 0.0 0.0
O 0.0 0.0 1.13
&END COORD
&KIND O
BASIS_SET TZVP-MOLOPT-GTH
POTENTIAL GTH-PBE-q6
&END KIND
&KIND C
BASIS_SET TZVP-MOLOPT-GTH
POTENTIAL GTH-PBE-q4
&END KIND
&END SUBSYS
&END FORCE_EVAL
&GLOBAL
PROJECT CO
RUN_TYPE GEO_OPT
PRINT_LEVEL LOW
&END GLOBAL
&MOTION
&GEO_OPT
MAX_ITER 200
MAX_FORCE 0.0009725
OPTIMIZER BFGS
&END GEO_OPT

Hanning Chen

unread,
Aug 12, 2010, 12:07:44 AM8/12/10
to cp...@googlegroups.com
Hi,

  You seemed to optimize your molecule in the presence of an external electric field. Once the field is turned on, the system's Hamiltonian is time (or step) dependent. I am not sure how the "optimized structure" is defined.




--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To post to this group, send email to cp...@googlegroups.com.
To unsubscribe from this group, send email to cp2k+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cp2k?hl=en.


aarondesk

unread,
Aug 12, 2010, 7:54:55 AM8/12/10
to cp2k

I don't understand your comment. I believe it should be possible to
get an optimized structure in the presence of an electrical field.

flo

unread,
Aug 12, 2010, 8:20:36 AM8/12/10
to cp2k
There are two important points. At first Hanning Chen is right, the
current implementation uses a time dependent electric field.
Performing geometry optimizations, there is no time, therefore this
definition of the electric field is meaningless. The second problem
Hanning mentions is, that ionic structures don't have a minimum in
energy in electric fields (thats why they start to translate). A
neutral structure should be possible to optimize, but in the EFIELD
part, it was only implemented for dynamics as it was mainly meant to
be used in combination with TDDFT methods.

If you really want to try to optimize your structure in an electric
field, you should try to use the EXTERNAL_POTENTIAL. I haven't used
this feature yet, but from my understanding it should do what you
want.

A proper implementation of a static periodic field, which can be used
for MD and geometry optimizations is on my to do list, but I don't
know, when I will finish it.

regrads

Flo

Hanning Chen

unread,
Aug 12, 2010, 4:50:56 PM8/12/10
to cp...@googlegroups.com
Flo is right. The feature of "EXTERNAL_POTENTIAL" is actually what aarondesk needs. In the presence of a STATIC electric field, an optimized structure likely exits. On the other hand, "EFIELD" is primarily for time-dependent wavefunction propagation. Alternatively, since the step of "EFIELD" is always zero during a geometry optimization, one can set "START_STEP 0" to check the existence of the electric field. 

 



aarondesk

unread,
Aug 16, 2010, 10:43:35 AM8/16/10
to cp2k

Ah! Thank you. Ok, the form will be something like this (for a uniform
electrical field of +0.5 eV/angs along the Z direction), but I'm still
not sure how to interpret the FUNCTION keyword and if I'm getting this
right. Any ideas?

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

aarondesk

unread,
Aug 19, 2010, 7:48:48 AM8/19/10
to cp2k
That should be, I want to apply a field of +0.5 V/angs, but the units
of the function are eV/angs, or it looks like a force is being applied
rather than an electrical field. ???

Teodoro Laino

unread,
Aug 19, 2010, 7:56:27 AM8/19/10
to cp...@googlegroups.com
The final result must be in units of energy.
X,Y,Z (according the spatial dependence of your function) are intended
to be in bohr.
What are the units of the constants/parameters in your function in only
up to you (i.e. Z*A + X*B : A has units of energy/distance and B the
same [again X and Z are meant to be coordinates] - they can be
eV/Angstrom or kcalmol/bohr or whatever..).

Regards,
Teo

aarondesk

unread,
Aug 19, 2010, 9:20:33 AM8/19/10
to cp2k
Therein lies my confusion. Electrical fields are in units of V/angs
(or V/m), while eV/angs are units of force. What is the connection
between the two? Does EXTERNAL_POTENTIAL apply a real electrical
field, or simply an force on the atomic nuclei?

Thank you.

Teodoro Laino

unread,
Aug 19, 2010, 9:25:55 AM8/19/10
to cp...@googlegroups.com
as the name says "EXTERNAL_POTENTIAL" it sums to the Hamiltonian a
potential (i.e. energy term).
I don't see all this confusion. If I write the potential in this way:

V(x,y,z)= A*EXP(-b/Z)

A has units of energy
and b of distance (angstrom or bohr)

I don't see nowhere here either field units or potential units.

As I said before the net result must be an energy unit. that's all.
Teo

Teodoro Laino

unread,
Aug 19, 2010, 9:32:29 AM8/19/10
to cp...@googlegroups.com
to make it more clear: with EXTERNAL_POTENTIAL you specify a potential
V(x,y,z) which provide an energy term E defined
as : E = \int \rho(x,y,z) V(x,y,z) dx dy dz

where \rho is the total density.
this should put you in the condition to proceed with your dimensional
analysis.

Teo

Axel

unread,
Aug 19, 2010, 10:08:27 AM8/19/10
to cp2k


On Aug 19, 9:20 am, aarondesk <aarond...@gmail.com> wrote:
> Therein lies my confusion. Electrical fields are in units of V/angs
> (or V/m), while eV/angs are units of force. What is the connection
> between the two? Does EXTERNAL_POTENTIAL apply a real electrical

the charge? if you apply an electrical field the
resulting potential is field times charge, isn't it?

aarondesk

unread,
Aug 19, 2010, 11:45:03 AM8/19/10
to cp2k

Ok, I think I'm finally understanding. Atomic units make this a little
confusing since they seem to disappear. Thank you for your patience.

Assuming only functions of z, the electric field (F) is related to the
electric potential (V) by F = -dV/dz. F units = volts/angs. V units =
eV/charge. For atomic units, the charge units drop out (=1) so it
appears to disappear and you are left with only units of energy for V.

Thus for V = (a/b)*Z = (0.5 eV/angs-(atomic units charge)*Z we get F =
0.5 eV/angs-atomic units charge. The sign gets changed on V (not
shown) since electrons are negative charge.

Convert to SI units by:
F = (0.5 eV/angs-atomic units charge)*(1 atomic unit charge/1.6E-19
C)*(1.602E-19J/eV)*(V/(J/C)) = 0.5 V/angs.

Thus the field (not potential) felt by the molecule is 0.5 V/angs.

Hopefully my math is correct!

Nam Tran

unread,
Jul 3, 2020, 10:47:48 PM7/3/20
to cp...@googlegroups.com
Dear Teo and aarondesk,

Please help correct my understanding. If you defined a linear external potential like aarondesk's, it means you applied an external constant force on selected atoms ? (because F = -dV/dz is a constant)

Thanks

Arup Sarkar

unread,
Jul 18, 2024, 7:52:52 AM7/18/24
to cp2k
Hello everyone,

The above discussion regarding the application of the static electric field in geometry optimization, is really useful. I am also trying running similar calculation. I was wondering is there any way to find out in the output file? Like what amount of electric field it is applying during SCF or optimization?


Best regards,
Arup Sarkar
Postdoctoral Researcher
Max Planck Institute for Polymer Research
Reply all
Reply to author
Forward
0 new messages