constant number density

Dear lammps users
my system is comprised of a metal surface and a gas deposited on surface .i want number density of gas be constant.this system is reactive and pair_style is reax/c. is there any way in LAMMPS to enter 1 new gas molecule in box when 1 molecule in the box adsorbed on surface and dissociates?

Best Regard.

Dear lammps users
my system is comprised of a metal surface and a gas deposited on surface .i
want number density of gas be constant.this system is reactive and
pair_style is reax/c. is there any way in LAMMPS to enter 1 new gas molecule
in box when 1 molecule in the box adsorbed on surface and dissociates?

certainly. you can perform these actions in a loop or using the
"every" option to the run command. you would need to figure out a way
to classify the gas atoms so you can count how many you need to add or
delete.

axel.

Or you could write/derive your own variant of

the fix deposit command that would figure that
out at deposition time and decide how many
new atoms to deposit.

Steve