How to solve the ERROR: Fix gcmc molecule command requires that atoms have molecule attributes with fix property/atom commad?

Hello Lammps Users,

I am trying to run gcmc for H2 adsorption on MOFs. But keep getting the following error:

ERROR: Fix gcmc molecule command requires that atoms have molecule attributes

since the special potential that I used only works in atomic atom_style, does anyone know how to solve this error with fix property/atom command?

Here is my input file:
LAMMPS (12 Dec 2018)
units metal
atom_style atomic
dimension 3
boundary p p p
processors * * *

read_data start.lmp
triclinic box = (0 0 0) to (21.668 21.675 21.672) with tilt (0 0 0)
1 by 1 by 1 MPI processor grid
reading atoms …
432 atoms

mass 1 26.982
mass 2 15.999
mass 3 12.011
mass 4 01.008
mass 5 01.008
mass 6 14.007

molecule gas H2.txt
Read molecule gas:
2 atoms with max type 5
1 bonds with max type 0
0 angles with max type 0
0 dihedrals with max type 0
0 impropers with max type 0
group mof type 1 2 3 4 6
432 atoms in group mof
group gas type 5
0 atoms in group gas

configuration for runs

pair_style mlip mlip.ini
pair_coeff * *

dump info

dump 1 all atom 10 dump_H2_MC.lammpstrj

GCMC

#variable tfac equal 5.0/3.0 # (3 trans + 2 rot)/(3 trans)
fix fgcmc gas gcmc 10 10 10 0 65899 300 -0.2 0.1 mol gas pressure 10.0

output

#thermo_style custom step etotal temp lx vol press
thermo 100
run 200
WARNING: Fix gcmc using full_energy option (…/fix_gcmc.cpp:487)
ERROR: Fix gcmc molecule command requires that atoms have molecule attributes (…/fix_gcmc.cpp:537)
Last command: run 200

Looking forward to the replies. Thank you so much.

Best,
Nicole Liu

Unless the developers of the potential have put in a check against the atom style (which would be very unwise), there is no technical reason why you cannot use a different atom style than `atomic" with that custom pair style. All atom styles are a superset of atomic and are thus compatible with it. Your claim is therefor incorrect.

The only point where the atom style makes a difference is the format of the data file. When using atom style full (or bond which should also be sufficient in your case) then there are additional columns required in the “Atoms” section of the data file. Details are in the read_data command documentation.

Why don’t you just read the documentation of that command? There are multiple examples given specifically to demonstrate how to add molecule IDs and discuss how to initialize/restart them.

Thanks so much for the reply.

i am a newbie for lammps. I have tried to read and understand the manual but didn’t get how to change it based on my system. Will go manual again. Thanks again.