Re: How to maintain Density constant?

From: Kenno Vanommeslaeghe (kvanomme_at_rx.umaryland.edu)
Date: Thu Mar 06 2014 - 12:39:08 CST

If it's *that* bad, then

a) there *has* to be something badly wrong with your system/simulation
setup, and that mistake has to be corrected before anything else;
constraining the volume (or changing the pressure) is not the right solution

b) you should have indicated the magnitude of the problem right away in
your first post. Some of the time I spent e-mailing about it could have
been used to fix bugs in the CGenFF atom typer or add molecules. Given the
volume of e-mails here and on the CHARMM forums, lazily formulated
questions like this are a significant impediment to my work.

On 03/06/2014 12:28 PM, Roy Fernando wrote:
> Hi Kenno, Ivan,
>
> Thanks for detailed explanations.
>
> While I understand the fundamental physics part, what I was looking for is
> some insights about why my system displaying unphysical (or far from being
> physical) behaviors.
>
> I am not simulating a gas, I am simulating a protein in a solution. This
> type of a system evolve under atmospheric pressure and therefore choosing
> a NPT simulation makes sense to me. When an NPT simulation is chosen I am
> allowing the system volume to fluctuate to maintain the pressure around
> 1atm. However, what I noticed was not a fluctuation. The density of the
> system dropped by 40% because the system dimensions has increased by 20%.
> I was trying to see if there are other processes that can be applied such
> as maintaining some ion concentration (this system is neutral to balance
> the charges). The density of the solution is expected to be around 1.1
> g/cm^3 but I observed it to be around 0.6 g/cm^3
>
> Thanks for your help.
>
> Roy
>
>
>
>
>
> On Thu, Mar 6, 2014 at 11:55 AM, Kenno Vanommeslaeghe
> <kvanomme_at_rx.umaryland.edu <mailto:kvanomme_at_rx.umaryland.edu>> wrote:
>
> It's perfectly normal (and indeed unavoidable) in constant pressure
> simulations for the volume (and hence density) to equilibrate a bit,
> then fluctuate. As long as the change is not catastrophic (which was
> not indicated in Roy's e-mail), there's nothing to worry about. If the
> density is really important, one can run NVT, but then one has to give
> up control over the pressure.
>
>
>
> On 03/06/2014 11:34 AM, Ivan Gregoretti wrote:
>
> Thank you Kenno.
>
> So, going back to try to help Roy.
>
> 1) Running MD simulations where you control both pressure and
> temperature is routine. Kenno tells us that it makes no sense to also
> try to impose a control on the volume. (Of course.)
>
> 2) Why is your system's density dropping? I wonder if the periodic
> boundary conditions are properly set. I can picture a situation where
> there is no boundary conditions and the molecules start to slowly
> diffuse away from the center of mass of your system.
>
> Ivan
>
>
> Ivan Gregoretti, PhD
> Bioinformatics
>
>
>
> On Thu, Mar 6, 2014 at 10:57 AM, Kenno Vanommeslaeghe
> <kvanomme_at_rx.umaryland.edu <mailto:kvanomme_at_rx.umaryland.edu>> wrote:
>
> On 03/06/2014 08:23 AM, Ivan Gregoretti wrote:
>
>
> p V = n R T
>
> with n being the number of molecules and V being volume.
> It's an ideal
> gas state equation. Notice that n/V is your density.
>
> In your molecular dynamics, n does not change, so, if you
> want to keep
> the density constant, you need to run your simulation at
> constant
> volume.
>
> Do I get it right Kenno?
>
>
>
> Mostly. We usually don't simulate gases, so the ideal gas law
> you brought up
> is of very limited value, but there exist similar equations
> for liquids and
> solid, and one thing they all have in common is that (assuming
> n is
> constant) out of p, V and T (and also E and/or Q), you can set
> two to an
> arbitrary value, but then you don't have control over the
> other one(s); this
> is very fundamental and doesn't take advanced statistical
> mechanics to see.
> There exist mechanisms in nature to impose *some* combinations
> of these
> variables on a system, and these combinations ("ensembles" in
> thermodynamic
> speak) are often implemented in MD engines. The "constant
> pressure and
> volume" Roy asked for is not one of them; even if someone
> would somehow
> implement it, it would be of no practical relevance. Besides, the
> temperature would shift and fluctuate uncontrollably
> (remember, you can only
> choose 2), which is probably not what Roy (or anyone else) wants.
>
>
>

This archive was generated by hypermail 2.1.6 : Wed Dec 31 2014 - 23:22:12 CST