eptm_class module¶
Implementation of a class to represent an epithelial tissue comprised of cell cortices and adhesions.
-
class
eptm_class.
Epithelium
(radius=35, n=2000, param_dict={}, tissue_type='within_hexagon', verbose=False, disordered_tissue_params={}, cell_kwargs={}, **eptm_kwargs)[source]¶ Bases:
object
Class to hold and manipulate all objects that constitute a tissue: cells, adhesion and boundaries.
The adhesion objects, with their cell conection information, are stored here. This information is passed to each cell as a list, rather than adhesion itself, for memory.
-
class
OOMFormatter
(order=0, fformat='%1.1f', offset=True, mathText=True)[source]¶ Bases:
matplotlib.ticker.ScalarFormatter
-
activate_fast_adhesions
(on_off)[source]¶ Turn forces from fast adhesions on or off. Even when off, fast adhesions are used to calculate active contractility.
- Parameters
on_off (bool) – Turn forces from fast adhesions on or off.
-
activate_sidekick_adhesions
(on_off)[source]¶ Turn sdk vertex forces on or off
- Parameters
on_off (bool) – Activate sidekick forces or not.
-
activate_slow_adhesions
(on_off)[source]¶ Turn slow adhesion forces on or off
- Parameters
on_off (bool) – Activate slow adhesions, or not.
-
adjust_intersections
()[source]¶ Applies a hand-of-god correction to prevent intersections of cortices.
-
apply_prestretch_to_cell_identity_pairs
(prestretch, cell_pair, unipolar=False)[source]¶ Add active contractility to cell_pairs that share adhesions.
- Parameters
prestretch (float) – Magnitude of prestretch
cell_pair (list) – A list of two cell identites that will localise contractility on shared junctions e.g.
['A', 'B']`
.unipolar (bool) – (Default value = False) Apply on only the first cell.
-
apply_prestretch_to_whole_cells
(prestretch, cells)[source]¶ Apply a prestretch to the whole cortex of specified cells.
- Parameters
prestretch (float) – Magnitude of of prestretch.
cells (list) – List of cell identities that this will be applied to.
True if each cell shares adehsions with both other cells. Doesn’t work for the tissue boundary
- Parameters
c1_ref (string) – Identifier for first cell
c2_ref (string) – Identifier for second cell
c3_ref (string) – Identifier for third cell
- Return vertex_check
True if cells share a vertex
- Return type
bool
-
create_14_cell_eptm_from_fitted_single_cell
()[source]¶ Build a 14-cell tissue, symmetric in x and y, from a tissue made up of a single cell in a hexagon.
-
create_17_cell_eptm_from_fitted_single_cell
()[source]¶ Create a tissue with 17 cells and two axes of symmetry from a tissue with a single cell in a hexagon.
-
create_19_cell_eptm_from_fitted_single_cell
()[source]¶ Build a tissue with 19 cells from a tissue with a single cell enclosed in a hexagon.
-
create_3_cell_eptm_from_fitted_single_cell
()[source]¶ Tissue with 3 cells enclosed in a stencil. Need to start with a single cell in a hexagon.
-
create_disordered_tissue_in_ellipse
(param_dict=None, **kwargs)[source]¶ Creates a disordered tissue using a matern point process.
- Parameters
param_dict (dict) – (Default value = None) kappa, omega0, delta dictionary for cells.
kwargs (dict) – Optional arguments for the tissue.
-
decimate_all_cells_onto_new_grid
(factor)[source]¶ Changes ‘n’ for every cell by interpolating their variables onto a new grid.
- Parameters
factor (int) – The factor which which to scale the number of cortex nodes.
-
deform_elastic_boundary
(stiffness_x=None, stiffness_y=None, update_ads=False)[source]¶ Relax tissue with an elastic BC for the boundary
- Parameters
stiffness_x (float) – (Default value = None) Stiffness along x-axis.
stiffness_y (float) – (Default value = None) Stiffness along y-axis.
update_ads (bool) – (Default value = False) Whether to perform an update of the adhesions.
-
duplicate_cell
(cell_to_copy, x_shift, y_shift, roll=0, theta_shift=0, identifier='B')[source]¶ Duplicates a cell in the tissue, with a specified shift in x and y coords
- Parameters
cell_to_copy (string) – Identity of cell that will be duplicated
x_shift (flaot) – Translation in x-direction.
y_shift (float) – Translation in y-direction.
roll (int) – (Default value = 0) Roll the cell variables to change position of starting index.
theta_shift (float) – (Default value = 0) Shift theta by a scale factor (multiples of 2pi).
identifier (string) – (Default value = ‘B’) Identitfier for new cell.
-
get_all_tissue_vertices
(apply_to='all')[source]¶ Get a set of all unique vertices (as lists of 3 cell identities) in the tissue
- Parameters
apply_to (string) – (Default value = ‘all’) If not
'all'
, a list of cell identifiers that the function will be applied to.- Return vertices
A list of triplets of cell identities.
- Return type
list
-
get_all_vertices_for_cell
(cell_ref)[source]¶ Get a list of identities of neighbours that a cell shares adhesions with.
- Parameters
cell_ref (string) – Identity of cell.
- Return vertices
List of neighbour identities.
- Return type
list
-
get_bicellular_junctions_for_cell
(cell_ref, smooth=True, d_threshold=0.015)[source]¶ Get the local indices (i,j) for the coordinates of the endpoints of bicellular junctions in a cell
- Parameters
cell_ref (string) – identity of cell.
smooth (bool) – (Default value = True) Whether to smooth the cortex curvature to find the straight segments.
d_threshold (float) – (Default value = 0.015) Threshold below which cortex is classed as stright.
- Return bi_junctions
(list([id1, id2],…)) A list of the paired local ids for where the bicellular junctions start and end.
- Return type
string
-
get_boundary_stress_tensor
()[source]¶ Calculate stress tensor of the boundary stencil odo needs to be upgraded with new adhesion class make sure factoring for spacing on both sides.
- Return stress
The boundary stress tensor.
- Return type
np.array
-
get_cartesian_coords_of_vertex_triangle
(cell_1_ref, cell_2_ref, cell_3_ref)[source]¶ Get cartesian coords of the vertex traingle from the local idxs
- Parameters
cell_1_ref (string) – Idientifier of first cell.
cell_2_ref (string) – Idientifier of second cell.
cell_3_ref (string) – Idientifier of third cell.
- Return vertex
The ((x1,y1), (x2,y2), (x3,y3)) cartesian coords of the triangle.
- Return type
tuple
-
get_cell_sum_stress_tensor
()[source]¶ The sum of all cell stress tensors.
- Return stress
The 2x2 tissue stress tensor.
- Return type
np.array
-
get_coordinates_of_junction_midpoint
(cell_1_ref, cell_2_ref)[source]¶ Find the local idx midpoint of the junction shared between two cells
- Parameters
cell_1_ref (string) – Idientifier of first cell.
cell_2_ref (string) – Idientifier of second cell.
- Return midpoint
the local indices in each cell (idx_c1, idx_c2) of the junction midpoint
- Return type
(int, int)
-
get_coordinates_of_nearest_points_between_cells
(cell_1_ref, cell_2_ref)[source]¶ Get the local idxs for the nearest points between two cell cortices
- Parameters
cell_1_ref (string) – Identity of one cell.
cell_2_ref (string) – Identity of another cell.
- Return coords
Local indices of cells where the distance between them is minimised.
- Return type
(int, int)
-
get_cortex_coord_of_vertex_triangle
(cell_1_ref, cell_2_ref, cell_3_ref)[source]¶ Get local index for the coords of the vertex triangle on three cells.
- Parameters
cell_1_ref (string) – Idientifier of first cell.
cell_2_ref (string) – Idientifier of second cell.
cell_3_ref (string) – Idientifier of third cell.
- Return vertex
The three local indices on each cortex, where the vertex is located on each cortex.
- Return type
tuple
-
get_indices_of_points_within_distance
(points1, points2, cutoff)[source]¶ - Function to return the indices of points 1 that are within ‘cutoff’ of points 2.
odo make a sklearn tree of the wall to increase speed.
- Parameters
points1 (list) – The list of (x,y) points that will find nearest points in points2
points2 (list) – The reference list of points.
cutoff (float) – Maximum search distance.
- Return indices
The indices of points1 list that are within cutoff to points2.
- Return type
list
-
static
get_indices_to_order_anticlockwise
(points, centroid=None)[source]¶ Order a given set of points anticlockwise, centroid calculated from points if not given
- Parameters
points (np.array) – Input array of (x,y) coord pairs.
centroid (tuple) – (Default value = None) Centroid of points. Can also calculate on the fly.
- Returns
The indices that order the list.
- Return type
list
-
get_junction_cell_pairs
()[source]¶ Returns a set of the pairs of cells belonging to a junction, i.e. [(c1, c2),…], for all bicellular junctions in the tissue.
- Return junc_pairs
A list of the bicellualr junctions in the tissue.
- Return type
list
Find the length of the bijunction shared between two cells
- Parameters
cell_1_ref (string) – Idientifier of first cell.
cell_2_ref (string) – Idientifier of second cell.
alternative_junc_refs (list) – (Default value = None) Possible alternative junctions to try. Passed as [[‘ref_1’, ‘ref_2’],…]
- Return length
The length of cortex where the two cells share adhesions. Returns 0 if they don’t share any.
- Return type
float
-
get_locations_of_cortex_adhesion_transition
(cell_1_ref, vertex_neighbours)[source]¶ Find where cell 1 (cell_1_ref) swaps from adhering to cell 2 to cell 3. vertex_neighbours = (cell_2_ref, cell_3_ref)
- Parameters
cell_1_ref (string) – Identity of cell 1.
vertex_neighbours (list) – List (len=2) of neighbour identities.
- Return local_index
Local idx in cell 1 where there is an adhesion transition.
- Return type
int
-
get_shortest_distance_between_two_cells
(cell_1_ref, cell_2_ref)[source]¶ Find the shortest distance between two cells. This is a proxy for the length of the shrinking junction when cell_1_ref = “C” and cell_2_ref = “D”
- Parameters
cell_1_ref (string) – Reference of first cell id.
cell_2_ref (string) – Reference of first cell id.
- Return min_dist
The distance between the cortices.
- Return type
float
-
get_stress_tensor_around_cell_cluster_depreciated
()[source]¶ Calculate stress tensor of all the internal cells.
-
get_tissue_pressure
()[source]¶ Isotropic part of tissue-level stress
- Return stress
Isotropic componenet of stress tensor.
- Return type
float
-
get_tissue_width_and_height
()[source]¶ Top and bottom (delta x,delta y) of max/min of boundary stencil
- Return width_height
The (width, height) of the boundary stencil.
- Return type
tuple
-
get_unbalanced_force_residual
(norm='L2')[source]¶ Calculate the unbalanced force at centre of every bicellular junction. Can take L1 or L2 norm.
- Parameters
norm (string) – (Default value = ‘L2’)
-
get_vertex_circumcircle
(cell_1_ref, cell_2_ref, cell_3_ref)[source]¶ Get centroid and radius of circumcircleinsribed at vertices
- Parameters
cell_1_ref (string) – Idientifier of first cell.
cell_2_ref – Idientifier of second cell.
cell_3_ref (string) – Idientifier of third cell.
- Return circle_props
The (x,y) centre and radius of the circumcircle.
- Return type
tuple
-
get_xy_segment_lengths
(x, y)[source]¶ Get the spacing between nodes on a curve specified by (array(x), array(y))
- Parameters
x (np.array) – The x-coords of the nodes
y (np.array) – The y-coords of the nodes
- Return spacing
The spacing.
- Return type
np.array
-
hand_of_god_distances_to_delta
(initial_adhesion_update=True)[source]¶ Moves any cortices closer than delta away from each other
- Parameters
initial_adhesion_update (bool) – (Default value = True) Whether to re-calculate the adhesions for all cells
-
impose_pcp
(prestretch)[source]¶ Applies prestrain to all vertical junctions. Works only in the 14-cell tissue.
- Parameters
prestretch (float) – The magnitude of prestretch.
-
pickle_self
(SAVE_DIR=None, name=None, prune_adhesions=True)[source]¶ Pickles and saves an instance of this class in its current state.
- Parameters
SAVE_DIR (string) – (Default value = None) Save location.
name (string) – (Default value = None) Filename
prune_adhesions – (Default value = True) Remove fast adhesions and cell-stored adhesions before saving (recommended for space).
:type prune_adhesions : bool
-
plot_bijunction_tension_arrows
(cell_list, ax=None, num_extra_indices=2, arrow_col='k', arrow_scale=0.015, arrow_width=0.004)[source]¶ Plot arrows representing magnitude of tension in cortex
- Parameters
cell_list (list) – List of cell idetifiers on which arrows will be plotted.
ax (mpl axis) – (Default value = None) Axis on which to plot.
num_extra_indices (int) – (Default value = 2) Average the force over a few indices.
arrow_scale (float) – (Default value = .015) Scale the matplotlib arrow.
arrow_col (string) – (Default value = ‘k’) Arrow colour.
arrow_width (float) – (Default value = 0.004) Width of arrow.
-
plot_xy_on_trijunction
(ax=None, axEqual=True, plotAdhesion=True, plot_stress=False, plot_shape=False, plot_adhesion_forces=True, plot_boundary=True, cell_ids=[], lagrangian_tracking=False, plot_tension=False, plot_boundary_movement=True, plot_cbar=True, cell_kwargs={}, sim_type='auto')[source]¶ Plot the tissue and the boundary.
- Parameters
ax (mpl axis) – (Default value = None) Axis object to plot on.
plotAdhesion (bool) – (Default value = True) Whether to plot adhesions.
plot_shape (bool) – (Default value = False) Plot the principal axis of shape.
plot_boundary (bool) – (Default value = True) Plot the boundary?
lagrangian_tracking (bool) – (Default value = False) Plot Lagrange markers.
plot_boundary_movement (bool) – (Default value = True) Plot the position of the boundary in the last step.
cell_kwargs (dict) – (Default value = {}) Optional arguments for plotting the cells.
axEqual (bool) – (Default value = True) As in Matplotlib axis.
plot_stress (bool) – (Default value = False) Plot the principal axis of stress.
plot_adhesion_forces (bool) – (Default value = True) Plot arrows for the adhesion forces.
cell_ids (list) – (Default value = []) List of cell identifiers to plot.
plot_tension (bool) – (Default value = False) Plot the magnitude of tension in cortex with a heatmap.
plot_cbar (bool) – (Default value = True) Plot colourbars for the cell stress and tension.
sim_type (string) – (Default value = ‘auto’) Used to scale the stress colourmaps e.g. if there are lots of cables.
-
prune_slow_adhesions_by_length
(max_length)[source]¶ Remove slow adhesions if they are longer than ‘max_length’
- Parameters
max_length (float) – Adhesions with length above this will be discarded.
-
relax_deformable_boundary
(stiffness_x=None, stiffness_y=None, update_adhesions=True, pure_shear=False, max_shift=0.025, max_shift_tol=0.0001)[source]¶ Calculate the stress at the boundary and deform it elastically, updating cell psoitions as it moves to equilibrium.
- Parameters
stiffness_x (float) – (Default value = None) Stiffness of boundary in x-direction.
stiffness_y (float) – (Default value = None) Stiffness of boundary in y-direction.
update_adhesions (bool) – (Default value = True) Perform adhesion update?
pure_shear (bool) – (Default value = False) Enforce constant area?
max_shift (float) – (Default value = 0.025) Maximum boundary strain (can help prevent the boundary overlapping cells).
max_shift_tol (float) – (Default value = 1e-4) We don’t get closer than this to a cell.
- Return success
Whether relaxation passed or not.
- Return type
bool
-
relax_eptm_with_boundary
(stiffness_x=None, stiffness_y=None, max_solves=1)[source]¶ - Calculate the stress at the boundary and relax the boundary. N.B. stress and strain names
are wrong way around below.
- Parameters
stiffness_x (float) – (Default value = None) Stiffness of boundary in x-direction.
stiffness_y (float) – (Default value = None) Stiffness of boundary in y-direction.
max_solves (in) – (Default value = 1) Maximum jiggles to try to get to equilibrium before giving up.
-
relax_eptm_with_germband_bcs
(posterior_pull_shift=None, stiffness_y=None, max_solves=5)[source]¶ Relax eptm with BCs from GBE. Viscous D-V, fixed anterior and posterior pull. NB this is very specific to the fixed boundary with 14 cells.
- Parameters
posterior_pull_shift (float) – (Default value = None) Strain to apply to the right boundary nodes.
stiffness_y (float) – (Default value = None) Tissue stiffness in y.
max_solves (int) – (Default value = 5) Maximum jiggles to try before giving up.
-
remesh_all_cortices
(coarsen=True, refine=True)[source]¶ Add/remove mesh nodes if spacing too big/small
- Parameters
coarsen (bool) – (Default value = True). Boolean, whether to adaptively remove mesh nodes.
refine (bool) – (Default value = True). Boolean, whether to adaptively add mesh nodes.
-
remove_redundant_member_variables
()[source]¶ Deletes old, lingering variables that are taking up space
-
remove_sdk_from_a_junction
(junc)[source]¶ Removes sdk from the vertices of a junction defined as junc = [cell_ref_1, cell_ref_2]
- Parameters
junc (list) – A list of the two cell identities that make the bicellular junction.
-
static
rotate_curve_about_line
(x, y, m, c=None)[source]¶ For plotting the symmetric junctions, rotate the soln m is gradient.
- Parameters
x (np.arrays) – x-coords of the line.
y (np.array) – y-coords of the line.
m (float) – Gradient of line
c (float) – (Default value = None) y-intercept
- Returns
The new (x,y) arrays representing the line coordinates.
- Return type
tuple
-
run_simulation_timestep
(apply_to='all', viscous_cells='all')[source]¶ Run a full simulation timestep, including viscous length updates and solving to equilibrium.
- Parameters
apply_to (list) – (Default value = ‘all’) List of cells to apply function to.
viscous_cells – (Default value = ‘all’) List of cells that will have length and area updates.
-
scale_cells_to_fit_adhesion_to_delta
()[source]¶ Scale all cells such that their adhesions are within delta apart Note, we do them in sequence, rather than parallel, so no cells end up overlapping
-
set_adhesion_beta_scale_factor
(adhesion_beta_scale_factor)[source]¶ Set the scale factor to normalise fast adhesion forces in the meanfield.
- Parameters
adhesion_beta_scale_factor (float) – Exponential scaling factor.
-
set_adhesion_search_radius
(radius)[source]¶ Sets the range within which to look for fast adhesion binding pairs. This is used for applying prestretch. For fast adhesion forces, the force is set to zero for lengths above ‘max_adhesion_length’, such that max_adhesion_length must be <= adhesion_search_radius to work properly It is redundant if adhesion_type=meanfield, which adjusts the value to make sure all are connected.
- Parameters
radius – The new search radius.
-
set_adhesion_to_fixed_line_bool
(yes_no)[source]¶ Define whether the elements are adhering to fixed line (a fixed boundary, rather than other cells).
- Parameters
yes_no (bool) – Set to fixed line or not.
-
set_adhesion_type
(new_type)[source]¶ Set how the force for fast adhesions is calculated “meanfield”: update max search length to always find a neighbour, regarless of how far, and calulate the meanfield force. But the force is set to zero for adhesions longer than max_adhesion_length anyway. “nearest”: Use only the nearest neighbouring node. “fixed_radius”: Attach to all neighbours within ‘adhesion_search_radius’ and calculate meanfield force.
- Parameters
new_type (string) – The rule for calculating adhesion forces.
-
set_area_stiffness
(stiffness)[source]¶ Set area stiffness.
- Parameters
stiffness (float) – The new bulk stiffness.
-
set_cables_in_eptm
(prestretch, id1_cells=[], id2_cells=[], cable_type='bipolar')[source]¶ Initialises PCP cables in the epithelium by assigning prestrain to mis-matched identities
- Parameters
prestretch (float) – The magnitude of prestretch to apply to the cortices
id1_cells (list) – (Default value = []) List of cells to be identity 1
id2_cells (list) – (Default value = []) List of cells to be identity 2
cable_type (string) – (Default value = ‘bipolar’) unipolar or bipolar cables.
-
set_constitutive_model
(model)[source]¶ Updates the constitutive model on all the cortices
- Parameters
model (string) – The new constitutive model.
-
set_fast_adhesion_force_law
(new_type)[source]¶ Constitutive properties of fast adhesions
- Parameters
new_type (string) – The new rule for their constitutive properties.
-
set_max_num_adhesions_for_fast_force_calculation
(num_ads)[source]¶ Number of adhesions to use when calculating the force for fast adhesions.
- Parameters
num_ads (int) – The max num adhesions.
-
set_mesh_coarsening_fraction
(max_fraction_to_remove)[source]¶ Specify what fraction of total nodes can be removed in coarsening
- Parameters
max_fraction_to_remove (float) – Maxiumum fraction of mesh nodes to remove in one pass, when adaptive.
-
set_omega_for_cells
(new_omega, apply_to='all')[source]¶ Updates the adhesion strength for specified cells.
- Parameters
new_omega (float) – New adhesion strength.
apply_to (list) – (Default value = ‘all’) List of cells to apply function to.
-
set_pressure_on_off
(on_off)[source]¶ Turn bulk pressure force on or off in the cells.
- Parameters
on_off (bool) – Control whether to use medial terms.
-
set_prestrain_type
(prestrain_type)[source]¶ Updates the way the prestretch is calculated for all cells.
- Parameters
prestrain_type (string) – The new prestrain type.
-
set_relax_tolerance_for_cells
(tol)[source]¶ Tolerance for getting the tissue to elastic quilibrium
- Parameters
tol (float) – New relax tolerance.
-
set_sdk_restlen
(rest_len)[source]¶ Set the stiffness of an sdk bond
- Parameters
rest_len (float) – The bond rest length.
-
set_sdk_stiffness
(stiffness)[source]¶ Set the stiffness of an sdk bond
- Parameters
stiffness (float) – The bond stiffness.
-
set_verbose
(verbose)[source]¶ Turn print statements on or off.
- Parameters
verbose (bool) – Whether to print information to console.
-
set_viscous_bluk
(on_off)[source]¶ Specify if the area is viscous
- Parameters
on_off (bool) – Turn viscous bulk on or off.
-
set_viscous_cortex
(on_off)[source]¶ Specify if the cortex is viscous
- Parameters
on_off (bool) – turn viscosity on or off
-
smooth_all_variables_with_spline
(apply_to='all', smoothing=0.001)[source]¶ Use a spline to smooth the variables.
- Parameters
apply_to (list) – (Default value = ‘all’) If not
'all'
, a list of cell identifiers that the function will be applied to.smoothing (float) – (Default value = 1e-3) How much smoothing to apply.
-
solve_bvps_in_parallel
(applyTo='all', smoothing=0, hand_of_god=True)[source]¶ Use joblib to solve the bvp for all cortices and reach tissue elastic equilibrium
- Parameters
applyTo (list) – (Default value = “all”) Which cells to apply the function to.
smoothing (float) – (Default value = 0) How much to smooth cortex variables between solving.
hand_of_god (bool) – (Default value = True) Whether to manually move cortices to at least
delta
apart before solving. This helps with stability.
- Return success
Whether solving ran without errors and converged.
- Return type
bool
-
solve_bvps_in_series
(applyTo='all')[source]¶ Solve the bvp for each cell in series to reach elastic equilibrium. odo haven’t tested this functionality in a while
- Parameters
applyTo (list) – (Default value = ‘all’) Which cells to apply the function to.
-
static
truncate_colormap
(cmap, minval=0.0, maxval=1.0, n=1000)[source]¶ Truncate a colourmap between 2 values
- Parameters
cmap – A matplotlib colourmap.
cmap – mpl cmap
minval – (Default value = 0.0) New max value for the colourmap.
minval – (Default value = 0.0) float
maxval – (Default value = 1.0) New min value for colourmap.
maxval – (Default value = 1.0) float
n – (Default value = 1000) Number of values in cmap.
n – (Default value = 1000) int
- Returns
The truncaetd cmap
- Return type
mpl cmap
-
update_adhesion_distances_identifiers_and_indices_for_all_cortices
()[source]¶ Calculate the distances to all adhesions and the identies of the cortices.
-
update_adhesion_points_between_all_cortices
(only_fast=False, build_trees=True, apply_to='all', fresh_sdk=False, prune_slow=False)[source]¶ Update all specified adhesion types. By default, doesn’t prune slow because they may be updated before time progresses
- Parameters
only_fast (bool) – (Default value = False) Update only fast adhesions (and thereby prestretches).
build_trees (bool) – (Default value = True) Update adhesion trees.
apply_to (list) – (Default value = ‘all’) If not
'all'
, a list of cell identifiers that the function will be applied to.fresh_sdk (bool) – (Default value = False) Update sidkekick adhesions.
prune_slow (bool) – (Default value = False) Remove old and long slow adhesions.
-
update_adhesions_for_hexagons
()[source]¶ For only 1 cell. The cell is placed in a hexagonal wall and finds adhesions to the boundary.
-
update_all_max_adhesion_lengths
(new_length, update_adhesion=False)[source]¶ Update the maximum adhesion lengths. This is the maximum length for force calculation, not prestretch application
- Parameters
new_length (float) – New rest length for adhesions.
update_adhesion (bool) – (Default value = False) Whether to refresh the adhesion connection lists.
-
update_all_missing_member_variables
()[source]¶ Initialse missing member variables that may have been created since the eptm was saved
-
update_all_rest_lengths
(apply_to='all')[source]¶ Update the rest lengths, S_0 <- s, of specified cortices under viscous model
- Parameters
apply_to (list) – (Default value = ‘all’) If not
'all'
, a list of cell identifiers that the function will be applied to.
-
update_all_rest_lengths_and_areas
(apply_to='all')[source]¶ Update the rest lengths, S_0 <- s, and areas of specified cortices under viscous model
- Parameters
apply_to (list) – (Default value = ‘all’) If not
'all'
, a list of cell identifiers that the function will be applied to.
-
update_fast_adhesions
(build_trees=True, apply_to='all')[source]¶ Updates the population of fast turnover adhesions, tau_ad < tau_cortex Adds the current positions of the cortices as the possible adhesion points for each cortex
- Parameters
build_trees (bool) – (Default value = True) Rebuild the parameter trees with adhesion nodes.
apply_to (list) – (Default value = ‘all’) If not
'all'
, a list of cell identifiers that the function will be applied to.
-
update_pref_areas
(area=None, apply_to='all')[source]¶ Update the preferred area of specified cells
- Parameters
area (float) – (Default value = None) New preferred area.
apply_to (list) – (Default value = ‘all’) If not
'all'
, a list of cell identifiers that the function will be applied to.
-
update_pressures
(pressure, apply_to='all')[source]¶ Update the pressure acting on the cortex, from the cell bulk.
- Parameters
pressure (float) – Magnitude of pressure force in cell bulk.
apply_to (list) – (Default value = ‘all’) If not
'all'
, a list of cell identifiers that the function will be applied to.
-
update_sidekick_adhesions
(fresh_sdk=True, apply_to='all')[source]¶ Update the sidekick vertices in the tissue and then add data to cells. As with slow adhesions, these are stored in the Cell classes as: slow_ad = (local_cell_index, other_cell_x, other_cell_y, other_cell_mesh_spacing) rather than as adhesion objects.
- Parameters
fresh_sdk (bool) – (Default value = True) Remove the existing sidekick and make new ones.
apply_to (list) – (Default value = ‘all’) If not
'all'
, a list of cell identifiers that the function will be applied to.
-
update_slow_adhesions
(prune=False, apply_to='all')[source]¶ Update the slow adhesions in the tissue and then store in every cell To save memory, slow adhesions are stored in Cell class as: slow_ad = (local_cell_index, other_cell_x, other_cell_y, other_cell_mesh_spacing) rather than as adhesion objects.
- Parameters
prune (bool) – (Default value = False) Remove adhesions based on lifetime.
apply_to (list) – (Default value = ‘all’) If not
'all'
, a list of cell identifiers that the function will be applied to.
-
class