q2mm 5.0.0a1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. q2mm-5.0.0a1/.github/workflows/ci.yml +32 -0
  2. q2mm-5.0.0a1/.github/workflows/docs.yml +28 -0
  3. q2mm-5.0.0a1/.github/workflows/publish.yml +95 -0
  4. q2mm-5.0.0a1/.gitignore +60 -0
  5. q2mm-5.0.0a1/.vscode/launch.json +53 -0
  6. q2mm-5.0.0a1/LICENSE +21 -0
  7. q2mm-5.0.0a1/PKG-INFO +110 -0
  8. q2mm-5.0.0a1/README.md +68 -0
  9. q2mm-5.0.0a1/docs/api.md +322 -0
  10. q2mm-5.0.0a1/docs/getting-started.md +88 -0
  11. q2mm-5.0.0a1/docs/index.md +119 -0
  12. q2mm-5.0.0a1/docs/performance.md +184 -0
  13. q2mm-5.0.0a1/docs/references.md +63 -0
  14. q2mm-5.0.0a1/docs/tutorial.md +754 -0
  15. q2mm-5.0.0a1/examples/ethane/GS.fchk +725 -0
  16. q2mm-5.0.0a1/examples/ethane/GS.log +1403 -0
  17. q2mm-5.0.0a1/examples/ethane/GS.mol2 +23 -0
  18. q2mm-5.0.0a1/examples/ethane/README.md +27 -0
  19. q2mm-5.0.0a1/examples/ethane/TS.fchk +725 -0
  20. q2mm-5.0.0a1/examples/ethane/TS.log +1609 -0
  21. q2mm-5.0.0a1/examples/ethane/TS.mol2 +23 -0
  22. q2mm-5.0.0a1/examples/rh-enamide/README.md +60 -0
  23. q2mm-5.0.0a1/examples/rh-enamide/atom.typ +47 -0
  24. q2mm-5.0.0a1/examples/rh-enamide/ff/rh-hydrogenation-enamide-final.fld +146 -0
  25. q2mm-5.0.0a1/examples/rh-enamide/ff/rh_hyd_enamide_final.fld +1914 -0
  26. q2mm-5.0.0a1/examples/rh-enamide/ff/rh_hyd_enamide_start.fld +1914 -0
  27. q2mm-5.0.0a1/examples/rh-enamide/freq_runner.sh +26 -0
  28. q2mm-5.0.0a1/examples/rh-enamide/mm3.fld +1913 -0
  29. q2mm-5.0.0a1/examples/rh-enamide/rh-hydrogenation-enamide-template.mae +90 -0
  30. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/jaguar_spe_freq_in_out/1ZDMPfromJCTCSI_loner1.01.in +8999 -0
  31. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/jaguar_spe_freq_in_out/1ZDMPfromJCTCSI_loner1.out +2834 -0
  32. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/jaguar_spe_freq_in_out/2DMPEConformation1fromJCTCSI_isomer1.01.in +9402 -0
  33. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/jaguar_spe_freq_in_out/2DMPEConformation1fromJCTCSI_isomer1.out +3082 -0
  34. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/jaguar_spe_freq_in_out/3DMPEConformation2fromJCTCSI_isomer2.01.in +9403 -0
  35. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/jaguar_spe_freq_in_out/3DMPEConformation2fromJCTCSI_isomer2.out +3083 -0
  36. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/jaguar_spe_freq_in_out/4RR-Me-DuPHOSpro-RfromJCTCSI_isomer3.01.in +23189 -0
  37. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/jaguar_spe_freq_in_out/4RR-Me-DuPHOSpro-RfromJCTCSI_isomer3.out +7038 -0
  38. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/jaguar_spe_freq_in_out/5RR-Me-DuPHOSpro-SfromJCTCSI_isomer4.01.in +23190 -0
  39. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/jaguar_spe_freq_in_out/5RR-Me-DuPHOSpro-SfromJCTCSI_isomer4.out +7039 -0
  40. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/jaguar_spe_freq_in_out/6RR-Me-BPEpro-RConformation1fromJCTCSI_isomer5.01.in +19180 -0
  41. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/jaguar_spe_freq_in_out/6RR-Me-BPEpro-RConformation1fromJCTCSI_isomer5.out +6256 -0
  42. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/jaguar_spe_freq_in_out/7RR-Me-BPEpro-RConformation2fromJCTCSI_isomer6.01.in +19182 -0
  43. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/jaguar_spe_freq_in_out/7RR-Me-BPEpro-RConformation2fromJCTCSI_isomer6.out +6255 -0
  44. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/jaguar_spe_freq_in_out/8RR-Me-BPEpro-SConformation1fromJCTCSI_isomer7.01.in +19180 -0
  45. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/jaguar_spe_freq_in_out/8RR-Me-BPEpro-SConformation1fromJCTCSI_isomer7.out +6255 -0
  46. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/jaguar_spe_freq_in_out/9RR-Me-BPEpro-SConformation2fromJCTCSI_isomer8.01.in +19180 -0
  47. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/jaguar_spe_freq_in_out/9RR-Me-BPEpro-SConformation2fromJCTCSI_isomer8.out +6256 -0
  48. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mae/1_ZDMP_from_JCTC_SI.mae +128 -0
  49. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mae/2_DMPE_Conformation_1_from_JCTC_SI.mae +132 -0
  50. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mae/3_DMPE_Conformation_2_from_JCTC_SI.mae +132 -0
  51. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mae/4__R_R_-Me-DuPHOS_pro-R_from_JCTC_SI.mae +183 -0
  52. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mae/5__R_R_-Me-DuPHOS_pro-S_from_JCTC_SI.mae +183 -0
  53. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mae/6__R_R_-Me-BPE_pro-R_Conformation_1_from_JCTC_SI.mae +174 -0
  54. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mae/7__R_R_-Me-BPE_pro-R_Conformation_2_from_JCTC_SI.mae +174 -0
  55. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mae/8__R_R_-Me-BPE_pro-S_Conformation_1_from_JCTC_SI.mae +174 -0
  56. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mae/9__R_R_-Me-BPE_pro-S_Conformation_2_from_JCTC_SI.mae +174 -0
  57. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mol2/1_ZDMP_from_JCTC_SI.mol2 +85 -0
  58. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mol2/1_zdmp.mol2 +84 -0
  59. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mol2/2_DMPE_Conformation_1_from_JCTC_SI.mol2 +89 -0
  60. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mol2/2_dmpe_conf_1.mol2 +86 -0
  61. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mol2/3_DMPE_Conformation_2_from_JCTC_SI.mol2 +89 -0
  62. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mol2/3_dmpe_conf_2.mol2 +86 -0
  63. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mol2/4__R_R_-Me-DuPHOS_pro-R_from_JCTC_SI.mol2 +140 -0
  64. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mol2/4_duphos_r.mol2 +137 -0
  65. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mol2/5__R_R_-Me-DuPHOS_pro-S_from_JCTC_SI.mol2 +140 -0
  66. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mol2/5_duphos_s.mol2 +137 -0
  67. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mol2/6__R_R_-Me-BPE_pro-R_Conformation_1_from_JCTC_SI.mol2 +131 -0
  68. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mol2/6_bpe_r_conf_1.mol2 +128 -0
  69. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mol2/7__R_R_-Me-BPE_pro-R_Conformation_2_from_JCTC_SI.mol2 +131 -0
  70. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mol2/7_bpe_r_conf_2.mol2 +128 -0
  71. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mol2/8__R_R_-Me-BPE_pro-S_Conformation_1_from_JCTC_SI.mol2 +131 -0
  72. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mol2/8_bpe_s_conf_2.mol2 +128 -0
  73. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mol2/9__R_R_-Me-BPE_pro-S_Conformation_2_from_JCTC_SI.mol2 +131 -0
  74. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/mol2/9_bpe_s_conf_2.mol2 +128 -0
  75. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/raw_xyz/1_zdmp.xyz +38 -0
  76. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/raw_xyz/2_dmpe_conf_1.xyz +40 -0
  77. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/raw_xyz/3_dmpe_conf_2.xyz +40 -0
  78. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/raw_xyz/4_duphos_r.xyz +64 -0
  79. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/raw_xyz/5_duphos_s.xyz +64 -0
  80. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/raw_xyz/6_bpe_r_conf_1.xyz +60 -0
  81. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/raw_xyz/7_bpe_r_conf_2.xyz +60 -0
  82. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/raw_xyz/8_bpe_s_conf_2.xyz +60 -0
  83. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/raw_xyz/9_bpe_s_conf_2.xyz +60 -0
  84. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/rh_enamide_training_set.mae +1406 -0
  85. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/rh_enamide_training_set.mmo +16477 -0
  86. q2mm-5.0.0a1/examples/rh-enamide/rh_enamide_training_set/rh_enamide_training_set.mol2 +1067 -0
  87. q2mm-5.0.0a1/examples/rh-enamide/rh_hyd_enamide_seminario.fld +1913 -0
  88. q2mm-5.0.0a1/examples/rh-enamide/rh_hyd_enamide_start.fld +1913 -0
  89. q2mm-5.0.0a1/examples/sn2-test/README.md +61 -0
  90. q2mm-5.0.0a1/examples/sn2-test/compare_direct.py +8 -0
  91. q2mm-5.0.0a1/examples/sn2-test/compare_implementations.py +68 -0
  92. q2mm-5.0.0a1/examples/sn2-test/compare_rh_enamide.py +72 -0
  93. q2mm-5.0.0a1/examples/sn2-test/compute_barrier.py +22 -0
  94. q2mm-5.0.0a1/examples/sn2-test/generate_mm_data.py +119 -0
  95. q2mm-5.0.0a1/examples/sn2-test/generate_qm_data.py +189 -0
  96. q2mm-5.0.0a1/examples/sn2-test/mm-reference/analyze-energy.txt +29 -0
  97. q2mm-5.0.0a1/examples/sn2-test/mm-reference/mm-frequencies.txt +19 -0
  98. q2mm-5.0.0a1/examples/sn2-test/mm-reference/sn2-ts.001 +49 -0
  99. q2mm-5.0.0a1/examples/sn2-test/mm-reference/sn2-ts.002 +49 -0
  100. q2mm-5.0.0a1/examples/sn2-test/mm-reference/sn2-ts.003 +49 -0
  101. q2mm-5.0.0a1/examples/sn2-test/mm-reference/sn2-ts.004 +49 -0
  102. q2mm-5.0.0a1/examples/sn2-test/mm-reference/sn2-ts.005 +49 -0
  103. q2mm-5.0.0a1/examples/sn2-test/mm-reference/sn2-ts.006 +49 -0
  104. q2mm-5.0.0a1/examples/sn2-test/mm-reference/sn2-ts.007 +49 -0
  105. q2mm-5.0.0a1/examples/sn2-test/mm-reference/sn2-ts.008 +49 -0
  106. q2mm-5.0.0a1/examples/sn2-test/mm-reference/sn2-ts.009 +49 -0
  107. q2mm-5.0.0a1/examples/sn2-test/mm-reference/sn2-ts.010 +49 -0
  108. q2mm-5.0.0a1/examples/sn2-test/mm-reference/sn2-ts.011 +49 -0
  109. q2mm-5.0.0a1/examples/sn2-test/mm-reference/sn2-ts.012 +49 -0
  110. q2mm-5.0.0a1/examples/sn2-test/mm-reference/sn2-ts.013 +49 -0
  111. q2mm-5.0.0a1/examples/sn2-test/mm-reference/sn2-ts.014 +49 -0
  112. q2mm-5.0.0a1/examples/sn2-test/mm-reference/sn2-ts.015 +49 -0
  113. q2mm-5.0.0a1/examples/sn2-test/mm-reference/sn2-ts.016 +49 -0
  114. q2mm-5.0.0a1/examples/sn2-test/mm-reference/sn2-ts.017 +49 -0
  115. q2mm-5.0.0a1/examples/sn2-test/mm-reference/sn2-ts.018 +49 -0
  116. q2mm-5.0.0a1/examples/sn2-test/mm-reference/sn2-ts.xyz +7 -0
  117. q2mm-5.0.0a1/examples/sn2-test/mm-reference/vibrate-output.txt +233 -0
  118. q2mm-5.0.0a1/examples/sn2-test/qm-reference/ch3f-energy.txt +2 -0
  119. q2mm-5.0.0a1/examples/sn2-test/qm-reference/ch3f-frequencies.txt +10 -0
  120. q2mm-5.0.0a1/examples/sn2-test/qm-reference/ch3f-hessian.npy +0 -0
  121. q2mm-5.0.0a1/examples/sn2-test/qm-reference/ch3f-optimized.xyz +7 -0
  122. q2mm-5.0.0a1/examples/sn2-test/qm-reference/complex-optimized.xyz +8 -0
  123. q2mm-5.0.0a1/examples/sn2-test/qm-reference/sn2-ts-energy.txt +2 -0
  124. q2mm-5.0.0a1/examples/sn2-test/qm-reference/sn2-ts-frequencies.txt +13 -0
  125. q2mm-5.0.0a1/examples/sn2-test/qm-reference/sn2-ts-hessian.npy +0 -0
  126. q2mm-5.0.0a1/examples/sn2-test/qm-reference/sn2-ts-optimized.xyz +8 -0
  127. q2mm-5.0.0a1/examples/sn2-test/qm-reference/summary.txt +18 -0
  128. q2mm-5.0.0a1/examples/sn2-test/run_tsff_pipeline.py +238 -0
  129. q2mm-5.0.0a1/examples/sn2-test/sn2-ts-guess.xyz +8 -0
  130. q2mm-5.0.0a1/examples/sn2-test/test_backends.py +25 -0
  131. q2mm-5.0.0a1/examples/sn2-test/test_pipeline.py +48 -0
  132. q2mm-5.0.0a1/hooks/pre-commit +26 -0
  133. q2mm-5.0.0a1/mkdocs.yml +55 -0
  134. q2mm-5.0.0a1/pyproject.toml +114 -0
  135. q2mm-5.0.0a1/q2mm/__init__.py +16 -0
  136. q2mm-5.0.0a1/q2mm/backends/__init__.py +1 -0
  137. q2mm-5.0.0a1/q2mm/backends/base.py +101 -0
  138. q2mm-5.0.0a1/q2mm/backends/mm/__init__.py +6 -0
  139. q2mm-5.0.0a1/q2mm/backends/mm/openmm.py +444 -0
  140. q2mm-5.0.0a1/q2mm/backends/mm/tinker.py +382 -0
  141. q2mm-5.0.0a1/q2mm/backends/qm/__init__.py +1 -0
  142. q2mm-5.0.0a1/q2mm/backends/qm/psi4.py +159 -0
  143. q2mm-5.0.0a1/q2mm/constants.py +277 -0
  144. q2mm-5.0.0a1/q2mm/forcefields/__init__.py +22 -0
  145. q2mm-5.0.0a1/q2mm/io/__init__.py +25 -0
  146. q2mm-5.0.0a1/q2mm/linear_algebra.py +128 -0
  147. q2mm-5.0.0a1/q2mm/models/__init__.py +8 -0
  148. q2mm-5.0.0a1/q2mm/models/datum.py +88 -0
  149. q2mm-5.0.0a1/q2mm/models/ff_io.py +363 -0
  150. q2mm-5.0.0a1/q2mm/models/forcefield.py +668 -0
  151. q2mm-5.0.0a1/q2mm/models/hessian.py +192 -0
  152. q2mm-5.0.0a1/q2mm/models/identifiers.py +145 -0
  153. q2mm-5.0.0a1/q2mm/models/molecule.py +364 -0
  154. q2mm-5.0.0a1/q2mm/models/param.py +299 -0
  155. q2mm-5.0.0a1/q2mm/models/seminario.py +385 -0
  156. q2mm-5.0.0a1/q2mm/optimizers/__init__.py +20 -0
  157. q2mm-5.0.0a1/q2mm/optimizers/defaults.py +52 -0
  158. q2mm-5.0.0a1/q2mm/optimizers/objective.py +413 -0
  159. q2mm-5.0.0a1/q2mm/optimizers/scipy_opt.py +271 -0
  160. q2mm-5.0.0a1/q2mm/optimizers/scoring.py +222 -0
  161. q2mm-5.0.0a1/q2mm/parsers/__init__.py +54 -0
  162. q2mm-5.0.0a1/q2mm/parsers/_patterns.py +51 -0
  163. q2mm-5.0.0a1/q2mm/parsers/amber_ff.py +290 -0
  164. q2mm-5.0.0a1/q2mm/parsers/base.py +86 -0
  165. q2mm-5.0.0a1/q2mm/parsers/gaussian.py +694 -0
  166. q2mm-5.0.0a1/q2mm/parsers/jaguar.py +256 -0
  167. q2mm-5.0.0a1/q2mm/parsers/macromodel.py +383 -0
  168. q2mm-5.0.0a1/q2mm/parsers/mm3.py +932 -0
  169. q2mm-5.0.0a1/q2mm/parsers/mol2.py +217 -0
  170. q2mm-5.0.0a1/q2mm/parsers/structures.py +732 -0
  171. q2mm-5.0.0a1/q2mm/parsers/tinker_ff.py +427 -0
  172. q2mm-5.0.0a1/q2mm/utilities.py +83 -0
  173. q2mm-5.0.0a1/q2mm.egg-info/PKG-INFO +110 -0
  174. q2mm-5.0.0a1/q2mm.egg-info/SOURCES.txt +201 -0
  175. q2mm-5.0.0a1/q2mm.egg-info/dependency_links.txt +1 -0
  176. q2mm-5.0.0a1/q2mm.egg-info/requires.txt +24 -0
  177. q2mm-5.0.0a1/q2mm.egg-info/top_level.txt +1 -0
  178. q2mm-5.0.0a1/scripts/generate_benchmarks.py +208 -0
  179. q2mm-5.0.0a1/scripts/generate_optimization_fixtures.py +124 -0
  180. q2mm-5.0.0a1/scripts/regenerate_parity_fixtures.py +362 -0
  181. q2mm-5.0.0a1/scripts/setup_upstream_worktree.ps1 +45 -0
  182. q2mm-5.0.0a1/scripts/setup_upstream_worktree.sh +49 -0
  183. q2mm-5.0.0a1/scripts/validate_against_upstream.ps1 +39 -0
  184. q2mm-5.0.0a1/scripts/validate_against_upstream.py +675 -0
  185. q2mm-5.0.0a1/setup.cfg +4 -0
  186. q2mm-5.0.0a1/test/__init__.py +0 -0
  187. q2mm-5.0.0a1/test/fixtures/optimization_golden.json +25 -0
  188. q2mm-5.0.0a1/test/fixtures/seminario_parity/rh_enamide_reference.json +405 -0
  189. q2mm-5.0.0a1/test/fixtures/seminario_parity/sn2_reference.json +68 -0
  190. q2mm-5.0.0a1/test/integration/__init__.py +0 -0
  191. q2mm-5.0.0a1/test/integration/test_openmm_backend.py +240 -0
  192. q2mm-5.0.0a1/test/integration/test_optimization_validation.py +675 -0
  193. q2mm-5.0.0a1/test/integration/test_pipeline.py +126 -0
  194. q2mm-5.0.0a1/test/integration/test_psi4_backend.py +106 -0
  195. q2mm-5.0.0a1/test/integration/test_scipy_optimizer.py +350 -0
  196. q2mm-5.0.0a1/test/integration/test_seminario_parity.py +189 -0
  197. q2mm-5.0.0a1/test/integration/test_tinker_backend.py +106 -0
  198. q2mm-5.0.0a1/test/test_datatypes.py +48 -0
  199. q2mm-5.0.0a1/test/test_ffs.py +64 -0
  200. q2mm-5.0.0a1/test/test_linear_algebra.py +124 -0
  201. q2mm-5.0.0a1/test/test_models.py +525 -0
  202. q2mm-5.0.0a1/test/test_seminario.py +99 -0
  203. q2mm-5.0.0a1/test/test_utilities.py +65 -0
