Setting atom types

Hello lammps users

I have a system of atom with only one type of atoms, say carbon atoms. Now I want to change half of the atoms to second type of atoms such that every atom has a neighbor that is of other/second type. Suppose one atom is C and all its surrounding atoms are N atoms. Is there any way/command/logic in lammps to do so?

Thanks you.


Take a look at the set command

If you need to insure that teach neighboring atom has alternating atom type (IE, not random), then it sounds like you will have to build a crystal. You can do this in lammps directly using a combination of create_atoms and lattice commands:

Thank you Andrew. I will try.