-
Hi All, I have an existing workflow to compute the chemical potential of a system using Widom insertions. My current workflow first writes the trajectory of the system with N particles to a file and then performs the Widom insertions as post processing step (this was suggested in a prior post: https://groups.google.com/g/hoomd-users/c/dtm2jikp1k0/m/qjvlWvqwBwAJ). For each frame in the trajectory, I update the simulation state to contain N+1 particles and run for a single step with dt=0 to compute the new potential energy. This information is then used to get \Delta U(N -> N+1), which is then averaged over many frames/insertions to get the chemical potential. My question is how to do this most efficiently. I am currently performing the insertions using Many thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Are these MD or HPMC simulations? What potentials do you need to evaluate for the inserted particles? |
Beta Was this translation helpful? Give feedback.
-
Looks like I wrote the comment you are referring to. :) When I did this with HOOMD 2 for LJ-type particles, I was able to do the insertion quite efficiently by doing multiple insertions in parallel. I think I made the test particle its own type, and I disabled the interactions between test particles by setting By doing multiple trials in parallel, the cost of the snapshot setting and transfer to the GPU is amortized, so I think it was pretty cheap in the end. The number of snapshots and trials we used should be in this paper: |
Beta Was this translation helpful? Give feedback.
Looks like I wrote the comment you are referring to. :)
When I did this with HOOMD 2 for LJ-type particles, I was able to do the insertion quite efficiently by doing multiple insertions in parallel. I think I made the test particle its own type, and I disabled the interactions between test particles by setting
r_cut=False
for those pairs. For each frame, I addedNtest
particles at random positions using the snapshot interface, and I computed the potential energy of the configuration. For pair potentials, the change in energy due to the insertion of a test particle should be 2x the energy assigned to the test particle (since half the pair energy goes to each particle in a pair). You can th…