loading_rate = float(spring_constant * velocity)
rho = kB * temperature / unfolding_distance
alpha = rho * log(loading_rate / (unfolding_rate * rho))
- w = 0.1 * rho # calculate bin width (in force)
+ w = 0.2 * rho # calculate bin width (in force)
force_mean = alpha - gamma_e * rho
theory = Histogram()
theory.bin_edges = arange(start=0, stop=max(force_mean,0)+3*rho, step=w)
sim_alpha = params[0]
sim_rho = abs(params[1])
for s,t,n in [(sim_alpha, alpha, 'alpha'), (sim_rho, rho, 'rho')]:
- assert (s - t)/w < 2, (
+ assert (s - t)/w < 3, (
'simulation %s = %g != %g = %s (bin width = %g)' % (n,s,t,n,w))
return sim.residual(theory)