Mixed patchy particle system #2105
-
Hi, I'm trying to build a system with multiple (but different) 3-patch particles - for example: one particle with AAB patches, another with ABB. Like-like is attractive, like-unlike repulsive. I'm aware I can't do this with AngularStep, and most legacy advice I have read suggests building a sim with rigid bodies. My issue is that a) I would like the potential on the particles to be highly directional, b) I would want the particles acting as patches to overlap. I can't seem to wrap my head around how to do this - is it a case of using the anisotropic pair potential? TIA! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
You are correct, You could also to write a C++ component that implements the desired behavior in one step. You could base it on the I'm working on a new code that makes this type of customization as easy as writing a single function with no complex boilerplate, Python bindings, or dict unpacking required. That code isn't quite ready to share yet. I will announce it on this discussion board when it is. I plan to write a patchy particle tutorial for it. I am interested to see whether the Union approach or the direct evaluation is cleaner for multi-patch particles like this. |
Beta Was this translation helpful? Give feedback.
-
Hi Joshua,
Thank you so much for the detailed reply, I'll be sure to try out union as
it might be the quickest route for me. I'm happy (in a way) that it wasn't
a simple question!
Cheers!
…On Mon, Jul 21, 2025, 11:32 PM Joshua A. Anderson ***@***.***> wrote:
You are correct, AngularStep makes no distinction between like-like and
like-unlike for individual elements in the mask. However, the isotropic
potential that it multiplies does. I think you could use Union
<https://hoomd-blue.readthedocs.io/en/v5.3.1/hoomd/hpmc/pair/union.html>
to achieve the behavior you describe, though it is a bit convoluted. You
need 4 particle types (A, B, P1, P2). Use e.g. a step potential between A
and B to implement the like-like and like-unlike interactions. Use that as
the isotropic potential with AngularStep to implement only 1 directional
patch on each of A and B. Due to the way HOOMD-blue handles particle types,
you also need to set interaction parameters for P1, P2, and all the cross
terms involving P1 and P2 (even if they are 0) for Step and AngularStep.
Then create a Union with the angular step as the constituent_potential
and configure P1 to have the AAB patches - they could all be at the origin
or offset from it depending on the model. The key thing is that the
orientation of the particle in the union will direct the patch. Then do the
same for P2 with its ABB patches. The union potential is the only one that
acts on your system directly.
You could also to write a C++ component that implements the desired
behavior in one step. You could base it on the AngulerStep code and
modify accordingly. Unfortunately, this requires a moderate amount of
boilerplate: https://github.com/glotzerlab/hpmc-energy-template/ should
get you started.
I'm working on a new code that makes this type of customization as easy as
writing a single function with no complex boilerplate, Python bindings, or
dict unpacking required. That code isn't quite ready to share yet. I will
announce it on this discussion board when it is. I plan to write a patchy
particle tutorial for it. I am interested to see whether the Union approach
or the direct evaluation is cleaner for multi-patch particles like this.
—
Reply to this email directly, view it on GitHub
<#2105 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AWMPWNWAB6SV4GNSZXYVHVD3JVS6RAVCNFSM6AAAAACCAAJFSWVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGOBTHA4DOMY>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
You are correct,
AngularStep
makes no distinction between like-like and like-unlike for individual elements in the mask. However, the isotropic potential that it multiplies does. I think you could use Union to achieve the behavior you describe, though it is a bit convoluted. You need 4 particle types (A, B, P1, P2). Use e.g. a step potential between A and B to implement the like-like and like-unlike interactions. Use that as the isotropic potential withAngularStep
to implement only 1 directional patch on each of A and B. Due to the way HOOMD-blue handles particle types, you also need to set interaction parameters for P1, P2, and all the cross terms involving P1 and P2 (even if they are 0…