Defining dynamic dihedrals with atom types in coarse-grained system using fix bond/react

Dear all,

I am working on a coarse-grained system and trying to dynamically add dihedral angles using ‘fix bond/react’. Seems that there are a few issues due to the random distribution of certain particles which need to form dihedrals based on proximity within a specific distance.

The main issue is specifying these dynamic dihedrals, as our system doesn’t allow us to predict which particles will meet due to their random distribution. LAMMPS requires specifying atom indices for defining dihedrals, but given our model’s nature, this approach is impractical.

Is it possible to define dihedrals using atom types instead of indices in LAMMPS? If not, has anyone written a custom fix that can dynamically create dihedrals based on atom type? If not, any help/suggestions for writing such a custom fix would be greatly appreciated.

Thanks for your help in advance.

Best,
H.A

Is is true that ‘fix bond/react’ can dynamically form dihedrals based on atom type. For example, if a dimer (two beads covalently bonded) approached another dimer, a bond can be formed between them and a dihedral defined based on the atom types of the dimers. Does this capability solve your problem?

Dear Jacob,

Thank you very much for your response, yes I am looking for a feature like that. Those central particles that are meant to approach to form a dihedral are bonded to 3 or 4 more particles. However I want to have the dihedral between specific bond of each central particle so they keep the intended geometry.

I tried your fix but ran into some issues, so I want to double check a couple things and ask a question which I appreciate if you could help me with them.
First, as I said the central particles of the dihedral are bonded to some other particles, now should I include them all in the pre- and post-reaction files or only the dimer-dimer particles? Also do we map the atom types dedicated to fix_bond_react to their original types in the ‘Types’ section? Totally I’m a bit confused about the types.

Next, the biggest issue that I run into is that if I do not add the dihedral into the LAMMPS data file, the job runs into error. I tried putting some print statements int the LAMMPS source code and seems that when I add the diheral into the post-reaction file it complains that there’s no dihedral declared in the molecule file. Now my concern is if I add the dihedral into the data file as well, it may add an unwanted interaction. Would this be overridden by the dihedral in the post-reaction file?

Thank you very much,
H.A

That depends on the size of the molecules reacting and the interaction (pairwise) cutoffs of the simulations. If the reacting atoms are always bonded to only three or four more particles, you might be able to get away with including all the atoms of both molecules in the template. Otherwise, you should define some atoms as ‘edge’ atoms, which are atoms that would connect to the rest of a long chain, for example.

The atom types in the pre-reaction template should match the atom types of reactive sites in the simulation.

The parameters for all possible interaction types, even those that appear because of reactions, need to be listed in your data file. Note that listing the parameters for a dihedral interaction is not the same as actually adding a dihedral interaction to your simulation, in which you list the atom IDs involved in the dihedral. Perhaps the diagram here will help: https://www.reacter.org/intro