Skip to main content

FreelyJointedChain

Struct FreelyJointedChain 

Source
pub struct FreelyJointedChain {
    pub n_segments: f64,
    pub kuhn_length: f64,
    pub temperature: f64,
}
Expand description

Freely Jointed Chain polymer model.

Models a polymer as N rigid segments of length b (Kuhn length), with free rotation about each joint.

Fields§

§n_segments: f64

Number of Kuhn segments

§kuhn_length: f64

Kuhn segment length [m]

§temperature: f64

Temperature [K]

Implementations§

Source§

impl FreelyJointedChain

Source

pub fn new(n_segments: f64, kuhn_length: f64, temperature: f64) -> Self

Create a new Freely Jointed Chain model.

§Arguments
  • n_segments - Number of Kuhn segments N
  • kuhn_length - Kuhn length b [m]
  • temperature - Temperature [K]
Source

pub fn mean_square_end_to_end(&self) -> f64

Mean square end-to-end distance: = N * b².

Source

pub fn rms_end_to_end(&self) -> f64

RMS end-to-end distance: ^(1/2) = b * sqrt(N).

Source

pub fn contour_length(&self) -> f64

Contour length: L_c = N * b.

Source

pub fn inverse_langevin(x: f64) -> f64

Inverse Langevin function approximation (Padé approximant).

L_inv(x) ≈ x * (3 - x²) / (1 - x²) for |x| < 1.

Source

pub fn force_extension(&self, extension: f64) -> f64

Force-extension relationship: F = (kT/b) * L_inv(R/L_c).

§Arguments
  • extension - End-to-end distance R [m], must be < contour length
Source

pub fn spring_constant(&self) -> f64

Entropic spring constant at small extensions: k = 3kT / (N*b²).

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.