diff --git a/reacnetgenerator/_draw.py b/reacnetgenerator/_draw.py index dc63e80ca..ef918843e 100644 --- a/reacnetgenerator/_draw.py +++ b/reacnetgenerator/_draw.py @@ -104,7 +104,7 @@ def _draw(self, timeaxis=None): G.add_weighted_edges_from( [(showname[name[i]], showname[name[j]], table[i][j])] ) - weights = np.array([math.log(G[u][v]["weight"] + 1) for u, v in G.edges()]) + weights = np.array([math.log(G[u][v]["weight"] + 1) for u, v in G.edges()]) # type: ignore widths = ( weights / np.max(weights) diff --git a/reacnetgenerator/_path.py b/reacnetgenerator/_path.py index 0ca64f923..46daad7af 100644 --- a/reacnetgenerator/_path.py +++ b/reacnetgenerator/_path.py @@ -224,13 +224,13 @@ def convertSMILES(self, atoms, bonds): ValueError (RDKit error) Maximum BFS search size exceeded. """ - m = Chem.RWMol(Chem.MolFromSmiles("")) + m = Chem.RWMol(Chem.MolFromSmiles("")) # type: ignore d = {} for name, number in zip(self.atomnames[atoms], atoms): - d[number] = m.AddAtom(Chem.Atom(name)) + d[number] = m.AddAtom(Chem.Atom(name)) # type: ignore for atom1, atom2, level in bonds: - m.AddBond(d[atom1], d[atom2], Chem.BondType(level)) - name = Chem.MolToSmiles(m) + m.AddBond(d[atom1], d[atom2], Chem.BondType(level)) # type: ignore + name = Chem.MolToSmiles(m) # type: ignore return name def _getatomsandbonds(self, line): diff --git a/reacnetgenerator/tools.py b/reacnetgenerator/tools.py index c8cee72a3..8828cccd7 100644 --- a/reacnetgenerator/tools.py +++ b/reacnetgenerator/tools.py @@ -3,7 +3,8 @@ from pathlib import Path from typing import Dict, List, Tuple, Union -import ase +import ase.geometry +import ase.units import numpy as np