doping Zr in Cu bicrystal using set command

Dear lammps experts,
I am trying to dope Zr atoms in a Cu bicrystal sample. Though the sample don’t have Zr but I have defined the two atom type in the data file.
After reading the data file I defined the atom type with mass command for both atoms (type 1 is Cu and type 2 is Zr) and then tried to dope 10% Zr using the following command:
set atom 1 type/fraction 2 0.1 12393

I didn’t get any error but I could not see any Zr atoms in my sample. I checked the output file and it explains
"0 settings made for type/fraction"

Could you please help me understand what is missing.

Thank you.

According to the manual, your commend may not be suitable for what you want. If you want 10 percent of the original atoms to be new type with type/fraction, your style should not be atom, but others, like region or group, depending what you have defined.

Keshab Bashyal <kbashyal@…3211…>于2018年1月10日 周三下午10:33写道:

Dear Xiao Jia,
Thank you very much for the suggestion. It really helped. I defined the region and it works well.