[lammps-users] fix_nve

Steve,

I had gone through the file fix_nve.cpp file to findout how nve is being implemented. I had seen the positions and velocities of atoms are being updated. But i am wondering how is it able to accomplish the constant energy criteria. Can you please explain how it’s being done??

Thanks
Ajit

2009/10/14 Ajit Vallabhaneni <ajitkvallabhaneni@…24…>

Steve,

I had gone through the file fix_nve.cpp file to findout how nve is being implemented. I had seen the positions and velocities of atoms are being updated. But i am wondering how is it able to accomplish the constant energy criteria. Can you please explain how it’s being done??

Ajit:

If you are using the NVE ensemble, why would you need to use an explicit criterion to ensure energy conservation? If there are no external agents acting on the system–such as an external field, or a heat source or sink–why would you expect the energy to change at all?

–AEI

Steve,

             I had gone through the file fix_nve.cpp file to findout how nve
is being implemented. I had seen the positions and velocities of atoms are
being updated. But i am wondering how is it able to accomplish the constant
energy criteria. Can you please explain how it's being done??

ajit,

it just magically happens. if you don't add or remove any energy to a system,
have a constant number of atoms and don't change the volume, you have an
NVE ensemble. there is nothing that _forces_ the (total) energy to be constant.
at least in an ideal world. in reality, the energy will not be
perfectly constant due
to accumulation of rounding errors when using floating point math.
you should also note, that if you set up a non-equilibrium system, then the nve
integrator will not make it a constant energy ensemble. all you can say about it
is that it doesn't add or remove (kinetic) energy (like the nvt one).

please dare to have a look at a text book about statistical mechanics
(e.g. mcquarrie)
to find out more about ensembles.

cheers,
   axel.