srtee / lammps-USER-CONP2

updated constant potential plugin for LAMMPS
GNU General Public License v3.0
35 stars 16 forks source link

Script for reverse potential of electrodes #32

Closed saffari101 closed 2 years ago

saffari101 commented 2 years ago

Hi Shern

I want to reverse the electrodes' potentials. If left electrode has -2 V and right electrode 2 V according to script below, what would be if I want to reverse it as left electrode to be 2 V and right electrode to be -2 V,

variable v equal 4.0
fix e eleleft conp 1 eleright 1.979 4 iter etypes 1 5 pppm ffield
fix efiled sol efield 0 0 $(-v_v/lz)

Also, since in ffiled we use p p p boundary, how much gap distance is required to put in the end of simulation box in z direction, right behind the electrodes, in order to halt the interactions of ions and electrodes with image atoms from the z direction in the next periodic simulation box?

Bests,

srtee commented 2 years ago

Hi saffari101,

You would just use -4 instead of 4.

With the finite field method no gap is needed. You should be able to reuse the data file from the slab method without change. See the relevant Dufils paper cited in the main description -- no gap is introduced, which makes the method far more efficient.

saffari101 commented 2 years ago

thanks a lot for your help dear Shern!