Worm-like chain (O’Brien)
Usage examples and full code reference for
WormLikeChain2. For the underlying theory, see
Worm-like chain (O’Brien).
Quick start
from afrc.polymer_models.wlc2 import WormLikeChain2
# defaults: persistence length lp = 3.0 A, segment size aa_size = 3.8 A
model = WormLikeChain2('MASNDYTQQATQSYGAYPTQPGQGYSQQSSQPYG')
model.get_mean_end_to_end_distance()
model.get_root_mean_squared_end_to_end_distance()
model.get_mean_radius_of_gyration() # closed-form Rg (unique to this model)
r, p = model.get_end_to_end_distribution()
Vary the persistence length:
for lp in (2.0, 3.0, 4.0):
wlc = WormLikeChain2('MASNDYTQQATQSYG', lp=lp)
print(lp, wlc.get_mean_radius_of_gyration())
Note
WormLikeChain2 requires the sequence to be at least as long as the persistence length,
otherwise a WLC2Exception is raised.
See also the demo/demo_WormLikeChain2.ipynb notebook for a worked, plotted example.
Code reference
- class afrc.polymer_models.wlc2.WormLikeChain2(seq, p_of_r_resolution=0.05, lp=3.0, aa_size=3.8)
This class generates an object that returns polymer statistics consistent with the Worm-like chain model as implemented by O’Brien. Provides mean Re, mean Rg, and Re distribution.
[1] O’Brien, E. P., Morrison, G., Brooks, B. R., & Thirumalai, D. (2009). How accurate are polymer models in the analysis of Forster resonance energy transfer experiments on proteins? The Journal of Chemical Physics, 130(12), 124903.
- __init__(seq, p_of_r_resolution=0.05, lp=3.0, aa_size=3.8)
Method to create Polymer Object. Seq should be a valid upper-case amino acid sequence and p_of_r_resolution defines the resolution (in angstroms) to be used for distributions.
By default p_of_r_resolution is taken from the config.py file in the afrc package which defines the resolution at 0.05 A.
- Parameters:
seq (str) – Amino acid sequence (used only to calculate number of residues)
p_of_r_resolution (float) – Bin width for bulding probability distributions. In Angstroms.
lp (float) – Persistence length. We use a default of 3 but 4 is also used a lot in the literature.
aa_size (float) – Size of one amino acid (called ‘b’ in the literature). 3.8 is the generally acceptable value used.
- get_end_to_end_distribution()
Defines the end-to-end distribution based on the Worm-like chain (WLC) as defined by O’Brien et al.
This is a composition independent model for which the end-to-end distance depends solely on the number of amino acids. It is included here as an additional reference model.
- Returns:
A 2-pair tuple of numpy arrays where the first is the distance (in Angstroms) and the second array is the probability of that distance.
- Return type:
tuple of arrays
References
[1] O’Brien, E. P., Morrison, G., Brooks, B. R., & Thirumalai, D. (2009). How accurate are polymer models in the analysis of Forster resonance energy transfer experiments on proteins? The Journal of Chemical Physics, 130(12), 124903.
- get_mean_end_to_end_distance()
Returns the mean end-to-end distance (\(R_e\)). As calculated from the Worm-like chain (WLC) model as defined by O’brien et al.
Note, the mean here is calculated by integrating over P(r) vs r.
- Returns:
Value equal to the mean end-to-end distance distribution
- Return type:
float
- get_mean_radius_of_gyration()
Returns the mean radius of gyration (\(R_g\)) as defined by O’Brien et al in [1]. NOTE it doesn’t explicitly say it in the paper, but we’re assuming this is actually Rg^{2} so this returns the square root of the Rg defined in table 1 (WLC row).
[1] O’Brien, E. P., Morrison, G., Brooks, B. R., & Thirumalai, D. (2009). How accurate are polymer models in the analysis of Forster resonance energy transfer experiments on proteins? The Journal of Chemical Physics, 130(12), 124903.
- Returns:
Value equal to the mean radius of gyration.
- Return type:
float
- get_root_mean_squared_end_to_end_distance()
Returns the mean end-to-end distance (\(R_e\)). As calculated from the Worm-like chain (WLC) model as defined by O’brien et al.
Note mean here is calculated by taking the square root after integrating over P(r) vs r^2.
- Returns:
Value equal to the root-mean-squared end-to-end distance
- Return type:
float