Skip to content

Commit

Permalink
added e to molecule.draw
Browse files Browse the repository at this point in the history
  • Loading branch information
davidfarinajr committed Jan 23, 2021
1 parent 70ed641 commit 3a3031a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rmgpy/molecule/draw.py
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,7 @@ def _render_atom(self, symbol, atom, x0, y0, cr, heavy_first=True, draw_lone_pai
heavy_atom = symbol[0]

# Split label by atoms
labels = re.findall('[A-Z][a-z]*[0-9]*', symbol)
labels = re.findall('[A-Z]*[a-z]*[0-9]*', symbol)
if not heavy_first:
labels.reverse()
if 'C' not in symbol and 'O' not in symbol and len(atoms) == 1:
Expand Down Expand Up @@ -1333,6 +1333,8 @@ def _render_atom(self, symbol, atom, x0, y0, cr, heavy_first=True, draw_lone_pai
cr.set_source_rgba(0.5, 0.0, 0.5, 1.0)
elif heavy_atom == 'X':
cr.set_source_rgba(0.5, 0.25, 0.5, 1.0)
elif heavy_atom == 'e':
cr.set_source_rgba(1.0, 0.0, 1.0, 1.0)
else:
cr.set_source_rgba(0.0, 0.0, 0.0, 1.0)

Expand Down

0 comments on commit 3a3031a

Please sign in to comment.