Describe the solution you'd like
SMILES data contains the connectivity information. When doing structure_from_smiles add this data to the Structure object.
I think I'd want to do something like this for data validation on Structure as a field_validator:
- Iterate over all bonds and set the lowest number first so that it's easy to check for duplicates, i.e.,
(2, 1, 1) becomes (1, 2, 1).
- Then check for duplicate bonds, there can never be more than 1 bond between two atoms (it may have a bond order larger than 1, but there cannot be two entries with a
(1, 2, x) bond.
Describe the solution you'd like
SMILES data contains the connectivity information. When doing
structure_from_smilesadd this data to theStructureobject.I think I'd want to do something like this for data validation on
Structureas afield_validator:(2, 1, 1)becomes(1, 2, 1).(1, 2, x)bond.