These programs (wham and wham-2d) implement the Weighted Histogram Analysis Method of Kumar, et al (``Multidimensional free-energy calculations using the weighted histogram analysis method'', J. Comput. Chem., 16:1339-1350, 1995). The code generally follows the notation used by Benoit Roux (``The calculation of the potential of mean force using computer simulations'', Comput. Phys. Comm., 91:275-282, 1995). Consult these papers for the theoretical background and justification for the method.
This code is available for download from my web page (http://membrane.urmc.rochester.edu/wham/). The code doesn't change all that often, but it's probably worth checking periodically. If you run into trouble using these programs, feel free to contact me (alan_grossfield@urmc.rochester.edu), and I'll try to help you. This code is available under the GPL and BSD licenses, as you prefer. The exception to this licensing is a set of routines from Numerical Recipes, which is not mine to give away.
If you use this code as part of an original piece of research, I'd appreciate a reference or acknowledgement, but it's not required (good thing too, since it'd be almost impossible to enforce). For that matter, just letting me know what you're using my code for would be nice, although again I don't insist upon it.
Suggestions and patches are welcome.