SMTG-Bham / doped

doped is a Python software for the generation, pre-/post-processing and analysis of defect supercell calculations, implementing the defect simulation workflow in an efficient, reproducible, user-friendly yet powerful and fully-customisable manner.
https://doped.readthedocs.io
MIT License
135 stars 31 forks source link

How to convert concentration (per site) to atom percent? #95

Closed ravichinnappanphd closed 5 hours ago

ravichinnappanphd commented 9 hours ago

Defect formation energy of X is computed with Al53X1N54 supercell (108 sites). .get_equilibrium_concentrations(per_site=True) returns 3.5e-21%. How to convert this (per site) concentration of X to atom percent?

alexsquires commented 9 hours ago

@kavanase can tell me if I'm wrong, but from looking, this is not an option in doped, but this should be a very simple conversion you can do yourself. You just need to:

Take the per-site concentration provided by get_equilibrium_concentrations(per_site=True). Multiply this value by the total number of relevant sites in your supercell to get the fraction of sites occupied by the defect. Finally, convert this fraction to atom percent by expressing it as a percentage of the total relevant atoms in the supercell.

kavanase commented 5 hours ago

Not sure if I understand the question entirely either, but what @alexsquires says above is correct. The atom percent concentration is just the fractional concentration when accounting for stoichiometry (and sometimes multiple defects). So to convert from per-site to atom percent concentration, you just have to account for the stoichiometry. e.g. in your case of AlN which has only one symmetry-inequivalent site for each element, the atomic percent is just the site percent concentration (following what @alexsquires says you should get a factor of N/N -> 1, I think). For lower symmetry materials you would have to account for per-site concentrations on multiple defect sites to convert to a total atomic percent value. Atomic percent can have different definitions in different cases, depending on stoichiometry etc, and often depends on contributions from multiple defects, so we don't directly output this in doped

ravichinnappanphd commented 33 minutes ago

Yes. Concentration (per site) is already at.%. Thanks.