-
What is the best way to add particles and bonds after simulation is initialized? At the moment I have initialized and minimized my two particle system with a spring connecting them, I want to add a third particle and form two new spring to form a triangle and minimize, while recording the potential energy and gsd frame.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
The simplest solution is to place the first two particles at a distance equal to the the minimum of the bond potential, then add the third before calling State.set_snapshot is the only Python API method that allows you to change the number of particles/bonds/etc... |
Beta Was this translation helpful? Give feedback.
-
Here is my solution: Create a gsd frame by 'frame = gsd.hoomd.Frame()'. Copy the current snapshot to this frame. Add particles etc to this frame. Create a new simulation with the state from this frame. Please leave your solution if you have a better one. |
Beta Was this translation helpful? Give feedback.
Here is my solution:
Create a gsd frame by 'frame = gsd.hoomd.Frame()'.
Copy the current snapshot to this frame.
Add particles etc to this frame.
Create a new simulation with the state from this frame.
Please leave your solution if you have a better one.