2011/1/31 毛益进 <[email protected]>:

Hi,

A system with constant density and temperature can be reached, if I use nve

or nvt ensemble to equilibrate system.

this has nothing to do with equilibration. if you keep the volume

(simulation box)

fixed and the number of particles constant (periodic boundary conditions), then

you automatically have a constant density.

a "constant" temperature can only be reached for an infinitely large sample,

however people often talk about "constant temperature" simulations or "nvt

ensemble", if a finite system is coupled through some algorithm to a (large)

heat bath that models the exchange of kinetic energy with the environment

of the sample that you look at.

the impact of equilibration is that your potential energy does not drift,

i.e. it keeps fluctuating around some constant value.

temperature is not that well defined for a finite sample, we usually identify

an "instantaneous temperature" by relating the total kinetic energy to

the number of degrees of freedom and the boltzman constant.

you can find more details on this subject in a book on statistical mechanics.

However, what about a system with constant density, temperature, and

pressure?

for pressure the situation is similar to temperature. we identify the

pressure of a system through an expression derived from the virial theorem

and this is implemented via fix npt.

Temperature seems much easier to be controlled than pressure.

this is due to the fact that one typically looks at systems, that

are not very compressible (dense liquids and solids).

My question is that if I control pressure as well as temperature with a

constant density, all of which should be constant in one state, the density

will change somewhat due to change of volume. How can it happen?

it cannot:

in an nvt ensemble you (try to) keep the number of particles, the volume

and the temperature constant. n and v are constant by definition, so you

only need to model the exchange of kinetic energy with the environment.

in an npt ensemble the volume is no longer constant and cannot be constant.

as a consequence, the density will fluctuate, since the number of particles n

is still constant by definition.

again, this is all explained in great detail in textbooks on

statistical mechanics,

a literature that is highly recommended to familiarize yourself with _before_

starting to ask questions like the ones that you were asking.

cheers,

axel.