| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Lateral diffusion cefficients in membrane simulations with periodic boundary conditions are subject to substantial hydrodynamic finite-size effects. You can use the implementation of the correction formulas here to obtain the unperturbed value from the values calculated in the simulation.
The effect and the corrections are described here:
M. Vögele, J. Köfinger, and G. Hummer: Hydrodynamics of Diffusion in Lipid Membrane Simulations, Phys. Rev. Lett. 2018, 120 (26) (preprint available at arXiv:1803.04714)
Please cite this paper if the code here is helpful in your work, and the respective references for particular methods.
If you want to keep MemDiff separate from your other Python code, create a new conda environment.
conda create --name memdiff python=3.7 pip numpy scipy matplotlib jupyter conda activate memdiff
Clone the repository and install MemDiff via pip.
git clone https://github.com/bio-phys/memdiff.git cd memdiff pip install -e .
The package contains three modules:
Importing memdiff to your Python code will make all of them available
import memdiff
To calculate, for example, the corrected diffusion coefficient according to the numerical Oseen correction (1,2), call
memdiff.oseen.d0(dpbc,T,eta_f,eta_m,l,h,imax)
with the following parameters:
dpbc: uncorrected diffusion coefficient in cm^2/s T: temperature in K eta_f: solvent viscosity in Pa*s eta_m: membrane surface viscosity in Pa*s*m l: width of the simulation box in nm h: height of the simulation box in nm imax: maximal index of k-space vectors to take into account
The higher imax, the more precise and the slower the calculation. 20 is usually a good compromise.
There are analogous functions for the approximation formula and for the monotopic correction. See the chart below to decide which one to use.
An example Jupyter notebook is provided that uses data from a simulation of a carbon nanotube porin in a POPC/DOPC membrane to show the usage of the more advanced analysis functions. It shows how to fit the diffusion coefficient and the membrane viscosity from a series of simulations at different values of the box width.
A PDF version of the flow chart is available .
Details and tests are described in our papers (1,2).
| Back | FazBrowse Home | New Git URL |