Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1465 Unable to load specific mol-file #1479

Merged
merged 3 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/indigo-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1001,8 +1001,8 @@ jobs:
/bin/sh -c "
set -eux &&
yum install -y -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm yum-utils &&
curl -OL https://download.postgresql.org/pub/repos/yum/RPM-GPG-KEY-PGDG &&
rpm --import RPM-GPG-KEY-PGDG &&
curl -OL https://download.postgresql.org/pub/repos/yum/keys/PGDG-RPM-GPG-KEY-RHEL &&
rpm --import PGDG-RPM-GPG-KEY-RHEL &&
yumdownloader -y postgresql${{ matrix.postgres_major_version }}-devel &&
rpm -i --nodeps postgresql${{ matrix.postgres_major_version }}*.rpm &&
ls -alh /usr &&
Expand Down
1 change: 1 addition & 0 deletions api/tests/integration/ref/formats/mol_to_ket.py.out
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*** MOL to KET ***
1032-quadra.ket:SUCCEED
1046-imp_hydrogen.ket:SUCCEED
1465-lr_sugar.ket:SUCCEED
SgroupDifferent.ket:SUCCEED
acgt_1412.ket:SUCCEED
anacyclamide.ket:SUCCEED
Expand Down
1 change: 1 addition & 0 deletions api/tests/integration/tests/formats/mol_to_ket.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def find_diff(a, b):
"anacyclamide",
"acgt_1412",
"apamine",
"1465-lr_sugar",
]

files.sort()
Expand Down
69 changes: 69 additions & 0 deletions api/tests/integration/tests/formats/molecules/1465-lr_sugar.mol
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@

-INDIGO-01042412382D

