Open A-Thakkar opened 2 years ago
My personal choice would be not to do that. A few points of explanation:
to_string
function should really be about that: the conversion to a string. [PS1]Having said that, I am more open to having an external function doing multiple of those if needed. Something along the lines of cleanup_reaction(reaction_equation)
? Here I would prefer to work on the reaction equation as on the str, as it is compatible with extended SMILES for instance. Also, I tend to prefer free non-member functions when possible.
What are your thoughts on this?
[PS1]: following up on the arguments with free functions and other kinds of strings, I was already tempted a few times to remove to_string
from the ReactionEquation
class 😉
Related to https://github.com/rxn4chemistry/rxn-chemutils/issues/8
proposal to add canonicalisation and removal of atom mapping as arguments to the to_string method of ReactionEquation reaction.to_string(canonicalise=True, remove_atom_mapping=True)