Skip to content

Commit

Permalink
Merge pull request #485 from kamronald/fix_cluster_gen
Browse files Browse the repository at this point in the history
Update creation of Cluster instances
  • Loading branch information
kamronald authored Aug 14, 2024
2 parents 4d77c98 + 5230e87 commit b818a2a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion smol/cofe/space/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(self, site_spaces, frac_coords, lattice):
self._centroid = centroid - shift
self._frac_coords = frac_coords - shift
self._sites = tuple(
Site(site_space, coords)
Site(site_space.composition, coords)
for site_space, coords in zip(
site_spaces, lattice.get_cartesian_coords(frac_coords)
)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_cofe/test_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_diameter(cluster):
def test_periodicity(cluster, rng):
new_coords = cluster.frac_coords.copy()
new_coords += rng.integers(-5, 5)
site_spaces = [s.species for s in cluster.sites]
site_spaces = get_site_spaces(cluster)
assert Cluster(site_spaces, new_coords, cluster.lattice) == cluster
new_coords[0] += 0.005 + rng.random()
assert Cluster(site_spaces, new_coords, cluster.lattice) != cluster
Expand Down

0 comments on commit b818a2a

Please sign in to comment.