Combining 'fix bond/react' and 'if' command in LAMMPS

I’ve running simulations of bead-spring polymer networks and have written a ‘fix bond/react’ module that mimics molecular motors. The motor is effectively a unique bond type - call it motorBond - between filaments that steps along the bead-spring chain, shifting the motorBond to the next bead along the chain.

However I’d like to implement a condition, that if the bond force along a motorBond exceeds a certain magnitude, the reaction doesn’t occur even though the bonding pair atoms may be within range to allow a reaction. This is meant to mimic a stalling force for the molecular motor. I see you can use ‘compute bond/local’ to get the force through a bond in the simulation, so I’d like to use that compute command to implement this stalling mechanism.

Is it possible to use the ‘if’ command in LAMMPS to dynamically determine the behavior of groups of atoms or fixes during a run? I haven’t seen many obvious examples in the documentation.

Best,
Brian

no. the if command functions differently.
all LAMMPS commands are acted upon immediately while they are processed. any condition that you want to be applied to change the behavior of fix bond/react has to be programmed inside fix bond/react.
please see https://lammps.sandia.gov/doc/Commands_parse.html for some explanations of the input processing in LAMMPS.

axel.

This capability would be straightforward to add, using the existing ‘reaction constraint’ infrastructure inside bond/react.

This capability would be straightforward to add, using the existing ‘reaction constraint’ infrastructure inside bond/react.

I vaguely rexall other examples of motors walking along polymers in biology depending on the tension in the polymer.

I can imagine one might be able to detect tension in a polymer by monitoring how far a bond has stretched. (I am not sure how reliable that would be though.)

Tension is not the same as force.

Brian, can you clarify exactly what you need?

Andrew