Skip to content

Commit

Permalink
Draw Radicals on Groups
Browse files Browse the repository at this point in the history
Draw radical on Groups
  • Loading branch information
mjohnson541 authored and rwest committed Dec 4, 2024
1 parent 2a1f910 commit fd92d07
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rmgpy/molecule/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -1239,6 +1239,8 @@ def draw(self, file_format):
for index, atom in enumerate(self.atoms):
atom_type = '{0!s} {1!s} '.format(index+1, atom.label if atom.label != '' else '')
atom_type += ','.join([at.label for at in atom.atomtype])
if len(atom.radical_electrons) == 1 and atom.radical_electrons[0] == 1:
atom_type += '·'
atom_type = '"' + atom_type + '"'
graph.add_node(pydot.Node(name=str(index + 1), label=atom_type, fontname="Helvetica", fontsize="16"))
for atom1 in self.atoms:
Expand Down

0 comments on commit fd92d07

Please sign in to comment.