Closed fgrunewald closed 9 months ago
>>> g = read_smiles('O')
>>> g.nodes(data=True)
NodeDataView({0: {'element': 'O', 'charge': 0, 'aromatic': False, 'hcount': 2}})
sorry my bad: I meant when using [O]
, but I guess the standard convention is then to take it as atomic.
That's a fundamentally different smiles string. The brackets indicate that you're defining an atom and explicitly don't want the defaults (charge, valence, etc). In particular it sets the hcount to 0. [OH2]
would be what you want. Or [OH3+]
, [OH-]
for the charged ions
In the current implementation the smile "O" translates yields just O with an hcount of 0. Shouldn't it yield an hcount of 1 and be the short form of water? Perhaps I'm missing some convention here.