MultiMM 1.0.5__tar.gz → 1.0.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {multimm-1.0.5 → multimm-1.0.7}/MultiMM.egg-info/PKG-INFO +34 -11
- {multimm-1.0.5 → multimm-1.0.7}/PKG-INFO +34 -11
- {multimm-1.0.5 → multimm-1.0.7}/README.md +33 -10
- {multimm-1.0.5 → multimm-1.0.7}/setup.py +1 -1
- {multimm-1.0.5 → multimm-1.0.7}/simulation/__init__.py +1 -1
- {multimm-1.0.5 → multimm-1.0.7}/simulation/initial_structure_tools.py +90 -28
- {multimm-1.0.5 → multimm-1.0.7}/simulation/nucleosome_interpolation.py +2 -2
- {multimm-1.0.5 → multimm-1.0.7}/LICENSE +0 -0
- {multimm-1.0.5 → multimm-1.0.7}/MultiMM.egg-info/SOURCES.txt +0 -0
- {multimm-1.0.5 → multimm-1.0.7}/MultiMM.egg-info/dependency_links.txt +0 -0
- {multimm-1.0.5 → multimm-1.0.7}/MultiMM.egg-info/entry_points.txt +0 -0
- {multimm-1.0.5 → multimm-1.0.7}/MultiMM.egg-info/requires.txt +0 -0
- {multimm-1.0.5 → multimm-1.0.7}/MultiMM.egg-info/top_level.txt +0 -0
- {multimm-1.0.5 → multimm-1.0.7}/setup.cfg +0 -0
- {multimm-1.0.5 → multimm-1.0.7}/simulation/args_definition.py +0 -0
- {multimm-1.0.5 → multimm-1.0.7}/simulation/plots.py +0 -0
- {multimm-1.0.5 → multimm-1.0.7}/simulation/run.py +0 -0
- {multimm-1.0.5 → multimm-1.0.7}/simulation/utils.py +0 -0
- {multimm-1.0.5 → multimm-1.0.7}/simulation/validation.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: MultiMM
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.7
|
|
4
4
|
Summary: A tool for chromatin modeling from nucleosomes to chromosomal territories.
|
|
5
5
|
Home-page: https://github.com/SFGLab/MultiMM
|
|
6
6
|
Author: Sebastian Korsak
|
|
@@ -30,7 +30,7 @@ Requires-Dist: OpenMM
|
|
|
30
30
|
|
|
31
31
|
# MultiMM: An OpenMM-based software for whole genome 3D structure reconstruction
|
|
32
32
|
|
|
33
|
-
MultiMM is an OpenMM model designed for modeling the 3D structure of the whole genome. Its distinguishing feature is that it is multiscale, meaning it aims to model different levels of chromatin organization, from smaller scales (nucleosomes) to the level of chromosomal territories. The algorithm is both fast and accurate. A key feature enabling its speed is GPU parallelization via OpenMM, along with smart assumptions that assist the optimizer in finding the global minimum. One such fundamental assumption is the use of a Hilbert curve as the initial structure. This helps MultiMM to converge faster because the initial structure is already highly compacted.
|
|
33
|
+
MultiMM is an OpenMM model designed for modeling the 3D structure of the whole *human* genome. Its distinguishing feature is that it is multiscale, meaning it aims to model different levels of chromatin organization, from smaller scales (nucleosomes) to the level of chromosomal territories. The algorithm is both fast and accurate. A key feature enabling its speed is GPU parallelization via OpenMM, along with smart assumptions that assist the optimizer in finding the global minimum. One such fundamental assumption is the use of a Hilbert curve as the initial structure. This helps MultiMM to converge faster because the initial structure is already highly compacted.
|
|
34
34
|
|
|
35
35
|

|
|
36
36
|
|
|
@@ -40,23 +40,25 @@ After running the MultiMM model, users obtain a genome-wide structure. Users can
|
|
|
40
40
|
|
|
41
41
|
## Key Features
|
|
42
42
|
|
|
43
|
+
- OpenMM based.
|
|
44
|
+
- User-friendly software available via PyPI.
|
|
43
45
|
- Efficient simulation of chromatin interactions using 3D conformations.
|
|
44
|
-
- Can simulate the scales of nucleosomes, TADs, compartments, chromosomal territories and interactions with lamina.
|
|
45
|
-
-
|
|
46
|
-
- Scalable simulations across different force fields and resolution levels.
|
|
47
|
-
- Compatible with modern GPU-accelerated simulation libraries.
|
|
46
|
+
- Can simulate the scales of nucleosomes, TADs, compartments, chromosomal territories and interactions with lamina. Scalable simulations across different force fields and resolution levels.
|
|
47
|
+
- Compatible with modern GPU-accelerated simulation libraries. CPU acceleration can also be done.
|
|
48
48
|
|
|
49
49
|
## About Operating Systems
|
|
50
50
|
|
|
51
51
|
MultiMM has been tested primarily on Linux-based operating systems, with successful tests in Ubuntu, Debian, and Red Hat-based distributions. It is also possible to run it on macOS, though without CUDA support, which is helpful for accelerating computations. We do not recommend running MultiMM on Windows systems.
|
|
52
52
|
|
|
53
53
|
## Installation
|
|
54
|
-
|
|
54
|
+
MultiMM can be easily installed with pip:
|
|
55
55
|
|
|
56
56
|
```bash
|
|
57
|
-
pip install
|
|
57
|
+
pip install MultiMM
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
+
PyPI software: https://pypi.org/project/MultiMM/.
|
|
61
|
+
|
|
60
62
|
## Input Data
|
|
61
63
|
|
|
62
64
|
MultiMM relies on three types of datasets:
|
|
@@ -128,7 +130,7 @@ TRJ_FRAMES = 100
|
|
|
128
130
|
After specifying the parameters and forces, users can run the following command in the terminal:
|
|
129
131
|
|
|
130
132
|
```bash
|
|
131
|
-
|
|
133
|
+
MultiMM -c config.ini
|
|
132
134
|
```
|
|
133
135
|
|
|
134
136
|
The software will output a folder with the resulting structure and plots showing compartment distribution.
|
|
@@ -137,6 +139,28 @@ Example data can be found on Google Drive: https://drive.google.com/drive/folder
|
|
|
137
139
|
|
|
138
140
|
In the `examples` folder, we provide example configuration files for different modeling scenarios.
|
|
139
141
|
|
|
142
|
+
## Vizualization
|
|
143
|
+
|
|
144
|
+
For vizualization purposes, if you would like to import the whole genome structure you may use the command,
|
|
145
|
+
|
|
146
|
+
```python
|
|
147
|
+
import simulation.plots as splt
|
|
148
|
+
|
|
149
|
+
splt.viz_chroms(sim_path)
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
For `sim_path` you should add the output folder directory path (add `comps=Fase` in case that you do not need compartment coloring). Otherwise, in case that the user would like to model a particular region, without using compartment or chromosome coloring (pretty much any cif structure), they can type,
|
|
153
|
+
|
|
154
|
+
```python
|
|
155
|
+
import simulation.plots as splt
|
|
156
|
+
import simulation.utils as suts
|
|
157
|
+
|
|
158
|
+
V = suts.get_coordinates_cif(cif_path)
|
|
159
|
+
splt.viz_structure(V)
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
We would like once again to thank people who developed `pyvista` library and allow us to have fast and good vizualizations of large chromatin structure.
|
|
163
|
+
|
|
140
164
|
## Simulation Arguments
|
|
141
165
|
|
|
142
166
|
MultiMM has numerous configurable parameters. Below is a description of each argument and its default values. The defaults have been tested for genome-wide simulation but can be modified in the configuration file if needed. Units are typically assumed based on OpenMM conventions, though explicit unit specification is not required.
|
|
@@ -151,7 +175,7 @@ This version should now be more precise and polished. Let me know if you'd like
|
|
|
151
175
|
| DEVICE | str | None | None | device index for CUDA or OpenCL (count from 0) |
|
|
152
176
|
| INITIAL_STRUCTURE_PATH | str | None | None | Path to CIF file. |
|
|
153
177
|
| BUILD_INITIAL_STRUCTURE | bool | True | None | To build a new initial structure. |
|
|
154
|
-
| INITIAL_STRUCTURE_TYPE | str | hilbert | None | you can choose between: hilbert, circle. |
|
|
178
|
+
| INITIAL_STRUCTURE_TYPE | str | hilbert | None | you can choose between: hilbert, circle, rw, confined_rw, self_avoiding_rw, helix, spiral, sphere, knot. |
|
|
155
179
|
| FORCEFIELD_PATH | str | None | None | Path to XML file with forcefield. |
|
|
156
180
|
| N_BEADS | int | 50000 | None | Number of Simulation Beads. |
|
|
157
181
|
| COMPARTMENT_PATH | str | None | None | It should be a `.bed` file with subcompartments from Calder. |
|
|
@@ -200,7 +224,6 @@ This version should now be more precise and polished. Let me know if you'd like
|
|
|
200
224
|
| CF_USE_CENTRAL_FORCE | bool | False | None | Attraction of smaller chromosomes to the nucleolus (in the center). |
|
|
201
225
|
| CF_STRENGTH | float | 10.0 | kJ/mol | Strength of Attraction of Smaller Chromosomes |
|
|
202
226
|
| NUC_DO_INTERPOLATION | bool | False | None | Attraction of smaller chromosomes. |
|
|
203
|
-
| MAX_NUCS_PER_BEAD | int | 4 | None | Maximum amount of nucleosomes per single bead for nucleosome interpolation. |
|
|
204
227
|
| NUC_RADIUS | float | 0.1 | None | The radius of the single nucleosome helix. |
|
|
205
228
|
| POINTS_PER_NUC | int | 20 | None | The number of points that consist a nucleosome helix. |
|
|
206
229
|
| PHI_NORM | float | pi/5 | None | Zig zag angle. |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: MultiMM
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.7
|
|
4
4
|
Summary: A tool for chromatin modeling from nucleosomes to chromosomal territories.
|
|
5
5
|
Home-page: https://github.com/SFGLab/MultiMM
|
|
6
6
|
Author: Sebastian Korsak
|
|
@@ -30,7 +30,7 @@ Requires-Dist: OpenMM
|
|
|
30
30
|
|
|
31
31
|
# MultiMM: An OpenMM-based software for whole genome 3D structure reconstruction
|
|
32
32
|
|
|
33
|
-
MultiMM is an OpenMM model designed for modeling the 3D structure of the whole genome. Its distinguishing feature is that it is multiscale, meaning it aims to model different levels of chromatin organization, from smaller scales (nucleosomes) to the level of chromosomal territories. The algorithm is both fast and accurate. A key feature enabling its speed is GPU parallelization via OpenMM, along with smart assumptions that assist the optimizer in finding the global minimum. One such fundamental assumption is the use of a Hilbert curve as the initial structure. This helps MultiMM to converge faster because the initial structure is already highly compacted.
|
|
33
|
+
MultiMM is an OpenMM model designed for modeling the 3D structure of the whole *human* genome. Its distinguishing feature is that it is multiscale, meaning it aims to model different levels of chromatin organization, from smaller scales (nucleosomes) to the level of chromosomal territories. The algorithm is both fast and accurate. A key feature enabling its speed is GPU parallelization via OpenMM, along with smart assumptions that assist the optimizer in finding the global minimum. One such fundamental assumption is the use of a Hilbert curve as the initial structure. This helps MultiMM to converge faster because the initial structure is already highly compacted.
|
|
34
34
|
|
|
35
35
|

|
|
36
36
|
|
|
@@ -40,23 +40,25 @@ After running the MultiMM model, users obtain a genome-wide structure. Users can
|
|
|
40
40
|
|
|
41
41
|
## Key Features
|
|
42
42
|
|
|
43
|
+
- OpenMM based.
|
|
44
|
+
- User-friendly software available via PyPI.
|
|
43
45
|
- Efficient simulation of chromatin interactions using 3D conformations.
|
|
44
|
-
- Can simulate the scales of nucleosomes, TADs, compartments, chromosomal territories and interactions with lamina.
|
|
45
|
-
-
|
|
46
|
-
- Scalable simulations across different force fields and resolution levels.
|
|
47
|
-
- Compatible with modern GPU-accelerated simulation libraries.
|
|
46
|
+
- Can simulate the scales of nucleosomes, TADs, compartments, chromosomal territories and interactions with lamina. Scalable simulations across different force fields and resolution levels.
|
|
47
|
+
- Compatible with modern GPU-accelerated simulation libraries. CPU acceleration can also be done.
|
|
48
48
|
|
|
49
49
|
## About Operating Systems
|
|
50
50
|
|
|
51
51
|
MultiMM has been tested primarily on Linux-based operating systems, with successful tests in Ubuntu, Debian, and Red Hat-based distributions. It is also possible to run it on macOS, though without CUDA support, which is helpful for accelerating computations. We do not recommend running MultiMM on Windows systems.
|
|
52
52
|
|
|
53
53
|
## Installation
|
|
54
|
-
|
|
54
|
+
MultiMM can be easily installed with pip:
|
|
55
55
|
|
|
56
56
|
```bash
|
|
57
|
-
pip install
|
|
57
|
+
pip install MultiMM
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
+
PyPI software: https://pypi.org/project/MultiMM/.
|
|
61
|
+
|
|
60
62
|
## Input Data
|
|
61
63
|
|
|
62
64
|
MultiMM relies on three types of datasets:
|
|
@@ -128,7 +130,7 @@ TRJ_FRAMES = 100
|
|
|
128
130
|
After specifying the parameters and forces, users can run the following command in the terminal:
|
|
129
131
|
|
|
130
132
|
```bash
|
|
131
|
-
|
|
133
|
+
MultiMM -c config.ini
|
|
132
134
|
```
|
|
133
135
|
|
|
134
136
|
The software will output a folder with the resulting structure and plots showing compartment distribution.
|
|
@@ -137,6 +139,28 @@ Example data can be found on Google Drive: https://drive.google.com/drive/folder
|
|
|
137
139
|
|
|
138
140
|
In the `examples` folder, we provide example configuration files for different modeling scenarios.
|
|
139
141
|
|
|
142
|
+
## Vizualization
|
|
143
|
+
|
|
144
|
+
For vizualization purposes, if you would like to import the whole genome structure you may use the command,
|
|
145
|
+
|
|
146
|
+
```python
|
|
147
|
+
import simulation.plots as splt
|
|
148
|
+
|
|
149
|
+
splt.viz_chroms(sim_path)
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
For `sim_path` you should add the output folder directory path (add `comps=Fase` in case that you do not need compartment coloring). Otherwise, in case that the user would like to model a particular region, without using compartment or chromosome coloring (pretty much any cif structure), they can type,
|
|
153
|
+
|
|
154
|
+
```python
|
|
155
|
+
import simulation.plots as splt
|
|
156
|
+
import simulation.utils as suts
|
|
157
|
+
|
|
158
|
+
V = suts.get_coordinates_cif(cif_path)
|
|
159
|
+
splt.viz_structure(V)
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
We would like once again to thank people who developed `pyvista` library and allow us to have fast and good vizualizations of large chromatin structure.
|
|
163
|
+
|
|
140
164
|
## Simulation Arguments
|
|
141
165
|
|
|
142
166
|
MultiMM has numerous configurable parameters. Below is a description of each argument and its default values. The defaults have been tested for genome-wide simulation but can be modified in the configuration file if needed. Units are typically assumed based on OpenMM conventions, though explicit unit specification is not required.
|
|
@@ -151,7 +175,7 @@ This version should now be more precise and polished. Let me know if you'd like
|
|
|
151
175
|
| DEVICE | str | None | None | device index for CUDA or OpenCL (count from 0) |
|
|
152
176
|
| INITIAL_STRUCTURE_PATH | str | None | None | Path to CIF file. |
|
|
153
177
|
| BUILD_INITIAL_STRUCTURE | bool | True | None | To build a new initial structure. |
|
|
154
|
-
| INITIAL_STRUCTURE_TYPE | str | hilbert | None | you can choose between: hilbert, circle. |
|
|
178
|
+
| INITIAL_STRUCTURE_TYPE | str | hilbert | None | you can choose between: hilbert, circle, rw, confined_rw, self_avoiding_rw, helix, spiral, sphere, knot. |
|
|
155
179
|
| FORCEFIELD_PATH | str | None | None | Path to XML file with forcefield. |
|
|
156
180
|
| N_BEADS | int | 50000 | None | Number of Simulation Beads. |
|
|
157
181
|
| COMPARTMENT_PATH | str | None | None | It should be a `.bed` file with subcompartments from Calder. |
|
|
@@ -200,7 +224,6 @@ This version should now be more precise and polished. Let me know if you'd like
|
|
|
200
224
|
| CF_USE_CENTRAL_FORCE | bool | False | None | Attraction of smaller chromosomes to the nucleolus (in the center). |
|
|
201
225
|
| CF_STRENGTH | float | 10.0 | kJ/mol | Strength of Attraction of Smaller Chromosomes |
|
|
202
226
|
| NUC_DO_INTERPOLATION | bool | False | None | Attraction of smaller chromosomes. |
|
|
203
|
-
| MAX_NUCS_PER_BEAD | int | 4 | None | Maximum amount of nucleosomes per single bead for nucleosome interpolation. |
|
|
204
227
|
| NUC_RADIUS | float | 0.1 | None | The radius of the single nucleosome helix. |
|
|
205
228
|
| POINTS_PER_NUC | int | 20 | None | The number of points that consist a nucleosome helix. |
|
|
206
229
|
| PHI_NORM | float | pi/5 | None | Zig zag angle. |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# MultiMM: An OpenMM-based software for whole genome 3D structure reconstruction
|
|
2
2
|
|
|
3
|
-
MultiMM is an OpenMM model designed for modeling the 3D structure of the whole genome. Its distinguishing feature is that it is multiscale, meaning it aims to model different levels of chromatin organization, from smaller scales (nucleosomes) to the level of chromosomal territories. The algorithm is both fast and accurate. A key feature enabling its speed is GPU parallelization via OpenMM, along with smart assumptions that assist the optimizer in finding the global minimum. One such fundamental assumption is the use of a Hilbert curve as the initial structure. This helps MultiMM to converge faster because the initial structure is already highly compacted.
|
|
3
|
+
MultiMM is an OpenMM model designed for modeling the 3D structure of the whole *human* genome. Its distinguishing feature is that it is multiscale, meaning it aims to model different levels of chromatin organization, from smaller scales (nucleosomes) to the level of chromosomal territories. The algorithm is both fast and accurate. A key feature enabling its speed is GPU parallelization via OpenMM, along with smart assumptions that assist the optimizer in finding the global minimum. One such fundamental assumption is the use of a Hilbert curve as the initial structure. This helps MultiMM to converge faster because the initial structure is already highly compacted.
|
|
4
4
|
|
|
5
5
|

