How to estimate the pressure tensor in HPMC simulation? #2062
Unanswered
YunhanZhang8
asked this question in
Support
Replies: 1 comment
-
No version of HOOMD-blue computes the pressure tensor in hard particle simulations. To compute the isotropic pressure, use SDF: https://hoomd-blue.readthedocs.io/en/v5.2.0/hoomd/hpmc/compute/sdf.html For any future questions that you might ask, note that we only support the latest version of HOOMD-blue (currently 5.2.0). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Dear all,
I am currently performing HPMC simulations of a system containing 1,000 hard spheres in the NVT ensemble. My goal is to estimate the pressure tensor components (e.g., pressure_zz). When using hoomd.compute.thermo() to compute the pressure tensor, the output values remain zero. I expected non-zero values given the finite particle density and interactions. I have included my simulation script below for reference:
import hoomd
import hoomd.hpmc
import hoomd.md
hoomd.context.initialize()
hoomd.init.create_lattice(unitcell=hoomd.lattice.sc(a=2.0, type_name='A'), n=10)
all = hoomd.group.all();
mc = hoomd.hpmc.integrate.sphere(seed=1)
mc.shape_param.set('A', diameter=1.0)
g = hoomd.group.type(name='typeA', type='A')
my_thermo=hoomd.compute.thermo(group=g)
logger=hoomd.analyze.log(filename='mylog.log', quantities=['pressure_zz_typeA'], period=1000, overwrite=True,header_prefix='#');
hoomd.run(1e6)
Any suggestions would be appreciated.
Best regards,
Yunhan
Beta Was this translation helpful? Give feedback.
All reactions