Skip to content

Commit

Permalink
handle site position and normal lists in add_adsorbate_to_site
Browse files Browse the repository at this point in the history
  • Loading branch information
mjohnson541 committed Mar 12, 2025
1 parent a886eec commit 2c4cd59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pynta/mol.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,10 @@ def add_adsorbate_to_site(atoms, adsorbate, surf_ind, site, height=None,
height = site_heights[site['site']]

# Make the correct position
normal = site['normal']
normal = np.array(site['normal'])
if np.isnan(np.sum(normal)):
normal = np.array([0., 0., 1.])
pos = site['position'] + normal * height
pos = np.array(site['position']) + normal * height

# Convert the adsorbate to an Atoms object
if isinstance(adsorbate, Atoms):
Expand Down

0 comments on commit 2c4cd59

Please sign in to comment.