Starting from a $\ce{BaTiO3}$ structure, I want to dope this with Strontium to obtain $\ce{Ba_{0.67}Sr_{0.33}TiO3}$. Is there a way to do this using LAMMPS?

I began a discussion about this in Chinese on the Computational Chemistry Commune. I know this can be done using a scripting language (e.g. Bash/Python) to edit my input file, but I was curious if LAMMPS or some other existing tool can already automate this process.

  • 3
    $\begingroup$ I already answered you elsewhere and I'll answer you again. No matter whether LAMMPS supports this natively, you can do this in less than an hour with BASH. As long as you are using LAMMPS under Linux, you certainly already know some BASH. Figuring out how to do this in BASH (even if this involves a lot of Googling or browsing over StackExchange) is probably faster than asking others about how to do this in LAMMPS and waiting for their answer... $\endgroup$
    – wzkchem5
    Commented Sep 1, 2021 at 8:24
  • $\begingroup$ Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. $\endgroup$
    – Community Bot
    Commented Sep 1, 2021 at 12:28
  • $\begingroup$ @wzkchem5 thanks for your help! Would you be able to show us where the question was asked previously? $\endgroup$ Commented Sep 1, 2021 at 12:30
  • $\begingroup$ @NikeDattani Here it is: bbs.keinsci.com/thread-24926-1-1.html. But it's in Chinese. The Chinese question was more clearly phrased though - the OP seems to want a whatever method that randomly substitutes 33% of Ba with Sr in an existing BaTiO3 supercell. I guess this cannot be done with LAMMPS, but I don't know enough about LAMMPS to be sure. Maybe some visualization software supports this but I don't know. If I'm confronted with this problem I'll simply write a script. Python may be the most suitable but the OP does not seem to be familiar with Python. So I recommended Bash instead $\endgroup$
    – wzkchem5
    Commented Sep 1, 2021 at 13:12
  • 1
    $\begingroup$ LAMMPS has commands to a) select atoms into a group b) delete atoms c) create new ones. Would a combination of those satisfy your needs? $\endgroup$ Commented Sep 2, 2021 at 8:56


Browse other questions tagged .