# ActinRingsMC

## README

`ActinRingsMC`

— Module**Actin rings Monte Carlo simulation package**

A Julia simulation package with functions for running adaptive umbrella sampling Monte Carlo simulations of crosslinked actin rings.

This package implements the simulation protocol outlined in the Supplemental Material of Ref. 1.

**Installation**

The package can be installed by starting the Julia REPL, typing `]`

to enter package mode, and running

`add ActinRingsMC`

to install from the General registry, or by running

`add https://github.com/cumberworth/ActinRingsMC.jl`

to install directly from the development repository.

**Running a simulation**

In `examples`

directory of the repository is a script for umbrella sampling. It has both an initial run and a continuation run. The commands can be run in the Julia REPL, or, when in the same directory as the script, it can be run with

`julia run-umbrella-sampling.jl`

To achieve good sampling, one should experiment with the number of steps per iteration and the number of iterations.

**Analysis and visualization**

The simulations output two data file types per simulation, or in the case of an umbrella sampling run, per iteration. The file type with an `.ops`

extension contains order parameters saved at steps determined by the write interval and can be read in as a dataframe for analysis and plotting. Currently the order parameters include the energy, lattice height, and ring radius. The file type with a `.vtf`

extension is able to be read by the molecular visualization program, VMD, such that the configurations of the simulations can be spatially visualized. When viewing in VMD, it is recommended to use "Chain" for "Coloring Method" and "VDW" for "Drawing Method". The simulations also output a file containing all the system and simulation parameters used in the run to a `.parms`

file.

Umbrella sampling runs output additional file types. The output of these file is based on every step, not only those determined by the write frequency. The top row gives the lattice height (or bin, although binning has not been tested). Each subsequent row contains data from an iteration. `.counts`

gives the number of times each lattice height was visited, `.freqs`

gives a normalized version of this. `.biases`

includes the biases that were used to for that iteration (in contrast to those that would be calculated from its data).

A related python package, actinrings, includes code for analyzing and plotting the output from these simulations, including free energies and ring constriction forces; see its documentation for details.

**References**

[1] A. Cumberworth and P. R. t. Wolde, Constriction of actin rings by passive crosslinkers.

**Links**

## API

`ActinRingsMC.Lattice`

— Method```
Lattice(height::Int64, max_height::Int64, min_height::Int64) -> Lattice
```

2D lattice with periodic conditions on y.

The max and min heights should be calculated based on the number of scaffold filaments and the length of the filaments.

`ActinRingsMC.SimulationParams`

— TypeSimulation parameters.

`iters::Int64`

Number of iterations for US

`steps::Int64`

MC steps for a run or single iteration

`max_bias_diff::Float64`

Maximum change in bias energy (kbT)

`write_interval::Int64`

Number of steps between writing to output files

`radius_move_freq::Float64`

Frequency of radius moves (the remainder are filament translation moves)

`filebase::String`

Output filebase (include filepath)

`analytical_biases::Bool`

Use analytical model to generation starting biases

`read_biases::Bool`

Read starting biases from file

`biases_filename::String`

File to read biases from

`restart_iter::Int64`

Iteration to to start on

`binwidth::Int64`

Width of bins for lattice height bias (set to 1 for no binning)

`ActinRingsMC.System`

— Method```
System(parms::SystemParams, filaments::Vector{ActinRingsMC.Filament}, radius::Float64) -> System
```

System data, including parameters and positions of filaments.

The given radius should be that corresponding to the lattice height used to create the lattice and the starting configuration of the filaments.

`ActinRingsMC.SystemParams`

— TypeSystem parameters.

`ks::Float64`

Dissociation constant for single crosslinker binding

`kd::Float64`

Dissociation constant for double crosslinker binding

`T::Float64`

Temperature (K)

`delta::Float64`

Lattice spacing (m)

`Xc::Float64`

Crosslinker concentration (M)

`EI::Float64`

Bending rigidity (N m^2)

`Lf::Float64`

Filament length (m)

`lf::Int64`

Binding sites per filament

`Nfil::Int64`

Total number of filaments

`Nsca::Int64`

Number of scaffold filaments

`ActinRingsMC.calc_Lf`

— Method```
calc_Lf(lf::Int64, delta::Float64) -> Float64
```

Calculate the length of a filament.

`ActinRingsMC.calc_lf`

— Method```
calc_lf(Lf::Float64, delta::Float64) -> Int64
```

Calculate the number of sites per filament.

`ActinRingsMC.calc_max_lattice_height`

— Method```
calc_max_lattice_height(Nsca::Int64, lf::Int64) -> Int64
```

Calculate the maximum allowable height of a lattice given Nsca.

`ActinRingsMC.calc_min_lattice_height`

— Method```
calc_min_lattice_height(Nsca::Int64, lf::Int64) -> Int64
```

Calculate the minimum allowable height of a lattice given Nsca.

`ActinRingsMC.calc_radius`

— Method```
calc_radius(delta::Float64, height::Int64) -> Float64
```

Calculate the radius of a ring for a given lattice height.

`ActinRingsMC.generate_starting_config`

— Method```
generate_starting_config(lattice::Lattice, Nfil::Int64, Nsca::Int64, lf::Int64, overlap::Int64) -> Vector{ActinRingsMC.Filament}
```

Generate a starting configuration with uniform overlaps.

The number of scaffold filament Nsca and the number of lattices lf must be even.

`ActinRingsMC.run!`

— Method```
run!(system::System, lattice::Lattice, simparms::SimulationParams, biases::ActinRingsMC.Biases, ops_file::IOStream, vtf_file::IOStream)
```

Run an MC simulation.

`ActinRingsMC.run!`

— Method```
run!(system::System, lattice::Lattice, simparms::SimulationParams)
```

Run an MC simulation.

`ActinRingsMC.run_us!`

— Method```
run_us!(system::System, lattice::Lattice, simparms::SimulationParams)
```

Run an umbrella sampling MC simulation.

`ActinRingsMC.update_occupancies!`

— Method```
update_occupancies!(filaments::Vector{ActinRingsMC.Filament}, lattice::Lattice)
```

Clear occupancies and fully update.