grimme-lab / mctc-lib

Modular computation tool chain library
https://grimme-lab.github.io/mctc-lib
Apache License 2.0
15 stars 17 forks source link

Support ctfiles with V3000 formatted connection table #32

Closed awvwgk closed 2 years ago

awvwgk commented 2 years ago

molfiles and SDFs can specify the connection table in V3000 format, currently we only support V2000.

Example:

Compound 11
     RDKit          3D

  0  0  0  0  0  0  0  0  0  0999 V3000
M  V30 BEGIN CTAB
M  V30 COUNTS 17 16 0 0 0
M  V30 BEGIN ATOM
M  V30 1 O -2.821131 -0.276238 -0.753131 0
M  V30 2 C -2.076407 0.000289 0.175864 0
M  V30 3 O -2.469860 0.872693 1.126516 0
M  V30 4 C -0.648307 -0.508439 0.384207 0 CFG=1
M  V30 5 N -0.553725 -1.908221 -0.092137 0
M  V30 6 C 0.306640 0.448659 -0.352110 0
M  V30 7 C 1.764852 0.167437 -0.097096 0
M  V30 8 C 2.575104 0.984442 0.587951 0
M  V30 9 H -3.391314 1.091514 0.873612 0
M  V30 10 H -0.438887 -0.513473 1.460318 0
M  V30 11 H 0.421206 -2.197466 -0.111774 0
M  V30 12 H -0.893195 -1.946576 -1.055443 0
M  V30 13 H 0.073377 1.483235 -0.066299 0
M  V30 14 H 0.129860 0.396798 -1.434760 0
M  V30 15 H 2.179323 -0.745345 -0.519251 0
M  V30 16 H 2.219589 1.914253 1.021797 0
M  V30 17 H 3.622875 0.736438 0.730780 0
M  V30 END ATOM
M  V30 BEGIN BOND
M  V30 1 2 1 2
M  V30 2 1 2 3
M  V30 3 1 4 2
M  V30 4 1 4 5
M  V30 5 1 4 6
M  V30 6 1 6 7
M  V30 7 2 7 8 CFG=2
M  V30 8 1 3 9
M  V30 9 1 4 10 CFG=1
M  V30 10 1 5 11
M  V30 11 1 5 12
M  V30 12 1 6 13
M  V30 13 1 6 14
M  V30 14 1 7 15
M  V30 15 1 8 16
M  V30 16 1 8 17
M  V30 END BOND
M  V30 BEGIN COLLECTION
M  V30 MDLV30/STERAC1 ATOMS=(1 4)
M  V30 END COLLECTION
M  V30 END CTAB
M  END