stochasticHydroTools / SlenderBody

Slender-body hydrodynamics
11 stars 4 forks source link

SPHARCLE

Slender Particle Hydrodynamics And Reacting Cytoskeletal Linking Elements.

See the documentation on readthedocs for installation instructions, as well as how to run and modify the examples.

This repository contains the Python/C++ and Matlab codes for the publications:

  1. "An integral-based spectral method for inextensible slender fibers in Stokes flow," by O. Maxian, A. Mogilner, and A. Donev, Jan. 2021. See arxiv for text and Phys. Rev. Fluids for published version.
  2. "Simulations of dynamically cross-linked actin networks: morphology, rheology, and hydrodynamic interactions," by O. Maxian, R. P. Peláez, A. Mogilner, and A. Donev, Dec. 2021. See biorxiv for text and PLoS Comp. Bio for published version.
  3. "Interplay between Brownian motion and cross-linking kinetics controls bundling dynamics in actin networks," by O. Maxian, A. Donev, and A. Mogilner, April 2022. See biorxiv for text and Biophys. J. for published version.
  4. "The hydrodynamics of a twisting, bending, inextensible fiber in Stokes flow," by O. Maxian, B. Sprinkle, C.S. Peskin, and A. Donev, July 2022. See arxiv for text and Phys. Rev. Fluids for published version.
  5. "Slender body theories for rotating filaments," by O. Maxian and A. Donev, Nov. 2022. See J. Fluid Mech. for published version, which is open access. This is primarily a theoretical study which has some numerical calculations. The relevant files are here, but we recommend using the more accurate quadrature scheme by Malhotra and Barnett for slender body boundary integral calculations.
  6. "Bending fluctuations in semiflexible, inextensible, slender filaments in Stokes flow: towards a spectral discretization," by O. Maxian, B. Sprinkle, and A. Donev, Jan. 2023. See arxiv for text and J. Chem. Phys for published version.
  7. "Helical motors and formins synergize to compact chiral filopodial bundles: a theoretical perspective," by O. Maxian and A. Mogilner, Nov. 2023. See biorxiv for text. The codes for this publication are here.

Organization is as follows:

External dependencies:

Instructions for running code

1) Clone this repo using

git clone --recursive https://github.com/stochasticHydroTools/SlenderBody

This will also clone the submodules in the dependency folder. Then run

cd SlenderBody
bash install.sh

in the main directory. This will compile all of the dependencies and C++ modulues. It will also add the appropriate directories (where the python modulues are compiled) to your PYTHONPATH.

If the compilation process fails this script will show an error. In that case fix the compilation issue and run bash install.sh again.

3) Common mistakes:

4) Run the python scripts in Python/Examples. For example,

python3 ThreeShearedFibs.py

will run the example in Section 5.1.2 of [1]

Parallelization

The number of OpenMP threads (environment variable) MUST be set to one to obtain good performance. In particular, you must use

export OMP_NUM_THREADS=1

in linux prior to running our code. The parallelization is then implemented in the C++ class FiberCollectionC.cpp which takes as an inpute the number of threads. The number of threads in these calculations can be set by passing an integer to the constructor of fiberCollection.py. An example of this is on line 49 of Python/Examples/CheckStability.py. We also have a GPU version.

Uninstalling

1) Run make clean inside the Python folder.

2) The install.sh script modifies the .bashrc file (which are marked as written by the script). Simply remove these lines.