Skip to main content

PyPI - Version Build Status Documentation Status Python versions GitHub

pyMechT

pyMechT is a Python package for simulating the mechanical response of soft biological tissues. The ethos of pyMechT is to create simplified virtual experimental setups, rather than finite element analyses. Thus, varying parameters and running simulations is much faster, making it feasible to perform Bayesian inference and Markov Chain Monte Carlo analyses. A short overview is provided in the video below.

pyMechT overview

Documentation

Find the full documentation at https://pymecht.readthedocs.io/en/latest/.

Structure

pyMechT is a collection of modules for:

  • MatModel: defining material models
  • SampleExperiment: simulating experiments, such as uniaxial extension, biaxial extension, and inflation-extension. Simulations can be either disp_controlled or force_controlled
  • ParamDict: a custom dictionary class of a datastructure called Param, which facilitates storing/varying/fitting parameters
  • ParamFitter: fitting parameters to experimental data
  • RandomParameters and MCMC: Bayesian inference by running Monte Carlo (MC) and Markov chain Monte Carlo (MCMC) simulations

Structure of pyMechT{{caption=Structure of pyMechT}

This package is developed and maintained by the Computational Biomechanics Research Group at the University of Glasgow.

Required dependencies are:

  • matplotlib
  • numpy
  • pandas
  • pyDOE
  • scipy
  • torch
  • sympy
  • tqdm

Installation

Step 1 (optional): Create a virtual environment

To create an environment in Anaconda, execute:

conda create -n pymecht python=3.9 ipykernel

Python3.9 is suggested, although any of the currently-supported versions of Python will also work.

To activate this virtual environment, execute:

conda activate pymecht

This is an optional, but recommended, step. There are other options for creating and managing environments (such as venv or virtualenv)

Step 2: Install via pip

User

pyMechT can be installed directly from PyPI via pip by using:

pip install pymecht
Developer To install as a devloper, it is recommended to fork from the repo and clone this fork locally.

Step 2.1 Fork from ankushaggarwal/pymecht

To fork a branch, head to the Github repository and click the fork button in the top right-hand corner.

Step 2.2 Clone the forked repo

To clone this repo locally, use the

git clone <repo-address>

where <repo-address> can be replaced by either the https or ssh addresses of the forked repo.

Step 2.3 Install developer version of pyMechT

To install a developer version of pyMechT, navigate to the locally cloned repo and execute:

pip install -e .

An editable version of pyMechT is now installed. All local changes to the cloned source code files will be reflected when pyMechT is imported.

Step 3: Check installation

Ensure that pyMechT has been installed by executing:

pip list

The package and version should be visible in the resulting list.

Contributing to pyMechT

See the contributing guidelines CONTRIBUTING.md for information on submitting issues and pull requests.

Metadata

Release files for pymecht 1.1.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 pymecht 1.1.3
File Size Uploaded Provenance Actions
pymecht-1.1.3.tar.gz 512.4 kB Without provenance Details for pymecht-1.1.3.tar.gz

Built distribution (wheel)

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

Total release size: 543.1 kB

Release files / pymecht-1.1.3.tar.gz

Download URL pymecht-1.1.3.tar.gz
Size 512.4 kB
Tags Source
SHA-256 checksum
How to use checksums
66a6a8b2ffcef4719190cf6f3f3295f38f10970441b6acfe02eb46e007b1343b
BLAKE2b-256 checksum
How to use checksums
fb9c723290c6f20d61c773cd42f35abdee5b60458c3f64ffc7bc13256aac1851
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.21

Release files / pymecht-1.1.3-py3-none-any.whl

Download URL pymecht-1.1.3-py3-none-any.whl
Size 30.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
843e02e0fe9b2886f846589ceeee463e2fdb35740c1b6c98f441a7ca8ec3bc22
BLAKE2b-256 checksum
How to use checksums
0deea4b85ee482909633342a7ef55db8c044d3161912fc68c7be02afed64167c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.21

Security for pymecht 1.1.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