Skip to content

Commit 5b09eeb

Browse files
committed
changed annotation of evaluate_binding to be compatible with earlier python versions
1 parent d3b3599 commit 5b09eeb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

autoadsorbate/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import matplotlib.pyplot as plt
55
import numpy as np
66
import pandas as pd
7+
from typing import Union
78
from ase import Atom, Atoms
89
from ase.build.tools import sort as sort_atoms
910
from ase.constraints import FixAtoms
@@ -36,7 +37,7 @@ def get_connectivity(atoms: ase.Atoms, mult:float = 1.0) -> np.ndarray:
3637

3738
return nl.get_connectivity_matrix(sparse=False)
3839

39-
def evaluate_binding(atoms:ase.Atoms, mol_indices:None|list[int] = None, mult:float=1.0) -> dict:
40+
def evaluate_binding(atoms:ase.Atoms, mol_indices:Union[None,list[int]] = None, mult:float=1.0) -> dict:
4041
"""Evaluate the binding of a molecule to a surface by analyzing the connectivity and distances.
4142
Parameters:
4243
atoms (ase.Atoms): The ASE Atoms object.

0 commit comments

Comments
 (0)