how can I do this: simulated annealing with extra energy term

Hi,

I’m currently looking for a MD program, which allows me to do a simulated annealing MD run with variable unit-cell parameters. It seems to me, that LAMMPS is able to do this. Is this correct?

Also I would like to add an extra term into the energy expression. The extra term is currently calculated by calling a python function. What would be the easiest way to incorporate this term into the energy evaluation of LAMMS?

Thanks a lot in advance for your answer,

Albert

Hi,

I’m currently looking for a MD program, which allows me to do a simulated annealing MD run with variable unit-cell parameters. It seems to me, that LAMMPS is able to do this. Is this correct?

correct. there are multiple options: you can use fix npt with a variable target temperature, you can use fix nph with setting an initial kinetic energy and then removing it through fix viscous, you can combine fix nve time integration, fix press/berendsen and fix viscous (or fix langevin with a variable target temperature),

Also I would like to add an extra term into the energy expression. The extra term is currently calculated by calling a python function. What would be the easiest way to incorporate this term into the energy evaluation of LAMMS?

if this is just contributing an energy, then this would be merely a diagnostic piece of information and not affect the dynamics and you could even compute it after the fact from the trajectory. if it results in forces, then the best option depends on how those are computed. most likely, this would be done with a custom fix style. it is usually best to look for an existing fix that has a similar function and then use that as a template for your fix.

axel.