diff --git a/prolif/fingerprint.py b/prolif/fingerprint.py
index 61758a1..e51c232 100644
--- a/prolif/fingerprint.py
+++ b/prolif/fingerprint.py
@@ -190,9 +190,6 @@ def __init__(
count=False,
vicinity_cutoff=6.0,
):
- self.count = count
- self._set_interactions(interactions, parameters)
- self.vicinity_cutoff = vicinity_cutoff
if interactions is None:
interactions = [
"Hydrophobic",
@@ -206,6 +203,9 @@ def __init__(
"VdWContact",
]
self.interactions = interactions
+ self.count = count
+ self._set_interactions(interactions, parameters)
+ self.vicinity_cutoff = vicinity_cutoff
def _set_interactions(self, interactions, parameters):
# read interactions to compute
diff --git a/prolif/plotting/network.py b/prolif/plotting/network.py
index d5cad1c..c31ebc4 100644
--- a/prolif/plotting/network.py
+++ b/prolif/plotting/network.py
@@ -817,13 +817,12 @@ def _get_legend(self, height="90px"):
def display(self, **kwargs):
"""Prepare and display the network"""
html = self._get_html(**kwargs)
+ doc = escape(html)
iframe = (
- ''
- )
- return HTML(
- iframe.format(width=self.width, height=self.height, doc=escape(html)),
+ f''
)
+ return HTML(iframe)
@requires("IPython.display")
def show(self, filename, **kwargs):
@@ -832,12 +831,10 @@ def show(self, filename, **kwargs):
with open(filename, "w") as f:
f.write(html)
iframe = (
- '' # noqa: RUF027
- )
- return HTML(
- iframe.format(width=self.width, height=self.height, filename=filename),
+ f''
)
+ return HTML(iframe)
def save(self, fp, **kwargs):
"""Save the network to an HTML file