I try to print CO2 and H2O adsorption number and energy in LAMMPS using GM. But I cannot get any results in output. I add the relevant LAMMPS files. I do not know what I miss it.
Do you mean output from the print fix on line 120 in in.MOF5, or any output in general (log.MOF5, etc.)? If the former, you are giving the print fix only after running the simulation with run 500000, so the fix isn't active during the run. If you're not getting any output at all, I'm not sure what's going wrong.
fix print_ads all print 1000 "${fix_gcmc_co2_adsorbed} ${fix_gcmc_h2o_adsorbed}" file ads_data.txt screen no
As far as I know, the above command gives an output for every 1000 steps. It must write into ads_data.txt file. But I do not take any results. Also, some outputs are written into log.MOF5 file. As you can see on the attached file, there is no information about adsorption.
Correct, your print fix will write output every 1000 steps, when it is active during a run. However, in your script you first run the simulation, then activate the fix (so it would write output in any subsequent runs). Simply swap the order of the lines 119 and 120 in your script:
fix print_ads all print 1000 "${fix_gcmc_co2_adsorbed} ${fix_gcmc_n2_adsorbed} ${fix_gcmc_h2o_adsorbed}" file ads_data.txt screen no
I have one more question. I would like to compute gcmc in lammps for CO2 capture. Do you know how to make a ratio of molecule? For instance, I will give a CO2 to N2 molar ratio of 15 to 85. Should I change molar chemical potential?