-
Optimizing Grand Canonical Hybrid MCMD SimulationsHello, I have a question about optimizing grand canonical hybrid MC/MD (Monte Carlo/Molecular Dynamics) for simulations. Here is an overview of my system and the challenges I am facing: System Overview
ImplementationI use hoomd 4.6 with miniconda.
QuestionTo summarize, my questions are:
I would greatly appreciate any advice on improving the implementation or suggestions for best practices. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
There are C++ API calls to remove and add individual particles but these are not exposed to Python (#1535). I also don't think that these methods correctly handle removing the bonds/angles/... connected to the particles, but it has been many years since I looked at that code. There are no methods currently implemented to add/remove whole molecules.
All the Unfortunately, there is no solution to this problem in HOOMD-blue. Providing energy computations at this granularity would require a massive restructuring of the codebase. I also don't think that it would be possible to provide that level of customization with high performance from a Python API. At the same time, this level of customization is a common request and clearly needed by the community. I am working on some ideas in this direction but am not yet ready to share any details. I'll announce the project on this discussion board when it is ready to share: https://github.com/glotzerlab/hoomd-blue/discussions/categories/announcements |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for your fast and informative reply! Do you have any estimate on when these improvements might be available? |
Beta Was this translation helpful? Give feedback.
-
Thank you for the information. I am looking forward to it nonetheless. |
Beta Was this translation helpful? Give feedback.
There are C++ API calls to remove and add individual particles but these are not exposed to Python (#1535). I also don't think that these methods correctly handle removing the bonds/angles/... connected to the particles, but it has been many years since I looked at that code. There are no methods currently implemented to add/remove whole molecules.
set_snapshot
triggers a full re-initialization of all particle/bond/angle/... data structures. It is therefore very expensive (10x or more the cost of evaluating the total energy of the system). This will also re-initialize the tags for every particle to match the index in the snapshot provided toset_snapshot
. This should help explain the beha…