Increasingly, society requires high power, high energy storage devices for applications ranging from electric vehicles to buffers on the electric grid. Supercapacitors are a promising contribution to meeting these demands, though there still remain unsolved practical problems. Molecular dynamics simulations can shed light on the relevant molecular level processes in electric double layer capacitors, but these simulations are computationally very demanding. Our focus here is on the algorithmic complexity of the constant potential method (CPM), which uses dedicated electrostatics solvers to maintain a fixed potential difference between two conducting electrodes. We show how any standard electrostatics solver-capable of calculating the energies and forces on all atoms-can be used to implement CPM with a minimum of coding. As an example, we compare our generalized implementation of CPM, based on invocations of the particle-particle-particle-mesh routine of the Large-scale Atomic/Molecular Massively Parallel Simulator, with a traditional implementation based on a dedicated re-implementation of Ewald summation. Both methods yield comparable results on four test systems, with the former achieving a substantial gain in speed and improved scalability. The step from dedicated electrostatic solvers to generic routines is made possible by noting that CPM's traditional narrow Gaussian point-spread of atomic charges on the electrodes effectively endows point-like atoms with chemical hardness, i.e., an intra-atomic energy quadratic in the charge.