How to delete and generate a molecule on a surface in LAMMPS?

Dear LAMMPS users,

I am trying to model an electrochemical reaction (O2 + 4H+ + 4e- = 2H2O) by LAMMPS artificially. It means that I want to consider H2O and O2 in the reaction. Since the reaction happens on the catalyst surface, I want to write a LAMMPS input file in which 1. oxygens get disappeared on the catalyst surface 2. The disappeared oxygen molecules enter the simulation box.
I would be grateful if there are any suggestions.


Perhaps fix bond/react can do what you want. Otherwise, you would need to look into writing your own fix that will remove atoms/molecules and replace with other atoms/molecules. There are fix evaporate and fix deposit that can each do half of it, so there is some kind of template to follow.


Thank you so much for your response.
I have a couple of questions.

  1. Does the fix bond/react command needs a reactive force field?
  2. I have not written my own fix so far; is there any guidance for it?


No. On the contrary.

There is a whole section in LAMMPS manual about modifying and extending LAMMPS.