Skip to content

Commit

Permalink
#1277 SMILES with bad stereochemistry is not parsed (#1280)
Browse files Browse the repository at this point in the history
  • Loading branch information
even1024 authored Oct 9, 2023
1 parent cf3a8ab commit ddaf0ff
Show file tree
Hide file tree
Showing 39 changed files with 790 additions and 554 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/indigo-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ jobs:
python setup.py bdist_wheel
cp dist/*.whl ${GITHUB_WORKSPACE}/dist/
- name: Run pylint
run: pylint bingo_elastic
run: pylint --max-args 10 bingo_elastic
working-directory: bingo/bingo-elastic/python
- name: Run tests
run: pytest tests
Expand Down
7 changes: 2 additions & 5 deletions api/c/indigo/src/indigo_layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,16 @@ CEXPORT int indigoLayout(int object)
ml.max_iterations = self.layout_max_iterations;
ml.bond_length = 1.6f;
ml.layout_orientation = (layout_orientation_value)self.layout_orientation;
bool has_atropisomery = mol->hasAtropisomericCenter();
if (has_atropisomery)
if (mol->hasAtropoStereoBonds())
ml.respect_existing_layout = true;

TimeoutCancellationHandler cancellation(self.cancellation_timeout);
ml.setCancellationHandler(&cancellation);

ml.make();

if (obj.type != IndigoObject::SUBMOLECULE)
{
if (!has_atropisomery)
mol->clearBondDirections();
mol->clearBondDirections();
try
{
mol->markBondsStereocenters();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35741,7 +35741,7 @@ C(O)(C)C=C>>C(=O)(C)CC
[C:1]1([F:33])([O:4][C:10]2[C:15]([F:20])=[C:19]([C:21]([F:24])=[C:17]([F:22])[C:14]=2[F:18])[F:23])[C:3]([F:9])=[C:8]([C:11](=O)[C:6]([F:12])=[C:2]1[F:7])[F:13].[C:25]1([NH:28][NH2:31])=[CH:27][CH:30]=[CH:32][CH:29]=[CH:26]1>>[C:1]1(=[C:3]([F:9])[C:8](=[C:11]([N:31]=[N:28][C:25]2[CH:26]=[CH:29][CH:32]=[CH:30][CH:27]=2)[C:6]([F:12])=[C:2]1[F:7])[F:13])[O:4][C:10]1[C:15]([F:20])=[C:19]([C:21]([F:24])=[C:17]([F:22])[C:14]=1[F:18])[F:23].[C:11]1([N:31]=[N:28][C:25]2[CH:26]=[CH:29][CH:32]=[CH:30][CH:27]=2)[C:8]([F:13])=[C:3]([C:1]([F:33])=[C:2]([F:7])[C:6]=1[F:12])[F:9]
[C@:1]1([H])([C:4]#[C:8][CH3:13])[CH2:3][O:7]C(C)(C)[N:2]1[C:6](=[O:12])OC(C)(C)C.C(C)(C)(C)OC(=O)OC(=O)[O:19][C:18]([CH3:22])([CH3:21])[CH3:20]>>[C@H:1]([C:3](=O)[OH:7])([C:4]#[C:8][CH3:13])[NH:2][C:6](=[O:12])[O:19][C:18]([CH3:22])([CH3:21])[CH3:20].[NH:2]([C:1](=O)[C:4]#[C:8][CH3:13])[C:6](=[O:12])[O:19][C:18]([CH3:22])([CH3:21])[CH3:20]
[C:1]1([Si](C)(C)C)([O:21][CH2:3]1)[CH:2](OS(=O)(=O)C)[C:6]1([CH2:13][CH2:15][CH2:19][CH3:20])[O:22][CH2:11]1>>[C:6]1([CH2:13][CH2:15][CH2:19][CH3:20])=[CH:11][O:22][C:1]([CH2:3]F)=[CH:2]1.[C:6]1([CH2:13][CH2:15][CH2:19][CH3:20])=[CH:11][O:22][C:1]([CH2:3][OH:21])=[CH:2]1
[C:1]1([O:48][CH2:4]1)([C@@:3]1([H])[CH2:9][CH2:17][C@@:14]2([H])[C@:24]3([H])[CH2:27][CH:29]=[C:30]4[CH2:33][C@H:35]([CH2:34][CH2:31][C@:28]4([CH3:32])[C@@:26]3([H])[CH2:25][CH2:15][C@:8]12[CH3:16])[O:36][Si](C)(C)C(C)(C)C)[CH:2](OS(=O)(=O)C)[C:6]1([Si](C)(C)C)[O:49][CH2:10]1>>[C@:8]12([CH3:16])[CH2:15][CH2:25][C@:26]3([H])[C@@:28]4([CH3:32])[CH2:31][CH2:34][C@H:35]([OH:36])[CH2:33][C:30]4=[CH:29][CH2:27][C@@:24]3([H])[C@:14]1([H])[CH2:17][CH2:9][C@:3]2([H])[C:1]1=[CH:4][O:48][C:6]([CH2:10]F)=[CH:2]1.[C@:8]12([CH3:16])[CH2:15][CH2:25][C@:26]3([H])[C@@:28]4([CH3:32])[CH2:31][CH2:34][C@H:35]([OH:36])[CH2:33][C:30]4=[CH:29][CH2:27][C@@:24]3([H])[C@:14]1([H])[CH2:17][CH2:9][C@:3]2([H])[C:1]1=[CH:4][O:48][C:6]([CH2:10][OH:49])=[CH:2]1 |w:0,34,40,a:3,7,9,15,18,20,24,47,51,53,57,63,65,69,78,82,84,88,94,96,100|
[C@:1]1([O:48][CH2:4]1)([C@@:3]1([H])[CH2:9][CH2:17][C@@:14]2([H])[C@:24]3([H])[CH2:27][CH:29]=[C:30]4[CH2:33][C@H:35]([CH2:34][CH2:31][C@:28]4([CH3:32])[C@@:26]3([H])[CH2:25][CH2:15][C@:8]12[CH3:16])[O:36][Si](C)(C)C(C)(C)C)[CH:2](OS(=O)(=O)C)[C:6]1([Si](C)(C)C)[O:49][CH2:10]1>>[C@:8]12([CH3:16])[CH2:15][CH2:25][C@:26]3([H])[C@@:28]4([CH3:32])[CH2:31][CH2:34][C@H:35]([OH:36])[CH2:33][C:30]4=[CH:29][CH2:27][C@@:24]3([H])[C@:14]1([H])[CH2:17][CH2:9][C@:3]2([H])[C:1]1=[CH:4][O:48][C:6]([CH2:10]F)=[CH:2]1.[C@:8]12([CH3:16])[CH2:15][CH2:25][C@:26]3([H])[C@@:28]4([CH3:32])[CH2:31][CH2:34][C@H:35]([OH:36])[CH2:33][C:30]4=[CH:29][CH2:27][C@@:24]3([H])[C@:14]1([H])[CH2:17][CH2:9][C@:3]2([H])[C:1]1=[CH:4][O:48][C:6]([CH2:10][OH:49])=[CH:2]1 |a:0,3,7,9,15,18,20,24,47,51,53,57,63,65,69,78,82,84,88,94,96,100,w:34,40|
[C@H:1]1([CH2:4][C:9](=[O:13])[O:12][CH3:14])[C:3](=[O:8])[CH2:7][C@@:10]2([H])[CH:11]=[CH:6][C@:2]1([H])[O:29]2.S(=O)(=O)(C(F)(F)F)O[Si:22]([CH3:28])([CH3:27])[CH3:26]>>[CH:10]1([O:29][Si:22]([CH3:28])([CH3:27])[CH3:26])[CH2:11][CH2:6][CH:2]=[C:1]([CH2:4][C:9](=[O:13])[O:12][CH3:14])[C:3](=[O:8])[CH2:7]1.[C@@H:2]1([CH2:6][CH2:11][CH:10]=[CH:7][C:3](=[O:8])[C@@H:1]1[CH2:4][C:9](=[O:13])[O:12][CH3:14])[O:29][Si:22]([CH3:28])([CH3:27])[CH3:26].[C@@:3]12([CH:7]=[CH:10][CH2:11][CH2:6][C@H:2]([O:29][Si:22]([CH3:28])([CH3:27])[CH3:26])[C@@:1]1([H])[C@@H:4]2[C:9](=[O:13])[O:12][CH3:14])[O:8][Si:22]([CH3:28])([CH3:27])[CH3:26] |&1:0,9,13,46,53,64,69,75,77|
[C:1]1([O:4][Si:8]([CH3:14])([CH3:13])[C:12]([CH3:21])([CH3:20])[CH3:19])=[CH:3][C:7](=[CH:9][CH:5]=[C:2]1[O:6][Si:10]([CH3:17])([CH3:16])[C:15]([CH3:24])([CH3:23])[CH3:22])[CH2:11][N:18]([C:26](=[O:29])[C:28]([F:33])([F:32])[F:31])[CH2:25][CH2:27][C:30]1[CH:35]=[CH:37][C:38]([OH:39])=[CH:36][CH:34]=1>>[C:30]12([CH:34]=[CH:36][C:38](=[O:39])[CH:37]=[CH:35]1)[CH2:27][CH2:25][N:18]([CH2:11][C:7]1[CH:3]=[C:1]([C:2]([O:6][Si:10]([CH3:16])([CH3:17])[C:15]([CH3:24])([CH3:22])[CH3:23])=[CH:5][C:9]2=1)[O:4][Si:8]([CH3:13])([CH3:14])[C:12]([CH3:21])([CH3:19])[CH3:20])[C:26](=[O:29])[C:28]([F:33])([F:31])[F:32].[C:9]12[CH:5]=[C:2]([C:1]([O:4][Si:8]([CH3:13])([CH3:14])[C:12]([CH3:21])([CH3:19])[CH3:20])=[CH:3][C:7]=1[CH2:11][N:18]([C:26](=[O:29])[C:28]([F:33])([F:31])[F:32])[CH2:25][CH2:27][C:30]1[CH:34]=[CH:36][C:38]([OH:39])=[CH:37][C:35]2=1)[O:6][Si:10]([CH3:16])([CH3:17])[C:15]([CH3:24])([CH3:22])[CH3:23]
[C:12]1([N+:11]([O-:4])=[O:5])=[CH:7][C:9](=[C:8]([F:1])[CH:6]=[C:10]1[F:3])[F:2].[C:23]([CH3:15])([CH3:14])([CH3:13])[O:25][C:24](=[O:17])[N:26]1[CH2:21][CH2:19][CH:22]([OH:16])[CH2:18][CH2:20]1>>[C:8]1([CH:6]=[C:10]([C:12]([N+:11]([O-:4])=[O:5])=[CH:7][C:9]=1[F:2])[F:3])[O:16][CH:22]1[CH2:19][CH2:21][N:26]([C:24](=[O:17])[O:25][C:23]([CH3:15])([CH3:13])[CH3:14])[CH2:20][CH2:18]1.[C:10]1(=[CH:6][C:8](=[C:9]([F:2])[CH:7]=[C:12]1[N+:11]([O-:4])=[O:5])[F:1])[O:16][CH:22]1[CH2:19][CH2:21][N:26]([C:24](=[O:17])[O:25][C:23]([CH3:15])([CH3:13])[CH3:14])[CH2:20][CH2:18]1
Expand Down Expand Up @@ -36072,7 +36072,7 @@ C(O)(C)C=C>>C(=O)(C)CC
[C:1]1([F:33])([O:4][C:10]2[C:15]([F:20])=[C:19]([C:21]([F:24])=[C:17]([F:22])[C:14]=2[F:18])[F:23])[C:3]([F:9])=[C:8]([C:11](=O)[C:6]([F:12])=[C:2]1[F:7])[F:13].[C:25]1([NH:28][NH2:31])=[CH:27][CH:30]=[CH:32][CH:29]=[CH:26]1>>[C:1]1(=[C:3]([F:9])[C:8](=[C:11]([N:31]=[N:28][C:25]2[CH:26]=[CH:29][CH:32]=[CH:30][CH:27]=2)[C:6]([F:12])=[C:2]1[F:7])[F:13])[O:4][C:10]1[C:15]([F:20])=[C:19]([C:21]([F:24])=[C:17]([F:22])[C:14]=1[F:18])[F:23].[C:11]1([N:31]=[N:28][C:25]2[CH:26]=[CH:29][CH:32]=[CH:30][CH:27]=2)[C:8]([F:13])=[C:3]([C:1]([F:33])=[C:2]([F:7])[C:6]=1[F:12])[F:9]
[C@:1]1([H])([C:4]#[C:8][CH3:13])[CH2:3][O:7]C(C)(C)[N:2]1[C:6](=[O:12])OC(C)(C)C.C(C)(C)(C)OC(=O)OC(=O)[O:19][C:18]([CH3:22])([CH3:21])[CH3:20]>>[C@H:1]([C:3](=O)[OH:7])([C:4]#[C:8][CH3:13])[NH:2][C:6](=[O:12])[O:19][C:18]([CH3:22])([CH3:21])[CH3:20].[NH:2]([C:1](=O)[C:4]#[C:8][CH3:13])[C:6](=[O:12])[O:19][C:18]([CH3:22])([CH3:21])[CH3:20]
[C:1]1([Si](C)(C)C)([O:21][CH2:3]1)[CH:2](OS(=O)(=O)C)[C:6]1([CH2:13][CH2:15][CH2:19][CH3:20])[O:22][CH2:11]1>>[C:6]1([CH2:13][CH2:15][CH2:19][CH3:20])=[CH:11][O:22][C:1]([CH2:3]F)=[CH:2]1.[C:6]1([CH2:13][CH2:15][CH2:19][CH3:20])=[CH:11][O:22][C:1]([CH2:3][OH:21])=[CH:2]1
[C:1]1([O:48][CH2:4]1)([C@@:3]1([H])[CH2:9][CH2:17][C@@:14]2([H])[C@:24]3([H])[CH2:27][CH:29]=[C:30]4[CH2:33][C@H:35]([CH2:34][CH2:31][C@:28]4([CH3:32])[C@@:26]3([H])[CH2:25][CH2:15][C@:8]12[CH3:16])[O:36][Si](C)(C)C(C)(C)C)[CH:2](OS(=O)(=O)C)[C:6]1([Si](C)(C)C)[O:49][CH2:10]1>>[C@:8]12([CH3:16])[CH2:15][CH2:25][C@:26]3([H])[C@@:28]4([CH3:32])[CH2:31][CH2:34][C@H:35]([OH:36])[CH2:33][C:30]4=[CH:29][CH2:27][C@@:24]3([H])[C@:14]1([H])[CH2:17][CH2:9][C@:3]2([H])[C:1]1=[CH:4][O:48][C:6]([CH2:10]F)=[CH:2]1.[C@:8]12([CH3:16])[CH2:15][CH2:25][C@:26]3([H])[C@@:28]4([CH3:32])[CH2:31][CH2:34][C@H:35]([OH:36])[CH2:33][C:30]4=[CH:29][CH2:27][C@@:24]3([H])[C@:14]1([H])[CH2:17][CH2:9][C@:3]2([H])[C:1]1=[CH:4][O:48][C:6]([CH2:10][OH:49])=[CH:2]1 |w:0,34,40,a:3,7,9,15,18,20,24,47,51,53,57,63,65,69,78,82,84,88,94,96,100|
[C@:1]1([O:48][CH2:4]1)([C@@:3]1([H])[CH2:9][CH2:17][C@@:14]2([H])[C@:24]3([H])[CH2:27][CH:29]=[C:30]4[CH2:33][C@H:35]([CH2:34][CH2:31][C@:28]4([CH3:32])[C@@:26]3([H])[CH2:25][CH2:15][C@:8]12[CH3:16])[O:36][Si](C)(C)C(C)(C)C)[CH:2](OS(=O)(=O)C)[C:6]1([Si](C)(C)C)[O:49][CH2:10]1>>[C@:8]12([CH3:16])[CH2:15][CH2:25][C@:26]3([H])[C@@:28]4([CH3:32])[CH2:31][CH2:34][C@H:35]([OH:36])[CH2:33][C:30]4=[CH:29][CH2:27][C@@:24]3([H])[C@:14]1([H])[CH2:17][CH2:9][C@:3]2([H])[C:1]1=[CH:4][O:48][C:6]([CH2:10]F)=[CH:2]1.[C@:8]12([CH3:16])[CH2:15][CH2:25][C@:26]3([H])[C@@:28]4([CH3:32])[CH2:31][CH2:34][C@H:35]([OH:36])[CH2:33][C:30]4=[CH:29][CH2:27][C@@:24]3([H])[C@:14]1([H])[CH2:17][CH2:9][C@:3]2([H])[C:1]1=[CH:4][O:48][C:6]([CH2:10][OH:49])=[CH:2]1 |a:0,3,7,9,15,18,20,24,47,51,53,57,63,65,69,78,82,84,88,94,96,100,w:34,40|
[C@H:1]1([CH2:4][C:9](=[O:13])[O:12][CH3:14])[C:3](=[O:8])[CH2:7][C@@:10]2([H])[CH:11]=[CH:6][C@:2]1([H])[O:29]2.S(=O)(=O)(C(F)(F)F)O[Si:22]([CH3:28])([CH3:27])[CH3:26]>>[CH:10]1([O:29][Si:22]([CH3:28])([CH3:27])[CH3:26])[CH2:11][CH2:6][CH:2]=[C:1]([CH2:4][C:9](=[O:13])[O:12][CH3:14])[C:3](=[O:8])[CH2:7]1.[C@@H:2]1([CH2:6][CH2:11][CH:10]=[CH:7][C:3](=[O:8])[C@@H:1]1[CH2:4][C:9](=[O:13])[O:12][CH3:14])[O:29][Si:22]([CH3:28])([CH3:27])[CH3:26].[C@@:3]12([CH:7]=[CH:10][CH2:11][CH2:6][C@H:2]([O:29][Si:22]([CH3:28])([CH3:27])[CH3:26])[C@@:1]1([H])[C@@H:4]2[C:9](=[O:13])[O:12][CH3:14])[O:8][Si:22]([CH3:28])([CH3:27])[CH3:26] |&1:0,9,13,46,53,64,69,75,77|
[C:1]1([O:4][Si:8]([CH3:14])([CH3:13])[C:12]([CH3:21])([CH3:20])[CH3:19])=[CH:3][C:7](=[CH:9][CH:5]=[C:2]1[O:6][Si:10]([CH3:17])([CH3:16])[C:15]([CH3:24])([CH3:23])[CH3:22])[CH2:11][N:18]([C:26](=[O:29])[C:28]([F:33])([F:32])[F:31])[CH2:25][CH2:27][C:30]1[CH:35]=[CH:37][C:38]([OH:39])=[CH:36][CH:34]=1>>[C:30]12([CH:34]=[CH:36][C:38](=[O:39])[CH:37]=[CH:35]1)[CH2:27][CH2:25][N:18]([CH2:11][C:7]1[CH:3]=[C:1]([C:2]([O:6][Si:10]([CH3:16])([CH3:17])[C:15]([CH3:24])([CH3:22])[CH3:23])=[CH:5][C:9]2=1)[O:4][Si:8]([CH3:13])([CH3:14])[C:12]([CH3:21])([CH3:19])[CH3:20])[C:26](=[O:29])[C:28]([F:33])([F:31])[F:32].[C:9]12[CH:5]=[C:2]([C:1]([O:4][Si:8]([CH3:13])([CH3:14])[C:12]([CH3:21])([CH3:19])[CH3:20])=[CH:3][C:7]=1[CH2:11][N:18]([C:26](=[O:29])[C:28]([F:33])([F:31])[F:32])[CH2:25][CH2:27][C:30]1[CH:34]=[CH:36][C:38]([OH:39])=[CH:37][C:35]2=1)[O:6][Si:10]([CH3:16])([CH3:17])[C:15]([CH3:24])([CH3:22])[CH3:23]
[C:12]1([N+:11]([O-:4])=[O:5])=[CH:7][C:9](=[C:8]([F:1])[CH:6]=[C:10]1[F:3])[F:2].[C:23]([CH3:15])([CH3:14])([CH3:13])[O:25][C:24](=[O:17])[N:26]1[CH2:21][CH2:19][CH:22]([OH:16])[CH2:18][CH2:20]1>>[C:8]1([CH:6]=[C:10]([C:12]([N+:11]([O-:4])=[O:5])=[CH:7][C:9]=1[F:2])[F:3])[O:16][CH:22]1[CH2:19][CH2:21][N:26]([C:24](=[O:17])[O:25][C:23]([CH3:15])([CH3:13])[CH3:14])[CH2:20][CH2:18]1.[C:10]1(=[CH:6][C:8](=[C:9]([F:2])[CH:7]=[C:12]1[N+:11]([O-:4])=[O:5])[F:1])[O:16][CH:22]1[CH2:19][CH2:21][N:26]([C:24](=[O:17])[O:25][C:23]([CH3:15])([CH3:13])[CH3:14])[CH2:20][CH2:18]1
Expand Down
4 changes: 2 additions & 2 deletions api/tests/integration/ref/basic/molfile_stereo_desc.py.out
Original file line number Diff line number Diff line change
Expand Up @@ -2360,7 +2360,7 @@ M V30 COUNTS 15 16 1 0 0
M V30 BEGIN ATOM
M V30 1 C 0.0884 2.7107 0.0 0
M V30 2 C -0.6261 2.2982 0.0 0
M V30 3 C -0.6261 1.4732 0.0 0 CFG=3
M V30 3 C -0.6261 1.4732 0.0 0 CFG=1
M V30 4 C 0.0884 1.0607 0.0 0
M V30 5 C 0.8029 1.4732 0.0 0
M V30 6 C 0.8029 2.2982 0.0 0
Expand Down Expand Up @@ -2393,7 +2393,7 @@ M V30 15 2 13 14
M V30 16 1 13 15
M V30 END BOND
M V30 BEGIN COLLECTION
M V30 MDLV30/STERAC1 ATOMS=(1 7)
M V30 MDLV30/STERAC1 ATOMS=(2 3 7)
M V30 END COLLECTION
M V30 BEGIN SGROUP
M V30 1 DAT 1 ATOMS=(1 7) FIELDNAME=INDIGO_CIP_DESC FIELDDISP=" 0.0000 -
Expand Down
Loading

0 comments on commit ddaf0ff

Please sign in to comment.