def _compute_sites_symmetry(self, spacegroup=None, atomic_numbers=None, consider_old=False, symprec=1e-05):
    ' See compute_sites_symmetry - this metod does just the same, but it does not set the symmetry property.'
    occupation = self.info.get('occupancy', {})
    if ((not spacegroup) and self._symmetry):
        if atomic_numbers:
            mapping = UniqueValuesMapping(atomic_numbers)
        else:
            mapping = UniqueValuesMapping(self.get_atomic_numbers())
            if (consider_old and self._unique_sites):
                mapping = mapping.merge(self._unique_sites)
        if occupation:

            def gen_occ():
                for i in range(len(mapping)):
                    val = occupation.get(i, None)
                    if (val is None):
                        (yield val)
                    else:
                        (yield tuple(((k, val[k]) for k in val)))
            mapping = mapping.merge(gen_occ())
        spacegroup = self.compute_spacegroup_for_atomic_numbers(mapping.mapping, symprec=symprec)
    self.info['spacegroup'] = spacegroup
    if (not spacegroup):
        return self.cancel_sites_symmetry()
    tags = spacegroup.tag_sites(self.get_scaled_positions())
    mapping = mapping.merge(tags)
    tags = mapping.mapping
    sites = np.empty(len(tags), dtype=object)
    (uniq, umap) = np.unique(tags, return_inverse=True)
    used = set()
    for i in range(len(uniq)):
        index = (umap == i)
        if (self._unique_sites is not None):
            possible = (i for i in self._unique_sites[index])
            site = next(filter(None, possible), None)
            if (site in used):
                site = site.copy()
            else:
                used.add(site)
        else:
            site = None
        if (not site):
            symbol = self.symbols[numpy_index(umap, i)]
            for ai in np.where(index)[0]:
                if ((ai in occupation) and occupation[ai]):
                    symbol = occupation[ai]
            site = Site(self, symbol)
        sites[index] = site
    self.sites = sites
See compute_sites_symmetry - this metod does just the same, but it does not set the symmetry property.
def _compute_sites_symmetry(self, spacegroup=None, atomic_numbers=None, consider_old=False, symprec=1e-05):
    ' '
    occupation = self.info.get('occupancy', {})
    if ((not spacegroup) and self._symmetry):
        if atomic_numbers:
            mapping = UniqueValuesMapping(atomic_numbers)
        else:
            mapping = UniqueValuesMapping(self.get_atomic_numbers())
            if (consider_old and self._unique_sites):
                mapping = mapping.merge(self._unique_sites)
        if occupation:

            def gen_occ():
                for i in range(len(mapping)):
                    val = occupation.get(i, None)
                    if (val is None):
                        (yield val)
                    else:
                        (yield tuple(((k, val[k]) for k in val)))
            mapping = mapping.merge(gen_occ())
        spacegroup = self.compute_spacegroup_for_atomic_numbers(mapping.mapping, symprec=symprec)
    self.info['spacegroup'] = spacegroup
    if (not spacegroup):
        return self.cancel_sites_symmetry()
    tags = spacegroup.tag_sites(self.get_scaled_positions())
    mapping = mapping.merge(tags)
    tags = mapping.mapping
    sites = np.empty(len(tags), dtype=object)
    (uniq, umap) = np.unique(tags, return_inverse=True)
    used = set()
    for i in range(len(uniq)):
        index = (umap == i)
        if (self._unique_sites is not None):
            possible = (i for i in self._unique_sites[index])
            site = next(filter(None, possible), None)
            if (site in used):
                site = site.copy()
            else:
                used.add(site)
        else:
            site = None
        if (not site):
            symbol = self.symbols[numpy_index(umap, i)]
            for ai in np.where(index)[0]:
                if ((ai in occupation) and occupation[ai]):
                    symbol = occupation[ai]
            site = Site(self, symbol)
        sites[index] = site
    self.sites = sites