On the issue of inserting elliptical atoms with fix gcmc

input.txt (1.1 KB)



I want to use gcmc to insert elliptic atoms, but I don’t know why, I can only run 1000 steps at a time, and then I report the above error, use gdb to query the bug, and find that it is really atom->mass This array problem, please how do I deal with inserting it according to my idea

gcmc_md.lmp (3.2 KB)
pair_lj.txt (10.4 KB)
Here’s my idea that the script works fine when inserted according to the coarse particles, and when I change to elliptical particles, it reports the same error as the appeal

You cannot. Fix gcmc does not support atom styles that have per-atom masses, it only supports styles with per-type masses.

You could work around this specific limit by using a hybrid atom style where you combine it with atom style atomic (which has per-type masses) and set the per-type masses with the mass command, but then you have the problem that the shape information is not set and there is no simple way around that limitation.

So you would need to do some C++ programming. First to add support for shape information to molecule files (as an additional section), then to add support for per-atom masses to fix gcmc and then you would need to use the molecule file instead of just naming the type.

Alternately, you would use the python interface and program your own GCMC algorithm with the MC part in python and use create_atoms single and set etc. to define the new atoms, run 0 to get energies and then either continue with the changed system or restore the previous and run a chunk of MD.

Thank you very much for your answers