openforcefield / openff-evaluator

A physical property evaluation toolkit from the Open Forcefield Consortium.
https://docs.openforcefield.org/projects/evaluator
MIT License
55 stars 18 forks source link

Calculate density expectation as M/<V> instead of M<1/V> #283

Open mrshirts opened 4 years ago

mrshirts commented 4 years ago

I'd argue that M/\<V> instead of M<1/V> is a better quantity to be calculating. Volume is the more fundamental thermodynamic quantity (dG/dP = V), and the numerical behavior is better (doesn't overweight small values, underweight large values). It's also easier to then use in the calculation of partial molar volume.

One argument against this is that the experiments are often in terms of density. However, it's still straightforward to convert average molar volume to average density, and plug the density expectation into the Gaussian error model.

SimonBoothroyd commented 4 years ago

It's also easier to then use in the calculation of partial molar volume.

I'm not 100% sure I understand this point - can you please clarify?

The computational cost of computing < V > in addition to < 1 / V > is mostly negligible given that they are (in almost all cases) computed from the same simulation provided they are being computed at the same state.

Given that M/V is output by most simulation packages directly this is the easier quantity to average when computing densities as it avoids the need to compute the molecular weight of the system - while this may be trivial, it's still an extra un-needed couple of steps in the workflow graph (average < V >, computation of M then division as opposed to average < M / V >).

Volume is the more fundamental thermodynamic quantity (dG/dP = V), and the numerical behavior is better (doesn't overweight small values, underweight large values)

While this may be true from a theoretical perspective, I'm not convinced this makes any difference in practice. Can you point to any studies which show there is a significant difference (relative to the typical uncertainty in the estimated density) between the two approaches that justify making the change?