Replacing atom in .xyz file and iterating minimization script

Hi,

I am new to this community!
I have a lithium manganese oxide structure.
I am using read_data “filename.xyz” to read the structure.
I have 4 main atoms types in my structure file.
Li +, Mn3+, Mn 4+, O2-.

I typically run a minimization step to simulate the potential energy of the structure.

How can I use the read_data command to add a 5th atom type, Scandium in my .xyz file, and run the minimization step.

For example : -

Initial Structure
Masses

1 6.941 # Li
2 54.938049 # Mn 3+
3 54.938049 # Mn 4+
4 15.9994 # O
5 44.955912 # Sc 3+

Atoms # charge

#Atom No|Atom-Type|_|X|Y|Z

1 1 0.0 4.211237 0.0 4.211237
2 1 0.0 2.1056185 2.1056185 2.1056185
3 1 0.0 4.211237 4.211237 0.0
4 1 0.0 2.1056185 6.3168555 6.3168555
5 1 0.0 0.0 0.0 0.0
6 1 0.0 6.3168555 2.1056185 6.3168555

After running this I get initial potential energy of the structure.

Run 2 = Change one atom in pos. 1 to Scandium

Masses

1 6.941 # Li
2 54.938049 # Mn 3+
3 54.938049 # Mn 4+
4 15.9994 # O
5 44.955912 # Sc 3+

Atoms # charge

#Atom No|Atom-Type|_|X|Y|Z

1 5 0.0 4.211237 0.0 4.211237
2 1 0.0 2.1056185 2.1056185 2.1056185
3 1 0.0 4.211237 4.211237 0.0
4 1 0.0 2.1056185 6.3168555 6.3168555
5 1 0.0 0.0 0.0 0.0
6 1 0.0 6.3168555 2.1056185 6.3168555

Get minimization

Run 3 = Change one atom in pos. 2 to Scandium

Masses

1 6.941 # Li
2 54.938049 # Mn 3+
3 54.938049 # Mn 4+
4 15.9994 # O
5 44.955912 # Sc 3+

Atoms # charge

#Atom No|Atom-Type|_|X|Y|Z

1 1 0.0 4.211237 0.0 4.211237
2 5 0.0 2.1056185 2.1056185 2.1056185
3 1 0.0 4.211237 4.211237 0.0
4 1 0.0 2.1056185 6.3168555 6.3168555
5 1 0.0 0.0 0.0 0.0
6 1 0.0 6.3168555 2.1056185 6.3168555

etc.etc

Hi - I assume by *.xyz file you mean a LAMMPS data file. The format of xyz files is not the same.
Since the data file is “input” to LAMMPS you can create or edit it however you wish. Or use antoher
code that writes LAMMPS data files as outputs. The file can define as many atom types as
you wish, e.g. and provide masses for all of them. The atoms in the file do not have to include
an atom for every type. E.g. if you define 5 types and only read atoms with 4 types, you can
add those atoms later. E.g. with a fix which adds atoms dynamically. Or by reading a 2nd data
file which adds more atoms of the the new type.

Steve

Thank you for the response Steve!

I am writing a python script that iterates the structure and replace each atom type with an additional atom type as you have recommended, very helpful!

A couple more questions for you as well, looking to pick your brain on these too if you have the time.
For segregation of dopants at the grain boundary, what are your thoughts on using the monte carlo method vs this rudementary way to compare potential energies?

Knowing that nanoparticles nucleate in preferred plane orientations, have you come across any work that simulates these structures like Wulff Structures?
My approach now would be to just simulate dopant segregations for specific plane slices, eg: - 100 and 111 planes.

Thanks again for your help, anyone else please feel free to comment on this!

Fix atom/swap, in the MC package, was designed to model things like segregation of dopants
to a GB, while maintaining the stoichiometry of the system.

Steve