TOQ is an equal-arc-length, inverse equilibrium solver for the Grad-Shafranov equation originally written by Bob Miller of General Atomics.
run_toq is a Tcl/Tk script written by Scott Kruger of the Center for Plasma Theory and Computation, University of Wisconsin-Madison, based on work by Qian Peng of General Atomics.
There is no paper on TOQ specifically. Here are two references on magnetohydrodynamic equilibria: