We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b08117d commit 4d72d49Copy full SHA for 4d72d49
1 file changed
scaffoldgraph/core/scaffold.py
@@ -267,6 +267,20 @@ def __str__(self):
267
"""Returns the SMILES string of the molecule."""
268
return self.smiles
269
270
+ def _repr_png_(self):
271
+ """Return PNG representation of the rdkit mol."""
272
+ try:
273
+ return self.mol._repr_png_()
274
+ except AttributeError:
275
+ return None
276
+
277
+ def _repr_svg_(self):
278
+ """Return SVG representation of the rdkit mol."""
279
280
+ return self.mol._repr_svg_()
281
282
283
284
def __repr__(self):
285
return '<{_cls} at {address}>'.format(
286
_cls=self.__class__.__name__,
0 commit comments