Defining force field parameter sigma differently for every particle and changing it during the simulation #2077
Replies: 1 comment
-
The only way to do this in an unmodified HOOMD-blue is to give every particle a different type and set the pair interaction matrix accordingly. HOOMD will warn you about the possibility for slow performance, but in practice the overall performance achieved is still reasonable. Read more here: #2037 (comment) You plan to change sigma, so the main cost you will pay is an O(N^2) update to the parameter matrix from Python. You can certainly implement that with a custom updater (see https://hoomd-blue.readthedocs.io/en/v5.2.0/howto/continuously-vary-potential-parameters.html for an example), but one call to that will take longer than running the simulation (which is O(N)). If you find that the performance is too slow in that prototype, you can write custom C++ code to evaluate your potential: https://github.com/glotzerlab/hoomd-md-pair-template. For example, you could abuse the "charge" property of the particles to store the per-particle sigma (as long as you don't need charge for something else). Users have been requesting for features like this for many years. There is simply no way to implement them in HOOMD-blue's architecture which makes many performance optimizations around the idea that there are small number of types in a large system of particles. I am working on a new code that will allow users to easily write custom potentials that can depend in any way on custom per-particle properties. That new code is not ready to share yet, but watch for an announcement on this discussion board in the coming months. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am trying to model biological cells as circular soft repulsive particles in 2d. I want to model the cells as objects with dynamic size, so I want to evolve each cell's effective radius (sigma) independently. After sigma is defined as a force field parameter related to the size of the simulated object, I want to vary it for every cell during the simulation.
I know about the
hoomd.custom.Action
subclass used to define and append any user-defined operations with the integrator. So, can we use the same or any feature of HOOMD to define the size (sigma) as mentioned above?Here is a reference on a similar study.
Any help in the above direction will be helpful.
Thank you,
Saurav.
Beta Was this translation helpful? Give feedback.
All reactions