Skip to main content

treillis

Read the Docs License Pypi status

Lattices generation and simulation

treillis (/tʁɛji/, French for truss) is a Python library built to help researchers and whoever is interested in microlattices. It provides tools to modelize 2D and 3D microlattices, to compute their elastic properties as well as calculate stresses, strains and elastic constants. It was written by experimental physicists with the language that they know, and may need some optimization work, but aims at being as easy to use and iterate on as possible.

treillis offers tools to

  • generate lattices from different periodic or random base meshes
  • modify lattice structures by playing with the connectivity, the element shape, the node position...
  • display lattices in paper-quality figures or in interactive 3D figures
  • apply solid mechanics models to the lattices by treating them as basic meshes

Install

Ideally, if we had time and more experience with Python and building packages in general, the requirements would be much lighter. As is, treillis requires:

Install from the source as editable

Clone the repository.

Using Pixi

Install the latest version of Pixi, open a command terminal in the folder root and input pixi shell.

Using conda

Because treillis uses Datoviz for 3D interactive plotting, which does not yet have a conda release, you need to create the environment before being able to install

  • Open a conda command terminal in the folder root.
  • Create the treillis environment from environment.yml with

conda env create --name <YOUR ENVT NAME> --file=environment.yml

  • activate the environment conda activate <YOUR ENVT NAME>
  • install treillis in the environment as editable with
conda install conda-build
conda develop .

OR install treillis with conda install treillis

Pypi

Because the mechanics module of treillis is based on scikit-sparse, it has the same issues with pip install: SuiteSparse needs to be setup first before building the package. Hence, the next paragraph is copied from the scikit-sparse documentation:

To install scikit-sparse, you need to have the SuiteSparse library installed on your system.

It is recommended that you install SuiteSparse and the scikit-sparse dependencies in a virtual environment, to avoid conflicts with other packages. We recommend using Anaconda:

  $ conda create -n scikit-sparse python>=3.10 suitesparse
  $ conda activate scikit-sparse

If you are not using Anaconda, you can install SuiteSparse using your preferred package manager.

On MacOS, you can use Homebrew:

  $ brew install suite-sparse

On Debian/Ubuntu systems, use the following command:

  $ sudo apt-get install python-scipy libsuitesparse-dev

On Arch Linux, run:

  $ sudo pacman -S suitesparse

Documentation

Find the treillis documentation here.

License

treillis is under a GNU lesser general public license v3.0. See LICENSE.

Citation

If you use this library, please kindly cite us! See the CITATION file.

Metadata

Release files for treillis 1.4.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for treillis 1.4.3
File Size Uploaded Provenance Actions
treillis-1.4.3.tar.gz 44.2 MB Without provenance Details for treillis-1.4.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for treillis 1.4.3
File Interpreter ABI Platform Actions
treillis-1.4.3-py3-none-any.whl Python 3 none any Details for treillis-1.4.3-py3-none-any.whl

Total release size: 88.9 MB

Release files / treillis-1.4.3.tar.gz

Download URL treillis-1.4.3.tar.gz
Size 44.2 MB
Tags Source
SHA-256 checksum
How to use checksums
4e568635e8fb7bfe128e86d7feea24a8210998d3868268297d3949b5a3059fe0
BLAKE2b-256 checksum
How to use checksums
a59368b8abe8c61d7c8f7cb9ba42af9e4d507855cf2513a61142240bea053f4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.0

Release files / treillis-1.4.3-py3-none-any.whl

Download URL treillis-1.4.3-py3-none-any.whl
Size 44.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
d066a3ddf6f8afbc3b4a4592049e0566074bf41f9475cdeebce44e89546d35fe
BLAKE2b-256 checksum
How to use checksums
675595c651f3f12ee9eb9f6785d42fd4581fd7320f01d181700ac2a550e75a8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.0

Security for treillis 1.4.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page