change potential parameter by code

Hi,
I want to do thermal dynamic integration with lammps. I build lammps as a library for my own code.

I need to change the parameter “bigA” in the tersoff potential as a function of lamda. How can I get access to this parameter?

Thank you!
Jinping

Hi,
I want to do thermal dynamic integration with lammps. I build lammps as a
library for my own code.

I need to change the parameter "bigA" in the tersoff potential as a function
of lamda. How can I get access to this parameter?

this is tricky and probably not such a good idea, since bigA is stored
in a per-element array.
it would be more straightforward to introduce a by-type-pair array
with a scaling factor defaulting to 1.0 (scale), similar to what is
done in, e.g. pair style coul/cut and then provide access to this
property via the Pair::extract() method.
after all, changing bigA will only scale the pair-wise (repulsive)
contribution, while a scale factor could be systematically applied to
specific pairs of types.

axel.

Once you’ve figured those details out, see the fix adapt command.

For other pair styles it can adjust params as a function of time

during a simulation. In general you can add hooks to

pair styles that are not yet supported, to drive them via fix adapt.

Steve