The brownpak code performs Brownian Dynamics simulations with hydrodynamics interactions on bead-spring polymer models.
See the User Guide for installation guide and description of the input and output files. The API documentation, generated by [FORD]((https://forddocs.readthedocs.io/en/stable/), is available here.
- Hydrodynamic interaction (HI) between the polymer segments handled at the RPY-level.
- HI can be switched off if desired.
- Two algorithms for integrating the stochastic differential equation governing the evolution of the segment positions: (1) Explicit Euler and (2) Semi-implicit Euler. See Dutta and Sing (2024) for details of the semi-implicit algorithm.
- Two algorithms for generating the Brownian forces: (1) Cholesky factorization and (2) Krylov subspace method. A block variant of the Krylov subspace method will be chosen automatically depending on the input.
- Three kinds of ambient velocity fields: (1) Uniaxial extensional flow, (2) Planar extensional flow (3) Simple shear flow.
- Three algorithms for pair table generation: (1) Direct
$N^2$ calculation (2) Verlet list (3) Cell list (4) Axis-aligned bounding box (AABB) tree. For equilibrium simulation with multiple chains, a cell list is preferable, whereas for a single chain in a strong ambient flow field, AABB tree may be faster. - Multiple styles for pairwise forces, bonds, angles, and dihedrals. For details, see the User Guide.
- Python scripts included for generating initial configurations and converting output binary files to text formats (including LAMMPS data format.)
- Simulations including multiple chains are handled only under equilibrium conditions.
- In presence of an ambient velocity field, brownpak supports simulations of only a single chain. In dilute solutions, this is not an issue as we can run multiple instances of the code in an embarrassingly parallel setup and average over the desired properties.
This code or parts of this code has been used for the folowing publications:
- S. Dutta, C. E. Sing, Brownian dynamics simulations of bottlebrush polymers in dilute solution under shear and uniaxial extensional flows The Journal of Chemical Physics 160, 0044901 (2024).
- T. Pan, S. Dutta, C. E. Sing, Interaction potential for coarse-grained models of bottlebrush polymers The Journal of Chemical Physics 156, 014903 (2022).
- S. Dutta, T. Pan, C. E. Sing, Bridging simulation length scales of bottlebrush polymers using a wormlike cylinder model Macromolecules 52, 4858–4874 (2019).
- A Fortran compiler compliant with the 2008 standard.
- Fypp, the Fortran preprocessor.
- Intel Math Kernel Library (classic or oneAPI MKL), available from the [Intel website](https://www.intel.com/content/www/us/en/developer/tools/oneapi/ onemkl.html).
The code can be compiled using the Makefile build/Makefile. While that makefile is for gfortran, adapting to another compiler is fairly straightforward. See for example build/Makefile-ifort for the classic Intel ifort compiler (now superseded by ifx). After successful compilation, an executable named brownpak will be created in the bin directory.
Run the executable thus:
brownpak fn_control=<str> job_tag=<int>
Above, fn_control is a file to read in all parameters and job_tag is an
integer to run independent instances for an embarrassingly parallel simulation
on a cluster.
For an example of the input file see bin/control.txt. This file includes the
name of the file storing the initial configuration and topology. Initial
configurations can be generated using the Python scripts in utils/models.
Output trajectory files are in binary format, which can be converted to ascii using the codes in utils/extract or utils/traj2txt.