Package: pymem3dg
Membrane Dynamics in 3D using Discrete Differential Geometry (Mem3DG)Mem3DG is a flexible software package to model the membrane and its dynamics using unstructured meshes.
This work is currently under heavy development, please star this repository to follow along!InstallationThe core of Mem3DG is written in C++ with functions exposed to a Python interface using pybind11.
The python interface and helper utilities for visualization and analysis are bundled together into a python package called pymem3dg.
pymem3dg can be obtained using pip (pip install pymem3dg) or conda (conda install pymem3dg) from their respective repositories.
For the majority of users who wish to develop models, this is the recommended installation procedure.DependenciesWe acknowledge the use of helpful external libraries including:Geometry-Central, the core mesh data structurelibigl, some geometry input generationpybind11, for Python-C++ interoperabilityPolyscope, trajectory visualization GUIPCG, random number generationNetCDF-cxx4, binary trajectory I/OWhile the majority of these libraries are either included in this repositoryBuilding for developmentFor advanced users who seek to modify the code, develop simulations in C++ directly, or produce/link to Mem3DG shared libraries, Mem3DG can be configured and built using CMake.
After cloning the repository, initialize submodules and their dependencies, and follow the standard CMake out-of-source configuration and build procedures.gitsubmoduleupdate--init--recursive
mkdirbuildcdbuild
cmake-DWITH_NETCDF=ON-DCMAKE_BUILD_TYPE=Release..
cmake--build.--configReleaseThere are several CMake options which you can configure.
Further options can be discovered by inspecting the CMakeLists.txt or using a utility likeccmakeorcmake -LAH.
These options can be passed during the configuration step (e.g.,-DWITH_NETCDF=ON).option(BUILD_PYMEM3DG"Build the python extensions?"ON)option(WITH_NETCDF"Build with NetCDF (binary trajectory output)?"ON)option(BUILD_MEM3DG_DOCS"Configure documentation"OFF)option(M3DG_GET_OWN_EIGEN"Download own Eigen"ON)option(M3DG_GET_OWN_PYBIND11"Download own pybind11"ON)option(WITH_LIBUNWIND"Link libunwind for stack traces"OFF)option(WITH_OPENMP"Build with OpenMP support"OFF)option(LINK_PROFILER"Link profiler gperftools"OFF)option(MEM3DG_PEDANTIC"Be extremely pedantic while compiling"OFF)Buildingpymem3dgWhile the pymem3dg extension module can be built directly with CMake, packaging and installing in a matter which conforms with guidelines from thePython packaging authorityis best done using python tooling.
We usescikit-build-coreto bridge between CMake and the Python build system.
Typical Python metadata and details are specified inpyproject.toml.pymem3dg can be built and installed by using pip from the root of this repository.gitsubmoduleupdate--init--recursive
pipinstall-v.Extra dependencies for building the documentation and tests can be installed as wellpip install -v .[docs,tests].
Other options can be passed to CMake by modifying config-settings in pip.pip install . --config-settings=cmake.build-type="Debug"Acknowledging your use of Mem3DGMem3DG is developed byCuncheng Zhu,Christopher T. Lee, with contributions from others.
Development of Mem3DG is funded in part by AFOSR MURI FA9550-18-1-0051, and a Hartwell Foundation Postdoctoral Fellowship.