fix gcmc's use of thermo_temp of potential energy


I have two questions about the use of “fix gcmc”.

I’m wondering why the documentation says that one must include the line “compute_modify thermo_temp dynamic yes” SEPARATELY from modifying the “fix nvt” to include dynamic number of atoms (i.e., the documentation says both of these lines must be included in separate places).

If the temperature used by “fix nvt” was modified to use its own temperature calculation, what is thermo_temp used for? In MC acceptance rules, only the set temperature is used, while the instantaneous system temperature is not used for anything. The only thing I can see thermo_temp being used for is in outputting the system temperature to the thermo log.

When I remove the line “compute_modify thermo_temp dynamic yes” from my input script, I see no change to the simulation, which makes me believe that my interpretation is correct. I just want to check that I’m not misunderstanding something.

When using “fix gcmc” in conjunction with a fix that has an associated potential energy (like “fix langevin”), the documentation says that that potential energy can be included in the GCMC acceptance rules if “fix_modify energy yes” is set. However, only the difference in energy before and after an insertion is used in the GCMC acceptance rules; thus, an extra potential energy that doesn’t change during the course of a particle insertion (as with the extra potential energy associated with a thermostat) should not affect the acceptance rules.

Here though, I do see a change to the simulation when I remove this line from my input script, so clearly my understanding is incorrect. Could someone correct my misunderstanding?

  1. Whenever someone writes a paragraph of text, followed by, “is this right?” I find it hard to provide a helpful response. I will say that if you remove the line “compute_modify thermo_temp dynamic yes,” then the temperature reported by compute thermo_temp will no longer be correct. Whether you care or not will depend on whether you are using it for anything.

  2. The energy calculation performed by fix langevin involves a sum over atom contributions. It is not surprising to me that removing an atom would cause that energy to change. In the case of fix nvt, there might also be an effect, because changing the number of atoms, changes the effective mass of the thermostat coordinates. From a physical chemistry point of view, it does not seem like a good idea to include the energy of a thermostat in the GCMC acceptance criterion.


Thanks Aidan, both answers make sense. Regarding the 2nd one, I wasn’t aware that the thermostat’s potential energy was calculated as a sum over atomic contributions. I’m not sure why one would ever want the thermostat energy to be included in the GCMC criterion, but I do now understand the documentation.