Skip to content

Commit

Permalink
#2041 - Monomer could be saved to RXN V3000 format but can't be load…
Browse files Browse the repository at this point in the history
…ed back - exception (#2700)
  • Loading branch information
AliaksandrDziarkach authored Dec 20, 2024
1 parent cff9a0f commit 43a676f
Show file tree
Hide file tree
Showing 8 changed files with 2,169 additions and 64 deletions.
1 change: 1 addition & 0 deletions api/tests/integration/ref/formats/rxn_to_ket.py.out
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*** RXN to KET ***
2485-bad-layout.ket:SUCCEED
2531-bad-layout.ket:SUCCEED
rxn3000-with-macro.ket:SUCCEED
358 changes: 358 additions & 0 deletions api/tests/integration/tests/formats/reactions/rxn3000-with-macro.rxn
Original file line number Diff line number Diff line change
@@ -0,0 +1,358 @@
$RXN V3000

-INDIGO- 1220241444

M V30 COUNTS 2 1
M V30 BEGIN REACTANT
M V30 BEGIN CTAB
M V30 COUNTS 1 0 0 0 0
M V30 BEGIN ATOM
M V30 1 5hMedC 10.225 -7.375 0.0 0 CLASS=RNA SEQID=1
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/5hMedC/5hMedC NATREPLACE=RNA/C
M V30 BEGIN CTAB
M V30 COUNTS 23 24 3 0 0
M V30 BEGIN ATOM
M V30 1 C 15.2737 -8.09693 0.0 0 CFG=1
M V30 2 O 16.1872 -7.69022 0.0 0
M V30 3 C 16.8564 -8.43336 0.0 0 CFG=2
M V30 4 C 16.3564 -9.29938 0.0 0
M V30 5 C 15.3782 -9.09143 0.0 0 CFG=2
M V30 6 C 14.4077 -7.59693 0.0 0
M V30 7 O 14.4077 -6.59693 0.0 0
M V30 8 H 13.5416 -6.09693 0.0 0
M V30 9 O 14.6351 -9.76056 0.0 0
M V30 10 P 13.684 -9.45154 0.0 0
M V30 11 O 12.9409 -10.1207 0.0 0
M V30 12 O 13.4761 -8.47339 0.0 0
M V30 13 O 13.8919 -10.4297 0.0 0
M V30 14 N 17.8509 -8.32882 0.0 0
M V30 15 C 18.3509 -9.19485 0.0 0
M V30 16 C 19.3509 -9.19485 0.0 0
M V30 17 C 19.8509 -8.32882 0.0 0
M V30 18 N 19.3509 -7.46279 0.0 0
M V30 19 C 18.3509 -7.46279 0.0 0
M V30 20 O 17.8509 -6.59677 0.0 0
M V30 21 N 20.8509 -8.3288 0.0 0
M V30 22 C 19.8509 -10.0609 0.0 0
M V30 23 O 19.3509 -10.9269 0.0 0
M V30 END ATOM
M V30 BEGIN BOND
M V30 1 1 1 5
M V30 2 1 5 4
M V30 3 1 4 3
M V30 4 1 3 2
M V30 5 1 2 1
M V30 6 1 1 6 CFG=1
M V30 7 1 6 7
M V30 8 1 7 8
M V30 9 1 5 9 CFG=3
M V30 10 1 9 10
M V30 11 1 10 11
M V30 12 1 10 12
M V30 13 2 10 13
M V30 14 1 3 14 CFG=1
M V30 15 1 19 14
M V30 16 1 14 15
M V30 17 2 15 16
M V30 18 1 16 17
M V30 19 2 17 18
M V30 20 1 18 19
M V30 21 2 19 20
M V30 22 1 17 21
M V30 23 1 16 22
M V30 24 1 22 23
M V30 END BOND
M V30 BEGIN COLLECTION
M V30 MDLV30/STEABS ATOMS=(3 1 3 5)
M V30 END COLLECTION
M V30 BEGIN SGROUP
M V30 1 SUP 1 ATOMS=(1 8) XBONDS=(1 8) BRKXYZ=(9 0.433013 -0.250000 0.000000-
M V30 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=H CLASS=-
M V30 LGRP
M V30 2 SUP 2 ATOMS=(1 11) XBONDS=(1 11) BRKXYZ=(9 0.371574 0.334564 0.00000-
M V30 0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=OH CLAS-
M V30 S=LGRP
M V30 3 SUP 3 ATOMS=(21 1 2 3 4 5 6 7 9 10 12 13 14 15 16 17 18 19 20 21 22 -
M V30 23) XBONDS=(2 8 11) BRKXYZ=(9 -0.433013 0.250000 0.000000 -0.371574 -0-
M V30 .334564 0.000000 0.000000 0.000000 0.000000) LABEL=5hMedC CLASS=RNA SA-
M V30 P=(3 7 8 Al) SAP=(3 10 11 Br) NATREPLACE=RNA/C
M V30 END SGROUP
M V30 END CTAB
M V30 TEMPLATE 2 LINKER/PEG-2/PEG-2
M V30 BEGIN CTAB
M V30 COUNTS 9 8 3 0 0
M V30 BEGIN ATOM
M V30 1 O -3.8999 -0.3833 0.0 0
M V30 2 C -2.5999 0.3667 0.0 0
M V30 3 C -1.3 -0.3833 0.0 0
M V30 4 O 0.0 0.3667 0.0 0
M V30 5 C 1.3 -0.3833 0.0 0
M V30 6 C 2.6 0.3667 0.0 0
M V30 7 O 3.9 -0.3833 0.0 0
M V30 8 H 4.9394 0.2164 0.0 0
M V30 9 H -4.9394 0.2164 0.0 0
M V30 END ATOM
M V30 BEGIN BOND
M V30 1 1 1 2
M V30 2 1 2 3
M V30 3 1 3 4
M V30 4 1 4 5
M V30 5 1 5 6
M V30 6 1 6 7
M V30 7 1 7 8
M V30 8 1 1 9
M V30 END BOND
M V30 BEGIN SGROUP
M V30 1 SUP 1 ATOMS=(1 9) XBONDS=(1 8) BRKXYZ=(9 0.519750 -0.299850 0.000000-
M V30 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=H CLASS=-
M V30 LGRP
M V30 2 SUP 2 ATOMS=(1 8) XBONDS=(1 7) BRKXYZ=(9 -0.519700 -0.299850 0.00000-
M V30 0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=H CLASS-
M V30 =LGRP
M V30 3 SUP 3 ATOMS=(7 1 2 3 4 5 6 7) XBONDS=(2 8 7) BRKXYZ=(9 -0.519750 0.2-
M V30 99850 0.000000 0.519700 0.299850 0.000000 0.000000 0.000000 0.000000) -
M V30 LABEL=PEG-2 CLASS=LINKER SAP=(3 1 9 Al) SAP=(3 7 8 Br)
M V30 END SGROUP
M V30 END CTAB
M V30 END TEMPLATE
M V30 BEGIN CTAB
M V30 COUNTS 1 0 0 0 0
M V30 BEGIN ATOM
M V30 1 PEG-2 12.5 -7.4 0.0 0 CLASS=LINKER
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/5hMedC/5hMedC NATREPLACE=RNA/C
M V30 BEGIN CTAB
M V30 COUNTS 23 24 3 0 0
M V30 BEGIN ATOM
M V30 1 C 15.2737 -8.09693 0.0 0 CFG=1
M V30 2 O 16.1872 -7.69022 0.0 0
M V30 3 C 16.8564 -8.43336 0.0 0 CFG=2
M V30 4 C 16.3564 -9.29938 0.0 0
M V30 5 C 15.3782 -9.09143 0.0 0 CFG=2
M V30 6 C 14.4077 -7.59693 0.0 0
M V30 7 O 14.4077 -6.59693 0.0 0
M V30 8 H 13.5416 -6.09693 0.0 0
M V30 9 O 14.6351 -9.76056 0.0 0
M V30 10 P 13.684 -9.45154 0.0 0
M V30 11 O 12.9409 -10.1207 0.0 0
M V30 12 O 13.4761 -8.47339 0.0 0
M V30 13 O 13.8919 -10.4297 0.0 0
M V30 14 N 17.8509 -8.32882 0.0 0
M V30 15 C 18.3509 -9.19485 0.0 0
M V30 16 C 19.3509 -9.19485 0.0 0
M V30 17 C 19.8509 -8.32882 0.0 0
M V30 18 N 19.3509 -7.46279 0.0 0
M V30 19 C 18.3509 -7.46279 0.0 0
M V30 20 O 17.8509 -6.59677 0.0 0
M V30 21 N 20.8509 -8.3288 0.0 0
M V30 22 C 19.8509 -10.0609 0.0 0
M V30 23 O 19.3509 -10.9269 0.0 0
M V30 END ATOM
M V30 BEGIN BOND
M V30 1 1 1 5
M V30 2 1 5 4
M V30 3 1 4 3
M V30 4 1 3 2
M V30 5 1 2 1
M V30 6 1 1 6 CFG=1
M V30 7 1 6 7
M V30 8 1 7 8
M V30 9 1 5 9 CFG=3
M V30 10 1 9 10
M V30 11 1 10 11
M V30 12 1 10 12
M V30 13 2 10 13
M V30 14 1 3 14 CFG=1
M V30 15 1 19 14
M V30 16 1 14 15
M V30 17 2 15 16
M V30 18 1 16 17
M V30 19 2 17 18
M V30 20 1 18 19
M V30 21 2 19 20
M V30 22 1 17 21
M V30 23 1 16 22
M V30 24 1 22 23
M V30 END BOND
M V30 BEGIN COLLECTION
M V30 MDLV30/STEABS ATOMS=(3 1 3 5)
M V30 END COLLECTION
M V30 BEGIN SGROUP
M V30 1 SUP 1 ATOMS=(1 8) XBONDS=(1 8) BRKXYZ=(9 0.433013 -0.250000 0.000000-
M V30 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=H CLASS=-
M V30 LGRP
M V30 2 SUP 2 ATOMS=(1 11) XBONDS=(1 11) BRKXYZ=(9 0.371574 0.334564 0.00000-
M V30 0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=OH CLAS-
M V30 S=LGRP
M V30 3 SUP 3 ATOMS=(21 1 2 3 4 5 6 7 9 10 12 13 14 15 16 17 18 19 20 21 22 -
M V30 23) XBONDS=(2 8 11) BRKXYZ=(9 -0.433013 0.250000 0.000000 -0.371574 -0-
M V30 .334564 0.000000 0.000000 0.000000 0.000000) LABEL=5hMedC CLASS=RNA SA-
M V30 P=(3 7 8 Al) SAP=(3 10 11 Br) NATREPLACE=RNA/C
M V30 END SGROUP
M V30 END CTAB
M V30 TEMPLATE 2 LINKER/PEG-2/PEG-2
M V30 BEGIN CTAB
M V30 COUNTS 9 8 3 0 0
M V30 BEGIN ATOM
M V30 1 O -3.8999 -0.3833 0.0 0
M V30 2 C -2.5999 0.3667 0.0 0
M V30 3 C -1.3 -0.3833 0.0 0
M V30 4 O 0.0 0.3667 0.0 0
M V30 5 C 1.3 -0.3833 0.0 0
M V30 6 C 2.6 0.3667 0.0 0
M V30 7 O 3.9 -0.3833 0.0 0
M V30 8 H 4.9394 0.2164 0.0 0
M V30 9 H -4.9394 0.2164 0.0 0
M V30 END ATOM
M V30 BEGIN BOND
M V30 1 1 1 2
M V30 2 1 2 3
M V30 3 1 3 4
M V30 4 1 4 5
M V30 5 1 5 6
M V30 6 1 6 7
M V30 7 1 7 8
M V30 8 1 1 9
M V30 END BOND
M V30 BEGIN SGROUP
M V30 1 SUP 1 ATOMS=(1 9) XBONDS=(1 8) BRKXYZ=(9 0.519750 -0.299850 0.000000-
M V30 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=H CLASS=-
M V30 LGRP
M V30 2 SUP 2 ATOMS=(1 8) XBONDS=(1 7) BRKXYZ=(9 -0.519700 -0.299850 0.00000-
M V30 0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=H CLASS-
M V30 =LGRP
M V30 3 SUP 3 ATOMS=(7 1 2 3 4 5 6 7) XBONDS=(2 8 7) BRKXYZ=(9 -0.519750 0.2-
M V30 99850 0.000000 0.519700 0.299850 0.000000 0.000000 0.000000 0.000000) -
M V30 LABEL=PEG-2 CLASS=LINKER SAP=(3 1 9 Al) SAP=(3 7 8 Br)
M V30 END SGROUP
M V30 END CTAB
M V30 END TEMPLATE
M V30 END REACTANT
M V30 BEGIN PRODUCT
M V30 BEGIN CTAB
M V30 COUNTS 1 0 0 0 0
M V30 BEGIN ATOM
M V30 1 C 15.3206 -7.40254 0.0 0
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/5hMedC/5hMedC NATREPLACE=RNA/C
M V30 BEGIN CTAB
M V30 COUNTS 23 24 3 0 0
M V30 BEGIN ATOM
M V30 1 C 15.2737 -8.09693 0.0 0 CFG=1
M V30 2 O 16.1872 -7.69022 0.0 0
M V30 3 C 16.8564 -8.43336 0.0 0 CFG=2
M V30 4 C 16.3564 -9.29938 0.0 0
M V30 5 C 15.3782 -9.09143 0.0 0 CFG=2
M V30 6 C 14.4077 -7.59693 0.0 0
M V30 7 O 14.4077 -6.59693 0.0 0
M V30 8 H 13.5416 -6.09693 0.0 0
M V30 9 O 14.6351 -9.76056 0.0 0
M V30 10 P 13.684 -9.45154 0.0 0
M V30 11 O 12.9409 -10.1207 0.0 0
M V30 12 O 13.4761 -8.47339 0.0 0
M V30 13 O 13.8919 -10.4297 0.0 0
M V30 14 N 17.8509 -8.32882 0.0 0
M V30 15 C 18.3509 -9.19485 0.0 0
M V30 16 C 19.3509 -9.19485 0.0 0
M V30 17 C 19.8509 -8.32882 0.0 0
M V30 18 N 19.3509 -7.46279 0.0 0
M V30 19 C 18.3509 -7.46279 0.0 0
M V30 20 O 17.8509 -6.59677 0.0 0
M V30 21 N 20.8509 -8.3288 0.0 0
M V30 22 C 19.8509 -10.0609 0.0 0
M V30 23 O 19.3509 -10.9269 0.0 0
M V30 END ATOM
M V30 BEGIN BOND
M V30 1 1 1 5
M V30 2 1 5 4
M V30 3 1 4 3
M V30 4 1 3 2
M V30 5 1 2 1
M V30 6 1 1 6 CFG=1
M V30 7 1 6 7
M V30 8 1 7 8
M V30 9 1 5 9 CFG=3
M V30 10 1 9 10
M V30 11 1 10 11
M V30 12 1 10 12
M V30 13 2 10 13
M V30 14 1 3 14 CFG=1
M V30 15 1 19 14
M V30 16 1 14 15
M V30 17 2 15 16
M V30 18 1 16 17
M V30 19 2 17 18
M V30 20 1 18 19
M V30 21 2 19 20
M V30 22 1 17 21
M V30 23 1 16 22
M V30 24 1 22 23
M V30 END BOND
M V30 BEGIN COLLECTION
M V30 MDLV30/STEABS ATOMS=(3 1 3 5)
M V30 END COLLECTION
M V30 BEGIN SGROUP
M V30 1 SUP 1 ATOMS=(1 8) XBONDS=(1 8) BRKXYZ=(9 0.433013 -0.250000 0.000000-
M V30 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=H CLASS=-
M V30 LGRP
M V30 2 SUP 2 ATOMS=(1 11) XBONDS=(1 11) BRKXYZ=(9 0.371574 0.334564 0.00000-
M V30 0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=OH CLAS-
M V30 S=LGRP
M V30 3 SUP 3 ATOMS=(21 1 2 3 4 5 6 7 9 10 12 13 14 15 16 17 18 19 20 21 22 -
M V30 23) XBONDS=(2 8 11) BRKXYZ=(9 -0.433013 0.250000 0.000000 -0.371574 -0-
M V30 .334564 0.000000 0.000000 0.000000 0.000000) LABEL=5hMedC CLASS=RNA SA-
M V30 P=(3 7 8 Al) SAP=(3 10 11 Br) NATREPLACE=RNA/C
M V30 END SGROUP
M V30 END CTAB
M V30 TEMPLATE 2 LINKER/PEG-2/PEG-2
M V30 BEGIN CTAB
M V30 COUNTS 9 8 3 0 0
M V30 BEGIN ATOM
M V30 1 O -3.8999 -0.3833 0.0 0
M V30 2 C -2.5999 0.3667 0.0 0
M V30 3 C -1.3 -0.3833 0.0 0
M V30 4 O 0.0 0.3667 0.0 0
M V30 5 C 1.3 -0.3833 0.0 0
M V30 6 C 2.6 0.3667 0.0 0
M V30 7 O 3.9 -0.3833 0.0 0
M V30 8 H 4.9394 0.2164 0.0 0
M V30 9 H -4.9394 0.2164 0.0 0
M V30 END ATOM
M V30 BEGIN BOND
M V30 1 1 1 2
M V30 2 1 2 3
M V30 3 1 3 4
M V30 4 1 4 5
M V30 5 1 5 6
M V30 6 1 6 7
M V30 7 1 7 8
M V30 8 1 1 9
M V30 END BOND
M V30 BEGIN SGROUP
M V30 1 SUP 1 ATOMS=(1 9) XBONDS=(1 8) BRKXYZ=(9 0.519750 -0.299850 0.000000-
M V30 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=H CLASS=-
M V30 LGRP
M V30 2 SUP 2 ATOMS=(1 8) XBONDS=(1 7) BRKXYZ=(9 -0.519700 -0.299850 0.00000-
M V30 0 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000) LABEL=H CLASS-
M V30 =LGRP
M V30 3 SUP 3 ATOMS=(7 1 2 3 4 5 6 7) XBONDS=(2 8 7) BRKXYZ=(9 -0.519750 0.2-
M V30 99850 0.000000 0.519700 0.299850 0.000000 0.000000 0.000000 0.000000) -
M V30 LABEL=PEG-2 CLASS=LINKER SAP=(3 1 9 Al) SAP=(3 7 8 Br)
M V30 END SGROUP
M V30 END CTAB
M V30 END TEMPLATE
M V30 END PRODUCT
M END
Loading

0 comments on commit 43a676f

Please sign in to comment.