See occurence of reactions - changing type of monomers

Hi all,

I am a new LAMMPS user and I implemented the given input file ‘input.lammps’ to simulate a copolymer where monomers can change types based on a neighboring condition. I want to see wheter the reactions occur and if so, when. I am watching the dump file with ovito and i see no changes.

Can you help me please by telling if my code might do the right thing (reaction occuring at every time step) or ohterwise how to check if the reactions happen ?
Not all the files might be useful but just in case I upload them all (tell me if you need more info/files)

Best regards,

Adrien

mol2closeTo1POST.txt (172 Bytes)
mol2closeTo1PRE.txt (172 Bytes)
mol3closeTo2POST.txt (172 Bytes)
mol3closeTo1POST.txt (172 Bytes)
mol2closeTo3POST.txt (172 Bytes)
mol1closeTo3POST.txt (131 Bytes)
mol2closeTo3PRE.txt (172 Bytes)
mol1closeTo3PRE.txt (172 Bytes)
map_2to1.txt (88 Bytes)
map_3to2.txt (88 Bytes)
map_2to3.txt (88 Bytes)
map_1to2.txt (88 Bytes)

input.lammps (2.5 KB)
InitialFile.txt (8.9 KB)
create_Initifile.ipynb (2.8 KB)
dump.lammpstrj (9.9 KB)

Fix bond/react keeps a tally of the number of reactions that happened for each react argument: fix bond/react command — LAMMPS documentation

This count can be tracked as custom style thermodynamic output or written to a file with fix print.

1 Like

Thank you for this answer.

Apparently no reaction occur… Is it possible to have some help for the molecule template ? I think the problem comes from here but I don’t know what to change or add.

Best,

Adrien

@jrgissing is the author of fix bond/react and he can sometimes help.

However, you should consider approaching this like any other scientific problem where you need to acquire a skill. Rather than starting right away with a rather complex problem, you should start with something very small, possibly even artificial. This will allow you to observe how various changes affect the functioning. Only a genius gets everything correct in the first try for a complex problem. Normal people have to approach things in stages and build the skills and learn from experimenting.

This sounds like an interesting application! If I understand what you are trying to do correctly, you will probably need to specify ‘edgeIDs’. Edge atoms are those that would connect to the rest of polymer chain, in the simulation.

1 Like

Dear Jacob Gissinger,

Thank you for your answer. I got a reaction thanks to your advice.

Nevertheless I got questions : do you think atoms far away on the polymer chain but close in 3D could interact using my naive method ?

I will try to do some simple examples of catalyzed reactions to understand better the fix bond/react function but in the meantime I was thinking to do a naive process.
I would create as many molecule templates as needed to capture every possibilities. As I can’t have less than 5 atoms because of the edgeIDs, and I have 3 atom types, it would be 3^5 molecule files (using Python it is quickly done).
Do you see any workaround ?

Best regards,

Adrien

Can you describe what you are trying to accomplish, and/or provide a schematic? Most likely, the number of templates needed in your case can be reduced greatly by a minor modification to the code.