The two files that I wrote to do the Monte Carlo simulations of potassium and chloride ions near a charged membrane are the module
defs.f90
of definitions and the main program
kcl.f90