|
|
6
6
|
|
|
@@ -10,23 +10,25 @@ After running the MultiMM model, users obtain a genome-wide structure. Users can
|
|
|
10
10
|
|
|
11
11
|
## Key Features
|
|
12
12
|
|
|
13
|
+
- OpenMM based.
|
|
14
|
+
- User-friendly software available via PyPI.
|
|
13
15
|
- Efficient simulation of chromatin interactions using 3D conformations.
|
|
14
|
-
- Can simulate the scales of nucleosomes, TADs, compartments, chromosomal territories and interactions with lamina.
|
|
15
|
-
-
|
|
16
|
-
- Scalable simulations across different force fields and resolution levels.
|
|
17
|
-
- Compatible with modern GPU-accelerated simulation libraries.
|
|
16
|
+
- Can simulate the scales of nucleosomes, TADs, compartments, chromosomal territories and interactions with lamina. Scalable simulations across different force fields and resolution levels.
|
|
17
|
+
- Compatible with modern GPU-accelerated simulation libraries. CPU acceleration can also be done.
|
|
18
18
|
|
|
19
19
|
## About Operating Systems
|
|
20
20
|
|
|
21
21
|
MultiMM has been tested primarily on Linux-based operating systems, with successful tests in Ubuntu, Debian, and Red Hat-based distributions. It is also possible to run it on macOS, though without CUDA support, which is helpful for accelerating computations. We do not recommend running MultiMM on Windows systems.
|
|
22
22
|
|
|
23
23
|
## Installation
|
|
24
|
-
|
|
24
|
+
MultiMM can be easily installed with pip:
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
pip install
|
|
27
|
+
pip install MultiMM
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
+
PyPI software: https://pypi.org/project/MultiMM/.
|
|
31
|
+
|
|
30
32
|
## Input Data
|
|
31
33
|
|
|
32
34
|
MultiMM relies on three types of datasets:
|
|
@@ -98,7 +100,7 @@ TRJ_FRAMES = 100
|
|
|
98
100
|
After specifying the parameters and forces, users can run the following command in the terminal:
|
|
99
101
|
|
|
100
102
|
```bash
|
|
101
|
-
|
|
103
|
+
MultiMM -c config.ini
|
|
102
104
|
```
|
|
103
105
|
|
|
104
106
|
The software will output a folder with the resulting structure and plots showing compartment distribution.
|
|
@@ -107,6 +109,28 @@ Example data can be found on Google Drive: https://drive.google.com/drive/folder
|
|
|
107
109
|
|
|
108
110
|
In the `examples` folder, we provide example configuration files for different modeling scenarios.
|
|
109
111
|
|
|
112
|
+
## Vizualization
|
|
113
|
+
|
|
114
|
+
For vizualization purposes, if you would like to import the whole genome structure you may use the command,
|
|
115
|
+
|
|
116
|
+
```python
|
|
117
|
+
import simulation.plots as splt
|
|
118
|
+
|
|
119
|
+
splt.viz_chroms(sim_path)
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
For `sim_path` you should add the output folder directory path (add `comps=Fase` in case that you do not need compartment coloring). Otherwise, in case that the user would like to model a particular region, without using compartment or chromosome coloring (pretty much any cif structure), they can type,
|
|
123
|
+
|
|
124
|
+
```python
|
|
125
|
+
import simulation.plots as splt
|
|
126
|
+
import simulation.utils as suts
|
|
127
|
+
|
|
128
|
+
V = suts.get_coordinates_cif(cif_path)
|
|
129
|
+
splt.viz_structure(V)
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
We would like once again to thank people who developed `pyvista` library and allow us to have fast and good vizualizations of large chromatin structure.
|
|
133
|
+
|
|
110
134
|
## Simulation Arguments
|
|
111
135
|
|
|
112
136
|
MultiMM has numerous configurable parameters. Below is a description of each argument and its default values. The defaults have been tested for genome-wide simulation but can be modified in the configuration file if needed. Units are typically assumed based on OpenMM conventions, though explicit unit specification is not required.
|
|
@@ -121,7 +145,7 @@ This version should now be more precise and polished. Let me know if you'd like
|
|
|
121
145
|
| DEVICE | str | None | None | device index for CUDA or OpenCL (count from 0) |
|
|
122
146
|
| INITIAL_STRUCTURE_PATH | str | None | None | Path to CIF file. |
|
|
123
147
|
| BUILD_INITIAL_STRUCTURE | bool | True | None | To build a new initial structure. |
|
|
124
|
-
| INITIAL_STRUCTURE_TYPE | str | hilbert | None | you can choose between: hilbert, circle. |
|
|
148
|
+
| INITIAL_STRUCTURE_TYPE | str | hilbert | None | you can choose between: hilbert, circle, rw, confined_rw, self_avoiding_rw, helix, spiral, sphere, knot. |
|
|
125
149
|
| FORCEFIELD_PATH | str | None | None | Path to XML file with forcefield. |
|
|
126
150
|
| N_BEADS | int | 50000 | None | Number of Simulation Beads. |
|
|
127
151
|
| COMPARTMENT_PATH | str | None | None | It should be a `.bed` file with subcompartments from Calder. |
|
|
@@ -170,7 +194,6 @@ This version should now be more precise and polished. Let me know if you'd like
|
|
|
170
194
|
| CF_USE_CENTRAL_FORCE | bool | False | None | Attraction of smaller chromosomes to the nucleolus (in the center). |
|
|
171
195
|
| CF_STRENGTH | float | 10.0 | kJ/mol | Strength of Attraction of Smaller Chromosomes |
|
|
172
196
|
| NUC_DO_INTERPOLATION | bool | False | None | Attraction of smaller chromosomes. |
|
|
173
|
-
| MAX_NUCS_PER_BEAD | int | 4 | None | Maximum amount of nucleosomes per single bead for nucleosome interpolation. |
|
|
174
197
|
| NUC_RADIUS | float | 0.1 | None | The radius of the single nucleosome helix. |
|
|
175
198
|
| POINTS_PER_NUC | int | 20 | None | The number of points that consist a nucleosome helix. |
|
|
176
199
|
| PHI_NORM | float | pi/5 | None | Zig zag angle. |
|
|
@@ -6,7 +6,7 @@ with open('README.md', 'r', encoding='utf-8') as f:
|
|
|
6
6
|
|
|
7
7
|
setup(
|
|
8
8
|
name='MultiMM', # Package name
|
|
9
|
-
version='1.0.
|
|
9
|
+
version='1.0.7', # Version of the software
|
|
10
10
|
description='A tool for chromatin modeling from nucleosomes to chromosomal territories.',
|
|
11
11
|
long_description=long_description,
|
|
12
12
|
long_description_content_type='text/markdown',
|
|
@@ -136,33 +136,11 @@ def read_compartments(file,ch,reg,res,binary=True):
|
|
|
136
136
|
def generate_hilbert_curve(n_points,p=8,n=3,displacement_sigma=0.1,scale=6,viz=False,add_noise=False):
|
|
137
137
|
hilbert_curve = HilbertCurve(p, n)
|
|
138
138
|
|
|
139
|
-
distances = list(range(n_points))
|
|
139
|
+
distances = list(range(n_points))
|
|
140
140
|
points = np.array(hilbert_curve.points_from_distances(distances))
|
|
141
|
-
|
|
142
|
-
#if n_points>4095:
|
|
143
|
-
# x_sim, y_sim, z_sim = points[:,0], points[:,1], points[:,2]
|
|
144
|
-
# tck, u = interpolate.splprep(x=[x_sim,y_sim,z_sim], s=2)
|
|
145
|
-
# u_fine = np.linspace(0,1,n_points)
|
|
146
|
-
# x_fine, y_fine, z_fine = interpolate.splev(u_fine, tck)
|
|
147
|
-
# V_interpol = np.vstack((x_fine,y_fine,z_fine)).T
|
|
148
|
-
#else:
|
|
149
|
-
# V_interpol = points
|
|
150
141
|
if add_noise:
|
|
151
142
|
displacement = np.random.normal(loc=0.0, scale=displacement_sigma, size=n_points*3).reshape(n_points,3)
|
|
152
143
|
V_interpol = V_interpol + displacement
|
|
153
|
-
#max_dist = np.max(np.linalg.norm(V_interpol,axis=1))
|
|
154
|
-
|
|
155
|
-
#if viz:
|
|
156
|
-
# fig = plt.figure()
|
|
157
|
-
# ax = plt.axes(projection='3d')
|
|
158
|
-
|
|
159
|
-
# z = V_interpol[:,2]
|
|
160
|
-
# x = V_interpol[:,0]
|
|
161
|
-
# y = V_interpol[:,1]
|
|
162
|
-
|
|
163
|
-
# ax.plot3D (x, y, z, 'green')
|
|
164
|
-
# ax.set_title('Hilbert Curve')
|
|
165
|
-
# plt.show()
|
|
166
144
|
|
|
167
145
|
return points
|
|
168
146
|
|
|
@@ -181,13 +159,97 @@ def polymer_circle(n: int, z_stretch: float = 1.0, radius: float = 5.0) -> np.nd
|
|
|
181
159
|
points = np.array(points)
|
|
182
160
|
return points
|
|
183
161
|
|
|
162
|
+
def helix_structure(N_beads, radius=1, pitch=2):
|
|
163
|
+
theta = np.linspace(0, 4 * np.pi, N_beads) # 2 full turns
|
|
164
|
+
x = radius * np.cos(theta)
|
|
165
|
+
y = radius * np.sin(theta)
|
|
166
|
+
z = np.linspace(0, pitch * N_beads, N_beads)
|
|
167
|
+
V = np.column_stack((x, y, z))
|
|
168
|
+
return V
|
|
169
|
+
|
|
170
|
+
def spiral_structure(N_beads, initial_radius=1, pitch=1, growth_factor=0.05):
|
|
171
|
+
theta = np.linspace(0, 4 * np.pi, N_beads)
|
|
172
|
+
radius = initial_radius + growth_factor * np.arange(N_beads)
|
|
173
|
+
x = radius * np.cos(theta)
|
|
174
|
+
y = radius * np.sin(theta)
|
|
175
|
+
z = np.linspace(0, pitch * N_beads, N_beads)
|
|
176
|
+
V = np.column_stack((x, y, z))
|
|
177
|
+
return V
|
|
178
|
+
|
|
179
|
+
def sphere_surface_structure(N_beads, radius=1):
|
|
180
|
+
phi = np.random.uniform(0, 2 * np.pi, N_beads)
|
|
181
|
+
costheta = np.random.uniform(-1, 1, N_beads)
|
|
182
|
+
u = np.random.uniform(0, 1, N_beads)
|
|
183
|
+
|
|
184
|
+
theta = np.arccos(costheta)
|
|
185
|
+
r = radius * u ** (1/3)
|
|
186
|
+
|
|
187
|
+
x = r * np.sin(theta) * np.cos(phi)
|
|
188
|
+
y = r * np.sin(theta) * np.sin(phi)
|
|
189
|
+
z = r * np.cos(theta)
|
|
190
|
+
|
|
191
|
+
V = np.column_stack((x, y, z))
|
|
192
|
+
return V
|
|
193
|
+
|
|
194
|
+
def confined_random_walk(N_beads, box_size=5):
|
|
195
|
+
V = np.zeros((N_beads, 3))
|
|
196
|
+
for i in range(1, N_beads):
|
|
197
|
+
step = np.random.choice([-1, 1], size=3) # Random step in x, y, z
|
|
198
|
+
V[i] = V[i-1] + step
|
|
199
|
+
# Keep the points within a confined box (folding in)
|
|
200
|
+
V[i] = np.clip(V[i], -box_size, box_size)
|
|
201
|
+
return V
|
|
202
|
+
|
|
203
|
+
def trefoil_knot_structure(N_beads, scale=5):
|
|
204
|
+
t = np.linspace(0, 2 * np.pi, N_beads)
|
|
205
|
+
x = scale * (np.sin(t) + 2 * np.sin(2 * t))
|
|
206
|
+
y = scale * (np.cos(t) - 2 * np.cos(2 * t))
|
|
207
|
+
z = -scale * np.sin(3 * t)
|
|
208
|
+
|
|
209
|
+
V = np.column_stack((x, y, z))
|
|
210
|
+
return V
|
|
211
|
+
|
|
212
|
+
def random_walk_structure(N_beads, step_size=1):
|
|
213
|
+
# Initialize the structure array
|
|
214
|
+
V = np.zeros((N_beads, 3))
|
|
215
|
+
|
|
216
|
+
# Loop over each bead, starting from the second one
|
|
217
|
+
for i in range(1, N_beads):
|
|
218
|
+
# Randomly pick a direction for each step
|
|
219
|
+
step_direction = np.random.normal(size=3)
|
|
220
|
+
step_direction /= np.linalg.norm(step_direction) # Normalize to make it unit length
|
|
221
|
+
|
|
222
|
+
# Move the current bead from the last bead by a fixed step size
|
|
223
|
+
V[i] = V[i-1] + step_size * step_direction
|
|
224
|
+
|
|
225
|
+
return V
|
|
226
|
+
|
|
227
|
+
def compute_init_struct(N_beads,mode='rw',scale=5):
|
|
228
|
+
match mode:
|
|
229
|
+
case 'rw':
|
|
230
|
+
return random_walk_structure(N_beads)
|
|
231
|
+
case 'confined_rw':
|
|
232
|
+
return confined_random_walk(N_beads)
|
|
233
|
+
case 'knot':
|
|
234
|
+
return trefoil_knot_structure(N_beads)
|
|
235
|
+
case 'self_avoiding_rw':
|
|
236
|
+
return self_avoiding_random_walk(N_beads)
|
|
237
|
+
case 'circle':
|
|
238
|
+
return polymer_circle(N_beads,50,5)
|
|
239
|
+
case 'helix':
|
|
240
|
+
return helix_structure(N_beads)
|
|
241
|
+
case 'spiral':
|
|
242
|
+
return spiral_structure(N_beads)
|
|
243
|
+
case 'sphere':
|
|
244
|
+
return sphere_surface_structure(N_beads)
|
|
245
|
+
case 'hilbert':
|
|
246
|
+
return generate_hilbert_curve(n_dna,scale=scale)
|
|
247
|
+
case _:
|
|
248
|
+
return IndentationError('Invalid option for initial structure.')
|
|
249
|
+
|
|
184
250
|
def build_init_mmcif(n_dna,chrom_ends,psf=True,path='',curve='hilbert',scale=5):
|
|
185
251
|
# Define the initial coordinates of histones and the structure of DNA
|
|
186
|
-
|
|
187
|
-
dna_points = generate_hilbert_curve(n_dna,scale=scale)
|
|
188
|
-
elif curve=='circle':
|
|
189
|
-
dna_points = polymer_circle(n_dna,50,5)
|
|
190
|
-
|
|
252
|
+
dna_points = compute_init_struct(n_dna,mode=curve,scale=scale)
|
|
191
253
|
# Write the positions in .mmcif file
|
|
192
254
|
atoms = ''
|
|
193
255
|
|
|
@@ -29,9 +29,9 @@ def get_perp_component(x, v):
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
class NucleosomeInterpolation:
|
|
32
|
-
def __init__(self, V, bw,
|
|
32
|
+
def __init__(self, V, bw, nuc_radius=0.1, points_per_nuc=20, phi_norm=np.pi/5):
|
|
33
33
|
self.V, self.bw = V, bw
|
|
34
|
-
self.max_nucs_per_bead, self.nuc_points =
|
|
34
|
+
self.max_nucs_per_bead, self.nuc_points = int(np.ceil(1/(2*nuc_radius))), points_per_nuc
|
|
35
35
|
self.nuc_r, self.phi_norm = nuc_radius, phi_norm
|
|
36
36
|
|
|
37
37
|
def make_helix(self, r, theta, z0):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|