seapipy


Nameseapipy JSON
Version 0.2.1 PyPI version JSON
download
home_pageNone
SummaryA Surface evolver API for python
upload_time2024-03-22 13:19:24
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseBSD 3-Clause License Copyright (c) 2022, Augusto Borges All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords surface evolver api vertex model
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10809290.svg)](https://doi.org/10.5281/zenodo.10809290)
[![PyPI version](https://badge.fury.io/py/seapipy.svg)](https://pypi.org/project/seapipy/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/seapipy)](https://pypi.org/project/seapipy/)
[![codecov](https://codecov.io/gh/borgesaugusto/seapipy/graph/badge.svg?token=SJFFTX412I)](https://codecov.io/gh/borgesaugusto/seapipy)
[![Documentation Status](https://readthedocs.org/projects/seapipy/badge/?version=latest)](https://seapipy.readthedocs.io/en/latest/?badge=latest)
# SeapiPy 
#### A Surface evolver API for python


###  Documentation: 
https://seapipy.readthedocs.io/

---

###  Installation

---

###  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
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10809290.svg)](https://doi.org/10.5281/zenodo.10809290)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "seapipy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "Surface Evolver, API, Vertex model",
    "author": null,
    "author_email": "Augusto Borges <borges.augustoar@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/88/ac/67998870dd025e9a816e8b16795fab608238bf8a180b0dd83eaa3178f282/seapipy-0.2.1.tar.gz",
    "platform": null,
    "description": "[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10809290.svg)](https://doi.org/10.5281/zenodo.10809290)\n[![PyPI version](https://badge.fury.io/py/seapipy.svg)](https://pypi.org/project/seapipy/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/seapipy)](https://pypi.org/project/seapipy/)\n[![codecov](https://codecov.io/gh/borgesaugusto/seapipy/graph/badge.svg?token=SJFFTX412I)](https://codecov.io/gh/borgesaugusto/seapipy)\n[![Documentation Status](https://readthedocs.org/projects/seapipy/badge/?version=latest)](https://seapipy.readthedocs.io/en/latest/?badge=latest)\n# SeapiPy \n#### A Surface evolver API for python\n\n\n###  Documentation: \nhttps://seapipy.readthedocs.io/\n\n---\n\n###  Installation\n\n---\n\n###  Usage\nTo create a simple tissue 10x10 tissue, you can create a lattice object and initialize the vertices, edges and cells of \nthe system. Then, you might create values for the cell volumes directly. You could also create normally distributed\ntensions for the edges.\n```python\nimport seapipy as sep\nlattice = sep.lattice_class.Lattice(10, 10)\nvertices, edges, cells = lattice.create_example_lattice()\nvolume_values = {k: 500 for k, v in cells.items()}\ninitial_edges_tensions = lattice.get_normally_distributed_densities(edges)\n```\n\nThen, you could create the Surface Evolver object using this variables and then initialize the Surface Evolver slate \nwhere all the functions will be written into, before saving to disk\n```python\nse_object = sep.surface_evolver.SurfaceEvolver(vertices, \n                                               edges, \n                                               cells,\n                                               initial_edges_tensions, \n                                               volume_values, \n                                               polygonal=False)\nse_file = se_object.generate_fe_file()\n```\n\nThe polygonal=False allows curved edges to exist in the tissue. Now, various Surface Evolver functions might be added \nto the file buffer in the *se_file* variable. For example we could add an initial relaxing for the tissue with\n```python\nse_object.initial_relaxing()\n```\n\nAfterwards, we could add a saving function to create a checkpoint in the Surface Evolver simulation using\n```python\nse_object.save_one_step(\"path/to/saving/checkpoint\", \"step_\")\n```\n\nWhich would save the state of the Surface Evolver simulation at *\"path/to/saving/chekcpoint\"* with name *\"step_\"* followed\nby the number of times it has been saved. \nFinally you could save the whole Surface Evolver slate into the disk and run it using\n```python\nse_object.save_fe_file(\"SurfaceEvolverFile\")\nsep.command.run_evolver(\"path/to/SurfaceEvolverFile\", \"path/to/SurfaceEvolverExecutable\")\n```\n\n\n### How to cite us\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10809290.svg)](https://doi.org/10.5281/zenodo.10809290)\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License  Copyright (c) 2022, Augusto Borges All rights reserved.  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
    "summary": "A Surface evolver API for python",
    "version": "0.2.1",
    "project_urls": {
        "Homepage": "https://github.com/borgesaugusto/seapipy/"
    },
    "split_keywords": [
        "surface evolver",
        " api",
        " vertex model"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6805a9408d3ae28adee9481e17bcfc3577edb46056cb2d55a429a675f2c4d8d7",
                "md5": "4b3f0282794d54b60f08498fe7d78081",
                "sha256": "36c7ab5557cbd460fcfa3bea6610eafb52effe5fe8d1218d0474417f0d336100"
            },
            "downloads": -1,
            "filename": "seapipy-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4b3f0282794d54b60f08498fe7d78081",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 12547,
            "upload_time": "2024-03-22T13:19:23",
            "upload_time_iso_8601": "2024-03-22T13:19:23.312344Z",
            "url": "https://files.pythonhosted.org/packages/68/05/a9408d3ae28adee9481e17bcfc3577edb46056cb2d55a429a675f2c4d8d7/seapipy-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "88ac67998870dd025e9a816e8b16795fab608238bf8a180b0dd83eaa3178f282",
                "md5": "57475d2f29fb4aa622032885526a7cf0",
                "sha256": "e47a7f0af10e487da3af71849d8c7677b19f7cc76d9cbb7b15ece447bc3bd058"
            },
            "downloads": -1,
            "filename": "seapipy-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "57475d2f29fb4aa622032885526a7cf0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 12596,
            "upload_time": "2024-03-22T13:19:24",
            "upload_time_iso_8601": "2024-03-22T13:19:24.892092Z",
            "url": "https://files.pythonhosted.org/packages/88/ac/67998870dd025e9a816e8b16795fab608238bf8a180b0dd83eaa3178f282/seapipy-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-22 13:19:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "borgesaugusto",
    "github_project": "seapipy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "seapipy"
}
        
Elapsed time: 0.28483s