Skip to content

Commit

Permalink
Merge pull request #1443 from utf/speed-get_ir_mesh
Browse files Browse the repository at this point in the history
Speed up get_ir_reciprocal_mesh function
  • Loading branch information
mkhorton committed Apr 18, 2019
2 parents 779b93f + 276a5fc commit 52a81ed
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pymatgen/symmetry/analyzer.py
Expand Up @@ -372,10 +372,9 @@ def get_ir_reciprocal_mesh(self, mesh=(10, 10, 10), is_shift=(0, 0, 0)):
np.array(mesh), self._cell, is_shift=shift, symprec=self._symprec)

results = []
tmp_map = list(mapping)
for i in np.unique(mapping):
for i, count in zip(*np.unique(mapping, return_counts=True)):
results.append(((grid[i] + shift * (0.5, 0.5, 0.5)) / mesh,
tmp_map.count(i)))
count))
return results

def get_conventional_to_primitive_transformation_matrix(self, international_monoclinic=True):
Expand Down

0 comments on commit 52a81ed

Please sign in to comment.