Skip to content

Commit

Permalink
#1184 Support monomer templates export into KET-format (#1251)
Browse files Browse the repository at this point in the history
  • Loading branch information
even1024 authored Oct 16, 2023
1 parent e82c9eb commit dcdebad
Show file tree
Hide file tree
Showing 26 changed files with 2,356 additions and 58 deletions.
5 changes: 5 additions & 0 deletions api/tests/integration/ref/formats/mol_to_ket.py.out
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,10 @@
1046-imp_hydrogen.ket:SUCCEED
SgroupDifferent.ket:SUCCEED
atropisomer.ket:SUCCEED
chem.ket:SUCCEED
cysteine.ket:SUCCEED
dcysteine.ket:SUCCEED
dthymine.ket:SUCCEED
non_atrop.ket:SUCCEED
suplabel.ket:SUCCEED
thymine.ket:SUCCEED
5 changes: 5 additions & 0 deletions api/tests/integration/tests/formats/mol_to_ket.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ def find_diff(a, b):
"suplabel",
"atropisomer",
"non_atrop",
"cysteine",
"dcysteine",
"thymine",
"dthymine",
"chem",
]

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

-INDIGO-09062309442D

0 0 0 0 0 0 0 0 0 0 0 V3000
M V30 BEGIN CTAB
M V30 COUNTS 0 0 0 0 0
M V30 END CTAB
M V30 BEGIN TEMPLATE
M V30 TEMPLATE 3 CHEM/cch/cch
M V30 BEGIN CTAB
M V30 COUNTS 9 8 4 0 1
M V30 BEGIN ATOM
M V30 1 H 9.2012 -7.1587 0 0
M V30 2 H 8.3747 -7.9854 0 0
M V30 3 O 10.0281 -7.9854 0 0
M V30 4 S 9.7182 -6.7372 0 0
M V30 5 C 9.1949 -7.6427 0 0 CFG=2
M V30 6 O 9.6984 -8.5803 0 0
M V30 7 C 9.6984 -7.9763 0 0
M V30 8 C 9.1949 -7.0388 0 0
M V30 9 N 8.7041 -7.9947 0 0
M V30 END ATOM
M V30 BEGIN BOND
M V30 1 1 4 1
M V30 2 1 7 3
M V30 3 1 9 2
M V30 4 2 7 6
M V30 5 1 5 8 CFG=1
M V30 6 1 8 4
M V30 7 1 5 7
M V30 8 1 9 5
M V30 END BOND
M V30 BEGIN SGROUP
M V30 1 SUP 1 ATOMS=(1 2) XBONDS=(1 3) LABEL=H CSTATE=(4 3 0.8265 0 0) -
M V30 CLASS=LGRP
M V30 2 SUP 2 ATOMS=(1 3) XBONDS=(1 2) LABEL=OH CSTATE=(4 2 -0.825 0 0) -
M V30 CLASS=LGRP
M V30 3 SUP 3 ATOMS=(1 1) XBONDS=(1 1) LABEL=H CSTATE=(4 1 0 -0.8267 0) -
M V30 CLASS=LGRP
M V30 4 SUP 4 ATOMS=(6 4 5 6 7 8 9) XBONDS=(3 1 2 3) LABEL=Cys CSTATE=(4 3 -
M V30 -0.8265 0 0) CSTATE=(4 2 0.825 0 0) CSTATE=(4 1 0 0.8267 0) CLASS=AA -
M V30 SAP=(3 9 2 Br) SAP=(3 7 3 Cx) SAP=(3 4 1 Ex)
M V30 END SGROUP
M V30 END CTAB
M V30 END TEMPLATE
M END

47 changes: 47 additions & 0 deletions api/tests/integration/tests/formats/molecules/cysteine.mol
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@

-INDIGO-09062309442D

