Is there get_net_virial() of particle group in HOOMD v4.1.0

26 views
Skip to first unread message

Avishek Kumar Avishek Kumar

unread,
Oct 26, 2023, 10:29:28 PM10/26/23
to hoomd-users
Hi,

I was using HOOMD v2.7.0 which provided me the net virial component of particle group  by using get_net_virial(particle group). Is there some syntax in HOOMD v4.1.0 which calculates the net virial over particle group or do we have to write the custom function in HOOMD code to calculate the net virial component over particle group? Kindly help me, I am not missing something.

Thanks and Regards,
Avishek

Brandon Butler

unread,
Oct 31, 2023, 11:34:28 AM10/31/23
to hoomd...@googlegroups.com

Hello Avishek,

If you want to compute the sum of a particular group of particles you can use local snapshot docs and only sum over particles you want. You need to make sure that virials were computed for that step you are computing this for. You can do this through a custom action that sets the correct flags (see that documentation for more) or setting the simulation attribute always_compute_pressure to True (this has a performance penalty).

Best,

--
Brandon Butler
MolSSI Fellow
PhD Candidate, Chemical Engineering and Scientific Computing | Glotzer Lab, University of Michigan
Email: butl...@umich.edu

--
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/7a67a689-455b-4b49-aed7-a1d217271525n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages