Replies: 1 comment
-
Yes, you must set parameters for all (unordered) pairs of types, including HOOMD-blue doesn't know that you intend to place only a single particle of each of those types. What if someone later executes the script with a different input file that contains more than one? Would you prefer undefined behavior where HOOMD-blue computes forces using whatever unknown parameters happen to be at that memory location instead of getting an error message? In your case, you need to set parameters between all colloid types and the solvent:
and set r_cut=0 to achieve your goal of no same-type colloid interactions:
Yes, you still need to set Of course, you will also need to set the full matrix of Cn-Cm interactions as well. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I wrote a HOOMD script to simulate the behavior of large spheres (colloids) in a bath of smaller spheres (solvent). I used the DPD framework along with a Lennard-Jones potential as follows:
The interaction between solvent particles is governed by DPD, as is the interaction between colloids and solvent particles.
The interaction between colloids is governed by the LJ potential.
When I specified the DPD interactions like this:
I encountered the following error upon execution:
hoomd.error.IncompleteSpecificationError: For <class 'hoomd.md.pair.pair.DPD'> in TypeParameter r_cut for key ('C2', 'C2') value is required
I resolved this issue by including in my script the colloid-colloid interaction in DPD but setting A=0:
dpd.params[('colloid',
'colloid')] = dict(A=0.0,gamma=4.5)
It seems that when using 'pair' —regardless of the potential (here, dpd = hoomd.md.pair.DPD(nlist=hoomd.md.nlist.Cell(buffer=0.4), kT=1.0)) — HOOMD applies the potential to all particle pairs in the system. Defining dpd.params[('colloid', 'solvent')] and dpd.params[('solvent', 'solvent')] does not de facto exclude dpd.params[('colloid', 'colloid')].
Is this correct? Is there a way to specify a potential for only selected pairs?
Thanks, Damien
PS: This is important to me also because my system contains only six colloidal particles (C1, C2, …, C6), with a single instance of each. I need to know how to specify the system so that interactions like C1-C1, C2-C2, etc., are not included, as they do not exist given that each particle appears only once.
Beta Was this translation helpful? Give feedback.
All reactions