0 0 0 0 0 0 0 0 0 0 0 V3000
M V30 BEGIN CTAB
M V30 COUNTS 0 0 0 0 0
M V30 END CTAB
M V30 BEGIN TEMPLATE
M V30 TEMPLATE 3 AA/cys/C
M V30 BEGIN CTAB
M V30 COUNTS 9 8 4 0 1
M V30 BEGIN ATOM
M V30 1 H 9.2012 -7.1587 0 0
M V30 2 H 8.3747 -7.9854 0 0
M V30 3 O 10.0281 -7.9854 0 0
M V30 4 S 9.7182 -6.7372 0 0
M V30 5 C 9.1949 -7.6427 0 0 CFG=2
M V30 6 O 9.6984 -8.5803 0 0
M V30 7 C 9.6984 -7.9763 0 0
M V30 8 C 9.1949 -7.0388 0 0
M V30 9 N 8.7041 -7.9947 0 0
M V30 END ATOM
M V30 BEGIN BOND
M V30 1 1 4 1
M V30 2 1 7 3
M V30 3 1 9 2
M V30 4 2 7 6
M V30 5 1 5 8 CFG=1
M V30 6 1 8 4
M V30 7 1 5 7
M V30 8 1 9 5
M V30 END BOND
M V30 BEGIN SGROUP
M V30 1 SUP 1 ATOMS=(1 2) XBONDS=(1 3) LABEL=H CSTATE=(4 3 0.8265 0 0) -
M V30 CLASS=LGRP
M V30 2 SUP 2 ATOMS=(1 3) XBONDS=(1 2) LABEL=OH CSTATE=(4 2 -0.825 0 0) -
M V30 CLASS=LGRP
M V30 3 SUP 3 ATOMS=(1 1) XBONDS=(1 1) LABEL=H CSTATE=(4 1 0 -0.8267 0) -
M V30 CLASS=LGRP
M V30 4 SUP 4 ATOMS=(6 4 5 6 7 8 9) XBONDS=(3 1 2 3) LABEL=Cys CSTATE=(4 3 -
M V30 -0.8265 0 0) CSTATE=(4 2 0.825 0 0) CSTATE=(4 1 0 0.8267 0) CLASS=AA -
M V30 SAP=(3 9 2 Al) SAP=(3 7 3 Br) SAP=(3 4 1 Cx)
M V30 END SGROUP
M V30 END CTAB
M V30 END TEMPLATE
M END

43 changes: 43 additions & 0 deletions api/tests/integration/tests/formats/molecules/dala.mol
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

ACCLDraw09281611442D

0 0 0 0 0 999 V3000
M V30 BEGIN CTAB
M V30 COUNTS 0 0 0 0 0
M V30 END CTAB
M V30 BEGIN TEMPLATE
M V30 TEMPLATE 23 dAA/ala/a/ NATREPLACE=AA/A
M V30 BEGIN CTAB
M V30 COUNTS 7 6 3 0 1
M V30 BEGIN ATOM
M V30 1 O 6.6266 -2.0662 0 0
M V30 2 H 5.0016 -2.0876 0 0
M V30 3 N 5.1358 -2.0784 0 0 CFG=3
M V30 4 C 5.7844 -1.5983 0 0 CFG=1
M V30 5 C 6.4753 -2.0653 0 0
M V30 6 O 6.4753 -2.8977 0 0
M V30 7 C 5.7844 -0.7662 0 0
M V30 END ATOM
M V30 BEGIN BOND
M V30 1 1 3 4
M V30 2 1 4 5
M V30 3 2 5 6
M V30 4 1 4 7 CFG=3
M V30 5 1 3 2
M V30 6 1 5 1
M V30 END BOND
M V30 BEGIN SGROUP
M V30 1 SUP 1 ATOMS=(1 1) XBONDS=(1 6) BRKXYZ=(9 7.02 -2.26 0 7.02 -1.85 0 -
M V30 0 0 0) CSTATE=(4 6 -0.82 -0.01 0) LABEL=OH CLASS=LGRP
M V30 2 SUP 2 ATOMS=(1 2) XBONDS=(1 5) BRKXYZ=(9 4.58 -1.87 0 4.6 -2.28 0 -
M V30 0 0 0) CSTATE=(4 5 0.8 0.02 0) LABEL=H CLASS=LGRP
M V30 3 SUP 3 ATOMS=(5 3 4 5 6 7) XBONDS=(2 5 6) BRKXYZ=(9 3.95 -3.33 0 3.95 -
M V30 -0.38 0 0 0 0) CSTATE=(4 5 -0.8 -0.02 0) CSTATE=(4 6 0.82 0.01 -
M V30 0) LABEL=a CLASS=AA SAP=(3 3 2 Al) SAP=(3 5 1 Br) NATREPLACE=AA/A
M V30 END SGROUP
M V30 BEGIN COLLECTION
M V30 MDLV30/STEABS ATOMS=(1 4)
M V30 END COLLECTION
M V30 END CTAB
M V30 END TEMPLATE
M END
50 changes: 50 additions & 0 deletions api/tests/integration/tests/formats/molecules/dcysteine.mol
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

-INDIGO-09062309442D

0 0 0 0 0 0 0 0 0 0 0 V3000
M V30 BEGIN CTAB
M V30 COUNTS 0 0 0 0 0
M V30 END CTAB
M V30 BEGIN TEMPLATE
M V30 TEMPLATE 27 dAA/cys/c/ NATREPLACE=AA/C
M V30 BEGIN CTAB
M V30 COUNTS 9 8 4 0 0
M V30 BEGIN ATOM
M V30 1 H 9.2012 -7.1587 0 0
M V30 2 H 8.3747 -7.9854 0 0
M V30 3 O 10.0281 -7.9854 0 0
M V30 4 S 9.7182 -6.7372 0 0
M V30 5 C 9.1949 -7.6427 0 0 CFG=1
M V30 6 O 9.6984 -8.5803 0 0
M V30 7 C 9.6984 -7.9763 0 0
M V30 8 C 9.1949 -7.0388 0 0
M V30 9 N 8.7041 -7.9947 0 0 CFG=3
M V30 END ATOM
M V30 BEGIN BOND
M V30 1 1 4 1
M V30 2 1 7 3
M V30 3 1 9 2
M V30 4 2 7 6
M V30 5 1 5 8 CFG=3
M V30 6 1 8 4
M V30 7 1 5 7
M V30 8 1 9 5
M V30 END BOND
M V30 BEGIN SGROUP
M V30 1 SUP 1 ATOMS=(1 2) XBONDS=(1 3) CSTATE=(4 3 0.83 -0 0) LABEL=H -
M V30 CLASS=LGRP
M V30 2 SUP 2 ATOMS=(1 3) XBONDS=(1 2) CSTATE=(4 2 -0.83 -0 0) LABEL=OH -
M V30 CLASS=LGRP
M V30 3 SUP 3 ATOMS=(1 1) XBONDS=(1 1) CSTATE=(4 1 0 -0.83 0) LABEL=H -
M V30 CLASS=LGRP
M V30 4 SUP 4 ATOMS=(6 9 5 6 7 8 4) XBONDS=(3 3 2 1) CSTATE=(4 3 -0.83 0 0) -
M V30 CSTATE=(4 2 0.83 0 0) CSTATE=(4 1 -0 0.83 0) LABEL=c SAP=(3 -
M V30 9 2 Al) SAP=(3 7 3 Br) SAP=(3 4 1 Cx) NATREPLACE=AA/C
M V30 END SGROUP
M V30 BEGIN COLLECTION
M V30 MDLV30/STEABS ATOMS=(1 5)
M V30 END COLLECTION
M V30 END CTAB
M V30 END TEMPLATE
M END

76 changes: 76 additions & 0 deletions api/tests/integration/tests/formats/molecules/dthymine.mol
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@

-INDIGO-09062309442D

0 0 0 0 0 0 0 0 0 0 0 V3000
M V30 BEGIN CTAB
M V30 COUNTS 0 0 0 0 0
M V30 END CTAB
M V30 BEGIN TEMPLATE
M V30 TEMPLATE 45 DNA/T
M V30 BEGIN CTAB
M V30 COUNTS 22 23 3 0 0
M V30 BEGIN ATOM
M V30 1 O 13.2102 -15.3772 0 0
M V30 2 N 14.5655 -12.6378 0 0 CFG=3
M V30 3 O 13.616 -13.0138 0 0
M V30 4 C 14.2945 -13.5123 0 0 CFG=2
M V30 5 C 14.0424 -14.2836 0 0
M V30 6 C 13.2102 -14.2836 0 0 CFG=1
M V30 7 C 12.9472 -13.5013 0 0 CFG=1
M V30 8 C 12.1657 -13.2555 0 0
M V30 9 O 11.9165 -12.4635 0 0
M V30 10 P 10.9413 -12.1135 0 0 CFG=3
M V30 11 O 10.9413 -11.2885 0 0
M V30 12 O 10.9413 -12.9385 0 0
M V30 13 C 15.4027 -12.3728 0 0
M V30 14 C 13.8243 -11.9705 0 0
M V30 15 N 15.6751 -11.494 0 0 CFG=3
M V30 16 O 16.0606 -13.0135 0 0
M V30 17 C 14.0967 -11.0918 0 0
M V30 18 C 14.9733 -10.8443 0 0
M V30 19 O 15.2442 -9.9702 0 0
M V30 20 C 13.4376 -10.4484 0 0
M V30 21 O 10.8008 -13.7454 0 0
M V30 22 H 13.3787 -13.7454 0 0
M V30 END ATOM
M V30 BEGIN BOND
M V30 1 1 1 22
M V30 2 1 7 6
M V30 3 1 10 11
M V30 4 1 3 4
M V30 5 2 10 12
M V30 6 1 6 5
M V30 7 1 4 5
M V30 8 1 7 8 CFG=1
M V30 9 1 4 2 CFG=1
M V30 10 1 6 1 CFG=3
M V30 11 1 8 9
M V30 12 1 2 13
M V30 13 1 2 14
M V30 14 1 13 15
M V30 15 2 13 16
M V30 16 2 14 17
M V30 17 1 15 18
M V30 18 2 18 19
M V30 19 1 17 18
M V30 20 1 7 3
M V30 21 1 17 20
M V30 22 1 10 21
M V30 23 1 9 10
M V30 END BOND
M V30 BEGIN SGROUP
M V30 1 SUP 1 ATOMS=(20 2 1 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20) -
M V30 XBONDS=(2 22 1) CSTATE=(4 22 -1.27 -0 0) CSTATE=(4 1 1.3 -0 -
M V30 0) LABEL=T CLASS=DNA SAP=(3 10 21 Al) SAP=(3 1 22 Br)
M V30 2 SUP 2 ATOMS=(1 21) XBONDS=(1 22) CSTATE=(4 22 1.27 0 0) LABEL="5'" -
M V30 CLASS=LGRP
M V30 3 SUP 3 ATOMS=(1 22) XBONDS=(1 1) CSTATE=(4 1 -1.3 0 0) LABEL="3'" -
M V30 CLASS=LGRP
M V30 END SGROUP
M V30 BEGIN COLLECTION
M V30 MDLV30/STEABS ATOMS=(3 4 6 7)
M V30 END COLLECTION
M V30 END CTAB
M V30 END TEMPLATE
M END

78 changes: 78 additions & 0 deletions api/tests/integration/tests/formats/molecules/thymine.mol
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@

-INDIGO-09062309442D

0 0 0 0 0 0 0 0 0 0 0 V3000
M V30 BEGIN CTAB
M V30 COUNTS 0 0 0 0 0
M V30 END CTAB
M V30 BEGIN TEMPLATE
M V30 TEMPLATE 131 RNA/T
M V30 BEGIN CTAB
M V30 COUNTS 23 24 3 0 0
M V30 BEGIN ATOM
M V30 1 O 12.7602 -15.7147 0 0
M V30 2 O 14.0825 -15.2617 0 0
M V30 3 N 14.1088 -12.9483 0 0 CFG=3
M V30 4 O 13.166 -13.3263 0 0
M V30 5 C 13.8445 -13.8248 0 0 CFG=2
M V30 6 C 13.5924 -14.5961 0 0 CFG=1
M V30 7 C 12.7602 -14.5961 0 0 CFG=1
M V30 8 C 12.4972 -13.8138 0 0 CFG=1
M V30 9 C 11.7157 -13.568 0 0
M V30 10 O 11.4665 -12.776 0 0
M V30 11 P 10.4913 -12.376 0 0 CFG=3
M V30 12 O 10.1163 -11.551 0 0
M V30 13 O 10.4913 -13.201 0 0
M V30 14 C 14.9439 -12.6769 0 0
M V30 15 C 13.3625 -12.2866 0 0
M V30 16 N 15.2096 -11.7959 0 0 CFG=3
M V30 17 O 15.6067 -13.3125 0 0
M V30 18 C 13.6281 -11.4059 0 0
M V30 19 C 14.5028 -11.1516 0 0
M V30 20 O 14.767 -10.2755 0 0
M V30 21 C 12.9642 -10.7675 0 0
M V30 22 O 10.5257 -14.0454 0 0
M V30 23 H 12.5598 -14.0454 0 0
M V30 END ATOM
M V30 BEGIN BOND
M V30 1 1 1 23
M V30 2 1 8 7
M V30 3 1 11 12
M V30 4 1 4 5
M V30 5 2 11 13
M V30 6 1 7 6
M V30 7 1 5 6
M V30 8 1 8 9 CFG=1
M V30 9 1 5 3 CFG=1
M V30 10 1 6 2 CFG=3
M V30 11 1 7 1 CFG=3
M V30 12 1 9 10
M V30 13 1 3 14
M V30 14 1 3 15
M V30 15 1 14 16
M V30 16 2 14 17
M V30 17 2 15 18
M V30 18 1 16 19
M V30 19 2 19 20
M V30 20 1 18 19
M V30 21 1 8 4
M V30 22 1 18 21
M V30 23 1 11 22
M V30 24 1 10 11
M V30 END BOND
M V30 BEGIN SGROUP
M V30 1 SUP 1 ATOMS=(21 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21-
M V30 ) XBONDS=(2 23 1) CSTATE=(4 23 -1.1 -0 0) CSTATE=(4 1 0.93 -0 0) -
M V30 LABEL=T CLASS=RNA SAP=(3 11 22 Al) SAP=(3 1 23 Br)
M V30 2 SUP 2 ATOMS=(1 22) XBONDS=(1 23) CSTATE=(4 23 1.1 0 0) LABEL="5'" -
M V30 CLASS=LGRP
M V30 3 SUP 3 ATOMS=(1 23) XBONDS=(1 1) CSTATE=(4 1 -0.93 0 0) LABEL="3'" -
M V30 CLASS=LGRP
M V30 END SGROUP
M V30 BEGIN COLLECTION
M V30 MDLV30/STEABS ATOMS=(4 5 6 7 8)
M V30 END COLLECTION
M V30 END CTAB
M V30 END TEMPLATE
M END

Loading

0 comments on commit dcdebad

Please sign in to comment.