@@ -0,0 +1,32 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [master]
6
+ pull_request:
7
+ branches: [master]
8
+
9
+ jobs:
10
+ lint:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ - uses: actions/setup-python@v5
15
+ with:
16
+ python-version: "3.12"
17
+ - run: python -m pip install -e ".[dev]"
18
+ - run: python -m ruff check q2mm/ test/ scripts/
19
+ - run: python -m ruff format --check q2mm test scripts examples
20
+
21
+ test:
22
+ runs-on: ubuntu-latest
23
+ strategy:
24
+ matrix:
25
+ python-version: ["3.10", "3.11", "3.12", "3.13"]
26
+ steps:
27
+ - uses: actions/checkout@v4
28
+ - uses: actions/setup-python@v5
29
+ with:
30
+ python-version: ${{ matrix.python-version }}
31
+ - run: python -m pip install -e ".[dev]"
32
+ - run: python -m pytest -v
@@ -0,0 +1,28 @@
1
+ name: docs
2
+ on:
3
+ push:
4
+ branches:
5
+ - master
6
+ permissions:
7
+ contents: write
8
+ jobs:
9
+ deploy:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - name: Configure Git Credentials
14
+ run: |
15
+ git config user.name github-actions[bot]
16
+ git config user.email 41898282+github-actions[bot]@users.noreply.github.com
17
+ - uses: actions/setup-python@v5
18
+ with:
19
+ python-version: "3.12"
20
+ - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
21
+ - uses: actions/cache@v4
22
+ with:
23
+ key: mkdocs-material-${{ env.cache_id }}
24
+ path: ~/.cache
25
+ restore-keys: |
26
+ mkdocs-material-
27
+ - run: pip install mkdocs-material
28
+ - run: mkdocs gh-deploy --force
@@ -0,0 +1,95 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ permissions:
9
+ contents: write
10
+
11
+ jobs:
12
+ build:
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ with:
17
+ fetch-depth: 0 # setuptools-scm needs full history
18
+
19
+ - uses: actions/setup-python@v5
20
+ with:
21
+ python-version: "3.12"
22
+
23
+ - name: Install build tools
24
+ run: python -m pip install build
25
+
26
+ - name: Build sdist and wheel
27
+ run: python -m build
28
+
29
+ - name: Verify version matches tag
30
+ run: |
31
+ TAG="${GITHUB_REF#refs/tags/v}"
32
+ PKG_VERSION=$(python -c "import os; print(next(f[5:-7] for f in os.listdir('dist') if f.startswith('q2mm-') and f.endswith('.tar.gz')))")
33
+ echo "Tag version: $TAG"
34
+ echo "Package version: $PKG_VERSION"
35
+ if [ "$TAG" != "$PKG_VERSION" ]; then
36
+ echo "ERROR: Tag v$TAG does not match package version $PKG_VERSION"
37
+ exit 1
38
+ fi
39
+
40
+ - name: Upload distributions
41
+ uses: actions/upload-artifact@v4
42
+ with:
43
+ name: release-dists
44
+ path: dist/
45
+
46
+ github-release:
47
+ runs-on: ubuntu-latest
48
+ needs: build
49
+
50
+ steps:
51
+ - name: Determine if pre-release
52
+ id: prerelease
53
+ run: |
54
+ TAG="${GITHUB_REF#refs/tags/}"
55
+ if echo "$TAG" | grep -qE '(a|b|rc|dev|alpha|beta)'; then
56
+ echo "is_prerelease=true" >> "$GITHUB_OUTPUT"
57
+ echo "$TAG is a pre-release"
58
+ else
59
+ echo "is_prerelease=false" >> "$GITHUB_OUTPUT"
60
+ echo "$TAG is a stable release"
61
+ fi
62
+
63
+ - name: Retrieve release distributions
64
+ uses: actions/download-artifact@v4
65
+ with:
66
+ name: release-dists
67
+ path: dist/
68
+
69
+ - name: Create GitHub Release
70
+ uses: softprops/action-gh-release@v2
71
+ with:
72
+ generate_release_notes: true
73
+ prerelease: ${{ steps.prerelease.outputs.is_prerelease }}
74
+ files: dist/*
75
+
76
+ pypi-publish:
77
+ runs-on: ubuntu-latest
78
+ needs: build
79
+
80
+ permissions:
81
+ id-token: write
82
+
83
+ environment:
84
+ name: pypi
85
+ url: https://pypi.org/p/q2mm
86
+
87
+ steps:
88
+ - name: Retrieve release distributions
89
+ uses: actions/download-artifact@v4
90
+ with:
91
+ name: release-dists
92
+ path: dist/
93
+
94
+ - name: Publish to PyPI
95
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,60 @@
1
+ # ── Q2MM runtime artifacts ──────────────────────────────────
2
+ timer.dat
3
+ root.log
4
+
5
+ # ── Generated Psi4 logs (large, regenerated by generate_qm_data.py) ──
6
+ examples/sn2-test/qm-reference/psi4-output*.dat
7
+
8
+ # ── Python ──────────────────────────────────────────────────
9
+ __pycache__/
10
+ *.py[cod]
11
+ *$py.class
12
+ *.so
13
+ *.egg-info/
14
+ *.egg
15
+ dist/
16
+ build/
17
+ *.manifest
18
+ *.spec
19
+ .installed.cfg
20
+ MANIFEST
21
+
22
+ # ── Virtual environments ───────────────────────────────────
23
+ .env
24
+ .venv
25
+ env/
26
+ venv/
27
+ ENV/
28
+
29
+ # ── Testing / coverage ────────────────────────────────────
30
+ .pytest_cache/
31
+ htmlcov/
32
+ .coverage
33
+ .coverage.*
34
+ coverage.xml
35
+ .tox/
36
+ .nox/
37
+ .hypothesis/
38
+
39
+ # ── Type checking ─────────────────────────────────────────
40
+ .mypy_cache/
41
+ .dmypy.json
42
+ .pyre/
43
+
44
+ # ── Editors / IDEs ────────────────────────────────────────
45
+ .idea/
46
+ *.swp
47
+ *.swo
48
+ *~
49
+
50
+ # ── OS files ──────────────────────────────────────────────
51
+ .DS_Store
52
+ Thumbs.db
53
+ Desktop.ini
54
+ $RECYCLE.BIN/
55
+
56
+ # ── MkDocs ────────────────────────────────────────────────
57
+ /site/
58
+
59
+ # ── Jupyter ───────────────────────────────────────────────
60
+ .ipynb_checkpoints/
@@ -0,0 +1,53 @@
1
+ {
2
+ "version": "0.2.0",
3
+ "configurations": [
4
+ {
5
+ "name": "Run SN2 Pipeline",
6
+ "type": "debugpy",
7
+ "request": "launch",
8
+ "program": "${workspaceFolder}/examples/sn2-test/run_tsff_pipeline.py",
9
+ "console": "integratedTerminal",
10
+ "cwd": "${workspaceFolder}",
11
+ "justMyCode": false
12
+ },
13
+ {
14
+ "name": "Run Tests",
15
+ "type": "debugpy",
16
+ "request": "launch",
17
+ "module": "pytest",
18
+ "args": ["-v", "--tb=short"],
19
+ "console": "integratedTerminal",
20
+ "cwd": "${workspaceFolder}",
21
+ "justMyCode": false
22
+ },
23
+ {
24
+ "name": "Run Tests (current file)",
25
+ "type": "debugpy",
26
+ "request": "launch",
27
+ "module": "pytest",
28
+ "args": ["-v", "${file}"],
29
+ "console": "integratedTerminal",
30
+ "cwd": "${workspaceFolder}",
31
+ "justMyCode": false
32
+ },
33
+ {
34
+ "name": "Generate Benchmarks",
35
+ "type": "debugpy",
36
+ "request": "launch",
37
+ "program": "${workspaceFolder}/scripts/generate_benchmarks.py",
38
+ "console": "integratedTerminal",
39
+ "cwd": "${workspaceFolder}",
40
+ "justMyCode": false
41
+ },
42
+ {
43
+ "name": "Validate vs Upstream",
44
+ "type": "debugpy",
45
+ "request": "launch",
46
+ "program": "${workspaceFolder}/scripts/validate_against_upstream.py",
47
+ "args": ["--mode", "both"],
48
+ "console": "integratedTerminal",
49
+ "cwd": "${workspaceFolder}",
50
+ "justMyCode": false
51
+ }
52
+ ]
53
+ }
q2mm-5.0.0a1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2017 Eric C. Hansen
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
q2mm-5.0.0a1/PKG-INFO ADDED
@@ -0,0 +1,110 @@
1
+ Metadata-Version: 2.4
2
+ Name: q2mm
3
+ Version: 5.0.0a1
4
+ Summary: Quantum-guided molecular mechanics force field optimization
5
+ Author: Eric Hansen
6
+ License: BSD-3-Clause
7
+ Project-URL: Homepage, https://github.com/ericchansen/q2mm
8
+ Project-URL: Documentation, https://ericchansen.github.io/q2mm/
9
+ Keywords: force-field,molecular-mechanics,optimization,transition-state,computational-chemistry,Q2MM,OpenMM
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Intended Audience :: Science/Research
12
+ Classifier: License :: OSI Approved :: BSD License
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Scientific/Engineering :: Chemistry
20
+ Requires-Python: >=3.10
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ Requires-Dist: numpy
24
+ Provides-Extra: amber
25
+ Requires-Dist: parmed; extra == "amber"
26
+ Provides-Extra: openmm
27
+ Requires-Dist: openmm; extra == "openmm"
28
+ Provides-Extra: qcel
29
+ Requires-Dist: qcelemental; extra == "qcel"
30
+ Provides-Extra: dev
31
+ Requires-Dist: pytest; extra == "dev"
32
+ Requires-Dist: ruff; extra == "dev"
33
+ Requires-Dist: qcelemental; extra == "dev"
34
+ Requires-Dist: build; extra == "dev"
35
+ Provides-Extra: docs
36
+ Requires-Dist: mkdocs-material; extra == "docs"
37
+ Provides-Extra: all
38
+ Requires-Dist: openmm; extra == "all"
39
+ Requires-Dist: parmed; extra == "all"
40
+ Requires-Dist: qcelemental; extra == "all"
41
+ Dynamic: license-file
42
+
43
+ # Q2MM
44
+
45
+ **Quantum-guided molecular mechanics force field optimization.**
46
+
47
+ [![CI](https://github.com/ericchansen/q2mm/actions/workflows/ci.yml/badge.svg)](https://github.com/ericchansen/q2mm/actions/workflows/ci.yml)
48
+
49
+ Q2MM optimizes molecular mechanics (MM) force field parameters by minimizing
50
+ the difference between MM-calculated properties and quantum mechanics (QM)
51
+ reference data. It is designed for building **transition state force fields
52
+ (TSFFs)** that enable rapid virtual screening of enantioselective catalysts.
53
+
54
+ **📖 [Documentation](https://ericchansen.github.io/q2mm/)**
55
+
56
+ ## Why Q2MM?
57
+
58
+ - **Hessian-informed initialization** — the Seminario method extracts bond and
59
+ angle force constants directly from QM Hessians, providing excellent starting
60
+ parameters before optimization begins.
61
+ - **Open-source backends** — first-class support for [OpenMM](https://openmm.org/)
62
+ and [Psi4](https://psicode.org/) alongside commercial packages (Gaussian,
63
+ Schrödinger, Tinker).
64
+ - **Clean, modular architecture** — format-agnostic data models (`ForceField`,
65
+ `Q2MMMolecule`) decouple algorithms from file formats.
66
+ - **Modern optimization** — powered by `scipy.optimize` with L-BFGS-B,
67
+ Nelder-Mead, trust-region, and Levenberg-Marquardt methods.
68
+ - **Transition state support** — negative force constants, torsion parameters,
69
+ and proper eigenvalue handling for saddle-point geometries.
70
+
71
+ ## Quick Start
72
+
73
+ ```bash
74
+ pip install -e .
75
+ ```
76
+
77
+ ```python
78
+ import numpy as np
79
+ from q2mm.models.molecule import Q2MMMolecule
80
+ from q2mm.models.seminario import estimate_force_constants
81
+
82
+ # Load QM data (coordinates + Hessian from your QM package)
83
+ mol = Q2MMMolecule.from_xyz("ts-optimized.xyz")
84
+ mol.hessian = np.load("ts-hessian.npy") # Hartree/Bohr²
85
+
86
+ # Estimate force constants from the QM Hessian (Seminario method)
87
+ ff = estimate_force_constants(mol, au_hessian=True)
88
+
89
+ print(f"Bonds: {len(ff.bonds)}, Angles: {len(ff.angles)}")
90
+ for b in ff.bonds:
91
+ print(f" {b.elements}: k={b.force_constant:.3f} mdyn/Ã…")
92
+ ```
93
+
94
+ See the [Tutorial](https://ericchansen.github.io/q2mm/tutorial/) for a
95
+ complete end-to-end workflow.
96
+
97
+ ## Supported Backends
98
+
99
+ | Backend | Type | License |
100
+ |---------|------|---------|
101
+ | **OpenMM** | MM | MIT |
102
+ | **Psi4** | QM | BSD-3 |
103
+ | **Tinker** | MM | Free (academic) |
104
+ | **Gaussian** | QM | Commercial |
105
+ | **Schrödinger** | QM/MM | Commercial |
106
+
107
+ ## License
108
+
109
+ BSD-3-Clause. See [LICENSE](LICENSE).
110
+
q2mm-5.0.0a1/README.md ADDED
@@ -0,0 +1,68 @@
1
+ # Q2MM
2
+
3
+ **Quantum-guided molecular mechanics force field optimization.**
4
+
5
+ [![CI](https://github.com/ericchansen/q2mm/actions/workflows/ci.yml/badge.svg)](https://github.com/ericchansen/q2mm/actions/workflows/ci.yml)
6
+
7
+ Q2MM optimizes molecular mechanics (MM) force field parameters by minimizing
8
+ the difference between MM-calculated properties and quantum mechanics (QM)
9
+ reference data. It is designed for building **transition state force fields
10
+ (TSFFs)** that enable rapid virtual screening of enantioselective catalysts.
11
+
12
+ **📖 [Documentation](https://ericchansen.github.io/q2mm/)**
13
+
14
+ ## Why Q2MM?
15
+
16
+ - **Hessian-informed initialization** — the Seminario method extracts bond and
17
+ angle force constants directly from QM Hessians, providing excellent starting
18
+ parameters before optimization begins.
19
+ - **Open-source backends** — first-class support for [OpenMM](https://openmm.org/)
20
+ and [Psi4](https://psicode.org/) alongside commercial packages (Gaussian,
21
+ Schrödinger, Tinker).
22
+ - **Clean, modular architecture** — format-agnostic data models (`ForceField`,
23
+ `Q2MMMolecule`) decouple algorithms from file formats.
24
+ - **Modern optimization** — powered by `scipy.optimize` with L-BFGS-B,
25
+ Nelder-Mead, trust-region, and Levenberg-Marquardt methods.
26
+ - **Transition state support** — negative force constants, torsion parameters,
27
+ and proper eigenvalue handling for saddle-point geometries.
28
+
29
+ ## Quick Start
30
+
31
+ ```bash
32
+ pip install -e .
33
+ ```
34
+
35
+ ```python
36
+ import numpy as np
37
+ from q2mm.models.molecule import Q2MMMolecule
38
+ from q2mm.models.seminario import estimate_force_constants
39
+
40
+ # Load QM data (coordinates + Hessian from your QM package)
41
+ mol = Q2MMMolecule.from_xyz("ts-optimized.xyz")
42
+ mol.hessian = np.load("ts-hessian.npy") # Hartree/Bohr²
43
+
44
+ # Estimate force constants from the QM Hessian (Seminario method)
45
+ ff = estimate_force_constants(mol, au_hessian=True)
46
+
47
+ print(f"Bonds: {len(ff.bonds)}, Angles: {len(ff.angles)}")
48
+ for b in ff.bonds:
49
+ print(f" {b.elements}: k={b.force_constant:.3f} mdyn/Ã…")
50
+ ```
51
+
52
+ See the [Tutorial](https://ericchansen.github.io/q2mm/tutorial/) for a
53
+ complete end-to-end workflow.
54
+
55
+ ## Supported Backends
56
+
57
+ | Backend | Type | License |
58
+ |---------|------|---------|
59
+ | **OpenMM** | MM | MIT |
60
+ | **Psi4** | QM | BSD-3 |
61
+ | **Tinker** | MM | Free (academic) |
62
+ | **Gaussian** | QM | Commercial |
63
+ | **Schrödinger** | QM/MM | Commercial |
64
+
65
+ ## License
66
+
67
+ BSD-3-Clause. See [LICENSE](LICENSE).
68
+