https://github.com/borgesaugusto/seapipy
API for creating Surface Evolver files with python
https://github.com/borgesaugusto/seapipy
api science simulations surface-evolver tissues
Last synced: 2 months ago
JSON representation
API for creating Surface Evolver files with python
- Host: GitHub
- URL: https://github.com/borgesaugusto/seapipy
- Owner: borgesaugusto
- License: bsd-3-clause
- Created: 2022-11-12T12:01:43.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-03T14:15:50.000Z (over 1 year ago)
- Last Synced: 2025-12-15T11:13:59.439Z (6 months ago)
- Topics: api, science, simulations, surface-evolver, tissues
- Language: Python
- Homepage:
- Size: 80.1 KB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://doi.org/10.5281/zenodo.10809290)
[](https://pypi.org/project/seapipy/)
[](https://anaconda.org/conda-forge/seapipy)
[](https://pypi.org/project/seapipy/)
[](https://codecov.io/gh/borgesaugusto/seapipy)
[](https://seapipy.readthedocs.io/en/latest/?badge=latest)
# SeapiPy
#### A Surface evolver API for python
### Documentation:
https://seapipy.readthedocs.io/
---
### Installation
Using PIP
```bash
pip install seapipy
```
Using conda
```bash
conda install conda-forge::seapipy
```
---
### Usage
To create a simple tissue 10x10 tissue, you can create a lattice object and initialize the vertices, edges and cells of
the system. Then, you might create values for the cell volumes directly. You could also create normally distributed
tensions for the edges.
```python
import seapipy as sep
lattice = sep.lattice_class.Lattice(10, 10)
vertices, edges, cells = lattice.create_example_lattice()
volume_values = {k: 500 for k, v in cells.items()}
initial_edges_tensions = lattice.get_normally_distributed_densities(edges)
```
Then, you could create the Surface Evolver object using this variables and then initialize the Surface Evolver slate
where all the functions will be written into, before saving to disk
```python
se_object = sep.surface_evolver.SurfaceEvolver(vertices,
edges,
cells,
initial_edges_tensions,
volume_values,
polygonal=False)
se_file = se_object.generate_fe_file()
```
The polygonal=False allows curved edges to exist in the tissue. Now, various Surface Evolver functions might be added
to the file buffer in the *se_file* variable. For example we could add an initial relaxing for the tissue with
```python
se_object.initial_relaxing()
```
Afterwards, we could add a saving function to create a checkpoint in the Surface Evolver simulation using
```python
se_object.save_one_step("path/to/saving/checkpoint", "step_")
```
Which would save the state of the Surface Evolver simulation at *"path/to/saving/chekcpoint"* with name *"step_"* followed
by the number of times it has been saved.
Finally you could save the whole Surface Evolver slate into the disk and run it using
```python
se_object.save_fe_file("SurfaceEvolverFile")
sep.command.run_evolver("path/to/SurfaceEvolverFile", "path/to/SurfaceEvolverExecutable")
```
### How to cite us
[](https://doi.org/10.5281/zenodo.10809290)
This tool is also described in [bioRxiv](https://www.biorxiv.org/content/10.1101/2024.05.28.595800v1).
To cite that preprint you may use:
**ForSys: non-invasive stress inference from time-lapse microscopy**
Augusto Borges, Jerónimo R. Miranda-Rodríguez, Alberto Sebastián Ceccarelli, Guilherme Ventura, Jakub Sedzinski, Hernán López-Schier, Osvaldo Chara
bioRxiv 2024.05.28.595800; doi: https://doi.org/10.1101/2024.05.28.595800