Possible bug in fix bond/react rate_limit?

Dear lammps developers,

I’m using fix bond/react to add extra coarse grained lipids into the membrane during the run (risky operation!). While using the rate_limit keyword to control the speed of membrane growth, I observed different behaviours depending on which version of LAMMPS I use. More specifically, lammps-17Apr2024 seems to control the rate correctly while lammps-4Feb2025 just ignore the limit that I set. Not sure if I made a mistake in my script or changes in the update messed something up. Attached is a minimal example that can be used to recreate the problem.

membrane_grow.MD (10.8 KB)
phag_plate.init (845.5 KB)
map_new_lipid1_inner.txt (203 Bytes)
lipid1_inner.txt (374 Bytes)
lc3_inner.txt (354 Bytes)
lc3_lipid1_inner.txt (623 Bytes)
lc3_lipid1_outer.txt (622 Bytes)
lc3_outer.txt (353 Bytes)
lipid1_outer.txt (374 Bytes)
map_new_lipid1_outer.txt (198 Bytes)

I use the following command to run the simulation.

mpirun -np 32 lmp -in membrane_grow.MD -v r 1

The rate_limit is set to 1 per 10000 steps. The heads.dat lists the total number of atoms, the number of newly added atom in the outer layer and the number of newly added atom in the inner layer, which should only increase by 1 every 10 lines. With lammps-4Feb2025, however, at some point new lipids get added like crazy.

Below are the packages that I included in my build (same for both version)

BROWNIAN
EXTRA-FIX
EXTRA-PAIR
GRANULAR
MANYBODY
MC
MISC
MOLECULE
OPENMP
OPT
REACTION
RIGID

cmake -D BUILD_MPI=yes .
cmake -D BUILD_OMP=yes .
cmake -D PKG_OPT=yes .

I hope I haven’t missed anything, let me know if more information is required :blush:

Bests,
Jingbang

Sorry for the delay. I am unable to get your example started. On the first line, you appear to reference a variable ‘r’ that was never defined. Also note that you are calling a data file that you do not provide. Can you clean up and test these input files, and provide the output file for comparison?

Hi,
Really sorry for confusion: the required input file should be vesicle.init but for some reason the uploading process automatically change it to phag_plate.init. I have now compressed all the input files into
input_files.tar.gz (222.0 KB)
hopefully nothing can be changed in a zip file.

I then decompress it with tar -xvzf input_files.tar.gz.

Then cd input_files to enter the directory and cp ~/lammps-17Apr2024/build_mpi/lmp . or cp ~/lammps-4Feb2025/build_mpi/lmp . to copy the LAMMPS executable.

I then load the required modules I used to build LAMMPS. For 17Apr2024 they are

module load foss/2023a
module load CMake/3.26.3-GCCcore-12.3.0
module load Doxygen/1.9.7-GCCcore-12.3.0
module load git/2.41.0-GCCcore-12.3.0-nodocs
module load Python/3.11.3-GCCcore-12.3.0

For 4Feb2025 they are

module load foss/2023b
module load CMake/3.27.6-GCCcore-13.2.0
module load Doxygen/1.9.8-GCCcore-13.2.0
module load git/2.42.0-GCCcore-13.2.0
module load Python/3.11.5-GCCcore-13.2.0

I then run the simulation with following commands
nohup mpirun -np 32 lmp -in membrane_grow.MD > out_17Apr2024 &
or
nohup mpirun -np 32 lmp -in membrane_grow.MD > out_4Feb2025 &

The output files are
out_17Apr2024 (13.4 KB)
out_4Feb2025 (13.4 KB)
In the thermo section of the output file, v_heads1a and v_heads1b represent the number of added lipids by reaction, limited by rate_limit to 1 per 10000 steps. Note that in out_4Feb2025 this limitation is clearly breached.

I hope you are now able to reproduce what I saw. Let me know if you need anything else.

Bests,
Jingbang

Thanks for this report, there was indeed a bug when using both ‘rate_limit’ and the ‘create atoms’ feature of ‘fix bond/react’. This issue should be fixed in PR #4548 on the LAMMPS Github. Please let me know if you have further issues.

1 Like