I am starting using LAMMPS/Electrode package to simulate a nano-porous electrode and calculate the capacity. I plan to run a Montecarlo simulation adding at each step a ion inside a suitable pore. The simulation box consists only of the electrode atoms and at the beginning is empty.
I have a doubt how to use the commands to keep the potential constant…how can I proceed and which fix or style I should use if I have one electrode only?

Thank you SRTEE for the answer, could you please mention any problems that could happen using only one electrode? For example I saw that introducing a charged particles inside the electrode makes the gaussian charges to be updated while the particle is moving, so it seems that the ELECTRODE package is working properly. I am using these commands:

boundary p p p
kspace_style ewald/electrode 1.0e-7
fix conp bot electrode/conp 0 1.979
fix ensembleFix solvent nve

I have a question about the examples in ELECTRODE. Why on each atom we define a non-zero charge ? Where these values come from? i.e. below in the file data.au-vac

If you’re using the matrix inversion method it doesn’t matter what the initial charges are. If you’re using any conjugate gradient method, if you provide a good initial guess for the charges, the calculation will converge to the correct charges more quickly.

I would recommend you read the literature on the topic and then ask any specific questions you may have. I can certainly give you my opinions but hey, I am just a stranger on the Internet . You should start with Celine Merlet’s papers – her 2012 “Can we model electrodes as constant charge surfaces?” is foundational to the modern field, and she has some very recent papers on nanoporosity and curvature of electrodes and how that relates to capacitance.