variable parameters in DPD pair potential

96 views
Skip to first unread message

Deepak Mangal

unread,
Feb 7, 2022, 11:07:49 AM2/7/22
to hoomd-users
Hi all,
I want to use variable gamma (based on distance between particles) in DPD pair potential by including short-range lubrication interactions between particles. Can I do that using custom action?
Thanks,
Deepak Mangal

Brandon Butler

unread,
Feb 7, 2022, 12:39:09 PM2/7/22
to hoomd...@googlegroups.com

Hey Deepak,

Yes, you can. You can also just run a set number of steps in a while or for loop before changing the potential again. To use a custom action see the tutorial in the official documentation, and create a class definition that allows for the class to take a DPD potential object and update its attributes in its act method.

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/d2cc9f20-ea93-483e-bcac-beb1b23b4263n%40googlegroups.com.
--
Brandon Butler
MolSSI Fellow
PhD Candidate, Chemical Engineering and Scientific Computing | Glotzer Lab, University of Michigan
Email: butl...@umich.edu

Deepak Mangal

unread,
Feb 7, 2022, 2:57:20 PM2/7/22
to hoomd-users
Hi Brandon,
Thank you for your quick reply. I actually was not asking about updating DPD pair attributes with timestep. The DPD pair attributes are specific to particle types, but with lubrication interaction it will depend on the distance between a pair of particles also. So, I wanted to know how I can implement it using custom action.
Thanks,
Deepak

Joshua Anderson

unread,
Feb 8, 2022, 10:47:41 AM2/8/22
to hoomd...@googlegroups.com
Deepak,

The functional form of the DPD potential is written in C++ and compiled into the shared object file. You cannot modify it using Python using a custom action.

See: https://github.com/glotzerlab/hoomd-blue/blob/7b450cc7eb65e49e4fa8ac7be490103d42c22326/hoomd/md/EvaluatorPairDPDThermo.h#L268-L283
------
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/9e9e842b-3387-4c25-9251-0dabac41e442n%40googlegroups.com.

Deepak Mangal

unread,
Feb 9, 2022, 10:45:01 AM2/9/22
to hoomd-users
Hi Dr. Anderson,
Thank you for your reply. To use variable parameters in DPD pair potential, I created a new pair potential class (attached here), and installed the HOOMD-Blue package with the new class. The package is installed successfully, but hoomd.md.pair module doesn't recognize the new pair potential. Could you please suggest what changes I should make in the HOOMD-Blue package to include new pair potential class?
Sincerely,
Deepak Mangal
EvaluatorPairDPDMorseThermo.h

Joshua Anderson

unread,
Feb 9, 2022, 11:02:46 AM2/9/22
to hoomd...@googlegroups.com
Deepack,

I have an open pull request that adds documentation on this topic to ARCHITECTURE.md. You can find an overview there: https://github.com/glotzerlab/hoomd-blue/pull/1230

You can also search recent pull requests for an example of one adding a new potential.
------
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/0d958735-5a1a-4899-8200-5a87fa21b34dn%40googlegroups.com.
> <EvaluatorPairDPDMorseThermo.h>

Reply all
Reply to author
Forward
0 new messages