How to replace new atom with existing atom in lammps file

Hello everyone,
I want to replace sodium atom with lithium atom in the existing lammps file but only a small percentage of atoms are to be replaced not all the sodium atom.

Why not create a python (or fortran or etc) code to do this job? You can write a code to read the initial microstate file and change the atom type of the Na atoms you want to turn into Li (and also the charge, if there is such attribute in file). If desired, you could even set up criteria based on spatial organization to identify which Na atoms are to be changed into Li (so that the Li atoms are more uniformly spread for example).

See set command — LAMMPS documentation

For that you need to make certain you have an atom type and potential parameters defined for Lithium atoms. Then you can use the set type/fraction or set type/ratio or set type/subset command to change the atom type for the desired fraction of the sodium atoms.