Question about fix gcmc for hybrid algorithm

Nothing about fix GCMC prevents atoms from flowing in or out of a specified region. You shouldn’t have to fix/unfix the GCMC fix every loop. It is possible that your walls are blocking the flow, but I haven’t checked your input script. It is also possible that your NVT fix isn’t moving the atoms out of the region as you are expecting. Take a look at the documentation on the group command, especially the dynamic keyword. You may need a dynamic group specified in your NVT command.

It should be possible to use fix GCMC to perform DCV simulations. I haven’t done it, but I think others have tried or are working on it (see e-mail archives).


Thanks Paul!
It is the nvt fix’s problem. The group command with dynamic keyword makes it work. But, I have some new questions:

  1. The gcmc fix does not allow the dynamic group. However, if I use gcmc to insert/delete atoms of type 1, and I set type 1 to a static group (e.g. gas) before the fix, then, I use the command ‘fix xxx gas gcmc X X X 1(type) …’ for the same type of gas, will the command treat the inserted atoms as the update group auto-dynamicly for the next gcmc timestep? The result seems fine, but I want to make sure. I also used the ave/spatial fix, which comes with the same question.
  2. When I use the dynamic group, there is always a Warning: One or more dynamic groups may not be updated at correct point in timestep. Does it matter?


Should be fine to have the NVT fix group be dynamic and the GCMC fix group be static as you’ve done. If I understand your question correctly, I think that the commands and behavior you’re seeing are OK. As far as the warning message goes, you might try changing the order of the commands in your input script (if possible) to see if you can make the warning go away. Even if not, I think that the worst case would be that newly-added members of the group wouldn’t move the first timestep they are added, or would only partially be updated on their first timestep. Probably OK. Others with more experience with dynamic groups may wish to chime in.