Code and data used for publication in Physical Review Research: "Theoretical models for tension-dependent DNA looping time", by Wout Laeremans and Wouter G. Ellenbroek.
The main LAMMPS file is main.lmp, which contains the code for a semiflexible chain polymer under tension and outputs the timestep at which a loop is formed (i.e., when the two outermost beads come within a capture distance
The files rxn_pre.data_template, rxn_post.data_template, and rxn.map are included to determine when a loop is formed. For this, we use the REACTER package and define a reaction when the two outermost beads come within the capture distance
Additionally, this reaction setup requires that the two outermost beads on each end of the polymer are of type 2 and 3 on the upper side, and type 3 and 2 on the lower side, as specified in the example file polymer50.data.
To enable output of the exact timestep when a loop forms, we slightly modified the LAMMPS source code. Specifically, we changed fix_bond_react.cpp as shown in this commit: https://github.com/wouterel/lammps/commit/314e9ca4e797eabb391b2d5b575cb6f5e259d4e0. With this modification, main.lmp prints the exact timestep at which a loop is formed.
Finally, the file main_sampling.lmp is provided to output the distance between the end beads every 1000 timesteps. This data was used to numerically extract the free energy profiles, as presented in the appendix of the publication.
For the MATLAB code, MATLAB R2023a was used. The first script comparison_experiment.m reproduces Fig. 2 in the article.
The second script 3_theories.m reproduces Fig. 3 in the article and requires the data for the timesteps of loop formation in the zip file data_WLC_3_theories.zip. In order for the code to run, the data should be extracted into a folder located in the same directory as the code and added to the main MATLAB path. The data files are named as follows: Nx_fy.txt, where x represents the value of
To reproduce Fig. 4 of the article, the script finite_size.m can be used. This requires the zip files data_finite_size.zip and data_WLC_3_theories.zip. The former contains loop formation timesteps in files named N22_fy_fse.txt, where y again denotes the force. For
The script zero_force_scaling.m reproduces Fig. 5 in the article and requires the data in data_zero_force_scaling.zip.
To reproduce Fig. 6, run the script diff_rc.m. The required data is in the folder diff_rc_data.zip, which should be extracted and added to the MATLAB path. This folder includes the same data for
The final figure in the manuscript (Fig. 7) can be generated using the script corrected_free_energy.m. Before running, load the following .mat files into the MATLAB workspace: final_F_r_N11_f0_with_fit.mat, final_F_r_N23_f0_3_with_fit.mat, final_F_r_N23_f0_6_with_fit.mat and final_F_r_N23_f0_with_fit.mat. The last three MAT-file objects contain the free energy data extracted from simulation and fitted curves, necessary to apply Eq. 23 in the manuscript and generate subfigure