Exclude frozen particles from energy and force computation

129 views
Skip to first unread message

Jean-m

unread,
Jun 27, 2018, 8:32:32 AM6/27/18
to hoomd-users
Hi.
I have a system with 4060 particules and 4000 are frozen.
I then let the 60  particles move inside the system.

I know that if I exclude the 4000 from the group that I use to integrate ex:
md.integrate.langevin(group=my_60_particles, kT=1), the 4000 particles will be frozen,
but how can I avoid computing the interactions between the 4000 - 4000 particles?

Thank you.

Michael Howard

unread,
Jun 27, 2018, 8:41:16 PM6/27/18
to hoomd-users
You can set r_cut = False for the frozen-frozen pair interaction to exclude those from the pair force calculation.

http://hoomd-blue.readthedocs.io/en/stable/module-md-pair.html#hoomd.md.pair.pair

—Mike

Jens

unread,
Jun 30, 2018, 10:27:09 AM6/30/18
to hoomd...@googlegroups.com
This would be helpful for me too, but I don't quite understand how to do this.

If I have, for example, a Lennard-Jones pair interaction as follows:

nl = nlist.cell()
lj = pair.lj(r_cut=3.0, nlist=nl)
lj.pair_coeff.set('A', 'A', epsilon=1.0, sigma=1.0)
lj.pair_coeff.set('A', 'B', epsilon=2.0, sigma=1.0, alpha=0.5, r_cut=3.0, r_on=2.0);
lj.pair_coeff.set('B', 'B', epsilon=1.0, sigma=1.0, r_cut=2**(1.0/6.0), r_on=2.0);

How would I exclude all interactions for particles of type 'C'? If I don't include interactions for C in the above, hoomd generates an error:

**ERROR**: Type pair (u'C', u'C') not found in pair coeff





--
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+unsubscribe@googlegroups.com.
To post to this group, send email to hoomd...@googlegroups.com.
Visit this group at https://groups.google.com/group/hoomd-users.
For more options, visit https://groups.google.com/d/optout.

Joshua Anderson

unread,
Jul 2, 2018, 8:30:05 AM7/2/18
to hoomd...@googlegroups.com
Jens,

I don't understand your question. You say you want to exclude all interactions for particles of type 'C'". Interactions of type 'C' with what?

------
Joshua A. Anderson, Ph.D.
Research Area Specialist, Chemical Engineering, University of Michigan
http://www-personal.umich.edu/~joaander/

Jens

unread,
Jul 3, 2018, 6:11:03 AM7/3/18
to hoomd...@googlegroups.com
Hi Joshua,

I don't want them to interact with anything.

There are two cases where I need this, both within the context of using rigid bodies.

One is where I have 'ghost' particles that are part of a rigid body and need to move with it, but are invisible within the context of the simulation.

The other are the central particles in rigid body simulations; they're required by Hoomd-blue and it crashes if I don't specify a pair interaction, but I just want the constituent particles interacting with each other.

In both cases, I work around this by setting the interactions of these particles with everything else to be zero, but that means I have to enumerate all possible pairs of interactions for these particles with anything else in the system. This seems inefficient, so I was wondering if there was a better way of doing it.


Joshua Anderson

unread,
Jul 3, 2018, 9:28:24 AM7/3/18
to hoomd...@googlegroups.com
Jens,

For case 1: If the particles are invisible in the context of the simulation, they why waste simulation resources on them? Just compute there positions during analysis from the central particle position and orientation and the location of the reference particle in the frame of the body. Even if you remove them from pair force interactions, they still take up time and space in portions of the neighbor list generation step.

For case 2:
``lj.pair_coeff.set('C', ['A', 'B', 'C'], r_cut=False);``
where ['A', 'B', 'C'] is the list of all the particle types in the system.


------
Joshua A. Anderson, Ph.D.
Research Area Specialist, Chemical Engineering, University of Michigan
http://www-personal.umich.edu/~joaander/

Michael Howard

unread,
Jul 3, 2018, 9:36:37 AM7/3/18
to hoomd-users
In case 2, you will likely still need to specify any “required” coefficients for the pair potential, even though those calculations will not be performed. For the LJ potential, I usually set epsilon = 0 and sigma = 0 when I set r_cut = False.

—Mike

Jens

unread,
Jul 3, 2018, 10:03:57 AM7/3/18
to hoomd...@googlegroups.com
Thanks to both for your help - that works perfectly and is much neater.

On 3 July 2018 at 14:36, Michael Howard <howard....@gmail.com> wrote:
In case 2, you will likely still need to specify any “required” coefficients for the pair potential, even though those calculations will not be performed. For the LJ potential, I usually set epsilon = 0 and sigma = 0 when I set r_cut = False.

—Mike

Sheelan Sengupta Chowdhury

unread,
Jan 9, 2020, 6:01:29 AM1/9/20
to hoomd-users
Hi,

I have a system of charged particles - A is positively charged particles, B is negative. Each A is bonded by one B. I want to calculate LJ potential when A is not interacting with the B it's connected through the bond but all other Bs. Any lead/idea? 

Regards,
Sheelan  

Michael Howard

unread,
Jan 9, 2020, 7:16:53 PM1/9/20
to hoomd-users
Pair interactions between bonded particles are excluded by default:


Regards,
Mike

Sheelan Sengupta

unread,
Jan 10, 2020, 12:32:47 AM1/10/20
to hoomd...@googlegroups.com
Thanks a lot. 
Regards,
Sheelan

--
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/40f67566-c1c5-492a-a7e6-0e2f639a5e1a%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages