How to monitor pressure when using hoomd.hpmc.update.BoxMC

55 views
Skip to first unread message

uet tey

unread,
Oct 12, 2022, 9:16:39 AM10/12/22
to hoomd-users
Dear HOOMD-developers,

I would like to know how to monitor or output the system's pressure when using hoomd.hpmc.update.BoxMC. Thanks.

Sincerely, 
James

Joshua Anderson

unread,
Oct 13, 2022, 8:50:51 AM10/13/22
to hoomd...@googlegroups.com
James,

When using BoxMC with volume and/or length moves, your system is in a constant pressure ensemble. The pressure is always identically equal to the `betaP` value you set.
------
Joshua A. Anderson, Ph.D.
Research Area Specialist, Chemical Engineering, University of Michigan

--
You received this message because you are subscribed to the Google Groups "hoomd-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hoomd-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hoomd-users/38e237be-6779-4447-b4eb-7b5ccb04ff06n%40googlegroups.com.

Brandon Butler

unread,
Oct 17, 2022, 1:06:00 PM10/17/22
to hoomd...@googlegroups.com

Hey James,

You can monitor pressure using the SDF compute (https://hoomd-blue.readthedocs.io/en/v3.5.0/module-hpmc-compute.html#hoomd.hpmc.compute.SDF).

Best,

Brandon

--
You received this message because you are subscribed to the Google Groups "hoomd-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hoomd-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hoomd-users/38e237be-6779-4447-b4eb-7b5ccb04ff06n%40googlegroups.com.
--
Brandon Butler
MolSSI Fellow
PhD Candidate, Chemical Engineering and Scientific Computing | Glotzer Lab, University of Michigan
Email: butl...@umich.edu

Eric Irrgang

unread,
Oct 17, 2022, 3:37:08 PM10/17/22
to hoomd...@googlegroups.com
Brandon, have you tried that?

My expectation is that the result would fluctuate wildly and even the average would not be very close to the pressure set point, if the BoxMC moves include volume changing moves.

It wasn't clear to me from the original post whether the use case involves volume changing moves. If it does, I would echo Josh's point that the set pressure is by definition the pressure of the ensemble being sampled, and "instantaneous pressure" is a dubious concept in such an ensemble.

I'm not sure we know how to correctly weight sampled pressure for an ensemble average (what ensemble is that, anyway?) for BoxMC moves that preserve volume (and change instead, say, the aspect ratio or lattice angles). But I'd be interested in a referral to relevant literature.

Best,
Eric
> To view this discussion on the web visit https://groups.google.com/d/msgid/hoomd-users/cfad66e9-6737-bac6-e050-001a149df88e%40umich.edu.

Brandon Butler

unread,
Oct 18, 2022, 10:33:27 AM10/18/22
to hoomd...@googlegroups.com

Sorry that was my bad.

I honestly didn't read the original post closely enough. My mind saw pressure and answered SDF. Thanks for the correction!

Best,

Brandon

Joshua Anderson

unread,
Oct 18, 2022, 10:40:58 AM10/18/22
to hoomd...@googlegroups.com
When you use SDF in combination with volume moves, you will get the average SDF pressure equal to the set point pressure. But as Eric says, SDF is noisy and it will take a LOT of averaging. This is a very expensive way to prove that statistical mechanics is correct. Also, the fluctuations in the frame to frame SDF pressure aren't meaningful. The fluctuations have more to do with the sampling approach than with any physical property of the system (in contrast to the virial pressure HOOMD computes for MD).

I wouldn't use SDF in combination with aspect or shear moves. As the geometry of the box changes, the system will be under different levels of stress. The resulting average pressure would be meaningless.

------
Joshua A. Anderson, Ph.D.
Research Area Specialist, Chemical Engineering, University of Michigan
Reply all
Reply to author
Forward
0 new messages