You can always download EJS jar file. Double click to run it. then Click right mouse button, select "open EJS model"
to view how the EJS simulation was created.

I use particleSet to represent movement of charge particles. You need to set coordinate and velocity for those particles.