Move size in hpmc.integrate

22 views
Skip to first unread message

Kaustav Chakraborty

unread,
Mar 10, 2023, 11:46:57 AM3/10/23
to hoomd-users
Dear HOOMD users,

I want to clear a confusion regarding hpmc with hard sphere. Let's say I have a single hard sphere inside a cubic box and running a monte carlo simulation. To run this I'm giving the following command (I use HOOMD-v2.3.4)-

mc = hoomd.hpmc.integrate.sphere(d=0.12,seed=193799, nselect=1)
mc.shape_param[type_id].set(diameter=diameter)

Does that mean the sphere will be displaced at every step (I'm giving nselect=1 to ensure that it is displaced only once at each mc step) from it's previous position by some  random value (taken from uniform distribution generated by some random number generator)  between 0 to 0.12?

Regards,
Kaustav Chakraborty

Joshua Anderson

unread,
Mar 10, 2023, 1:31:53 PM3/10/23
to hoomd...@googlegroups.com
Kaustav,

The documentation I wrote on this is very explicit: https://hoomd-blue.readthedocs.io/en/v3.9.0/module-hpmc-integrate.html#module-hoomd.hpmc.integrate

If there is a specific part of the documentation you don't find clear, please copy and paste that sentence and explain what clarification you need.
------
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/7ba44061-3490-4da9-9045-4d5d68e6ed92n%40googlegroups.com.

Kaustav Chakraborty

unread,
Mar 10, 2023, 2:01:31 PM3/10/23
to hoomd...@googlegroups.com
'default_d (float) – Default maximum size of displacement trial moves' 

 does that mean every trial move of each particle in the system is taken from uniformly distributed random numbers from 0 to this particular 'maximum size of displacement' ?

Kaustav chakraborty

unread,
Mar 12, 2023, 8:35:49 AM3/12/23
to hoomd...@googlegroups.com
It seems that the random numbers for trial moves are sampled from exponential distribution starting from this 'Default maximum size of displacement trial moves', rather than from uniform distribution (And that perfectly makes sense if the target is to make moves closely to the value of maximum move size determined from practical conditions). Could you please  confirm this?

You received this message because you are subscribed to a topic in the Google Groups "hoomd-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hoomd-users/6yK2aJEyvS8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hoomd-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hoomd-users/CAPzXsaNgFFJLkF%2BQ2QCjZ2SWxYb5u0wtoruO_hMM7TNv1yqsOg%40mail.gmail.com.
displacements_of_a_particular_particle_d0p12_cpp_from_trajectory_file_v4.png

Eric Irrgang

unread,
Mar 13, 2023, 5:56:56 AM3/13/23
to hoomd...@googlegroups.com

> On Mar 10, 2023, at 10:01 PM, Kaustav Chakraborty <kaustav.chakra...@gmail.com> wrote:
>
> 'default_d (float) – Default maximum size of displacement trial moves'
>
> does that mean every trial move of each particle in the system is taken from uniformly distributed random numbers from 0 to this particular 'maximum size of displacement' ?

No. The trial move is from [0, 0, 0] to [x, y, z], with x^2 + y^2 + z^2 <= d.

Per the documentation, the trial displacement move is generated with "a random vector uniformly distributed within the ball of radius 1", scaled by d (the maximum displacement).

It is not the magnitude of the vector (the displacement) that is uniformly distributed; it is the cartesian coordinate that is uniformly distributed.

Any symmetric probability density would be valid. This uniform density was found to be simple and effective in a large variety of systems.

Kaustav Chakraborty

unread,
Mar 13, 2023, 7:26:11 AM3/13/23
to hoomd...@googlegroups.com
Have you mistakenly written d, instead of d^2 at the end of the first sentence?

--
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.

Joshua Anderson

unread,
Mar 13, 2023, 7:36:08 AM3/13/23
to hoomd...@googlegroups.com
------
Joshua A. Anderson, Ph.D.
Research Area Specialist, Chemical Engineering, University of Michigan

Eric Irrgang

unread,
Mar 13, 2023, 11:26:39 AM3/13/23
to hoomd...@googlegroups.com

Have you mistakenly written d, instead of d^2 at the end of the first sentence?


Yes. Sorry. 


Reply all
Reply to author
Forward
0 new messages