The SmilesGenerator creates a wrong SMILES string for this molecule BrC1C(Br)C(Br)C(Br)C(Br)C1Br
The SMILES created is C1C(C(C(C(C1Br)Br)Br)Br)BrBr but the correct SMILES string is C1(C(C(C(C(C1Br)Br)Br)Br)Br)Br.
The SMILES generator is missing a parenthesis around the first branching and creates a molecue with the two bromines connected to each other.
I traced through the code and found what I think is the problem. In the ParseChain method, around line 1535 the code checks to see if the parent has a ring break with the atoms of the branch and if the connected bond count for the parent is less than 4. I think that this logic will not work if the parent atom is the very first atom. The code should check to see if the parent atom is the very first atom and if it is then the connected bonds count should be checked for less than 3 instead of 4.
Hope this makes sense.
Log in to post a comment.