keeping harmonic bond energy constant

Hi all

I have a group of atoms connected to their individual equilibrium sites by harmonic springs. This group is exchanging energy with nearby fluid. I want to bring E(=KE+PE) of each atom to a constant value. Now I can bring KE to a fixed value by any thermostat or velocity rescaling. But I want to consider PE and then adjust KE accordingly so that their energy E remains constant.

Can anyone please help me in this?
Thanks in advance.

Hi all

I have a group of atoms connected to their individual equilibrium sites by
harmonic springs. This group is exchanging energy with nearby fluid. I want
to bring E(=KE+PE) of each atom to a constant value. Now I can bring KE to a
fixed value by any thermostat or velocity rescaling. But I want to consider
PE and then adjust KE accordingly so that their energy E remains constant.

Can anyone please help me in this?

you probably just need to rethink your setup a little bit.

if you have "constant" kinetic energy, your system will have
a constant KE+PE, too, as soon as it has reached equilibrium,
and if it doesn't have a stable equilibrium, then there is no reason
to enforce that KE+PE is constant. mind you, that all of these
considerations only make sense of the macroscopic level, i.e.
when averaging over an ensemble. on the microscopic level,
there is no "constant" unless you have an NVE integrated system
with no exchange or manipulation of any kind.

cheers,
     axel.