-
|
Hello, using HOOMD version 4.7, I would like to compute a custom force by using I have a special particle (the "driver" particle with type 1) that is externally controlled and should be located at the end of the positions array, and N agent particles with type 0. I am using a hoomd.md.nlist.Cell object as follows: and added it to the operations array: Essentially, I am looking at the difference between the HOOMD computed In my unit tests, I can confirm that in the first step, What confuses me is that
Am I using the access via Thank you for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
|
You do not need the The neighbor list is not building because you disabled distance checks: hoomd-blue/hoomd/md/NeighborList.cc Lines 1252 to 1256 in 6df3e7d Set hoomd-blue/hoomd/md/NeighborList.cc Lines 1284 to 1314 in 6df3e7d |
Beta Was this translation helpful? Give feedback.
-
|
The particles will be resorted periodically throughout the simulation, even on a single CPU: https://hoomd-blue.readthedocs.io/en/v5.4.0/hoomd/tune/particlesorter.html#hoomd.tune.ParticleSorter |
Beta Was this translation helpful? Give feedback.
pair_liststores pairs of tags. You are usingcpu_local_force_arraysandcpu_local_snapshotwhich are accessed by index. To get the current indices, usesnap.particles.rtag[tag]instead of the tags directly on these lines:It doesn't help you right now, but I have designed hoomd-rs to avoid all of this needless complexity. In hoomd-rs, you only need to write your custom pair force routine as a function of two site's properties --- all the index, tag, ghost, and spatial data structure complexities are already implemented elsewhere. Your custom potential is also compiled to machine code and will therefore run 100's to 1000's o…