MEDYAN.FilamentMechParams

Union{}

FilamentMechParams(; kwargs...)

Mechanical parameters shared by all filaments of a type.

Elastic constants are specified at the monomer scale. With n = numpercylinder and a = spacing, a full cylinder has rest length L0 = n*a; mechanics uses klength/n, kangle/n, and ktwist/n. Keep these monomer-scale constants fixed when changing cylinder resolution.

The bending parameter is named kangle. Its continuum bending rigidity is EI = kangle*spacing (pN·nm²). For a three-dimensional wormlike chain, the bending persistence length is

lp = EI/(kB*T) = kangle*spacing/(kB*T)
kangle = kB*T*lp/spacing

Here lp and spacing are in nm and kB*T is in pN·nm. For example, at 310 K, spacing = 2.7 and kangle = 16_000 give lp ≈ 10_093 nm (10.1 μm).

The NaN and -1 defaults are placeholders, not a complete physical parameter set. Supply geometry, elastic and collision constants, cylinder size, and the tip limit. Leave twist_per_monomer = NaN to disable twist; otherwise supply both twist_per_monomer and ktwist.

  • radius::Float64: Cylinder radius (nm), used for excluded-volume contact distances and filament geometry.
  • spacing::Float64: Axial rest-length increment per monomer (nm). A full cylinder spans numpercylinder*spacing.
  • klength::Float64: Monomer-scale stretching spring constant (pN/nm). A cylinder contributes E = (klength/numpercylinder)*(L-L0)^2/2, where L and L0 are its current and rest lengths. The corresponding axial rigidity is EA = klength*spacing (pN).
  • kangle::Float64: Monomer-scale bending constant (pN·nm/rad²). Each joint contributes E = (kangle/numpercylinder)*(1-cos(θ)), where θ = 0 is straight. For small bends this is (kangle/numpercylinder)*θ^2/2. Set kangle = kB*T*lp/spacing for the desired continuum bending persistence length lp.
  • ktwist::Float64: Monomer-scale torsional constant (pN·nm/rad²), used only when twist is enabled. For excess twist Δφ relative to the relaxed twist, a joint contributes E = 2*(ktwist/numpercylinder)*tan(Δφ/2)^2, approximately (ktwist/numpercylinder)*Δφ^2/2 near equilibrium. The continuum torsional rigidity is C = ktwist*spacing (pN·nm²).
  • twist_per_monomer::Float64: Signed relaxed rotation of the material direction per monomer (rad). The reference twist between neighboring cylinders is numpercylinder*twist_per_monomer. NaN disables twist degrees of freedom; 0 enables twist with an untwisted reference state.
  • direction_gamma::Float64: Monomer-scale rotational drag coefficient (pN·nm·s) of the material direction about the filament axis, used only when twist is enabled. baoab! uses it, minimize_energy! brownian dynamics doesn’t apply drag or random forces to material directions. A cylinder of length L gets (L/spacing)*direction_gamma, so a full cylinder gets numpercylinder*direction_gamma. L is the rest length of the cylinder, plus radius for each end cap on end cylinders. End cylinder rest lengths are measured to the tips, including the tip extensions. NaN (default) uses 4π*viscosity*radius^2*spacing, the drag of a long cylinder rotating about its axis.
  • numpercylinder::Int32: Number of monomers represented by a full cylinder; must be positive. Controls mechanical discretization and the division of the monomer-scale elastic constants. End cylinders can be shorter.
  • kcollide::Float64: Excluded-volume repulsion stiffness (pN/nm) supplied to the collision model. Larger values penalize overlap more strongly. This is separate from stretching stiffness and is not divided by numpercylinder.
  • collision_layers::UInt32: Bitmask of collision layers occupied by this filament type; default UInt32(1) selects the first layer. Multiple bits may be set.
  • no_collide_mask::UInt32: Bitmask of layers this filament type ignores. A pair is excluded if either object’s mask intersects the other’s layers. Default UInt32(0) excludes no layers.
  • max_num_unmin_end::Int32: Maximum number of newly added, mechanically unminimized monomers allowed at each tip. Tip reactions that would exceed this limit are disabled until mechanical relaxation. Choose a nonnegative limit smaller than (radius + minimum_other_filament_radius)/spacing so unrelaxed growth remains shorter than the filament contact distance.