@@ -125,7 +125,7 @@ def get_shrinkwrap_ads_sites(
125125 atoms_copy = atoms .copy ()
126126
127127 for index in target :
128- atoms_copy . append ( Atom ( "X" , atoms_copy [index ].position + [0 , 0 , 0 ]) )
128+ atoms_copy += Atoms ([ "X" ], [ atoms_copy [index ].position + [0 , 0 , 0 ]] )
129129
130130 extended_atoms = atoms_copy .copy () * [2 , 2 , 1 ]
131131 extended_grid = grid .copy () * [2 , 2 , 1 ]
@@ -1322,11 +1322,17 @@ def max_cell_range(cell):
13221322 y_coords = np .arange (y_start , y_end , precision )
13231323 z_coord = max (a .position [2 ] for a in atoms ) + 3.5
13241324
1325- # Create grid vertices
1326- vertices = [Atom (marker , [x , y , z_coord ]) for x , y in product (x_coords , y_coords )]
1325+ # # Create grid vertices
1326+ # vertices = [Atom(marker, [x, y, z_coord]) for x, y in product(x_coords, y_coords)]
1327+ # grid = get_empty_atoms(atoms)
1328+ # for v in vertices:
1329+ # grid.append(v)
13271330 grid = get_empty_atoms (atoms )
1328- for v in vertices :
1329- grid .append (v )
1331+ positions = [(x , y , z_coord ) for x , y in product (x_coords , y_coords )]
1332+ grid += Atoms (
1333+ [marker for _ in positions ],
1334+ positions
1335+ )
13301336
13311337 # Map vertices to 2D grid indices for face creation
13321338 nx , ny = len (x_coords ), len (y_coords )
@@ -1459,7 +1465,7 @@ def get_AFM_cartoon(atoms: Atoms, precision: float = 1, show_figure=False) -> No
14591465
14601466 if show_figure :
14611467 import matplotlib .pyplot as plt
1462- import sns
1468+ import seaborn as sns
14631469
14641470 sns .heatmap (df )
14651471 plt .axis ("scaled" )
0 commit comments