Skip to content

Commit 89fd450

Browse files
Edit init_from_rdkit_mol docstring (#414)
Issues: #396 Added additional notes section in the docstring to explain that users should kekulize their molecule prior to calling the `init_form_rdkit_mol` method. It also explains the consequences of not doing so (bond orders changed to integer values). Co-authored-by: stevenbennett96 <[email protected]>
1 parent a8311fa commit 89fd450

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/stk/molecular/molecules/building_block.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ def init_from_file(
470470
)
471471
# This remake needs to be here because molecules loaded
472472
# with rdkit often have issues, because rdkit tries to do
473-
# bits of structural analysis like stereocenters. remake
473+
# bits of structural analysis like stereocenters. Remake
474474
# gets rid of all this problematic metadata.
475475
molecule = remake(cls._init_funcs[extension](path))
476476

@@ -490,6 +490,13 @@ def init_from_rdkit_mol(
490490
"""
491491
Initialize from an :mod:`rdkit` molecule.
492492
493+
Notes
494+
-----
495+
For :mod:`rdkit` molecules with non-integer bond orders,
496+
such as 1.5, the molecule should be kekulized prior to
497+
calling this method. Otherwise, all bond orders will be
498+
set to an integer value in the building block.
499+
493500
Parameters
494501
----------
495502
molecule : :class:`rdkit.Mol`

0 commit comments

Comments
 (0)