We propose and test a family of methods to calculate the free energy along a generalized coordinate, , based on computing the force acting on this coordinate. First, we derive a formula that connects the free energy in unconstrained simulations with the force of constraint that can be readily calculated numerically. Then, we consider two methods, which improve the efficiency of the free energy calculation by yielding uniform or nearly uniform sampling of . Both rely on modifying the force acting on . In one method, this force is replaced by a force with zero mean and is advanced quasistatically. In the second method, the force is augmented adaptively by a biasing force. We provide formulas for calculating the free energy of the unmodified system from the forces acting in these modified, non-Hamiltonian systems. Using conformational transitions in 1,2-dichloroethane as a test case, we show that both methods perform very well.