neighbormodels.neighbors.add_subspecie_labels_if_missing

add_subspecie_labels_if_missing(cell_structure: pymatgen.core.structure.Structure) → pymatgen.core.structure.Structure[source]

Makes a copy of cell_structure and then checks if cell_structure has the subspecie site property. If it does, then return the copy as-is, otherwise label each site of the copy using the site’s atomic specie name and then return it.

Parameters:cell_structure – A pymatgen Structure object.
Returns:An exact copy of the input cell_structure object with subspecie labels added, if missing.