0 0 0 0 0 0 0 0 0 0 0 V3000
M V30 BEGIN CTAB
M V30 COUNTS 1 0 0 0 0
M V30 BEGIN ATOM
M V30 1 LR 10.125 6.675 0.0 0 CLASS=RNA
M V30 END ATOM
M V30 BEGIN BOND
M V30 END BOND
M V30 END CTAB
M V30 BEGIN TEMPLATE
M V30 TEMPLATE 1 RNA/LR/LR NATREPLACE=RNA/R
M V30 BEGIN CTAB
M V30 COUNTS 13 14 4 0 0
M V30 BEGIN ATOM
M V30 1 O -0.9702 0.0384 0.0 0
M V30 2 C 0.5413 -0.5559 0.0 0 CFG=1
M V30 3 C -1.5602 -1.0669 0.0 0 CFG=2
M V30 4 C 1.9236 0.0726 0.0 0 CFG=2
M V30 5 C -0.2063 -1.7187 0.0 0 CFG=1
M V30 6 O 1.5616 1.5445 0.0 0
M V30 7 C 0.3744 0.9413 0.0 0
M V30 8 O -2.6751 -0.6231 0.0 0
M V30 9 O -0.9999 1.5445 0.0 0
M V30 10 H -1.1323 2.7372 0.0 0
M V30 11 H 2.4387 2.3633 0.0 0
M V30 12 C 0.6245 -2.0152 0.0 0
M V30 13 O 0.0798 -3.2622 0.0 0
M V30 END ATOM
M V30 BEGIN BOND
M V30 1 1 1 2
M V30 2 1 1 3
M V30 3 1 2 4
M V30 4 1 2 7 CFG=1
M V30 5 1 3 5
M V30 6 1 3 8 CFG=3
M V30 7 1 4 5
M V30 8 1 6 11
M V30 9 1 7 9
M V30 10 1 9 10
M V30 11 1 2 12 CFG=3
M V30 12 1 12 13
M V30 13 1 5 13 CFG=1
M V30 14 1 4 6 CFG=1
M V30 END BOND
M V30 BEGIN COLLECTION
M V30 MDLV30/STEABS ATOMS=(4 2 3 4 5)
M V30 END COLLECTION
M V30 BEGIN SGROUP
M V30 1 SUP 1 ATOMS=(1 10) XBONDS=(1 10) BRKXYZ=(9 0.066200 -0.596350 0.0000-
M V30 00 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=H CLAS-
M V30 S=LGRP
M V30 2 SUP 2 ATOMS=(1 11) XBONDS=(1 8) BRKXYZ=(9 -0.438550 -0.409400 0.0000-
M V30 00 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=H CLAS-
M V30 S=LGRP
M V30 3 SUP 3 ATOMS=(1 8) XBONDS=(1 6) BRKXYZ=(9 0.557450 -0.221900 0.000000-
M V30 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=OH CLASS-
M V30 =LGRP
M V30 4 SUP 4 ATOMS=(10 1 2 3 4 5 6 7 9 12 13) XBONDS=(3 6 8 10) BRKXYZ=(9 --
M V30 0.557450 0.221900 0.000000 0.438550 0.409400 0.000000 0.000000 0.00000-
M V30 0 0.000000) BRKXYZ=(9 -0.066200 0.596350 0.000000 0.000000 0.000000 0.-
M V30 000000 0.000000 0.000000 0.000000) LABEL=LR CLASS=RNA SAP=(3 9 10 Al) -
M V30 SAP=(3 6 11 Br) SAP=(3 3 8 Cx) NATREPLACE=RNA/R
M V30 END SGROUP
M V30 END CTAB
M V30 END TEMPLATE
M END
274 changes: 274 additions & 0 deletions api/tests/integration/tests/formats/ref/1465-lr_sugar.ket
Original file line number Diff line number Diff line change
@@ -0,0 +1,274 @@
{
"root": {
"nodes": [
{
"$ref": "monomer0"
}
],
"connections": [],
"templates": [
{
"$ref": "monomerTemplate-LR_1"
}
]
},
"monomer0": {
"type": "monomer",
"id": "0",
"position": {
"x": 10.125,
"y": 6.675000190734863
},
"alias": "LR",
"templateId": "LR_1"
},
"monomerTemplate-LR_1": {
"type": "monomerTemplate",
"id": "LR_1",
"class": "RNA",
"classHELM": "RNA",
"alias": "LR",
"name": "LR",
"naturalAnalogShort": "R",
"attachmentPoints": [
{
"attachmentAtom": 8,
"leavingGroup": {
"atoms": [
9
]
}
},
{
"attachmentAtom": 5,
"leavingGroup": {
"atoms": [
10
]
}
},
{
"attachmentAtom": 2,
"leavingGroup": {
"atoms": [
7
]
}
}
],
"atoms": [
{
"label": "O",
"location": [
-0.9702000021934509,
0.03840000182390213,
0.0
]
},
{
"label": "C",
"location": [
0.5412999987602234,
-0.555899977684021,
0.0
]
},
{
"label": "C",
"location": [
-1.5601999759674073,
-1.0669000148773194,
0.0
],
"stereoLabel": "abs"
},
{
"label": "C",
"location": [
1.9235999584197999,
0.07259999960660935,
0.0
],
"stereoLabel": "abs"
},
{
"label": "C",
"location": [
-0.20630000531673432,
-1.7187000513076783,
0.0
],
"stereoLabel": "abs"
},
{
"label": "O",
"location": [
1.5615999698638917,
1.5444999933242798,
0.0
]
},
{
"label": "C",
"location": [
0.37439998984336855,
0.9412999749183655,
0.0
]
},
{
"label": "O",
"location": [
-2.675100088119507,
-0.6230999827384949,
0.0
]
},
{
"label": "O",
"location": [
-0.9998999834060669,
1.5444999933242798,
0.0
]
},
{
"label": "H",
"location": [
-1.1323000192642213,
2.7372000217437746,
0.0
]
},
{
"label": "H",
"location": [
2.438699960708618,
2.363300085067749,
0.0
]
},
{
"label": "C",
"location": [
0.6244999766349793,
-2.015199899673462,
0.0
]
},
{
"label": "O",
"location": [
0.07980000227689743,
-3.262200117111206,
0.0
]
}
],
"bonds": [
{
"type": 1,
"atoms": [
0,
1
]
},
{
"type": 1,
"atoms": [
0,
2
]
},
{
"type": 1,
"atoms": [
1,
3
]
},
{
"type": 1,
"atoms": [
1,
6
],
"stereo": 1
},
{
"type": 1,
"atoms": [
2,
4
]
},
{
"type": 1,
"atoms": [
2,
7
],
"stereo": 6
},
{
"type": 1,
"atoms": [
3,
4
]
},
{
"type": 1,
"atoms": [
5,
10
]
},
{
"type": 1,
"atoms": [
6,
8
]
},
{
"type": 1,
"atoms": [
8,
9
]
},
{
"type": 1,
"atoms": [
1,
11
],
"stereo": 6
},
{
"type": 1,
"atoms": [
11,
12
]
},
{
"type": 1,
"atoms": [
4,
12
],
"stereo": 1
},
{
"type": 1,
"atoms": [
3,
5
],
"stereo": 1
}
]
}
}
1 change: 1 addition & 0 deletions core/indigo-core/molecule/molfile_loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ namespace indigo

void loadMolecule(Molecule& mol);
void loadQueryMolecule(QueryMolecule& mol);
void copyProperties(const MolfileLoader& loader);

// for Rxnfiles v3000
void loadCtab3000(Molecule& mol);
Expand Down
Loading
Loading