Command to change load during simulation

Hello friends,
I am currently simulating a lithium-ion battery and I have encountered a problem. I am unsure of how to change the charge of the lithium ions in the anode and cathode. As lithium in the electrolyte carries a positive charge, it must undergo a charge change when it enters the anode. I am attempting to address this issue using a command in the simulation. Any advice or suggestions would be greatly appreciated.

The first advice for questions like this is always to thoroughly search the published literature and see if somebody has done something similar to what you want to do and then figure out what software was used and what methodology.

I am not an expert in this kind of research, so I can only guess, but I would expect you would need to write a custom fix style in C++ to perform the required changes during the simulation. If you are using long-range electrostatics, you will also have to make certain to maintain the whole system in a neutral state to avoid errors from long-range Coulomb. Perhaps the implementation of the fix charge/regulation command — LAMMPS documentation can be an inspiration.