I am simulating two graphene electrode–electrolyte systems using the constant-potential method (CPM). The electrode geometries and numbers of atoms differ among the systems:
Here, eleft and eright are the groups of electrode atoms whose charges are varied by the constant-potential solver. I use boundary p p f and an electrode-compatible long-range solver (pppm/electrode). In both cases, concentration of NaCl solution is 0.5m.
My question is whether this command imposes the same electrode-to-electrode potential difference in all systems, despite their different geometries, electrolyte compositions, and numbers of CPM atoms.
I would also appreciate recommendations for the best LAMMPS outputs to verify the achieved electrode potentials and the total charge on each electrode. Thank you.
Yes, fix electrode/conp is designed to dynamically updating charges such that:
all charges within each electrode group have the same electrostatic potential;
the potential differences between electrode group charges are the values you specify in the input.
Of course, what that does to the rest of your system is not fix electrode/conp’s responsibility. For example, the electric field near a flat plane conductor is uniform and perpendicular to the plane, while the electric field near a cylindrical conductor is radial and decreases as 1/r; the electric field between electrodes will differ depending on whether there is vacuum, a dielectric, or mobile charges between the electrodes.
To compute the electric potential throughout your system, the easiest method is to obtain the time-averaged charge density distribution (for example with fix ave/chunk and a per-atom charge variable) and then invert Poisson’s equation to obtain the potential. This is not something LAMMPS currently has inbuilt support for; once I have more coding resources I hope to be able to work on this.