Free energy along a reaction coordinate I've come into this issue when trying to understand biased sampling methods, in particular, umbrella sampling, but I think the question is more general.
A recurring argument is that, along a reaction coordinate $s$ the free energy can be calculated as $A(s) = kT \ln P(s)$, where $P(s)$ is the probability of the reaction coordinate having the value $s$. See, for example here.
I'm having trouble understanding the above relation. Assuming a system with discrete microstates, I would write the free energy of the system as $A_{full} = -kT \ln Z$ with $Z = \sum_i \exp(-E_i/kT)$.
 The probability of $s$ can be written as $P(s) =  Z_s / Z$ where $Z_s = \sum_{s_i} \exp(-E_{s_i}/kT)$. Here the summation goes through the states $s_i$ compatible with $s$. 
The free energy at fixed $s$ is then $A(s) = -kT \ln Z_s$. If I go by the previous expression, however, I get $A(s) = kT \ln P(s) = kT \ln Z_s - kT \ln Z$. The sign thus doesn't match and there is an extra $A_{full}=-kT \ln Z$ term. Am I missing something, doing something wrong or $A(s)$ is supposed to be, in fact the free energy difference compared to the full system? If the latter, why is the sign reversed?
 A: I agree with you. The material in the link you gave seems to be presented in a confusing way. In almost all the standard treatments that I have seen, the free energy as a function of reaction coordinate is defined
$$
A(s) = -k_BT\ln P(s)
$$
and $P(s)$ may be expressed as a ratio of constrained and unconstrained partition functions
$$
P(s) = \bigl\langle \delta(s-s(q))\bigr\rangle =
\frac{\int dq \, \delta(s-s(q)) \exp(-E(q)/k_BT)}{\int dq \, \exp(-E(q)/k_BT)} = \frac{Z(s)}{Z} .
$$
Here, by $q$ I just mean all the coordinates of particles in the system, and $s(q)$ is the reaction coordinate expressed as a function of these coordinates; $\delta(\ldots)$ is the Dirac delta function. This is a very similar formula to yours, just written for a continuum of variables rather than a sum over states.
When you take logs you get
$$
-k_BT \ln P(s) = -k_BT \ln Z(s) + k_BT\ln Z = A(s) - A_\text{full}
$$
The free energy $A_\text{full}$ is just a constant here; we are mainly interested in $A(s)$. Higher probability density $P(s)$ is associated with lower free energy $A(s)$.
I'm not sure why they write it the way they do. It may be a simple mistake. Some confusion can get introduced when a "biasing potential" is introduced to "cancel out" the natural variation of $P(s)$, and produce a biased distribution $P'(s)$ which is flatter. Maybe that's the reason.

EDIT following OP comment.
The delta function turns the integral in the numerator into an integration over the "shell" in configuration space (or phase space) which satisfies the constraint $s(q)=s$, where $s$ is the argument of the function $P(s)$. The result is a probability density (per unit $s$). Afterwards, if you integrate $P(s)$ with respect to $s$, you will get $1$: it is normalized, by construction.
If you prefer, you can replace the delta function by a narrow rectangle function of width $\delta s$, and height $1/\delta s$. This enables you to make the connection with a probability histogram, tabulated in fixed-width bins, as one does in an actual simulation. The right-hand side then becomes the probability of finding the system with $s$ in a narrow range $s\ldots s+\delta s$ (divided by a factor of $1/\delta s$), rather than a probability density.  Some care is needed with this factor of $1/\delta s$, but the calculation is fairly straightforward.
