Skip to content

Commit

Permalink
Backmerge: #1347 When pasting Extended SMILES with coordinates enhanc…
Browse files Browse the repository at this point in the history
…ed stereochemistry is lost (#1350)
  • Loading branch information
even1024 authored Oct 20, 2023
1 parent 6a5ff1e commit 1951ec4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions api/tests/integration/ref/formats/smiles.py.out
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ C1C(O)=C(C2C=CC(C)=CC=2N)C(C)=CC=1 |wU:3.12,wD:3.3,(-2.40,1.39,;-0.80,1.39,;-0.0
atropisomer:
C1C(O)=C(C2C=CC(C)=CC=2N)C(C)=CC=1 |w:3.3,3.12|
C1C(O)=C(C2C=CC(C)=CC=2N)C(C)=CC=1 |w:3.3,3.12,(-2.40,1.39,;-0.80,1.39,;-0.00,2.77,;0.00,0.00,;1.60,0.00,;2.40,1.39,;4.00,1.39,;4.80,0.00,;6.40,0.00,;4.00,-1.39,;2.40,-1.39,;1.60,-2.77,;-0.80,-1.39,;0.00,-2.77,;-2.40,-1.39,;-3.20,-0.00,)|
atropisomer:
CC1=C(N2C=CC=C2[C@H](C)Cl)C(C)CCC1 |a:2,&1:8,r,wD:8.10,2.11,(13.73,-9.95,;14.59,-9.45,;15.46,-9.95,;15.46,-10.95,;16.36,-11.39,;16.22,-12.38,;15.23,-12.55,;14.76,-11.67,;13.77,-11.53,;13.16,-12.32,;13.40,-10.60,;16.33,-9.45,;17.19,-9.95,;17.23,-7.80,;16.18,-6.82,;16.07,-8.70,)|
CC1=C(N2C=CC=C2[C@H](C)Cl)C(C)CCC1 |a:2,&1:8,r,wU:8.10,wD:2.11,(13.73,-9.95,;14.59,-9.45,;15.46,-9.95,;15.46,-10.95,;14.56,-11.39,;14.70,-12.38,;15.69,-12.55,;16.15,-11.67,;17.14,-11.53,;17.76,-12.32,;17.52,-10.60,;16.33,-9.45,;17.19,-9.95,;16.33,-8.45,;15.46,-7.95,;14.59,-8.45,)|
*** Suffoxides ***
suffoxide:
C1[S@](=O)CC(=O)C=1C
Expand Down
1 change: 1 addition & 0 deletions api/tests/integration/tests/formats/smiles.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
"C1C(O)=C(C2C=CC(C)=CC=2N)C(C)=CC=1 |o1:3,r,wU:3.12|",
"C1=CC=C(C)C(C2=C(N)C=C(C)C=C2)=C1O |wU:5.4,wD:5.5|",
"C1=CC=C(C)C(C2=C(N)C=C(C)C=C2)=C1O |w:5.4,5.5|",
"CC1CCCC(C)C=1N1C([C@@H](Cl)C)=CC=C1 |a:7,&1:10,r,wD:7.6,10.11,(13.73,-9.95,;14.59,-9.45,;16.07,-8.70,;16.18,-6.82,;17.23,-7.80,;16.33,-9.45,;17.19,-9.95,;15.46,-9.95,;15.46,-10.95,;14.76,-11.67,;13.77,-11.53,;13.40,-10.60,;13.16,-12.32,;15.23,-12.55,;16.22,-12.38,;16.36,-11.39,)|",
]
for sm in mols_smiles:
print("atropisomer:")
Expand Down
2 changes: 1 addition & 1 deletion core/indigo-core/molecule/src/smiles_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,13 +381,13 @@ void SmilesLoader::_readOtherStuff()
if (_bmol->stereocenters.exists(idx))
{
_bmol->stereocenters.setType(idx, MoleculeStereocenters::ATOM_ABS, 0);
_overtly_defined_abs.insert(idx);
}
else
{
_bmol->addStereocenters(idx, MoleculeStereocenters::ATOM_ABS, 0, false);
_bmol->stereocenters.setTetrahydral(idx, false);
}
_overtly_defined_abs.insert(idx);

if (_scanner.lookNext() == ',')
_scanner.skip(1);
Expand Down

0 comments on commit 1951ec4

Please sign in to comment.