Skip to main content

AFRC logo

afrc

The Analytical Flory Random Coil — a sequence-specific reference model for unfolded and intrinsically disordered proteins.

PyPI version Supported Python versions Documentation status License: LGPL v3


Overview

afrc implements the Analytical Flory Random Coil (AFRC): a closed-form, sequence-specific polymer model that reports the dimensions a polypeptide would adopt if it behaved as an ideal chain in a theta solvent (apparent scaling exponent of 0.5, no finite-size effects). Given only an amino acid sequence, it returns a wide range of polymeric properties — instantly and without running any simulations.

The AFRC is intended as a reference (null) model, not a predictor of real dimensions. Real unfolded-state dimensions depend on sequence-encoded chain–chain and chain–solvent interactions that the AFRC deliberately omits. Its value is as a fixed, sequence-matched touchstone: deviations of a simulation or experiment from the AFRC directly report sequence-specific intramolecular interactions, and normalising to the AFRC lets chains of different length and composition be compared on a common footing.

Alongside the AFRC, the package ships a family of classic analytical polymer models that share a common interface, so the same sequence can be compared against several reference frames.

Installation

afrc requires Python 3.10 or later (tested through Python 3.14) and depends only on NumPy and SciPy.

pip install afrc

Quick start

from afrc import AnalyticalFRC

# create an AnalyticalFRC object from a sequence
P = AnalyticalFRC('MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDI')

# ensemble-average dimensions (Angstroms)
mean_rg  = P.get_mean_radius_of_gyration()
mean_e2e = P.get_mean_end_to_end_distance()
mean_rh  = P.get_mean_hydrodynamic_radius()

# full probability distributions, returned as (distances, probabilities)
rg_r,  rg_p  = P.get_radius_of_gyration_distribution()
re_r,  re_p  = P.get_end_to_end_distribution()

# distribution of the distance between two specific residues
d_r, d_p = P.get_interresidue_distance_distribution(4, 20)

# whole-chain maps
distance_map = P.get_distance_map()
contact_map  = P.get_contact_map(15.0)   # contact fractions at a 15 A threshold

Polymer models included

Every model takes an amino acid sequence and exposes a common interface (get_end_to_end_distribution, get_mean_end_to_end_distance, ...), so they can be swapped in and compared directly.

Model Import Description
Analytical Flory Random Coil from afrc import AnalyticalFRC Sequence-specific ideal (theta-state) chain; the reference null model.
Freely jointed chain from afrc.polymer_models.fjc import FreelyJointedChain Ideal chain with finite extensibility (non-Gaussian Kuhn–Grun).
Freely rotating chain from afrc.polymer_models.frc import FreelyRotatingChain Ideal chain with a tunable characteristic ratio (stiffness).
Worm-like chain (Zhou) from afrc.polymer_models.wlc import WormLikeChain Semiflexible chain parameterised by a persistence length.
Worm-like chain (O'Brien) from afrc.polymer_models.wlc2 import WormLikeChain2 Semiflexible chain; better large-chain stability, also gives Rg.
Self-avoiding walk from afrc.polymer_models.saw import SAW Good-solvent (excluded-volume) chain at a fixed scaling exponent.
nu-dependent SAW from afrc.polymer_models.nudep_saw import NuDepSAW Excluded-volume chain with a tunable Flory scaling exponent.

The full mathematical formalism, parameters, and usage examples for each model are in the documentation.

Google Colab

Use the AFRC (and the other polymer models) directly in a Google Colab notebook.

Documentation

Full documentation — including a theory section (formalism, parameters, references) and an application section (usage examples and code reference) for every model — is hosted at afrc.readthedocs.io. Worked, plotted examples for each model are in the demo/ directory.

Citation

If you use the AFRC in your work, please cite:

Alston, J. J., Ginell, G. M., Soranno, A., & Holehouse, A. S. (2023). The Analytical Flory Random Coil is a simple-to-use reference model for unfolded and disordered proteins. The Journal of Physical Chemistry B, 127(21), 4746–4760. https://doi.org/10.1021/acs.jpcb.3c01619

Help and contributing

If you find a bug or have a feature request, please open an issue on GitHub.

Authors

The AFRC was developed by Garrett Ginell, Jhullian Alston, and Alex Holehouse in the Holehouse Lab.

License

Distributed by the Holehouse Lab under the GNU Lesser General Public License (LGPL v3).

References

  • Alston, J. J., Ginell, G. M., Soranno, A., & Holehouse, A. S. (2023). The Analytical Flory Random Coil is a simple-to-use reference model for unfolded and disordered proteins. J. Phys. Chem. B, 127(21), 4746–4760.
  • Flory, P. J. (1969). Statistical Mechanics of Chain Molecules. Wiley-Interscience.
  • Mao, A. H., Lyle, N., & Pappu, R. V. (2013). Describing sequence–ensemble relationships for intrinsically disordered proteins. Biochemical Journal, 449(2), 307–318.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

afrc-0.4.2.tar.gz (43.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

afrc-0.4.2-py3-none-any.whl (56.2 kB view details)

Uploaded Python 3

File details

Details for the file afrc-0.4.2.tar.gz.

File metadata

  • Download URL: afrc-0.4.2.tar.gz
  • Upload date:
  • Size: 43.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for afrc-0.4.2.tar.gz
Algorithm Hash digest
SHA256 e800bda7e62ccdbc5dc581c717a1ea36a95821015c48535cd348803858859a8e
MD5 a179c66ba0ea52a26cabaa49c8259980
BLAKE2b-256 fc4adf55c37d7eeed661a81a2c1d4af09ea4460f1ca5749c3908359ef3009b90

See more details on using hashes here.

File details

Details for the file afrc-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: afrc-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 56.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for afrc-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4483621655c4ccfa3f61a33123d36da9a5963f9df18e01a09ca2e30fb3973ef9
MD5 6cab37f4e77649f48974f14398379d1e
BLAKE2b-256 e44438133d080a89087b3938e38ddea29cdc7f47fe2aa6cec033176f135d4194

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page