From: W. Trevor King Date: Sat, 15 Sep 2012 01:47:01 +0000 (-0400) Subject: posts:FRC: add reproduction of Livadaru's figure 14. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=42894519647394c9c6b5ffc2d114fdb456fe948c;p=blog.git posts:FRC: add reproduction of Livadaru's figure 14. --- diff --git a/posts/Comparing_velocity_clamp_experiments/figure-14.png b/posts/Comparing_velocity_clamp_experiments/figure-14.png new file mode 100644 index 0000000..001f2ed Binary files /dev/null and b/posts/Comparing_velocity_clamp_experiments/figure-14.png differ diff --git a/posts/Comparing_velocity_clamp_experiments/frc.py b/posts/Comparing_velocity_clamp_experiments/frc.py new file mode 100755 index 0000000..e476ec6 --- /dev/null +++ b/posts/Comparing_velocity_clamp_experiments/frc.py @@ -0,0 +1,55 @@ +#!/usr/bin/env python +# +# Copyright (C) 2012 W. Trevor King +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +"""Freely rotating chain (FRC) following Livadaru et al. [1]. + +[1]: http://pubs.acs.org/doi/abs/10.1021/ma020751g +""" + +import numpy as _numpy +import matplotlib.pyplot as _pyplot +try: # SciPy >= 0.10.0 + from scipy.constants import Boltzmann as _kB +except ImportError: # SciPy < 0.10.0 + from scipy.constants import Bolzmann as _kB + +from crunch import inverse_frc + + +def figure_14(): + figure = _pyplot.figure() + axes = figure.add_subplot(1, 1, 1) + axes.set_xscale('log') + axes.set_yscale('log') + axes.hold(True) + Fs = 10**_numpy.linspace(-4, 2.2, 100) + for gamma_degrees in [1, 5, 10, 20, 30, 50, 70]: + gamma = gamma_degrees * _numpy.pi / 180 + xs = _numpy.array([inverse_frc(F, gamma) for F in Fs]) + axes.plot(Fs, 1/(1-xs)) + axes.axis([Fs.min(), Fs.max(), 0.9, 500]) + axes.set_title('FRC force extension') + axes.set_xlabel(r'$\frac{fb}{k_B T}$') + axes.set_ylabel(r'$\left(1-\frac{R_z}{L}\right)^{-1}$') + figure.subplots_adjust(bottom=0.13) + return figure + + +if __name__ == '__main__': + figure = figure_14() + figure.savefig('figure-14.png') + #_pyplot.show() diff --git a/posts/FRC.mdwn_itex b/posts/FRC.mdwn_itex index c48c08e..4bd0e77 100644 --- a/posts/FRC.mdwn_itex +++ b/posts/FRC.mdwn_itex @@ -95,6 +95,16 @@ moves above $l/b$. For Puchner's revised numbers, this corresponds to assuming a temperature in the range of 300 K. +I've written an `inverse_frc` implementation in +[[crunch.py|Comparing_velocity_clamp_experiments/crunch.py]] for +[[comparing velocity clamp experiments]]. I test the implementation +with [[frc.py|Comparing_velocity_clamp_experiments/frc.py]] by +regenerating [Livadaru et al.'s figure 14][livadaru03]. + +[[!img Comparing_velocity_clamp_experiments/figure-14.png + alt="Inverse FRC test matching Livadaru et al.'s figure 14" + title="Inverse FRC test matching Livadaru et al.'s figure 14"]] + [carrionvazquez99]: http://dx.doi.org/10.1073/pnas.96.20.11288 [puchner08]: http://dx.doi.org/10.1529/biophysj.108.129999