Thanks to visit codestin.com
Credit goes to github.com

Skip to content

stochasticHydroTools/libMobility

Repository files navigation

libMobility

Documentation is available at libmobility.readthedocs.io

This repository contains several GPU solvers that can compute the action of the hydrodynamic mobility (at the RPY/FCM level) of a group of particles (in different geometries) with forces acting on them.

In particular, given a group of forces, $\boldsymbol{F}$, and torques, $\boldsymbol{\tau}$, acting on a group of positions, $\boldsymbol{X}$ and directions $\boldsymbol{\tau}$, the libMobility solvers can compute:

$$\begin{bmatrix}d\boldsymbol{X}\\ d\boldsymbol{\tau}\end{bmatrix} = \boldsymbol{\mathcal{M}}\begin{bmatrix}\boldsymbol{F}\\ \boldsymbol{T}\end{bmatrix}dt + \text{prefactor}\sqrt{2 k_B T \boldsymbol{\mathcal{M}}}d\boldsymbol{W} + k_BT\boldsymbol{\partial}_\boldsymbol{X}\cdot \boldsymbol{\mathcal{M}}dt$$

Where $d\boldsymbol{X}$ are the linear displacements, $\boldsymbol{d\tau}$ are the angular displacements, $\boldsymbol{\mathcal{M}}$ is the grand mobility tensor, $\boldsymbol{F}$ are the forces, $\boldsymbol{T}$ are the torques, $\text{prefactor}$ is a user-provided prefactor, and $d\boldsymbol{W}$ is a collection of i.i.d Weinner processes and $T$ is the temperature.

Each solver in libMobility allows for computing either the deterministic term, the stochastic term, or both at the same time.

For each solver, a Python interface is provided. All solvers have the same interface, although some input parameters might change (an open boundaries solver does not accept a box size as a parameter).

Repository Structure

This repository is organized into the following directories:

  • solvers/: This directory hosts a subfolder for each solver module. Each subfolder contains the implementation of the libMobility interface specific to that solver.

  • examples/: Contains examples on how to use the library from Python and C++.

  • include/: Includes the essential C++ base classes and utility files needed to construct the modules.

  • devtools/: Contains dev-specific scripts and files, like a meta.yaml file to build a conda package for libMobility using conda-build.

  • docs/: Contains the source files for the documentation.

  • tests/: Contains the tests for the library.

Installation

You can install the latest libMobility release through the conda-forge channel:

$ conda install -c conda-forge libmobility

Check the documentation for additional information on installation, such as how to compile from source.

Python Usage

Importing libMobility will make available any module under "solvers".

A usage example is available in python/example.py.
Calling

	help(SolverName)

will provide more in-depth information about the solver.

About

A unified interface to compute hydrodynamic displacements.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 6