TheoChem-VU / TCutility

Utility functions/classes for the TheoCheM programs
https://theochem-vu.github.io/TCutility/
MIT License
6 stars 0 forks source link

Use asterisk as radical dot in molecular formulas #261

Closed YHordijk closed 5 months ago

YHordijk commented 5 months ago

Currently to write a radical system with tcutility.formula.molecule we have to do it as follows:

from tcutility import formula

formula.molecule('TS: C2H4 + CH3•', 'unicode') 
>>> 'TS: C₂H₄ + CH₃•'

This requires us to have the dot symbol on hand. It is maybe a good idea to give the asterisk instead and simply replace it with the dot symbol.

from tcutility import formula

formula.molecule('TS: C2H4 + CH3*', 'unicode') 
>>> 'TS: C₂H₄ + CH₃•'