I am trying to simulate the diffusion characteristics of hydrogen atoms in an Inconel alloy comprising Ni, Cr and Fe at a specified percentage. Initially, I defined the composition of the alloy and generated the structure, minimized the energy, performed a round of heating and cooling at 3000 K from 300 K and at the end of the last stage of cooling I performed the NPT and NVT equilibrations to get the final structure of the alloy. My LAMMPS script has the codes containing the definition of hydrogen, defining the Lennard-Jones pair-wise potential of hydrogen with all 3 alloy elements and then a further hydrogen diffusion calculation right after the equilibration code. But every time I am running the simulation, it stops after the equilibration stating that an error occurred with “invalid value in set command” for this command- “set type 1 type/fraction 4 0.0008 1322”. What I am doing in this command is setting up a new element type 4 from type 1 (which is Ni defined earlier in the script) with a fraction value of 0.0008. Can anyone please tell me why is this error popping up here? What am I doing wrong and what should I do so that I can define a new type 4 from type 1 with the same fractional value? I have also added the section of codes where I am defining these types after the equilibration of the alloy with 1, 2 and 3 elements. Any help, in this case, will be highly appreciated. Thanks.
Here is the code-
# defining lattice parameter
#variable latparam equal 3.4987
variable tracerCharge equal 1 # Hydrogen
variable trFrac equal 0.1
#variable n equal 4
#variable t equal 100
#variable p equal $(v_t/v_n)
#variable fb equal 42
#variable fc equal 22
############### Set type fraction for atom percent ###################
# definining the type of metals
# Introduction of new type of tracer element Hydrogen
#set type 1 type/fraction 2 $(v_fb/v_t) 11
#set type 2 type/fraction 3 $(v_fc/v_fb) 12
set type 1 type/fraction 4 0.0008 1322
set type 2 type/fraction 5 0.0008 1422
set type 3 type/fraction 6 0.0008 1522
set type 1 type/fraction 7 ${trFrac} 1013
set type 7 charge ${tracerCharge} # charge of Hydrogen
###################### Group Atoms ###################################
# Atom type 1, 2 and 3 are already defined in the earlier part of this same script for the equilibration simulation
#group Ni type 1
#group Fe type 2
#group Cr type 3
group Ni1 type 4
group Fe1 type 5
group Cr1 type 6
group tracer type 7
pair_style hybrid lj/cut 10 eam/alloy
pair_coeff * * FeNiCr_eam.alloy Ni Fe Cr
pair_coeff 1 7 lj/cut 0 1.46
pair_coeff 2 7 lj/cut 0 1.37
pair_coeff 3 7 lj/cut 0 1.49
pair_coeff 4 7 lj/cut 0 1.46
pair_coeff 5 7 lj/cut 0 1.37
pair_coeff 6 7 lj/cut 0 1.49
pair_coeff 7 7 lj/cut 0 0
kspace_style ewald/disp 1.0e-10