You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<divclass="code-copy-outer-scaffold"><divclass="sourceCode" id="cb1"><preclass="sourceCode julia code-with-copy"><codeclass="sourceCode julia"><spanid="cb1-1"><ahref="#cb1-1" aria-hidden="true" tabindex="-1"></a><spanclass="bu">Base</span>.<spanclass="fu">length</span>(grid<spanclass="op">::</span><spanclass="dt">CubicGrid</span>)</span></code></pre></div><buttontitle="Copy to Clipboard" class="code-copy-button"><iclass="bi"></i></button></div>
<divclass="toc-actions"><ul><li><ahref="https://github.com/medyan-dev/MEDYAN.jl/edit/master/quartodocs/docstrings/medyan.newmembrane--a714b4a1c87062be.qmd" class="toc-action"><iclass="bi bi-github"></i>Edit this page</a></li><li><ahref="https://github.com/medyan-dev/MEDYAN.jl/issues/new" class="toc-action"><iclass="bi empty"></i>Report an issue</a></li></ul></div></nav>
193
+
<divclass="toc-actions"><ul><li><ahref="https://github.com/medyan-dev/MEDYAN.jl/edit/master/quartodocs/docstrings/medyan.apply_chem_boundary--86fcf1aed37adaf6.qmd" class="toc-action"><iclass="bi bi-github"></i>Edit this page</a></li><li><ahref="https://github.com/medyan-dev/MEDYAN.jl/issues/new" class="toc-action"><iclass="bi empty"></i>Report an issue</a></li></ul></div></nav>
<divclass="code-copy-outer-scaffold"><divclass="sourceCode" id="cb1"><preclass="sourceCode julia code-with-copy"><codeclass="sourceCode julia"><spanid="cb1-1"><ahref="#cb1-1" aria-hidden="true" tabindex="-1"></a><spanclass="fu">newmembrane!</span>(c<spanclass="op">::</span><spanclass="dt">MEDYAN.Context</span>; <spanclass="kw">type</span>, meshinit, mechparams)</span></code></pre></div><buttontitle="Copy to Clipboard" class="code-copy-button"><iclass="bi"></i></button></div>
212
-
<p>Add a new membrane to the system.</p>
213
-
<sectionid="keyword-arguments" class="level1">
214
-
<h1>Keyword Arguments</h1>
215
-
<ul>
216
-
<li><code>type::Int</code>: Membrane type index (must have corresponding entry in <code>c.membranemechparams</code>)</li>
217
-
<li><code>meshinit</code>: Structure containing mesh shape initialization information, such as a named tuple <code>(vertlist, trilist)</code> containing vertex coordinates and triangle list, <code>MeshInitEllipsoid</code>, <code>MeshInitPlane</code> or a general <code>MeshInitSurfaceFunc</code>.</li>
218
-
<li><code>mechparams::Union{Nothing, MembraneMechParams}=nothing</code>: Mechanical parameters for this membrane. If <code>nothing</code>, copies from <code>c.membranemechparams[type]</code>.</li>
219
-
</ul>
220
-
</section>
211
+
<divclass="code-copy-outer-scaffold"><divclass="sourceCode" id="cb1"><preclass="sourceCode julia code-with-copy"><codeclass="sourceCode julia"><spanid="cb1-1"><ahref="#cb1-1" aria-hidden="true" tabindex="-1"></a><spanclass="fu">apply_chem_boundary!</span>(c<spanclass="op">::</span><spanclass="dt">Context</span>; oversampling_factor<spanclass="op">::</span><spanclass="dt">Int</span>=<spanclass="fl">16</span>)<spanclass="op">::</span><spanclass="dt">Nothing</span></span></code></pre></div><buttontitle="Copy to Clipboard" class="code-copy-button"><iclass="bi"></i></button></div>
212
+
<p>Update chem voxel volumes and diffusion rates.</p>
213
+
<p>The chem boundary is the intersection of any boundary set by <ahref="../docstrings/medyan.set_chem_boundary--8446b49a230e3146.html"><code>set_chem_boundary!</code></a> and membranes with <code>chem_boundary=true</code>.</p>
214
+
<p><code>oversampling_factor</code> can be increased to improve the accuracy at the expense of increased memory use.</p>
215
+
<p>Calling this will invalidate the chem cache.</p>
221
216
</div>
222
217
</div>
223
218
</div>
@@ -632,4 +627,4 @@ <h1>Keyword Arguments</h1>
632
627
633
628
634
629
635
-
<footerclass="footer"><divclass="nav-footer"><divclass="nav-footer-center"><divclass="toc-actions d-sm-block d-md-none"><ul><li><ahref="https://github.com/medyan-dev/MEDYAN.jl/edit/master/quartodocs/docstrings/medyan.newmembrane--a714b4a1c87062be.qmd" class="toc-action"><iclass="bi bi-github"></i>Edit this page</a></li><li><ahref="https://github.com/medyan-dev/MEDYAN.jl/issues/new" class="toc-action"><iclass="bi empty"></i>Report an issue</a></li></ul></div></div></div></footer></body></html>
630
+
<footerclass="footer"><divclass="nav-footer"><divclass="nav-footer-center"><divclass="toc-actions d-sm-block d-md-none"><ul><li><ahref="https://github.com/medyan-dev/MEDYAN.jl/edit/master/quartodocs/docstrings/medyan.apply_chem_boundary--86fcf1aed37adaf6.qmd" class="toc-action"><iclass="bi bi-github"></i>Edit this page</a></li><li><ahref="https://github.com/medyan-dev/MEDYAN.jl/issues/new" class="toc-action"><iclass="bi empty"></i>Report an issue</a></li></ul></div></div></div></footer></body></html>
<li><p><code>base_diffusion_coeffs::Vector{Float64}</code>: Diffusion coefficients indexed by diffusing species id (nm²/s)</p></li>
221
221
<li><p><code>membrane_species_params::StaticArraysCore.SVector{NUM_MEMBRANEDIFFUSINGSPECIES, MEDYAN.MembraneSpeciesParams} where NUM_MEMBRANEDIFFUSINGSPECIES</code>: Membrane species parameters indexed by membrane diffusing species id.</p></li>
222
-
<li><p><code>min_compartment_volume_ratio::Float64</code>: Smallest volume a compartment can have before being deactivated as a ratio to a full compartment volume.</p></li>
222
+
<li><p><code>min_chem_voxel_volume_ratio::Float64</code>: Smallest volume a chem voxel can have before being deactivated as a ratio to a full chem voxel volume.</p></li>
223
223
<li><p><code>chemistryengine::MEDYAN.RDMESampler</code>: The reaction diffusion master equation sampler, contains the diffusing and regular fixed species state</p></li>
224
+
<li><p><code>chem_voxel_volumes::Array{Float64, 3}</code>: Volume of each chemical voxel</p></li>
225
+
<li><p><code>chem_voxel_areas::Array{Float64, 4}</code>: Areas of (-x, -y, -z) faces of each chemical voxel</p></li>
224
226
<li><p><code>chem_cylinders::Vector{MEDYAN.ChemCylinders}</code>: Data about filament cylinders, indexed by filament type id</p></li>
<li><p><code>membranes::Vector</code>: All membrane meshes.</p></li>
229
+
<li><p><code>next_membid::Ref{MEDYAN.MembId}</code>: Next memb id</p></li>
230
+
<li><p><code>membid2membidx::Dict{MEDYAN.MembId, UInt32}</code>: map from memb id to index memb indexes can change whenever a memb is removed, but id’s are stable</p></li>
231
+
<li><p><code>membidx2membid::Vector{MEDYAN.MembId}</code>: map from memb index to id</p></li>
<li><p><code>decimated_2mon_site_managers::Vector{MEDYAN.AbstractDecimated2MonSiteManager}</code>: Site managers, indexed by site id</p></li>
229
234
<li><p><code>filamentsites::Tuple{Vararg{Tuple{Vararg{MEDYAN.SiteData}}}}</code>: The filament site definitions, indexed by filament type id, filament site id to get a SiteData with fields of id, site, fxsid</p></li>
<li><p><code>collision_skin::Float64</code>: Extra collision neighbor list cutoff radius in nm. The neighbor lists are reset after something moves over this amount</p></li>
252
257
<li><p><code>collision_switchover_scale_unitless::Float32</code>: Smoothing scale to avoid sharp forces when two cylinders are collinear</p></li>
253
258
<li><p><code>filamentmechparams::Vector{MEDYAN.FilamentMechParams}</code>: The filament mechanical parameters, indexed by filament type id</p></li>
254
-
<li><p><code>membranemechparams::Vector{MEDYAN.MembraneMechParams}</code>: Membrane mechanical parameters, indexed by membrane type id.</p></li>
255
259
<li><p><code>func_membranespeciespotentialenergy::Any</code>: Membrane species potential energy function. See docs on default function for more info.</p></li>
256
260
<li><p><code>external_energy_forces!::Any</code>: External energy/force expressions. This should be a mutating function taking a <code>(fc::MEDYAN.ForceContext, vectorized_x)</code>, which adds to <code>fc.forces, fc.energies, and fc.energy</code>. The energy and force must be consistent, and this is not checked. This can be used as ad-hoc solutions to experiment with uncommon forces, such as specifically designed attachments, etc. If this variable is used often, consider moving it into MEDYAN.</p></li>
257
261
<li><p><code>chemboundary::MEDYAN.Boundary</code>: chemical boundary, updates compartment volumes and diffusion rates</p></li>
258
-
<li><p><code>meshindex_as_chemboundary::Ref{Int64}</code>: The membrane index used as chemical boundary. If values other than 0 is used, the actual interior region of the chemical boundary is the intersection between</p>
259
-
<ul>
260
-
<li>the interior of <code>chemboundary</code>, and</li>
261
-
<li>the interior of the membrane mesh at this index.</li>
262
-
</ul>
263
-
<p>Note: Since the membrane may change its shape often, <code>set_chemboundary!</code> might need to be called often accordingly to update volumes of compartments.</p></li>
0 commit comments