Skip to content

Commit

Permalink
work on cytosim process
Browse files Browse the repository at this point in the history
  • Loading branch information
prismofeverything committed Mar 8, 2022
1 parent f6094fd commit c988f83
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 3 deletions.
13 changes: 13 additions & 0 deletions vivarium_models/processes/cytosim.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,20 @@ def load_report(output):
for id, fiber_points, n_points, fiber_type in zip(all_ids, all_fibers, all_n_points, all_types)}


def temperature_to_kT(temp):
return 1.3806e-5 * (temp + 273.15)


# def random_actin_fiber(bounds):


class CytosimProcess(Process):
defaults = {
'model_name': 'cytosim_model',
'internal_timestep': 0.001,
'viscosity': 1,
'actin_segmentation': 0.1,
'temperature': 37, # in Celsius
'cytosim_template': "cytosim-buckling.cym",
'cell_radius': 5,
'confine': None,
Expand Down Expand Up @@ -121,6 +131,9 @@ def next_update(self, timestep, state):
cytosim_config = template.render(
internal_timestep=self.parameters['internal_timestep'],
# radius=self.parameters['cell_radius'],
kT=temperature_to_kT(self.parameters['temperature']),
viscosity=self.parameters['viscosity'],
actin_segmentation=self.parameters['actin_segmentation'],
confine=self.parameters['confine'],
bounds_x=box_extent[0],
bounds_y=box_extent[1],
Expand Down
37 changes: 37 additions & 0 deletions vivarium_models/templates/actin.cym
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
% Actin filaments with advanced rendering
% F. Nedelec, November 2015

set simul system
{
time_step = 0.001
viscosity = 1
display = ( point_value=0.001; style=3; )
}

set space cell
{
shape = sphere
}

new cell
{
radius = 0.125
}

set fiber actin
{
rigidity = 0.05
segmentation = 0.0055 %that is 4 monomers
confine = inside, 200
display = ( style=actin; color=red, dark_red; end_color=yellow; )
}

new 10 actin
{
length = 0.25
}

run 5000 system
{
nb_frames = 10
}
6 changes: 3 additions & 3 deletions vivarium_models/templates/cytosim-buckling.cym
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
set simul system
{
time_step = {{internal_timestep}}
viscosity = 0.01
kT = 0.001
viscosity = {{viscosity}}
kT = {{kT}}
}

set space cell
Expand All @@ -21,7 +21,7 @@ new cell
set fiber actin
{
rigidity = 10
segmentation = 0.1
segmentation = {{actin_segmentation}}
display = ( point=6,1; line=10,2; )
{% if confine %}
confine = {{confine.side}}, {{confine.force}}, {{confine.space}}
Expand Down

0 comments on commit c988f83

Please sign in to comment.