Patchy Particles in Hoomd-Blue

518 views
Skip to first unread message

Jared O'Leary

unread,
Mar 24, 2022, 12:31:40 PM3/24/22
to hoomd-users
Hi All:

I have seen various conversations that discuss patchy particles but I am still a little confused on some of the details of the implementation.

Essentially, I would like to simulate the self-assembly of patchy particle where each particle has three equally spaced patches. I would also like the "inter-patch" potentials to all be equal and I would like these to be MD simulations.

I have seen some comments here about using md.constrain.rigid, but the exact implementation is unclear to me. I would really appreciate it if someone could provide some more specific context. It would be even better if I could just some specific instructions as to what to add to the "basic" hoomd blue MD simulation shown here.

import hoomd 
cell = hoomd.md.nlist.Cell() 
lj = hoomd.md.pair.LJ(nlist=cell) 
lj.params[('A', 'A')] = dict(epsilon=1, sigma=1) 
lj.r_cut[('A', 'A')] = 2.5 

integrator = hoomd.md.Integrator(dt=0.005) 
integrator.forces.append(lj) 

nvt = hoomd.md.methods.NVT(kT=1.5, filter=hoomd.filter.All(), tau=1.0) integrator.methods.append(nvt) 

gpu = hoomd.device.GPU() 
sim = hoomd.Simulation(device=gpu) 
sim.operations.integrator = integrator 
sim.create_state_from_gsd(filename='init.gsd') sim.state.thermalize_particle_momenta(filter=hoomd.filter.All(), kT=1.5) 

sim.run(1e5)

Thanks a lot!

Best,
Jared


Joshua Anderson

unread,
Mar 25, 2022, 11:08:58 AM3/25/22
to hoomd...@googlegroups.com
Jared,

There have been many questions on rigid bodies recently. We are working on a complete tutorial that teaches the concepts you need to understand rigid body simulations. In the meantime, here is a minimal working example for a simulation of rods.

See the documentation for md.constrain.Rigid for complete details: https://hoomd-blue.readthedocs.io/en/v3.0.0/module-md-constrain.html#hoomd.md.constrain.Rigid

In this example, the 'rod' particle type represents the center of mass of the rods and does not interact with other particles in the system. For your case of patchy particles, you could use the central particle to represent the center sphere, place the 'A' particles at the patch locations, and set the particle-particle interactions as needed to implement your model.

init.py
run.py
rods.png

Jared O'Leary

unread,
Mar 28, 2022, 12:12:13 PM3/28/22
to hoomd-users
This is really helpful -- thank you so much!

One quick question -- is there any reason that you chose to use Langevin dynamics instead of the standard NVT from the MD simulation tutorials?

Thanks again!

Best,
Jared

Brandon Butler

unread,
Mar 30, 2022, 4:06:08 PM3/30/22
to hoomd...@googlegroups.com

Jared,

This depends on what system you are studying. Langevin dynamics add a stochastic force and drag which for some systems with implicit solvent (such as colloidal systems) might be preferable. Both lead to the same thermodynamics.

Best,

Brandon

--
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/24188f4a-f215-4a96-b609-5df9b2f83fc4n%40googlegroups.com.
--
Brandon Butler
MolSSI Fellow
PhD Candidate, Chemical Engineering and Scientific Computing | Glotzer Lab, University of Michigan
Email: butl...@umich.edu

Joshua Anderson

unread,
Apr 4, 2022, 5:44:31 AM4/4/22
to hoomd...@googlegroups.com
Jared,

In this specific minimal example, the rods are at a very low density and thus will rarely collide. Langevin provides a random force that causes them to diffuse. NVT modifies the particle velocities only by multiplication so the rods would mainly travel in straight lines through the box (at varying speeds).
------
Joshua A. Anderson, Ph.D.
Research Area Specialist, Chemical Engineering, University of Michigan
> To view this discussion on the web visit https://groups.google.com/d/msgid/hoomd-users/deecedc7-3e61-ffc1-e300-e305cfc6576c%40umich.edu.

hua lian

unread,
May 13, 2022, 4:49:05 AM5/13/22
to hoomd-users
Dear hoomd-users,
  I noticed that V3.0 removed md.constrain.oneD, which can constrain particles to move along a specific direction only(v2.9).   here I asked for help how to realize the above constrain  in v3.0?

Best,
Lianhua


---- 回复的原邮件 ----
发件人 Joshua Anderson<joaa...@umich.edu>
日期 2022年04月04日 17:44
收件人 hoomd...@googlegroups.com<hoomd...@googlegroups.com>
抄送至
主题 Re: [hoomd-users] Patchy Particles in Hoomd-Blue

Joshua Anderson

unread,
May 13, 2022, 5:02:27 AM5/13/22
to hoomd...@googlegroups.com
Lianhua,

Your message has nothing to do with patchy particle simulations, and adds nothing to that conversation thread. Please post new topics to new threads so that readers of the mailing list can understand the flow of the conversation. Find this and other guidelines on how to effectively use this mailing list here: https://groups.google.com/g/hoomd-users/c/Oip0wkUOXro - which is also posted at the top of the mailing list page here: https://groups.google.com/g/hoomd-users

The sphere, ellipsoid, and oneD constraints in HOOMD v2 where not proper energy conserving methods. We replaced these in v3 with RATTLE: https://hoomd-blue.readthedocs.io/en/v3.1.0/module-md-methods-rattle.html that constrains particles to move on manifolds. To add one dimensional constraints, add a one dimensional manifold type, adjust the implementation of the RATTLE integrators to handle both 1D and 2D manifolds correctly, and test that your implementation conserves energy in NVE integration.
------
Joshua A. Anderson, Ph.D.
Research Area Specialist, Chemical Engineering, University of Michigan

Reply all
Reply to author
Forward
0 new messages