Fix 'gcmc' Documentation


The following questions came to my mind as I was studying the documentation of the fix command ‘gcmc’

  1. The syntax of the gcmc command from documentation is as follows
    fix ID group-ID gcmc N X M …
    “Every N timesteps the fix attempts both GCMC exchanges (insertions or deletions) and MC moves of gas atoms or molecules. On those timesteps, the average number of attempted GCMC exchanges is X, while the average number of attempted MC moves is M.”
    Now if N is 10, does that mean GCMC fix is only working in every 10th step? Then what is happening in the steps 1 to 9, 11 to 19 and so on.

  2. GCMC simulation inserts molecules in the system and inserted molecule numbers can be calculated easily. Is it possible to calculate the volume of inserted molecules? I was not able to find any appropriate ‘compute’ command for that. Or is this volume need to be calculated from ideal gas equation?

LAMMPS is primarily a molecular dynamics code, thus you typically would run an MD simulation. The specific use case that fix gcmc was initially conceived for was absorption of gas molecules in zeolithes. There the process is far too slow when modeled exclusively with MD, so the simulation is augmented with MC moves for displacement and insertion/removal.

Volume is not a well defined concept at the atomic scale. What is the “volume” of an atom? If you look at a single atom it is mostly empty space. So what you can define is some kind of “effective volume” based on the density and number of atoms/molecules for a given region. Apart from that, you also have packing effects based on the shape and geometry of the system and inserted molecules.

So I suppose in the steps 1 to 9 MD simulation is carried out and at the 10th step MC moves are carried out. But if I want to run just MC simulation and do not define any fixes that performs time integration, nothing will happen in those in-between steps (1-9 steps).

Actually I did not phrase the question correctly. I actually wanted to know the volume of gas the from the number of inserted molecules not the volume of molecules.

If you just want to do an MC simulation than you have a) chosen the wrong program and are using the wrong feature in it for that purpose b) there is no sense running such a fix only every 10th step.

That makes even less sense. A gas will fill whatever volume it can expand to. At the atomic level that is all volume minus that of your host system for which you need to determine the “volume” of the individual atoms/molecules and you have the same problem again.

It is just a hypothetical example. I am just trying to figure out what fix gcmc is doing.
I am trying to calculate adsorption isotherm for porous structure which requires GCMC simulation and I believe it should be possible with LAMMPS.

Please don’t waste people’s time with asking pointless questions. What you had asked originally had been answered. If you don’t want to do what you are asking about, then there is no point in asking that question. There is a gazillion of hypothetical questions that don’t need to be asked.