Modifiying Cr element composition from a slab data

Hello Everyone. I want to change this FeCr slab data, changing the Cr composition. this data has 20% Cr. I want to change it to 15% and 30%. can you help me? or can you guide me how to do it?
CrFeO.data (70.0 KB)

LAMMPS has the set command — LAMMPS documentation

You can either compute how many Fe or Cr atoms you have to change randomly from one into the other or set them all to one type and then randomly set the ratio you want.

Remember that when using random atom type selections that you have to prepare multiple input geometries with different random number seeds to get converged results over multiple runs.

hello, thank you so much for your help, but in my case, I don’t set the atom in the script but make saparate file. and in the script, I will call the data by using read_data in the script. so, I have try using atomsk, but I still can’t find a way to change the data. or do you have any suggestions?

Sorry, but I don’t understand why you cannot use the set command after read data to change the type of atoms. Whether you make this kind of change in the data file or after loading the data file is irrelevant from my perspective. If you want a new data file after making the change, you can always use the write_data command.

If you want to get assistance for using atomsk, however, you are asking in the wrong place.