Hello all,
I’m trying to perform GCMC to insert water molecules into the host structure. As the machine learning interatomic potential (MLIP) only consider configuration of individual atoms, no bond information is considered. The data file I use adopt the atomic atom_style format. I works fine for running NPT. However, when performing GCMC to insert H2O molecules into the host structure, I have to use molecule keyword, which isn’t allow by atomic atom_style.
The error message:
ERROR: Fix gcmc molecule command requires that atoms have molecule attributes (…/fix_gcmc.cpp:571)
Last command: run 500000
I wonder if there’s a way to use atomic stom_style while enabling molecule keyword in GCMC.
Great thanks for your kind reply!
The input file:
1) Initialization
units metal
boundary p p p
atom_style atomic
variable T equal 4002) System definition
read_data MnFePBA_300K.data
replicate 1 2 1
mass 1 12.0107 # C
mass 2 54.938049 # Mn
mass 3 55.845 # Fe
mass 4 14.0067 # N
mass 5 22.98977 # Na
mass 6 15.9994 # O
mass 7 1.00794 # Hvariable seed index 2898
3) Simulation settings
group O type 6
group PB type 1 2 3 4
group H2O type 6 7pair_style mlip load_from=curr.almtp extrapolation_control=true extrapolation_control:threshold_break=10 extrapolation_control:threshold_save=2 extrapolation_control:save_extrapolative_to=preselected_8.cfg
pair_coeff * *molecule h2omol H2O.mol
variable oxygen atom “type==6”
group oxygen dynamic all var oxygen
variable nO equal count(oxygen)#bond_style harmonic
#bond_coeff 1 450.0 0.9572 # For O-H bonds in water
#angle_style harmonic
#angle_coeff 1 55.0 104.52 # For H-O-H angle
#fix shak H2O shake 1.0e-4 200 0 b 1 a 1 mol h2omol4) Visualization
dump dump all custom 2000 dump.gcmc_8.trj id type x y z
dump_modify dump element C Mn Fe N Na O H5) Run
reset_atoms id sort yes
neighbor 2 bin
neigh_modify every 5 delay 5 check yesvelocity all create {T} {seed} mom yes rot yes dist gaussian
compute_modify thermo_temp dynamic yes
compute ctH2O H2O temp
compute ctPB PB temp
compute_modify ctH2O dynamic/dof yes
compute_modify ctPB dynamic/dof yesvariable dt equal 0.0005
) NPT
fix mynpt1 all npt temp {T} {T} (200.0*dt) tri 1 1 (2000.0*dt)
timestep 0.0004
thermo 50
thermo_style custom step temp etotal press vol v_nO
run 4000variable xlo equal xlo+0.1
variable xhi equal xhi-0.1
variable ylo equal ylo+0.1
variable yhi equal yhi-0.1
variable zlo equal zlo+0.1
variable zhi equal zhi-0.1
region system block {xlo} {xhi} {ylo} {yhi} {zlo} {zhi}Create a fix to check the conditions and halt if met
fix halt_lower O halt 4000 v_nO <= 1 error continue
Add another fix for the upper limit
fix halt_upper O halt 4000 v_nO >= 32 error continue
check deleted atoms
fix fgcmc H2O gcmc 4000 100 100 0 65869 400 0.5 0.2 mol h2omol group H2O full_energy region system
fix 1 all recenter INIT INIT INIT
timestep 0.0004
thermo 200
thermo_style custom step temp etotal press vol v_nO
run 500000unfix halt_lower
unfix halt_upper
unfix fgcmc
unfix mynpt1
fix mynpt2 all npt temp {T} {T} (200.0*dt) tri 1 1 (2000.0*dt)
thermo 200
run 100000write_data MnFePBA_gcmc_8.data
write_dump all atom MnFePBA_gcmc_dump_8.trj
The data file
0.000000000 19.647429520 xlo xhi
0.000000000 9.865111619 ylo yhi
0.000000000 9.753668952 zlo zhi
1.290137464 1.140560017 1.154285571 xy xz yz128 atoms
7 atom types
Atoms
1 1 2.67025500 6.25464634 4.32679107 2 1 12.73196919 6.29769814 4.26953652 3 1 2.68040647 2.03634823 9.24621653 4 1 12.48280873 1.79751723 9.15647379 5 1 8.25893089 6.83666355 9.21678319
The molecule file
Water molecule.
3 atoms
2 bonds
1 anglesCoords
1 0 0 0
2 0.9584 0 0
3 -0.23996 0.92787 0Types
1 6
2 7
3 7