Cesar L. Pastrana, 2022 (c)
This software was used in the manuscript "Pressure-induced shape-shifting of helical bacteria" by Pastrana C.L, Qiu L., Armon S., Gerland U., and Amir A. Soft Matter 19(12), 2023: 2224-2230.
The surface is described using a discrete bead and spring model. The total energy of the system at a pressure
where the first sum runs over all pairs of connected notes
In this work, the relax configuration used as input is a spherocylinder. A helical domain with the desired properties is reinforced to be nearly undeformable.
The non-linear conjugate gradient algorithm is used to find the minimal energy configuration.
A Makefile is provided. To build, simply execute:
make
in the main folder. This will generate the compiled code shape
in the bin
folder.
The simulation is launched by simply executing ./shape
in the bin
folder.
Pressurisation proceeds in a step-wise fashion from
The program requires as input the following files:
-
init_coords.dat
: Array of$N\times 3$ with the$N$ vertices coordinates defining the surface in the relax configuration. The units of the input coordiantes coordinates are nm. -
mesh.dat
: Array of$T\times 3$ with the$T$ triangles defining the connectivity of the triangulated surface. -
params.conf
: This file contains the simulation parameters. The meaning of each parameter is indicated in commented blocks in the file. The main parameters are the target pressure$p$ (PRESSURE
), the step$\Delta p$ (DP
) and the reinforcement factor$K$ (K_SPR_FACTOR
).
For the appropiate determination of the helical region to be reinforced, the spherocilinder should have the main body oriented along the init_coords.dat
file and the number of particles per cap needs to be specified in the variable N_CAP
of the file params.conf
. Spherocyilinders with custom length and radius can be be generated using the accesory Python script in src/genspherocyl/genspherocyl.py
.
The following output files are generated after execution of shape
:
./minim_coords.dat
: Coordinate at the target pressure../press/X_press.dat
: Coordinates for each step of pressurization../summary/pressures.dat
: Pressures in each step../summary/output.dat
: Summaary of mechanical and mesh parameters employed../helix/main_helix_vertexes.dat
: Indices of the verticies defining the main helix (layer zero)./helix/helix_vertexes.dat
: Every index involved in the reinforced area