Page 1 of 1

Running AIMD with electric field

Posted: Thu Jun 01, 2023 2:50 am
by xuyinan
Hello VASP team,

I am trying to run an AIMD simulation with an electric field using VASP, ASE, and vasp-interactive. I used the EFIELD_PEAD tag in INCAR (0, 0.01, 0), and please see the attached zip file (I ran 8 ionic steps to make sure that the zip file uploaded is below the size limit).

I have two main questions:
1) It seems that if I want to simulate a system with electric field applied, two approaches are possible. A: EFIELD_PEAD; B: IDIPOL & LDIPOL & EFIELD. What is the difference between the two? It seems that the approach B requires a vacuum and cannot be used in bulk/liquid simulations.
2) Is it ok to use ASE and vasp-interactive? The later one gave me a warning during the run: "UserWarning: Due to thread safety, deepcopy of the VaspInteractive calculator does not contain the reference to the VASP process". Could it possibly mean that the electric field may not be properly applied?

Thank you for reading this issue, and please let me know if further details are needed

Re: Running AIMD with electric field

Posted: Thu Jun 01, 2023 6:48 am
by martin.schlipf
xuyinan wrote: Thu Jun 01, 2023 2:50 am1) It seems that if I want to simulate a system with electric field applied, two approaches are possible. A: EFIELD_PEAD; B: IDIPOL & LDIPOL & EFIELD. What is the difference between the two? It seems that the approach B requires a vacuum and cannot be used in bulk/liquid simulations.
For your calculation, you should use EFIELD. This simulates a system under the influence of an external field. EFIELD_PEAD is used for finite difference calculations, when you want to compute dielectric responses. Please read the documentation of that INCAR tag for more details.
EDIT: This statement is incorrect, see below.
xuyinan wrote: Thu Jun 01, 2023 2:50 am2) Is it ok to use ASE and vasp-interactive? The later one gave me a warning during the run: "UserWarning: Due to thread safety, deepcopy of the VaspInteractive calculator does not contain the reference to the VASP process". Could it possibly mean that the electric field may not be properly applied?
This is an ASE warning and not related to VASP. It should not affect the results of the VASP run. You would need to ask the ASE team, whether it can have any other side effects.

Re: Running AIMD with electric field

Posted: Thu Jun 01, 2023 6:21 pm
by xuyinan
Hello martin.schlipf,

Thanks so much for the fast response. I am a further question: if I use EFIELD (with an appropriate IDIPOL value, as per vaspwiki), should I turn on LPIPOL for a liquid water system (not slab)? I am guessing that since the interaction of periodic repeated images are allowed in liquid water, "LDIPOL=.TRUE." may not be necessary.

Thank you.

Re: Running AIMD with electric field

Posted: Fri Jun 02, 2023 6:49 am
by martin.schlipf
Oh you want to calculate a liquid. I am not sure whether applying an electric field works in this case. An electric field leads to a potential gradient across the unit cell. Typically that gradient would be compensated by a step in the potential in the vacuum. However, if you want to calculate a liquid there is no vacuum region where that could happen, so I am not sure what you will get instead.
I will inquire if there is a way to run such calculations with VASP.

Re: Running AIMD with electric field

Posted: Tue Jun 06, 2023 7:07 am
by martin.schlipf
I need to revert my previous statement. For bulk systems or liquids, EFIELD_PEAD is the way to go. While it calculates the linear response to an electric field, the contribution of this electric field to the forces was actually implemented in VASP. However, note that this part of the code is not extensively tested so please, first run some consistency tests like whether the forces and the energy are consistent.