2 Commits

Author SHA1 Message Date
  Gaspard Jankowiak 85832bf4d1 [nucleus] fix initial radius 11 months ago
  Gaspard Jankowiak 49365f9d8f update plots (width, depth, pulsation) 11 months ago

+ 1
- 3
configs_metrics/no_nucleus/varia_beta_param.yaml View File

@@ -1,6 +1,6 @@
1 1
 params:
2 2
     N: 250 # number of points
3
-    M: 20000 # max. number of iterations
3
+    M: 80000 # max. number of iterations
4 4
 
5 5
     δt: 2e-4 # time step
6 6
 
@@ -93,5 +93,3 @@ config:
93 93
         filename_centro: "initial_conditions/torino_width_1_centro.csv"
94 94
 
95 95
         # shift_nucleus: 0.25 # 3/4 of a period = 3/4 * 2π / f.ω0
96
-
97
-   

+ 2
- 2
configs_metrics/nucleus/varia_beta_param.yaml View File

@@ -44,7 +44,7 @@ params:
44 44
     N_mu: 100 # area constraint relaxation
45 45
     N_target_area: 0.7
46 46
     N_kb: 5e-4 # bending stiffness
47
-    N_ω:  1e-1 # inplane stiffness
47
+    N_ω:  5e1 # inplane stiffness
48 48
     N_W0: 7e-1  # potential offset
49 49
     N_kcont: 5e0 # contact force intensity
50 50
     N_αcont: 1e1 # contact force sharpness
@@ -94,4 +94,4 @@ config:
94 94
 
95 95
         # shift_nucleus: 0.25 # 3/4 of a period = 3/4 * 2π / f.ω0
96 96
 
97
-   
97
+   

+ 2
- 2
configs_metrics/nucleus/varia_width_param.yaml View File

@@ -44,7 +44,7 @@ params:
44 44
     N_mu: 100 # area constraint relaxation
45 45
     N_target_area: 0.7
46 46
     N_kb: 5e-4 # bending stiffness
47
-    N_ω:  1e-1 # inplane stiffness
47
+    N_ω:  5e1 # inplane stiffness
48 48
     N_W0: 7e-1  # potential offset
49 49
     N_kcont: 5e0 # contact force intensity
50 50
     N_αcont: 1e1 # contact force sharpness
@@ -94,4 +94,4 @@ config:
94 94
 
95 95
         # shift_nucleus: 0.25 # 3/4 of a period = 3/4 * 2π / f.ω0
96 96
 
97
-   
97
+   

+ 1
- 1
metrics_nonuc_beta.jl View File

@@ -40,7 +40,7 @@ for beta in betas
40 40
     P.f_β = beta
41 41
 
42 42
     # Write the current value to the log file
43
-    write(param_log, beta)
43
+    write(param_log, string(beta, "\n"))
44 44
 
45 45
     # Run the simulation
46 46
     CellSim.launch(P, F, config)

+ 50
- 0
metrics_nonuc_omega.jl View File

@@ -0,0 +1,50 @@
1
+push!(LOAD_PATH, "src")
2
+
3
+import CellSim
4
+import Dates
5
+
6
+# The configuration file from which parameters are taken
7
+base_config = "configs_metrics/no_nucleus/varia_omega_param.yaml"
8
+
9
+# The output prefix, this overrides the one set in the configuration file
10
+output_prefix = "nonuc_omega"
11
+
12
+# Load configuration
13
+P, F, config = CellSim.read_config(base_config)
14
+
15
+# Override the output prefix and create it
16
+config["output_prefix"] = output_prefix
17
+mkpath(output_prefix)
18
+
19
+# Set batch mode (only closes Figures at the end to avoid clutter)
20
+config["batch"] = true
21
+
22
+# Log file, used to list parameter value so we don't have to
23
+# compute them by hand. We cannot use the YAML files as Julia can
24
+# only read YAML files, not write to them.
25
+
26
+# Log file name
27
+parameter_log_file = string(output_prefix, "/parameter_log.txt")
28
+
29
+# Open the log file and write the date on top
30
+param_log = open(parameter_log_file, "a")
31
+date = string(Dates.now())
32
+write(param_log, string("\n", date, "\n\n"))
33
+
34
+# The range in which the varying parameter is taken
35
+# omegas = collect(range(2.0, 12.0; length=11))
36
+omegas = collect(range(12.0, 12.0; length=1))
37
+
38
+# Loop
39
+for omega in omegas
40
+    # Set the parameter value
41
+    P.f_ω0 = omega
42
+
43
+    # Write the current value to the log file
44
+    write(param_log, string(omega, "\n"))
45
+
46
+    # Run the simulation
47
+    CellSim.launch(P, F, config)
48
+end
49
+
50
+close(param_log)

+ 3
- 1
metrics_nonuc_width.jl View File

