piecewise harmonic potential

Dear LAMMPS users,

I would like to create a force field with Morse potentials and a piecewise harmonic potential.

More specifically the piecewise harmonic potential should look like the function in attachment.

How should I best tackle this issue?

Kind regards,

Tim

piecewise harmonic.jpg

Dear LAMMPS users,

I would like to create a force field with Morse potentials and a piecewise
harmonic potential.

More specifically the piecewise harmonic potential should look like the
function in attachment.

How should I best tackle this issue?

for easy experimentation, there is pair style python
for production simulation, there is pair style table. you can generate
the tables for the latter with the former using the pair_write
command.

axel.

Dear Axel,

Thanks for the reply. Do these commands also allow the implementation of bonded interactions? Because to my knowledge the "pair_style" commands only apply to non-bonded interactions (correct me if I'm wrong).

Kind regards,
Tim

Dear Axel,

Thanks for the reply. Do these commands also allow the implementation of bonded interactions?

no. there is a bond style table, that you can use, and a bond_write
command, but no bond_style python (yet). so you'd have to build and
debug the table externally. i suggest to first experiment with trying
to reproduce the harmonic bond style via tables, before replacing your
custom interaction function.

Because to my knowledge the "pair_style" commands only apply to non-bonded interactions (correct me if I'm wrong).

you are correct.

axel.