Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
b17b2b1
BUGFIX: improper scaling of internuc energy. also bad init conds for …
npagane Aug 13, 2020
ce48195
Merge branch 'master' of https://github.com/riscalab/wlcsim
npagane Aug 13, 2020
3bde9ec
BUGFIX add padding for neighbor bins search
npagane Aug 18, 2020
49e5abb
BUGFIX widended bin_size for neighbor bins
npagane Aug 22, 2020
9cf0407
BUGFIX fractional interpolate now does not break but still not center
npagane Aug 27, 2020
49da41d
CODE restructure wlcsim module to allow for multifibers
npagane Sep 4, 2020
411f2cb
CODE add nucleosome orientation analysis code
npagane Sep 4, 2020
f83b88f
CODE update initialization of orientation distances to nan
npagane Sep 8, 2020
1c65542
CODE change quartic to quadratic in internuc
npagane Sep 21, 2020
014aa96
Merge branch 'master' of https://github.com/riscalab/wlcsim
npagane Sep 21, 2020
8142e7e
CODE: add nucleosome wrap functionality
npagane Sep 26, 2020
4d67425
pushing temp defines file for ease, will change soon
npagane Sep 26, 2020
b2d54cb
CODE nucleosome wrap still does not work, but cleaned up code. scale …
npagane Oct 13, 2020
1d4201f
BUGFIX fix nuc slide and breathe MC moves. need to update defines fil…
npagane Oct 28, 2020
46777d5
DOC pushing current defines file to runs sims. will change soon
npagane Oct 28, 2020
18e45fb
CODE fixed viz code, shoudl allow fractional bases now
npagane Nov 2, 2020
b75503d
BUGFIX wrong index in viz code
npagane Nov 2, 2020
d6f8725
adapt for 0 index of nucleosome wrap
npagane Nov 25, 2020
c9988dd
Merge remote-tracking branch 'upstream/master'
npagane Feb 24, 2021
253ef01
BUGFIX update ricc break code and some general code structure
npagane Feb 24, 2021
8f93a89
CODE update defines files
npagane Feb 24, 2021
007c1a0
CODE update fine movie code
npagane Feb 24, 2021
3045b48
CODE define interuc energy parameter from defines file
npagane Feb 24, 2021
b72168e
CODE initalize with random LL dist and transpose discretization saving
npagane Feb 24, 2021
3f93760
CODE set defines parameter for nucleosome wrapping
npagane Feb 24, 2021
800c5a1
Generating jupyter notebook to perform bd simulation on rouse polymer
Mar 10, 2021
fa04319
bd code for wlc polymer simulation
Mar 10, 2021
53798e9
Merge branch 'SpakowitzLab:master' into master
npagane May 21, 2021
f5d2802
CODE update internucleosome default scaling
npagane May 21, 2021
fadfcb9
BUGFIX remove 0 ends for interpolation, need to fix better
npagane May 21, 2021
8555563
CODE add FLD/FLFE calc into MCsim
npagane May 21, 2021
6b21eb1
DOC add warnings to nucleosome slide + breath MC moves
npagane May 21, 2021
e34877e
BUGFIX remove hardcode for wrapping
npagane May 21, 2021
e8c0884
MCsim.py editted for user specific use. ABC are the initials of user
arianabrenner Mar 11, 2022
7eb4870
added nucleosome_indices variable to each snapshot. Created when inte…
arianabrenner Mar 11, 2022
eb48490
End-to-end autocorrelation functions added
arianabrenner Jul 9, 2022
1c49fe1
Previously commented out getNucCenterPositions removed
arianabrenner Jul 9, 2022
cb725c8
autocorrelation plot function plot_auto_corr() added
arianabrenner Sep 8, 2022
189d9e0
adding functionality to illustrate nucleosomes and linker DNA in diff…
arianabrenner Dec 8, 2022
f061906
added function to color nucleosomes and linker DNA differently
arianabrenner Dec 13, 2022
ac550ab
saveFineGrainedPDB() altered to export PDB with names to distinguish …
arianabrenner Dec 13, 2022
e72bb95
Added WLC_P__GJK_NUC_ONLY to turn DNA sterics off while maintaining n…
arianabrenner Mar 23, 2023
a512070
Added else if statement that skips DNA sterics when WLC_P__GJK_NUC_ON…
arianabrenner Mar 23, 2023
64236a7
made vars more dynamic
arianabrenner May 13, 2023
6906b33
minor edits
arianabrenner Sep 6, 2023
0d3587a
incorporated changes to run coarse movies using interactive script
arianabrenner Sep 7, 2023
d638263
option to put only nucleosome sterics on
arianabrenner Sep 7, 2023
6ca3e9e
corrected dist. between base pairs in defines file
arianabrenner Sep 7, 2023
5b8db6c
recentered nucleosomes
arianabrenner Sep 10, 2023
7ec0cdc
before adding alpha for mononucleosomes
arianabrenner Oct 12, 2023
bbaf815
functional alpha calculation
arianabrenner Oct 12, 2023
9ab12b6
corrected rounding error that yielded many 0.0 alpha angles
arianabrenner Oct 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
780 changes: 530 additions & 250 deletions analysis/MCsim.py

