Skip to content

Commit 38ca0c8

Browse files
gkastlunGeorg Kastlunger
andauthored
Not transferring inhomogeneous list into array as it fails (#107)
Co-authored-by: Georg Kastlunger <geokast@Lappi2.local>
1 parent 79e7b5f commit 38ca0c8

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

catkit/gen/adsorption.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ def __init__(self, slab, surface_atoms=None, tol=1e-5):
5757

5858
self.coordinates = np.array(self.coordinates)
5959
self.connectivity = np.array(self.connectivity, dtype=int)
60-
self.r1_topology = np.array(self.r1_topology)
61-
self.r2_topology = np.array(self.r2_topology)
6260
self.frac_coords = np.dot(self.coordinates, np.linalg.pinv(slab.cell))
6361
self.slab = slab
6462

@@ -307,8 +305,8 @@ def get_adsorption_vectors(self, unique=True, screen=True):
307305
else:
308306
sel = self.get_periodic_sites(screen=screen)
309307
coords = self.coordinates[sel]
310-
r1top = self.r1_topology[sel]
311-
r2top = self.r2_topology[sel]
308+
r1top = [self.r1_topology[i] for i in sel]
309+
r2top = [self.r2_topology[i] for i in sel]
312310

313311
vectors = np.empty((coords.shape[0], 3))
314312
for i, s in enumerate(coords):

0 commit comments

Comments
 (0)