But I think the volume of the system is constraint by the fix NVE. Is this no business with the position/velocity update?
there is no constraint. you just run. please have a deeper look
into one of the textbooks on molecular simulations.
Another question: If I want to add some energy to the system in a period time and then let the system go, what can I do? It's seemly that there is no ensemble I can use.
NVE ensemble doesn't change the energy, if you add a fix
that adds energy (fix heat, fix addforce etc.) then the
total energy will go up.
in fact, conservation of energy in NVE ensemble is a measure
of how well a simulation is set up (provided no energy is added,
etc.). with too large a time step, bad cutoffs, the energy
will go up, which would be unphysical.