Large diffs are not rendered by default.

1,270 changes: 1,270 additions & 0 deletions analysis/MCsim_ABC_edits.py

Large diffs are not rendered by default.

700 changes: 700 additions & 0 deletions analysis/RICC-BJ-2017_genome-norm.txt

Large diffs are not rendered by default.

264 changes: 264 additions & 0 deletions analysis/brownian_dynamics/00_Brownian_Dynamics_of_Rouse_Polymer.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Create Brownian Dyanmics Simulation of a Rouse Polymer"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"import seaborn as sns\n",
"import numba\n",
"import matplotlib.pyplot as plt\n",
"import os"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"import wlcsim\n",
"from wlcsim.bd import rouse, homolog\n",
"from wlcsim.bd import runge_kutta"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"N = int(1e2+1)\n",
"L = 17.475\n",
"b = 0.015\n",
"D = 2e1\n",
"R = 1\n",
"dt = rouse.recommended_dt(N, L, b, D)\n",
"Aex = 0; # no confinement\n",
"N_tot, loop_list = homolog.points_to_loops_list(N, []) # no loops\n",
"# tether_list = np.array([]).astype(int) # no tethered loci"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"2.5196008663366337e-05"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"dt"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'/ru-auth/local/home/risc_soft/miniconda3/envs/bd2/lib/python3.7/site-packages/bruno_util/__init__.py'"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import bruno_util\n",
"bruno_util.__file__"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"Nhat = L/b; L0 = L/(N-1); Dhat = D*N/Nhat; bhat = np.sqrt(L0*b)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
"Nt = 1e6; # total number of equi-space time steps\n",
"Nlin = 1e4; # see docstring of loglinsample\n",
"t = np.arange(0, Nt*dt, dt) # take Nt time steps\n",
"from bruno_util import numpy as bnp\n",
"t_i, i_i = bnp.loglinsample(Nt, Nlin, 0.6)\n",
"t_save = t[t_i]"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(1000001,)"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"np.shape(t)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"i_i = [np.round(i).astype(int) for i in i_i] # numba workaround"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {},
"outputs": [],
"source": [
"#Run Simulation with with_integrator\n",
"# x = rouse.with_integrator(runge_kutta.srk1/runge_kutta.lena4)\n",
"bead_coords= rouse.with_integrator(N, L, b, D, t, integrator = runge_kutta.rk4_thermal_lena)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Note the dimensions of `bead_coords` are `len(t)` by `N`(number of beads) by 3 (x,y,z). `bead_coord` contains the x,y,z-coordinates for each of the 101 beads at each timestep "
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"(1000001, 101, 3)"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"bead_coords.shape"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Save bead_coord in your local directory:"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [],
"source": [
"local_directory = '/ru-auth/local/home/abrenner/myscratch/bd/bead_coords/'\n",
"file_name = '2021_03_09_rouse_rk4lena.npy'"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"/rugpfs/fs0/risc_lab/scratch/abrenner/bd/bead_coords\n"
]
}
],
"source": [
"cd $local_directory"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Subset to the first 100 snapshots"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [],
"source": [
"subset_bead_coords = bead_coords[:100,:,:]"
]
},
{
"cell_type": "code",
"execution_count": 31,
"metadata": {},
"outputs": [],
"source": [
"np.save(file_name, subset_bead_coords)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Loading