Open Mobinati opened 5 months ago
Hi @Mobinati thank your for your interest in using tyssue!
Specs are used to set default uniform values for the parameter, but you can later change those for specific cells by updating the value in the sheet.face_df
dataframe. For example, if you want the central cell to have a prefered area that depends on some function of their position, you can run:
sheet.face_df["prefered_area"] = A0 * sheet.face_df['x']**2
Of course this is an artificial example ;)
The important point is that what's used in the computation of the energy terms for example depends on the values in the face_df
, edge_df
and vert_df
dataframes, and you can change the parameter values on any line of those pandas dataframes.
Hope this helps,
Best G
thanks a lot for the hint, actually I made a Custome function which works fine. but I have another issue with periodic boundaries.
how can I have a square box with cells connected to their front sides? for example for this tissue:
sheet = Sheet.planar_sheet_2d(
'basic2D', # a name or identifier for this sheet
nx=20, # approximate number of cells on the x axis
ny=20, # approximate number of cells along the y axis
distx=1, # distance between 2 cells along x
disty=1 # distance between 2 cells along y
)
sgeom.update_all(sheet)
I already have tried these but didn't work.
spec["settings"].update({"boundaries": {"x": [1, 18], "y": [1, 18]}})
sheet = Sheet("periodic", model_specs)
I am using Tyssue, and It's well-structured. thanks a lot. Just had a question, how is it possible to define the specs like prefered_area or prefered_perimeter not be unique for all cells in the tissue. how can we apply the energy minimization in a way that prefered_area or prefered_area be defined by a function and be specific for each cell?