@@ -41,8 +41,10 @@ for w in ws
41 41
     P.f_width = w
42 42
 
43 43
     # Write the current value to the log file
44
-    write(param_log, w)
44
+    write(param_log, string(w, "\n"))
45 45
 
46 46
     # Run the simulation
47 47
     CellSim.launch(P, F, config)
48 48
 end
49
+
50
+close(param_log)

+ 49
- 0
metrics_nuc_omega.jl View File

@@ -0,0 +1,49 @@
1
+push!(LOAD_PATH, "src")
2
+
3
+import CellSim
4
+import Dates
5
+
6
+# The configuration file from which parameters are taken
7
+base_config = "configs_metrics/nucleus/varia_omega_param.yaml"
8
+
9
+# The output prefix, this overrides the one set in the configuration file
10
+output_prefix = "nuc_omega"
11
+
12
+# Load configuration
13
+P, F, config = CellSim.read_config(base_config)
14
+
15
+# Override the output prefix and create it
16
+config["output_prefix"] = output_prefix
17
+mkpath(output_prefix)
18
+
19
+# Set batch mode (only closes Figures at the end to avoid clutter)
20
+config["batch"] = true
21
+
22
+# Log file, used to list parameter value so we don't have to
23
+# compute them by hand. We cannot use the YAML files as Julia can
24
+# only read YAML files, not write to them.
25
+
26
+# Log file name
27
+parameter_log_file = string(output_prefix, "/parameter_log.txt")
28
+
29
+# Open the log file and write the date on top
30
+param_log = open(parameter_log_file, "a")
31
+date = string(Dates.now())
32
+write(param_log, string("\n", date, "\n\n"))
33
+
34
+# The range in which the varying parameter is taken
35
+omegas = collect(range(2.0, 12.0; length=11))
36
+
37
+# Loop
38
+for omega in omegas
39
+    # Set the parameter value
40
+    P.f_ω0 = omega
41
+
42
+    # Write the current value to the log file
43
+    write(param_log, string(omega, "\n"))
44
+
45
+    # Run the simulation
46
+    CellSim.launch(P, F, config)
47
+end
48
+
49
+close(param_log)

+ 7
- 6
plot_all_the_plots.jl View File

@@ -67,17 +67,18 @@ PyPlot.title("Velocity vs kMT")
67 67
 
68 68
 # channel depth
69 69
 PyPlot.subplot(245)
70
-plot_csv("plot_data/before_recompute_nucleus/v_beta_nuc_old.csv", true, label="nuc old")
71
-plot_csv("plot_data/before_recompute_nucleus/v_beta_nuc_new.csv", true, label="nuc new")
72
-plot_csv("plot_data/before_recompute_nucleus/v_beta_nonuc.csv", false, label="nonuc", ls="dotted")
70
+plot_csv("plot_data/v_beta_nuc.csv", true, label="nuc")
71
+plot_csv("plot_data/v_beta_nonuc.csv", true, label="nonuc")
72
+# plot_csv("plot_data/before_recompute_nucleus/v_beta_nuc_new.csv", true, label="nuc new")
73
+# plot_csv("plot_data/before_recompute_nucleus/v_beta_nonuc.csv", false, label="nonuc", ls="dotted")
73 74
 PyPlot.axhline(0.0, lw=0.5, color="black")
74 75
 PyPlot.legend()
75 76
 PyPlot.title("Velocity vs f_β")
76 77
 
77 78
 # channel width
78 79
 PyPlot.subplot(246)
79
-plot_csv("plot_data/before_recompute_nucleus/v_width_nuc_old.csv", true, label="nuc old")
80
-plot_csv("plot_data/before_recompute_nucleus/v_width_nuc_new.csv", true, label="nuc new")
80
+plot_csv("plot_data/v_width_nuc.csv", true, label="nuc")
81
+# plot_csv("plot_data/before_recompute_nucleus/v_width_nuc_new.csv", true, label="nuc old")
81 82
 plot_csv("plot_data/before_recompute_nucleus/v_width_nonuc.csv", false, label="nonuc", ls="dotted")
82 83
 PyPlot.axhline(0.0, lw=0.5, color="black")
83 84
 PyPlot.legend()
@@ -85,7 +86,7 @@ PyPlot.title("Velocity vs f_width")
85 86
 
86 87
 # channel pulsation
87 88
 PyPlot.subplot(247)
88
-plot_csv("plot_data/before_recompute_nucleus/v_omega_nuc_old.csv", true, label="nuc old")
89
+plot_csv("plot_data/v_omega_nonuc.csv", true, label="nonuc")
89 90
 plot_csv("plot_data/v_omega_nuc.csv", true, label="nuc")
90 91
 PyPlot.axhline(0.0, lw=0.5, color="black")
91 92
 PyPlot.legend()

+ 10
- 0
plot_data/foo.sh View File

