Skip to content

Commit e870390

Browse files
JacksonBurnsdjlucey
authored andcommitted
explain why partial is needed
see: ReactionMechanismGenerator#2796 (comment)
1 parent 380dad3 commit e870390

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

rmgpy/molecule/draw.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,13 @@ def _generate_coordinates(self, fix_surface_sites=True, use_rdkit=True):
380380
# Generate the RDkit molecule from the RMG molecule, saving mapping
381381
# in order to match the atoms in the rdmol with the atoms in the
382382
# RMG molecule (which is required to extract coordinates).
383+
#
384+
# partial sanitization is used to allow molecules to fail RDKit's
385+
# bond order and implicit hydrogen assignments, and possibly also
386+
# RDKit's aromaticity perception, while still drawing the molecule.
387+
# this can happen because RMG uses partial bond orders and atom types
388+
# that RDKit doesn't understand, though RDKit can still generate
389+
# coordinates for the molecule.
383390
rdmol, rd_atom_idx = self.molecule.to_rdkit_mol(remove_h=False,
384391
return_mapping=True,
385392
sanitize="partial")

0 commit comments

Comments
 (0)