# System is distroted on applying dc electric filed

**URL:** <https://gromacs.bioexcel.eu/t/system-is-distroted-on-applying-dc-electric-filed/12029>\
**Category:** User discussions\
**Created:** [May 3, 2025, 11:57am UTC](https://gromacs.bioexcel.eu/t/system-is-distroted-on-applying-dc-electric-filed/12029 "2025-05-03T11:57:19Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![aish.warya\_2024](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@aish.warya\_2024](https://gromacs.bioexcel.eu/u/aish.warya_2024)\
**Post date:** [May 3, 2025, 11:57am UTC](https://gromacs.bioexcel.eu/t/system-is-distroted-on-applying-dc-electric-filed/12029/1 "2025-05-03T11:57:20Z")

</div>

GROMACS version:  
GROMACS modification: Yes/No  
Here post your question  
Dear users,  
I am applying an electric field of 1.5 V/nm along the Z-axis to a system with a liquid-liquid interface. The system has the interface aligned perpendicular to the **Z-axis** , but after the MD simulation, the interface becomes aligned parallel to the Z-axis. md.mdp is :  
title = OPLS Lysozyme NPT equilibration  
; Run parameters  
integrator = md ; leap-frog integrator  
nsteps = 100000000 ; 2 \* 500000 = 1000 ps (1 ns)  
dt = 0.001 ; 2 fs  
; Output control  
nstxout = 0 ; suppress bulky .trr file by specifying  
nstvout = 0 ; 0 for output frequency of nstxout,  
nstfout = 0 ; nstvout, and nstfout  
nstenergy = 10000 ; save energies every 10.0 ps  
nstlog = 10000 ; update log file every 10.0 ps  
nstxout-compressed = 10000 ; save compressed coordinates every 10.0 ps  
compressed-x-grps = System ; save the whole system  
; Bond parameters  
continuation = no ; Restarting after NPT  
constraint\_algorithm = lincs ; holonomic constraints  
constraints = h-bonds ; bonds involving H are constrained  
lincs\_iter = 1 ; accuracy of LINCS  
lincs\_order = 4 ; also related to accuracy  
; Neighborsearching  
cutoff-scheme = Verlet ; Buffered neighbor searching  
ns\_type = grid ; search neighboring grid cells  
nstlist = 10 ; 20 fs, largely irrelevant with Verlet scheme  
rcoulomb = 1.0 ; short-range electrostatic cutoff (in nm)  
rvdw = 1.0 ; short-range van der Waals cutoff (in nm)  
; Electrostatics  
coulombtype = PME ; Particle Mesh Ewald for long-range electrostatics  
pme\_order = 4 ; cubic interpolation  
fourierspacing = 0.16 ; grid spacing for FFT  
electric-field-z = 1.5 0 0 0  
; Temperature coupling is on  
tcoupl = nose-hoover ; modified Berendsen thermostat  
tc-grps = system ; two coupling groups - more accurate  
tau\_t = 0.1 ; time constant, in ps  
ref\_t = 300 ; reference temperature, one for each group, in K  
; Pressure coupling is on  
pcoupl = Parrinello-Rahman ; Pressure coupling on in NPT  
pcoupltype = isotropic ; Apply pressure coupling separately in X-Y and Z  
tau\_p = 5.0 ; time constant, in ps  
ref\_p = 1.0 ; reference pressure, in bar  
compressibility = 4.5e-5 ; isothermal compressibility of water, bar^-1  
; Periodic boundary conditions  
pbc = xyz ; 3-D PBC  
; Dispersion correction  
DispCorr = EnerPres ; account for cut-off vdW scheme  
; Velocity generation  
gen\_vel = yes ; Velocity generation is off

 ![Screenshot (333)](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/8/87ddb364c6dfbf2babbe6110569f090b626a3202.png)  
 ![Screenshot (332)](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/a/aaf9bcf6a396dfaf89eb87981d90c9a0f3bddf95.png)

Are there any modification needed in the mdp file? Could anyone help with the issue?

Thank you

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [May 6, 2025, 2:35pm UTC](https://gromacs.bioexcel.eu/t/system-is-distroted-on-applying-dc-electric-filed/12029/2 "2025-05-06T14:35:17Z")

</div>

With a liquid system, the electric field in enhanced by a factor of the dieletric permittivity when using PME with epsilon-surface=infinity. You need the scale down the applied field by the dielectric permittivity. Alternatively you can set epsilon-surface=1, but that will suppress the fluctuation of the dipole of the system by the same factor.

Still you might see get the conformation you see. If the gain in electrostatic energy is higher than the cost of the extra interface area, that is the lowest free-energy state.

PS: Your have a too coarse PME grid. You should use fourier-spacing=0.125 with a cut-off 1 and pme-order=4.

---

<div class="post-metadata">

**Author:** ![aish.warya\_2024](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@aish.warya\_2024](https://gromacs.bioexcel.eu/u/aish.warya_2024)\
**Post date:** [May 7, 2025, 5:24am UTC](https://gromacs.bioexcel.eu/t/system-is-distroted-on-applying-dc-electric-filed/12029/3 "2025-05-07T05:24:07Z")

</div>

> [@hess](#):
>
> Alternatively you can set epsilon-surface=1, but that will suppress the fluctuation of the dipole of the system by the same factor.

Dear @hess  
Thank you for your response. I will follow your suggestion.

I have one more concern: do we need to add any electrodes to the system manually, or will the simulation automatically assign the positive and negative electrodes? In several papers, I have seen references to the movement of positive and negative electrodes, but the figures do not explicitly show any added electrodes.

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [May 7, 2025, 6:17am UTC](https://gromacs.bioexcel.eu/t/system-is-distroted-on-applying-dc-electric-filed/12029/4 "2025-05-07T06:17:54Z")

</div>

Using electrodes is a completely different way of applying an electric fields. I think you need to do some background reading.

---

<div class="post-metadata">

**Author:** ![aish.warya\_2024](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@aish.warya\_2024](https://gromacs.bioexcel.eu/u/aish.warya_2024)\
**Post date:** [May 7, 2025, 9:52am UTC](https://gromacs.bioexcel.eu/t/system-is-distroted-on-applying-dc-electric-filed/12029/5 "2025-05-07T09:52:29Z")

</div>

okay sir. I will try this. Thank you

---

<div class="post-metadata">

**Author:** ![aish.warya\_2024](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@aish.warya\_2024](https://gromacs.bioexcel.eu/u/aish.warya_2024)\
**Post date:** [June 7, 2025, 3:57am UTC](https://gromacs.bioexcel.eu/t/system-is-distroted-on-applying-dc-electric-filed/12029/6 "2025-06-07T03:57:51Z")

</div>

Dear @hess,

Thank you again for your previous guidance regarding distortion upon applying an electric field.

As a follow-up, I am now studying the effect of an electric field on polymer chains at a liquid–liquid (oil–water) interface. The system consists of multiple polymer chains in the organic phase and counterions in the aqueous phase, with graphene electrodes at the top and bottom of the box (along the z-axis) (inorder to hinder the transfer of polymer cation from one organic phase to the other I used graphene sheets). I applied a field of 1.5 V/nm in the z-direction.

The simulations done in two ways:

1. NVT → NPT → MD, all with the electric field.
2. NVT → NPT without EF, then MD with EF.

In both cases, I observed no significant change in polymer conformation or alignment due to the field. However, some polymer chains, which were initially randomly distributed in the organic phase before simulation, are now partially adsorbed near the graphene electrodes after applying the field.

Could this indicate an issue with the force field, system size, or field strength? I’d appreciate any suggestions on how to improve the setup to better observe field-induced effects.

This is the mdp file I used:  
title = OPLS Lysozyme NPT equilibration  
; Run parameters  
integrator = md ; leap-frog integra  
define =-DPOSRES  
nsteps = 200000000 ; 2 \* 500000 = 1000 ps (1 ns)  
dt = 0.001 ; 2 fs  
; Output control  
nstxout = 0 ; suppress bulky .trr file by specifying  
nstvout = 0 ; 0 for output frequency of nstxout,  
nstfout = 0 ; nstvout, and nstfout  
nstenergy = 10000 ; save energies every 10.0 ps  
nstlog = 10000 ; update log file every 10.0 ps  
nstxout-compressed = 10000 ; save compressed coordinates every 10.0 ps  
compressed-x-grps = System ; save the whole system  
; Bond parameters  
continuation = no ; Restarting after NPT  
constraint\_algorithm = lincs ; holonomic constraints  
constraints = h-bonds ; bonds involving H are constrained  
lincs\_iter = 1 ; accuracy of LINCS  
lincs\_order = 4 ; also related to accuracy  
comm-mode = linear  
comm-grps = System  
; Neighborsearching  
cutoff-scheme = Verlet ; Buffered neighbor searching  
ns\_type = grid ; search neighboring grid cells  
nstlist = 10 ; 20 fs, largely irrelevant with Verlet scheme  
rcoulomb = 1.0 ; short-range electrostatic cutoff (in nm)  
rvdw = 1.0 ; short-range van der Waals cutoff (in nm)  
; Electrostatics  
coulombtype = PME ; Particle Mesh Ewald for long-range electrostatics  
ewald-geometry = 3dc  
pme\_order = 4 ; cubic interpolation  
fourierspacing = 0.16 ; grid spacing for FFT  
electric-field-z = 1.5 0 0 0  
; Temperature coupling is on  
tcoupl = nose-hoover ; modified Berendsen thermostat  
tc-grps = system ; two coupling groups - more accurate  
tau\_t = 0.1 ; time constant, in ps  
ref\_t = 300 ; reference temperature, one for each group, in K  
; Pressure coupling is on  
pcoupl = Parrinello-Rahman ; Pressure coupling on in NPT  
pcoupltype = isotropic ; Apply pressure coupling separately in X-Y and Z  
tau\_p = 5.0 ; time constant, in ps  
ref\_p = 1.0 ; reference pressure, in bar  
compressibility = 4.5e-5 ; isothermal compressibility of water, bar^-1  
; Periodic boundary conditions  
pbc = xyz ; 3-D PBC  
; Dispersion correction  
DispCorr = EnerPres ; account for cut-off vdW scheme  
; Velocity generation  
gen\_vel = yes ; Velocity generation is off  
periodic\_molecules = yes  
freezegrps = RNA  
freezedim = Y Y Y  
Output configuration is attached below:

Thank you for your time and help.

 ![Screenshot (446)](https://europe1.discourse-cdn.com/flex017/uploads/bioexcel1/original/2X/3/3d8ad0e2e181ef623fd1f2e8848187e956a70fa2.jpeg)

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [June 10, 2025, 8:59am UTC](https://gromacs.bioexcel.eu/t/system-is-distroted-on-applying-dc-electric-filed/12029/7 "2025-06-10T08:59:11Z")

</div>

If the polymers are charged, you would expect them the move along the field.

If you actually have two surfaces, you can also use charges to set up the field.

---

<div class="post-metadata">

**Author:** ![aish.warya\_2024](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@aish.warya\_2024](https://gromacs.bioexcel.eu/u/aish.warya_2024)\
**Post date:** [June 10, 2025, 11:18am UTC](https://gromacs.bioexcel.eu/t/system-is-distroted-on-applying-dc-electric-filed/12029/8 "2025-06-10T11:18:25Z")

</div>

Dear @hess

Thank you for your valuable response.

As you suggested, instead of using the `electric-field-z` option, I would like to try creating an electric field by setting charges on two surfaces in my system.

Could you please advise on how to correctly assign and maintain the surface charges in GROMACS? Specifically:

Should I modify the atomic charges of the graphene sheet atoms directly in the topology?

Your insights would be greatly appreciated.

Best regards,

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [June 10, 2025, 12:19pm UTC](https://gromacs.bioexcel.eu/t/system-is-distroted-on-applying-dc-electric-filed/12029/9 "2025-06-10T12:19:49Z")

</div>

The simplest way would be to evenly distribute the wanted charge over all carbon atoms in the interface.

---

<div class="post-metadata">

**Author:** ![aish.warya\_2024](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@aish.warya\_2024](https://gromacs.bioexcel.eu/u/aish.warya_2024)\
**Post date:** [June 10, 2025, 12:23pm UTC](https://gromacs.bioexcel.eu/t/system-is-distroted-on-applying-dc-electric-filed/12029/10 "2025-06-10T12:23:30Z")

</div>

Okay Sir, Thank you. I will try this

---

<div class="post-metadata">

**Author:** ![Rahamatolla](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@Rahamatolla](https://gromacs.bioexcel.eu/u/Rahamatolla)\
**Post date:** [June 11, 2025, 3:32am UTC](https://gromacs.bioexcel.eu/t/system-is-distroted-on-applying-dc-electric-filed/12029/11 "2025-06-11T03:32:46Z")

</div>

If i use. Itp file of graphene for adding charge, is this the right way?

---

<div class="post-metadata">

**Author:** ![hess](https://dub1.discourse-cdn.com/flex017/user_avatar/gromacs.bioexcel.eu/hess/32/416_2.png) [@hess](https://gromacs.bioexcel.eu/u/hess)\
**Post date:** [June 11, 2025, 12:02pm UTC](https://gromacs.bioexcel.eu/t/system-is-distroted-on-applying-dc-electric-filed/12029/12 "2025-06-11T12:02:18Z")

</div>

Yes, you need to change the charges of the atoms in the moleculetype. Or in the atomtypes section if you don’t specify them in the moleculetype.

---

<div class="post-metadata">

**Author:** ![Rahamatolla](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@Rahamatolla](https://gromacs.bioexcel.eu/u/Rahamatolla)\
**Post date:** [June 11, 2025, 12:18pm UTC](https://gromacs.bioexcel.eu/t/system-is-distroted-on-applying-dc-electric-filed/12029/13 "2025-06-11T12:18:09Z")

</div>

Thanks

---

<div class="post-metadata">

**Author:** ![aish.warya\_2024](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@aish.warya\_2024](https://gromacs.bioexcel.eu/u/aish.warya_2024)\
**Post date:** [June 13, 2025, 7:58am UTC](https://gromacs.bioexcel.eu/t/system-is-distroted-on-applying-dc-electric-filed/12029/14 "2025-06-13T07:58:25Z")

</div>

Okay.. Thank you dear @hess