@@ -0,0 +1,10 @@
1
+#!/bin/bash
2
+mv v_A_KMT_old.csv        v_A_KMT_nuc_old.csv
3
+mv v_A_mu_old.csv         v_A_mu_nuc_old.csv
4
+mv v_kb_new.csv           v_kb_nuc_new.csv
5
+mv v_kb_new_mun60.csv     v_kb_nuc_new_mun60.csv
6
+mv v_kb_old.csv           v_kb_nuc_old.csv
7
+mv v_kb_old_mun100.csv    v_kb_nuc_old_mun100.csv
8
+mv v_kb_old_mun60.csv     v_kb_nuc_old_mun60.csv
9
+mv v_omega_new.csv        v_omega_nuc_new.csv
10
+mv v_omega_old.csv        v_omega_nuc_old.csv

+ 21
- 0
plot_data/v_beta_nonuc.csv View File

@@ -0,0 +1,21 @@
1
+f_β, average_velocity
2
+0.015, 0.0
3
+0.03, 0.0
4
+0.045, 0.0
5
+0.06, 0.0
6
+0.075, 0.0
7
+0.09, 0.0
8
+0.105, 0.7671519241405338
9
+0.12, 1.2347593718893177
10
+0.135, 1.6654575098744437
11
+0.15, 2.0846389435024952
12
+0.165, 2.490540490823125
13
+0.18, 2.872978573820156
14
+0.195, 3.2208322434272127
15
+0.21, 3.514708254250237
16
+0.225, 3.741899035990587
17
+0.24, 3.8857265173582682
18
+0.255, 3.920773672496495
19
+0.27, 3.8204611934404515
20
+0.285, 3.522055350341856
21
+0.3, -1

+ 21
- 0
plot_data/v_beta_nuc.csv View File

@@ -0,0 +1,21 @@
1
+f_β, average_velocity
2
+0.015, 0.0
3
+0.03, 0.0
4
+0.045, 0.0
5
+0.06, 0.0
6
+0.075, 0.0
7
+0.09, 0.0
8
+0.105, 0.612263471316624
9
+0.12, 0.985727797485018
10
+0.135, 1.342665143670287
11
+0.15, 1.7023641287338365
12
+0.165, 2.054611636128647
13
+0.18, 2.390538512733729
14
+0.195, 2.6964839363387005
15
+0.21, 2.9561354193507596
16
+0.225, 3.161185274689853
17
+0.24, 3.2786268281748194
18
+0.255, 3.3020091823977804
19
+0.27, 3.176974268169778
20
+0.285, -1
21
+0.3, -1

+ 19
- 0
plot_data/v_omega_nonuc.csv View File

@@ -0,0 +1,19 @@
1
+f_β, average_velocity
2
+2.0, 0.0
3
+3.0, 0.0
4
+4.0, 0.0
5
+5.0, 0.0
6
+6.0, 3.1055914948903163
7
+7.0, 2.881470582611911
8
+8.0, 3.325641820154007
9
+9.0, 3.784071532464386
10
+10.0, 3.8338786762757433
11
+11.0, 3.9401258004472766
12
+12.0, 3.800526662145955
13
+
14
+
15
+
16
+
17
+
18
+
19
+

+ 20
- 0
plot_data/v_width_nuc.csv View File

@@ -0,0 +1,20 @@
1
+f_width, average_velocity
2
+0.3, 0.0
3
+0.3263157894736842, 2.1614025033018067
4
+0.3526315789473684, 3.5933033314569434
5
+0.37894736842105264, 3.3308594385788757
6
+0.4052631578947368, 2.6525779091912507
7
+0.43157894736842106, 2.34171234464485
8
+0.45789473684210524, 2.4003610560105884
9
+0.4842105263157895, 2.351809359460901
10
+0.5105263157894737, 2.153059223042315
11
+0.5368421052631579, 1.8128400296509328
12
+0.5631578947368421, 1.8126658885199423
13
+0.5894736842105263, 1.4329699187855398
14
+0.6157894736842106, 1.1142697449691241
15
+0.6421052631578947, 0.9484422484381647
16
+0.6684210526315789, 0.8895110570944318
17
+0.6947368421052632, 0.8459749036087939
18
+0.7210526315789474, 0.7606243615460635
19
+0.7473684210526316, 0.6326726638676393
20
+0.7736842105263158, 0.4567583616957045

+ 1
- 1
src/Nucleus.jl View File

@@ -437,7 +437,7 @@ function min_center_to_wall(P::Params)
437 437
 
438 438
     @assert fprime(res.zero)[1] > 0
439 439
 
440
-    return dist(res.zero[1])
440
+    return min(dist(res.zero[1]), π/P.f_ω0)
441 441
 end
442 442
 
443 443
 function initialize_coords(P::Params, F::Flags, cortex_c::PointCoords; fill_wall::Bool=true)

Loading…
Cancel
Save