chemistrykit 0.1.0__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 (299) hide show
  1. chemistrykit-0.1.0/LICENSE +21 -0
  2. chemistrykit-0.1.0/PKG-INFO +200 -0
  3. chemistrykit-0.1.0/README.md +150 -0
  4. chemistrykit-0.1.0/chemistrykit/__init__.py +69 -0
  5. chemistrykit-0.1.0/chemistrykit/analytical/__init__.py +61 -0
  6. chemistrykit-0.1.0/chemistrykit/analytical/core/__init__.py +0 -0
  7. chemistrykit-0.1.0/chemistrykit/analytical/core/base_system.py +118 -0
  8. chemistrykit-0.1.0/chemistrykit/analytical/systems/__init__.py +0 -0
  9. chemistrykit-0.1.0/chemistrykit/analytical/systems/calibration.py +131 -0
  10. chemistrykit-0.1.0/chemistrykit/analytical/systems/chromatography.py +317 -0
  11. chemistrykit-0.1.0/chemistrykit/analytical/systems/qtest.py +128 -0
  12. chemistrykit-0.1.0/chemistrykit/analytical/systems/titration.py +240 -0
  13. chemistrykit-0.1.0/chemistrykit/analytical/systems/uncertainty.py +189 -0
  14. chemistrykit-0.1.0/chemistrykit/analytical/tests/__init__.py +0 -0
  15. chemistrykit-0.1.0/chemistrykit/analytical/tests/test_calibration.py +49 -0
  16. chemistrykit-0.1.0/chemistrykit/analytical/tests/test_chromatography.py +77 -0
  17. chemistrykit-0.1.0/chemistrykit/analytical/tests/test_qtest.py +66 -0
  18. chemistrykit-0.1.0/chemistrykit/analytical/tests/test_titration.py +83 -0
  19. chemistrykit-0.1.0/chemistrykit/analytical/tests/test_uncertainty.py +54 -0
  20. chemistrykit-0.1.0/chemistrykit/analytical/tests/test_visualizers.py +56 -0
  21. chemistrykit-0.1.0/chemistrykit/analytical/utils/__init__.py +0 -0
  22. chemistrykit-0.1.0/chemistrykit/analytical/utils/regression.py +67 -0
  23. chemistrykit-0.1.0/chemistrykit/analytical/visualizers/__init__.py +0 -0
  24. chemistrykit-0.1.0/chemistrykit/analytical/visualizers/analytical_plots.py +129 -0
  25. chemistrykit-0.1.0/chemistrykit/constants.py +208 -0
  26. chemistrykit-0.1.0/chemistrykit/crystal/__init__.py +50 -0
  27. chemistrykit-0.1.0/chemistrykit/crystal/core/__init__.py +0 -0
  28. chemistrykit-0.1.0/chemistrykit/crystal/core/base_system.py +165 -0
  29. chemistrykit-0.1.0/chemistrykit/crystal/systems/__init__.py +0 -0
  30. chemistrykit-0.1.0/chemistrykit/crystal/systems/crystal_systems.py +158 -0
  31. chemistrykit-0.1.0/chemistrykit/crystal/systems/defects.py +125 -0
  32. chemistrykit-0.1.0/chemistrykit/crystal/systems/lattice_energy.py +150 -0
  33. chemistrykit-0.1.0/chemistrykit/crystal/systems/madelung.py +96 -0
  34. chemistrykit-0.1.0/chemistrykit/crystal/systems/packing.py +166 -0
  35. chemistrykit-0.1.0/chemistrykit/crystal/systems/xrd.py +222 -0
  36. chemistrykit-0.1.0/chemistrykit/crystal/tests/__init__.py +0 -0
  37. chemistrykit-0.1.0/chemistrykit/crystal/tests/test_crystal_systems.py +39 -0
  38. chemistrykit-0.1.0/chemistrykit/crystal/tests/test_defects.py +54 -0
  39. chemistrykit-0.1.0/chemistrykit/crystal/tests/test_lattice_energy.py +54 -0
  40. chemistrykit-0.1.0/chemistrykit/crystal/tests/test_madelung.py +41 -0
  41. chemistrykit-0.1.0/chemistrykit/crystal/tests/test_packing.py +73 -0
  42. chemistrykit-0.1.0/chemistrykit/crystal/tests/test_visualizers.py +43 -0
  43. chemistrykit-0.1.0/chemistrykit/crystal/tests/test_xrd.py +90 -0
  44. chemistrykit-0.1.0/chemistrykit/crystal/utils/__init__.py +0 -0
  45. chemistrykit-0.1.0/chemistrykit/crystal/utils/lattice_sums.py +89 -0
  46. chemistrykit-0.1.0/chemistrykit/crystal/utils/reference_data.py +84 -0
  47. chemistrykit-0.1.0/chemistrykit/crystal/visualizers/__init__.py +0 -0
  48. chemistrykit-0.1.0/chemistrykit/crystal/visualizers/crystal_plots.py +118 -0
  49. chemistrykit-0.1.0/chemistrykit/electrochem/__init__.py +76 -0
  50. chemistrykit-0.1.0/chemistrykit/electrochem/core/__init__.py +0 -0
  51. chemistrykit-0.1.0/chemistrykit/electrochem/core/base_system.py +117 -0
  52. chemistrykit-0.1.0/chemistrykit/electrochem/systems/__init__.py +0 -0
  53. chemistrykit-0.1.0/chemistrykit/electrochem/systems/battery.py +183 -0
  54. chemistrykit-0.1.0/chemistrykit/electrochem/systems/butler_volmer.py +306 -0
  55. chemistrykit-0.1.0/chemistrykit/electrochem/systems/electrolysis.py +214 -0
  56. chemistrykit-0.1.0/chemistrykit/electrochem/systems/nernst.py +268 -0
  57. chemistrykit-0.1.0/chemistrykit/electrochem/systems/standard_potentials.py +221 -0
  58. chemistrykit-0.1.0/chemistrykit/electrochem/tests/__init__.py +0 -0
  59. chemistrykit-0.1.0/chemistrykit/electrochem/tests/test_battery.py +68 -0
  60. chemistrykit-0.1.0/chemistrykit/electrochem/tests/test_butler_volmer.py +84 -0
  61. chemistrykit-0.1.0/chemistrykit/electrochem/tests/test_electrolysis.py +61 -0
  62. chemistrykit-0.1.0/chemistrykit/electrochem/tests/test_nernst.py +83 -0
  63. chemistrykit-0.1.0/chemistrykit/electrochem/tests/test_standard_potentials.py +58 -0
  64. chemistrykit-0.1.0/chemistrykit/electrochem/tests/test_visualizers.py +42 -0
  65. chemistrykit-0.1.0/chemistrykit/electrochem/utils/__init__.py +0 -0
  66. chemistrykit-0.1.0/chemistrykit/electrochem/utils/regression.py +57 -0
  67. chemistrykit-0.1.0/chemistrykit/electrochem/visualizers/__init__.py +0 -0
  68. chemistrykit-0.1.0/chemistrykit/electrochem/visualizers/electrochem_plots.py +121 -0
  69. chemistrykit-0.1.0/chemistrykit/integrators/__init__.py +55 -0
  70. chemistrykit-0.1.0/chemistrykit/integrators/adaptive.py +201 -0
  71. chemistrykit-0.1.0/chemistrykit/integrators/fixed_step.py +352 -0
  72. chemistrykit-0.1.0/chemistrykit/integrators/tests/__init__.py +0 -0
  73. chemistrykit-0.1.0/chemistrykit/integrators/tests/test_integrators.py +114 -0
  74. chemistrykit-0.1.0/chemistrykit/kinetics/__init__.py +55 -0
  75. chemistrykit-0.1.0/chemistrykit/kinetics/core/__init__.py +0 -0
  76. chemistrykit-0.1.0/chemistrykit/kinetics/core/base_system.py +247 -0
  77. chemistrykit-0.1.0/chemistrykit/kinetics/core/integrators.py +28 -0
  78. chemistrykit-0.1.0/chemistrykit/kinetics/systems/__init__.py +0 -0
  79. chemistrykit-0.1.0/chemistrykit/kinetics/systems/arrhenius.py +120 -0
  80. chemistrykit-0.1.0/chemistrykit/kinetics/systems/enzyme.py +269 -0
  81. chemistrykit-0.1.0/chemistrykit/kinetics/systems/networks.py +362 -0
  82. chemistrykit-0.1.0/chemistrykit/kinetics/systems/oscillators.py +131 -0
  83. chemistrykit-0.1.0/chemistrykit/kinetics/systems/rate_laws.py +192 -0
  84. chemistrykit-0.1.0/chemistrykit/kinetics/tests/__init__.py +0 -0
  85. chemistrykit-0.1.0/chemistrykit/kinetics/tests/test_arrhenius.py +48 -0
  86. chemistrykit-0.1.0/chemistrykit/kinetics/tests/test_enzyme.py +89 -0
  87. chemistrykit-0.1.0/chemistrykit/kinetics/tests/test_networks.py +102 -0
  88. chemistrykit-0.1.0/chemistrykit/kinetics/tests/test_oscillators.py +48 -0
  89. chemistrykit-0.1.0/chemistrykit/kinetics/tests/test_rate_laws.py +69 -0
  90. chemistrykit-0.1.0/chemistrykit/kinetics/tests/test_visualizers.py +57 -0
  91. chemistrykit-0.1.0/chemistrykit/kinetics/utils/__init__.py +0 -0
  92. chemistrykit-0.1.0/chemistrykit/kinetics/utils/linear_regression.py +56 -0
  93. chemistrykit-0.1.0/chemistrykit/kinetics/visualizers/__init__.py +0 -0
  94. chemistrykit-0.1.0/chemistrykit/kinetics/visualizers/kinetics_plots.py +147 -0
  95. chemistrykit-0.1.0/chemistrykit/md/__init__.py +57 -0
  96. chemistrykit-0.1.0/chemistrykit/md/core/__init__.py +1 -0
  97. chemistrykit-0.1.0/chemistrykit/md/core/base_system.py +363 -0
  98. chemistrykit-0.1.0/chemistrykit/md/systems/__init__.py +2 -0
  99. chemistrykit-0.1.0/chemistrykit/md/systems/lj_fluid.py +466 -0
  100. chemistrykit-0.1.0/chemistrykit/md/systems/pair_potentials.py +550 -0
  101. chemistrykit-0.1.0/chemistrykit/md/systems/thermostats.py +172 -0
  102. chemistrykit-0.1.0/chemistrykit/md/tests/__init__.py +0 -0
  103. chemistrykit-0.1.0/chemistrykit/md/tests/test_lj_fluid.py +108 -0
  104. chemistrykit-0.1.0/chemistrykit/md/tests/test_pair_potentials.py +198 -0
  105. chemistrykit-0.1.0/chemistrykit/md/tests/test_pbc.py +77 -0
  106. chemistrykit-0.1.0/chemistrykit/md/tests/test_thermostats.py +55 -0
  107. chemistrykit-0.1.0/chemistrykit/md/tests/test_visualizers.py +47 -0
  108. chemistrykit-0.1.0/chemistrykit/md/utils/__init__.py +1 -0
  109. chemistrykit-0.1.0/chemistrykit/md/utils/neighbor_list.py +123 -0
  110. chemistrykit-0.1.0/chemistrykit/md/utils/pbc.py +88 -0
  111. chemistrykit-0.1.0/chemistrykit/md/visualizers/__init__.py +2 -0
  112. chemistrykit-0.1.0/chemistrykit/md/visualizers/md_plots.py +146 -0
  113. chemistrykit-0.1.0/chemistrykit/periodic_table.py +341 -0
  114. chemistrykit-0.1.0/chemistrykit/photochem/__init__.py +58 -0
  115. chemistrykit-0.1.0/chemistrykit/photochem/core/__init__.py +0 -0
  116. chemistrykit-0.1.0/chemistrykit/photochem/core/base_system.py +54 -0
  117. chemistrykit-0.1.0/chemistrykit/photochem/systems/__init__.py +0 -0
  118. chemistrykit-0.1.0/chemistrykit/photochem/systems/jablonski.py +157 -0
  119. chemistrykit-0.1.0/chemistrykit/photochem/systems/photostationary_state.py +186 -0
  120. chemistrykit-0.1.0/chemistrykit/photochem/systems/quantum_yield.py +226 -0
  121. chemistrykit-0.1.0/chemistrykit/photochem/systems/stern_volmer.py +224 -0
  122. chemistrykit-0.1.0/chemistrykit/photochem/tests/__init__.py +0 -0
  123. chemistrykit-0.1.0/chemistrykit/photochem/tests/test_jablonski.py +56 -0
  124. chemistrykit-0.1.0/chemistrykit/photochem/tests/test_photostationary_state.py +75 -0
  125. chemistrykit-0.1.0/chemistrykit/photochem/tests/test_quantum_yield.py +69 -0
  126. chemistrykit-0.1.0/chemistrykit/photochem/tests/test_stern_volmer.py +71 -0
  127. chemistrykit-0.1.0/chemistrykit/photochem/tests/test_visualizers.py +41 -0
  128. chemistrykit-0.1.0/chemistrykit/photochem/utils/__init__.py +0 -0
  129. chemistrykit-0.1.0/chemistrykit/photochem/utils/regression.py +56 -0
  130. chemistrykit-0.1.0/chemistrykit/photochem/visualizers/__init__.py +0 -0
  131. chemistrykit-0.1.0/chemistrykit/photochem/visualizers/photochem_plots.py +109 -0
  132. chemistrykit-0.1.0/chemistrykit/polymer/__init__.py +70 -0
  133. chemistrykit-0.1.0/chemistrykit/polymer/core/__init__.py +0 -0
  134. chemistrykit-0.1.0/chemistrykit/polymer/core/base_system.py +106 -0
  135. chemistrykit-0.1.0/chemistrykit/polymer/systems/__init__.py +0 -0
  136. chemistrykit-0.1.0/chemistrykit/polymer/systems/chain_growth.py +253 -0
  137. chemistrykit-0.1.0/chemistrykit/polymer/systems/chain_statistics.py +222 -0
  138. chemistrykit-0.1.0/chemistrykit/polymer/systems/molecular_weight_distribution.py +293 -0
  139. chemistrykit-0.1.0/chemistrykit/polymer/systems/step_growth.py +145 -0
  140. chemistrykit-0.1.0/chemistrykit/polymer/tests/__init__.py +0 -0
  141. chemistrykit-0.1.0/chemistrykit/polymer/tests/test_chain_growth.py +90 -0
  142. chemistrykit-0.1.0/chemistrykit/polymer/tests/test_chain_statistics.py +97 -0
  143. chemistrykit-0.1.0/chemistrykit/polymer/tests/test_molecular_weight_distribution.py +94 -0
  144. chemistrykit-0.1.0/chemistrykit/polymer/tests/test_step_growth.py +36 -0
  145. chemistrykit-0.1.0/chemistrykit/polymer/tests/test_visualizers.py +47 -0
  146. chemistrykit-0.1.0/chemistrykit/polymer/utils/__init__.py +0 -0
  147. chemistrykit-0.1.0/chemistrykit/polymer/utils/moments.py +84 -0
  148. chemistrykit-0.1.0/chemistrykit/polymer/visualizers/__init__.py +0 -0
  149. chemistrykit-0.1.0/chemistrykit/polymer/visualizers/polymer_plots.py +134 -0
  150. chemistrykit-0.1.0/chemistrykit/quantum/__init__.py +72 -0
  151. chemistrykit-0.1.0/chemistrykit/quantum/core/__init__.py +0 -0
  152. chemistrykit-0.1.0/chemistrykit/quantum/core/base_system.py +194 -0
  153. chemistrykit-0.1.0/chemistrykit/quantum/systems/__init__.py +0 -0
  154. chemistrykit-0.1.0/chemistrykit/quantum/systems/harmonic_oscillator.py +281 -0
  155. chemistrykit-0.1.0/chemistrykit/quantum/systems/hartree_fock.py +242 -0
  156. chemistrykit-0.1.0/chemistrykit/quantum/systems/huckel.py +342 -0
  157. chemistrykit-0.1.0/chemistrykit/quantum/systems/hydrogenlike.py +260 -0
  158. chemistrykit-0.1.0/chemistrykit/quantum/systems/particle_in_box.py +287 -0
  159. chemistrykit-0.1.0/chemistrykit/quantum/systems/perturbation.py +258 -0
  160. chemistrykit-0.1.0/chemistrykit/quantum/systems/rigid_rotor.py +146 -0
  161. chemistrykit-0.1.0/chemistrykit/quantum/tests/__init__.py +0 -0
  162. chemistrykit-0.1.0/chemistrykit/quantum/tests/test_harmonic_oscillator.py +99 -0
  163. chemistrykit-0.1.0/chemistrykit/quantum/tests/test_hartree_fock.py +78 -0
  164. chemistrykit-0.1.0/chemistrykit/quantum/tests/test_huckel.py +112 -0
  165. chemistrykit-0.1.0/chemistrykit/quantum/tests/test_hydrogenlike.py +98 -0
  166. chemistrykit-0.1.0/chemistrykit/quantum/tests/test_particle_in_box.py +109 -0
  167. chemistrykit-0.1.0/chemistrykit/quantum/tests/test_perturbation.py +105 -0
  168. chemistrykit-0.1.0/chemistrykit/quantum/tests/test_rigid_rotor.py +53 -0
  169. chemistrykit-0.1.0/chemistrykit/quantum/tests/test_secular_equation.py +63 -0
  170. chemistrykit-0.1.0/chemistrykit/quantum/tests/test_visualizers.py +56 -0
  171. chemistrykit-0.1.0/chemistrykit/quantum/utils/__init__.py +0 -0
  172. chemistrykit-0.1.0/chemistrykit/quantum/utils/basis_sets.py +223 -0
  173. chemistrykit-0.1.0/chemistrykit/quantum/utils/secular_equation.py +116 -0
  174. chemistrykit-0.1.0/chemistrykit/quantum/visualizers/__init__.py +0 -0
  175. chemistrykit-0.1.0/chemistrykit/quantum/visualizers/quantum_plots.py +188 -0
  176. chemistrykit-0.1.0/chemistrykit/solutions/__init__.py +65 -0
  177. chemistrykit-0.1.0/chemistrykit/solutions/core/__init__.py +0 -0
  178. chemistrykit-0.1.0/chemistrykit/solutions/core/base_system.py +154 -0
  179. chemistrykit-0.1.0/chemistrykit/solutions/systems/__init__.py +0 -0
  180. chemistrykit-0.1.0/chemistrykit/solutions/systems/acid_base.py +324 -0
  181. chemistrykit-0.1.0/chemistrykit/solutions/systems/activity.py +152 -0
  182. chemistrykit-0.1.0/chemistrykit/solutions/systems/solubility.py +155 -0
  183. chemistrykit-0.1.0/chemistrykit/solutions/systems/titration.py +219 -0
  184. chemistrykit-0.1.0/chemistrykit/solutions/tests/__init__.py +0 -0
  185. chemistrykit-0.1.0/chemistrykit/solutions/tests/test_acid_base.py +93 -0
  186. chemistrykit-0.1.0/chemistrykit/solutions/tests/test_activity.py +61 -0
  187. chemistrykit-0.1.0/chemistrykit/solutions/tests/test_solubility.py +68 -0
  188. chemistrykit-0.1.0/chemistrykit/solutions/tests/test_titration.py +86 -0
  189. chemistrykit-0.1.0/chemistrykit/solutions/tests/test_visualizers.py +38 -0
  190. chemistrykit-0.1.0/chemistrykit/solutions/utils/__init__.py +0 -0
  191. chemistrykit-0.1.0/chemistrykit/solutions/utils/rootfinding.py +117 -0
  192. chemistrykit-0.1.0/chemistrykit/solutions/visualizers/__init__.py +0 -0
  193. chemistrykit-0.1.0/chemistrykit/solutions/visualizers/solutions_plots.py +93 -0
  194. chemistrykit-0.1.0/chemistrykit/spectro/__init__.py +70 -0
  195. chemistrykit-0.1.0/chemistrykit/spectro/core/__init__.py +0 -0
  196. chemistrykit-0.1.0/chemistrykit/spectro/core/base_system.py +106 -0
  197. chemistrykit-0.1.0/chemistrykit/spectro/systems/__init__.py +0 -0
  198. chemistrykit-0.1.0/chemistrykit/spectro/systems/beer_lambert.py +174 -0
  199. chemistrykit-0.1.0/chemistrykit/spectro/systems/electronic.py +183 -0
  200. chemistrykit-0.1.0/chemistrykit/spectro/systems/nmr.py +197 -0
  201. chemistrykit-0.1.0/chemistrykit/spectro/systems/rotational.py +192 -0
  202. chemistrykit-0.1.0/chemistrykit/spectro/systems/vibrational.py +419 -0
  203. chemistrykit-0.1.0/chemistrykit/spectro/tests/__init__.py +0 -0
  204. chemistrykit-0.1.0/chemistrykit/spectro/tests/test_beer_lambert.py +66 -0
  205. chemistrykit-0.1.0/chemistrykit/spectro/tests/test_electronic.py +71 -0
  206. chemistrykit-0.1.0/chemistrykit/spectro/tests/test_lineshapes.py +75 -0
  207. chemistrykit-0.1.0/chemistrykit/spectro/tests/test_nmr.py +73 -0
  208. chemistrykit-0.1.0/chemistrykit/spectro/tests/test_rotational.py +72 -0
  209. chemistrykit-0.1.0/chemistrykit/spectro/tests/test_spectrum.py +31 -0
  210. chemistrykit-0.1.0/chemistrykit/spectro/tests/test_vibrational.py +122 -0
  211. chemistrykit-0.1.0/chemistrykit/spectro/tests/test_visualizers.py +40 -0
  212. chemistrykit-0.1.0/chemistrykit/spectro/utils/__init__.py +0 -0
  213. chemistrykit-0.1.0/chemistrykit/spectro/utils/lineshapes.py +214 -0
  214. chemistrykit-0.1.0/chemistrykit/spectro/visualizers/__init__.py +0 -0
  215. chemistrykit-0.1.0/chemistrykit/spectro/visualizers/spectro_plots.py +101 -0
  216. chemistrykit-0.1.0/chemistrykit/statmech/__init__.py +51 -0
  217. chemistrykit-0.1.0/chemistrykit/statmech/core/__init__.py +1 -0
  218. chemistrykit-0.1.0/chemistrykit/statmech/core/base_system.py +151 -0
  219. chemistrykit-0.1.0/chemistrykit/statmech/systems/__init__.py +3 -0
  220. chemistrykit-0.1.0/chemistrykit/statmech/systems/lattice_gas.py +151 -0
  221. chemistrykit-0.1.0/chemistrykit/statmech/systems/maxwell_boltzmann.py +211 -0
  222. chemistrykit-0.1.0/chemistrykit/statmech/systems/partition_functions.py +371 -0
  223. chemistrykit-0.1.0/chemistrykit/statmech/tests/__init__.py +0 -0
  224. chemistrykit-0.1.0/chemistrykit/statmech/tests/test_lattice_gas.py +58 -0
  225. chemistrykit-0.1.0/chemistrykit/statmech/tests/test_maxwell_boltzmann.py +95 -0
  226. chemistrykit-0.1.0/chemistrykit/statmech/tests/test_partition_functions.py +137 -0
  227. chemistrykit-0.1.0/chemistrykit/statmech/tests/test_visualizers.py +38 -0
  228. chemistrykit-0.1.0/chemistrykit/statmech/utils/__init__.py +2 -0
  229. chemistrykit-0.1.0/chemistrykit/statmech/utils/combinatorics.py +78 -0
  230. chemistrykit-0.1.0/chemistrykit/statmech/utils/thermal_wavelength.py +53 -0
  231. chemistrykit-0.1.0/chemistrykit/statmech/visualizers/__init__.py +2 -0
  232. chemistrykit-0.1.0/chemistrykit/statmech/visualizers/statmech_plots.py +110 -0
  233. chemistrykit-0.1.0/chemistrykit/structure/__init__.py +49 -0
  234. chemistrykit-0.1.0/chemistrykit/structure/core/__init__.py +0 -0
  235. chemistrykit-0.1.0/chemistrykit/structure/core/base_system.py +278 -0
  236. chemistrykit-0.1.0/chemistrykit/structure/systems/__init__.py +0 -0
  237. chemistrykit-0.1.0/chemistrykit/structure/systems/bonding.py +193 -0
  238. chemistrykit-0.1.0/chemistrykit/structure/systems/lewis.py +180 -0
  239. chemistrykit-0.1.0/chemistrykit/structure/systems/point_group.py +498 -0
  240. chemistrykit-0.1.0/chemistrykit/structure/systems/vsepr.py +296 -0
  241. chemistrykit-0.1.0/chemistrykit/structure/tests/__init__.py +0 -0
  242. chemistrykit-0.1.0/chemistrykit/structure/tests/test_bonding.py +65 -0
  243. chemistrykit-0.1.0/chemistrykit/structure/tests/test_lewis.py +62 -0
  244. chemistrykit-0.1.0/chemistrykit/structure/tests/test_molecule.py +89 -0
  245. chemistrykit-0.1.0/chemistrykit/structure/tests/test_point_group.py +165 -0
  246. chemistrykit-0.1.0/chemistrykit/structure/tests/test_visualizers.py +33 -0
  247. chemistrykit-0.1.0/chemistrykit/structure/tests/test_vsepr.py +103 -0
  248. chemistrykit-0.1.0/chemistrykit/structure/utils/__init__.py +0 -0
  249. chemistrykit-0.1.0/chemistrykit/structure/utils/symmetry_ops.py +243 -0
  250. chemistrykit-0.1.0/chemistrykit/structure/visualizers/__init__.py +0 -0
  251. chemistrykit-0.1.0/chemistrykit/structure/visualizers/structure_plots.py +124 -0
  252. chemistrykit-0.1.0/chemistrykit/surface/__init__.py +45 -0
  253. chemistrykit-0.1.0/chemistrykit/surface/core/__init__.py +0 -0
  254. chemistrykit-0.1.0/chemistrykit/surface/core/base_system.py +83 -0
  255. chemistrykit-0.1.0/chemistrykit/surface/systems/__init__.py +0 -0
  256. chemistrykit-0.1.0/chemistrykit/surface/systems/bet.py +220 -0
  257. chemistrykit-0.1.0/chemistrykit/surface/systems/catalysis.py +169 -0
  258. chemistrykit-0.1.0/chemistrykit/surface/systems/freundlich.py +175 -0
  259. chemistrykit-0.1.0/chemistrykit/surface/systems/langmuir.py +195 -0
  260. chemistrykit-0.1.0/chemistrykit/surface/systems/langmuir_hinshelwood.py +145 -0
  261. chemistrykit-0.1.0/chemistrykit/surface/tests/__init__.py +0 -0
  262. chemistrykit-0.1.0/chemistrykit/surface/tests/test_bet.py +65 -0
  263. chemistrykit-0.1.0/chemistrykit/surface/tests/test_catalysis.py +35 -0
  264. chemistrykit-0.1.0/chemistrykit/surface/tests/test_freundlich.py +45 -0
  265. chemistrykit-0.1.0/chemistrykit/surface/tests/test_langmuir.py +61 -0
  266. chemistrykit-0.1.0/chemistrykit/surface/tests/test_langmuir_hinshelwood.py +49 -0
  267. chemistrykit-0.1.0/chemistrykit/surface/tests/test_visualizers.py +40 -0
  268. chemistrykit-0.1.0/chemistrykit/surface/utils/__init__.py +0 -0
  269. chemistrykit-0.1.0/chemistrykit/surface/utils/regression.py +57 -0
  270. chemistrykit-0.1.0/chemistrykit/surface/visualizers/__init__.py +0 -0
  271. chemistrykit-0.1.0/chemistrykit/surface/visualizers/surface_plots.py +104 -0
  272. chemistrykit-0.1.0/chemistrykit/tests/__init__.py +0 -0
  273. chemistrykit-0.1.0/chemistrykit/tests/test_package.py +62 -0
  274. chemistrykit-0.1.0/chemistrykit/thermo/__init__.py +61 -0
  275. chemistrykit-0.1.0/chemistrykit/thermo/core/__init__.py +0 -0
  276. chemistrykit-0.1.0/chemistrykit/thermo/core/base_system.py +106 -0
  277. chemistrykit-0.1.0/chemistrykit/thermo/systems/__init__.py +0 -0
  278. chemistrykit-0.1.0/chemistrykit/thermo/systems/equations_of_state.py +303 -0
  279. chemistrykit-0.1.0/chemistrykit/thermo/systems/equilibrium.py +433 -0
  280. chemistrykit-0.1.0/chemistrykit/thermo/systems/mixtures.py +273 -0
  281. chemistrykit-0.1.0/chemistrykit/thermo/systems/phase_equilibria.py +187 -0
  282. chemistrykit-0.1.0/chemistrykit/thermo/tests/__init__.py +0 -0
  283. chemistrykit-0.1.0/chemistrykit/thermo/tests/test_equations_of_state.py +95 -0
  284. chemistrykit-0.1.0/chemistrykit/thermo/tests/test_equilibrium.py +112 -0
  285. chemistrykit-0.1.0/chemistrykit/thermo/tests/test_mixtures.py +68 -0
  286. chemistrykit-0.1.0/chemistrykit/thermo/tests/test_phase_equilibria.py +56 -0
  287. chemistrykit-0.1.0/chemistrykit/thermo/tests/test_visualizers.py +53 -0
  288. chemistrykit-0.1.0/chemistrykit/thermo/utils/__init__.py +0 -0
  289. chemistrykit-0.1.0/chemistrykit/thermo/utils/cubic_roots.py +58 -0
  290. chemistrykit-0.1.0/chemistrykit/thermo/utils/regression.py +57 -0
  291. chemistrykit-0.1.0/chemistrykit/thermo/visualizers/__init__.py +0 -0
  292. chemistrykit-0.1.0/chemistrykit/thermo/visualizers/thermo_plots.py +157 -0
  293. chemistrykit-0.1.0/chemistrykit.egg-info/PKG-INFO +200 -0
  294. chemistrykit-0.1.0/chemistrykit.egg-info/SOURCES.txt +297 -0
  295. chemistrykit-0.1.0/chemistrykit.egg-info/dependency_links.txt +1 -0
  296. chemistrykit-0.1.0/chemistrykit.egg-info/requires.txt +27 -0
  297. chemistrykit-0.1.0/chemistrykit.egg-info/top_level.txt +1 -0
  298. chemistrykit-0.1.0/pyproject.toml +118 -0
  299. chemistrykit-0.1.0/setup.cfg +4 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 chemistrykit contributors
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.
@@ -0,0 +1,200 @@
1
+ Metadata-Version: 2.4
2
+ Name: chemistrykit
3
+ Version: 0.1.0
4
+ Summary: Unified numerical toolkit for computational chemistry: reaction kinetics, thermodynamics, quantum chemistry, electrochemistry, spectroscopy, and more, sharing common ODE integrators and chemical constants.
5
+ Author-email: Charles Poli <cpoli374@gmail.com>
6
+ Maintainer-email: Charles Poli <cpoli374@gmail.com>
7
+ License: MIT
8
+ Project-URL: Homepage, https://github.com/cpoli/chemistrykit
9
+ Project-URL: Issues, https://github.com/cpoli/chemistrykit/issues
10
+ Project-URL: Changelog, https://github.com/cpoli/chemistrykit/blob/main/CHANGELOG.md
11
+ Project-URL: Documentation, https://cpoli.github.io/chemistrykit/
12
+ Keywords: chemistry,computational-chemistry,reaction-kinetics,thermodynamics,quantum-chemistry,electrochemistry,spectroscopy,physical-chemistry
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.9
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Topic :: Scientific/Engineering :: Chemistry
22
+ Requires-Python: >=3.9
23
+ Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
+ Requires-Dist: numpy>=1.24
26
+ Requires-Dist: scipy>=1.10
27
+ Requires-Dist: matplotlib>=3.6
28
+ Requires-Dist: numba>=0.58
29
+ Requires-Dist: plotly>=5.15
30
+ Requires-Dist: sympy>=1.11
31
+ Requires-Dist: tqdm>=4.65
32
+ Provides-Extra: test
33
+ Requires-Dist: pytest>=7.0; extra == "test"
34
+ Requires-Dist: pytest-cov; extra == "test"
35
+ Requires-Dist: hypothesis>=6.90; extra == "test"
36
+ Requires-Dist: pillow>=9.0; extra == "test"
37
+ Provides-Extra: docs
38
+ Requires-Dist: sphinx>=7.0; extra == "docs"
39
+ Requires-Dist: pydata-sphinx-theme>=0.15; extra == "docs"
40
+ Requires-Dist: sphinx-autodoc-typehints>=1.25; extra == "docs"
41
+ Requires-Dist: myst-parser>=2.0; extra == "docs"
42
+ Requires-Dist: sphinx-gallery>=0.15; extra == "docs"
43
+ Requires-Dist: sphinx-design>=0.6; extra == "docs"
44
+ Provides-Extra: dev
45
+ Requires-Dist: chemistrykit[docs,test]; extra == "dev"
46
+ Requires-Dist: ruff>=0.6; extra == "dev"
47
+ Requires-Dist: mypy>=1.10; extra == "dev"
48
+ Requires-Dist: pre-commit>=3.7; extra == "dev"
49
+ Dynamic: license-file
50
+
51
+ # chemistrykit
52
+
53
+ | | |
54
+ |:--|:-:|
55
+ | Package | [![PyPI version](https://img.shields.io/pypi/v/chemistrykit)](https://pypi.org/project/chemistrykit/) [![Python versions](https://img.shields.io/pypi/pyversions/chemistrykit)](https://pypi.org/project/chemistrykit/) |
56
+ | Quality | [![License](https://img.shields.io/github/license/cpoli/chemistrykit)](https://github.com/cpoli/chemistrykit/blob/main/LICENSE) [![CI](https://github.com/cpoli/chemistrykit/actions/workflows/ci.yml/badge.svg)](https://github.com/cpoli/chemistrykit/actions/workflows/ci.yml) [![Coverage](https://img.shields.io/codecov/c/github/cpoli/chemistrykit)](https://codecov.io/gh/cpoli/chemistrykit) [![Coverage (manual)](https://img.shields.io/badge/coverage-96%25-brightgreen)](#coverage) |
57
+ | Documentation | [![Docs](https://img.shields.io/badge/docs-cpoli.github.io%2Fchemistrykit-blue)](https://cpoli.github.io/chemistrykit/) |
58
+ | Code style | [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) |
59
+ | Downloads | [![Downloads](https://static.pepy.tech/badge/chemistrykit)](https://pepy.tech/project/chemistrykit) [![Downloads/Month](https://static.pepy.tech/badge/chemistrykit/month)](https://pepy.tech/project/chemistrykit) |
60
+ | Community | [![GitHub Stars](https://img.shields.io/github/stars/cpoli/chemistrykit?style=social)](https://github.com/cpoli/chemistrykit) [![GitHub Forks](https://img.shields.io/github/forks/cpoli/chemistrykit?style=social)](https://github.com/cpoli/chemistrykit) [![Contributors](https://img.shields.io/github/contributors/cpoli/chemistrykit)](https://github.com/cpoli/chemistrykit/graphs/contributors) [![Last Commit](https://img.shields.io/github/last-commit/cpoli/chemistrykit)](https://github.com/cpoli/chemistrykit/commits/main) |
61
+
62
+ A unified numerical toolkit for computational chemistry, spanning the
63
+ field end to end: Arrhenius kinetics and oscillating reaction networks,
64
+ Huckel aromaticity and variational quantum chemistry, Nernst cells and
65
+ Butler-Volmer electrochemistry, NMR multiplets and Franck-Condon
66
+ spectra, crystal lattice energies and powder XRD, polymer chain
67
+ statistics and photochemical quenching -- with each domain's docs
68
+ tracing the field's own foundational breakthroughs in chronological,
69
+ pedagogical order, every historical milestone linked directly to the
70
+ runnable code that reproduces it. Pure-numerical throughout -- no
71
+ cheminformatics dependencies (no RDKit/ASE/PySCF/OpenMM) -- sharing
72
+ common ODE integrators, chemical constants, and a consistent NumPy-based
73
+ API. Conventionally imported as `ck`. chemistrykit clones the
74
+ architecture and engineering conventions of the sibling project
75
+ [physicskit](https://github.com/physicskit/physicskit) (`pk`).
76
+
77
+ All 14 domains from `chemistrykit-spec.md`'s build plan are implemented
78
+ -- see [Subpackages](#subpackages) for the full list, or browse the docs
79
+ at <https://chemistrykit.readthedocs.io>.
80
+
81
+ ## Install
82
+
83
+ ```bash
84
+ python -m venv .venv && source .venv/bin/activate
85
+ pip install -e ".[dev]"
86
+ ```
87
+
88
+ ## Quick start
89
+
90
+ ```python
91
+ import chemistrykit as ck
92
+ import numpy as np
93
+
94
+ # Closed-form first-order decay and its half-life
95
+ rate_law = ck.kinetics.FirstOrder(k=0.1, C0=1.0)
96
+ print(rate_law.half_life()) # ln(2) / k
97
+
98
+ # A general stoichiometric reaction network: A -> B -> C
99
+ network = ck.kinetics.StoichiometricNetwork.consecutive(k1=1.0, k2=0.3, A0=1.0)
100
+ result = network.integrate((0.0, 10.0), dt=1e-3, method="rk4")
101
+ print(result.concentration("B")[-1])
102
+ ```
103
+
104
+ ## Subpackages
105
+
106
+ Domain subpackages, each with runnable examples linked below:
107
+
108
+ - [`chemistrykit.kinetics`](https://chemistrykit.readthedocs.io/en/latest/examples/kinetics.html) -- reaction kinetics: integrated rate laws and half-lives, the Arrhenius equation and activation-energy fitting, Michaelis-Menten enzyme kinetics with Lineweaver-Burk linearization and inhibition, a general stoichiometry-matrix reaction-network engine (parallel/consecutive/reversible/steady-state-approximation chains), and the Brusselator oscillating reaction network.
109
+ - [`chemistrykit.thermo`](https://chemistrykit.readthedocs.io/en/latest/examples/thermo.html) -- chemical thermodynamics: equations of state (ideal gas, van der Waals, Redlich-Kwong), Clausius-Clapeyron phase boundaries, reaction equilibrium (Kp/Kc, van't Hoff, and a Gibbs-energy-minimization equilibrium-composition solver), and Raoult's/Henry's law mixtures with colligative properties.
110
+ - [`chemistrykit.solutions`](https://chemistrykit.readthedocs.io/en/latest/examples/solutions.html) -- solution chemistry: pH/pOH and weak acid/base equilibria with Henderson-Hasselbalch buffers, acid-base titration curves, Ksp solubility equilibria and the common-ion effect, and Debye-Huckel activity coefficients.
111
+ - [`chemistrykit.md`](https://chemistrykit.readthedocs.io/en/latest/examples/md.html) -- molecular dynamics and force fields: the Lennard-Jones fluid in reduced units (periodic boundary conditions, a Verlet neighbor list, pressure, g(r)), Morse/Buckingham/harmonic bonded potentials, and velocity-rescaling/Nose-Hoover thermostats.
112
+ - [`chemistrykit.statmech`](https://chemistrykit.readthedocs.io/en/latest/examples/statmech.html) -- statistical mechanics of molecules: translational/rotational/vibrational partition functions and their thermodynamic functions, the Maxwell-Boltzmann speed distribution, and a canonical-ensemble lattice-gas adsorption model.
113
+ - [`chemistrykit.quantum`](https://chemistrykit.readthedocs.io/en/latest/examples/quantum.html) -- quantum chemistry: particle-in-a-box models (with the free-electron model of conjugated-dye color); the quantum harmonic oscillator vs. the exact Morse potential; the rigid rotor; hydrogen-like orbitals; Huckel molecular-orbital theory and its 4n+2 aromaticity rule; a minimal variational treatment of H2+; and Rayleigh-Schrodinger perturbation theory for the anharmonic oscillator.
114
+ - [`chemistrykit.spectro`](https://chemistrykit.readthedocs.io/en/latest/examples/spectro.html) -- spectroscopy: the Beer-Lambert absorbance law and its stray-light deviation from linearity; rigid-rotor rotational spectra with isotope shifts; harmonic vs. Morse vibrational band positions plus a Wilson GF-matrix triatomic normal-mode calculation; Franck-Condon vibronic progressions; and a first-order NMR multiplet simulator.
115
+ - [`chemistrykit.structure`](https://chemistrykit.readthedocs.io/en/latest/examples/structure.html) -- molecular structure and bonding: a lightweight `Molecule` container; VSEPR geometry prediction with real 3D coordinate generation; point-group determination from 3D coordinates and character tables; bond order from the Pauling length correlation and Huckel-theory MO coefficients; and formal-charge/oxidation-state assignment from a Lewis structure.
116
+ - [`chemistrykit.electrochem`](https://chemistrykit.readthedocs.io/en/latest/examples/electrochem.html) -- electrochemistry: the Nernst equation for standard and concentration cells with Debye-Huckel activity corrections; a curated standard-reduction-potential table with redox-couple balancing; Butler-Volmer electrode kinetics and Tafel-plot linearization; galvanic vs. electrolytic cells and Faraday's laws of electrolysis; and a simplified constant-current battery discharge model with Peukert's-law rate dependence.
117
+ - [`chemistrykit.photochem`](https://chemistrykit.readthedocs.io/en/latest/examples/photochem.html) -- photochemistry: Jablonski-diagram excited-state kinetics built on `chemistrykit.kinetics`'s reaction-network engine; fluorescence/phosphorescence quantum yields and the photochemical quantum yield via Beer-Lambert; Stern-Volmer quenching with a static-vs-dynamic diagnostic; and photostationary-state kinetics for a two-state photoswitch.
118
+ - [`chemistrykit.surface`](https://chemistrykit.readthedocs.io/en/latest/examples/surface.html) -- surface chemistry and catalysis: Langmuir, Freundlich, and BET adsorption isotherms with their standard linearizations for fitting parameters from data; Langmuir-Hinshelwood single- and dual-site surface-reaction kinetics; and a turnover-frequency/rate-enhancement catalysis model built on `chemistrykit.kinetics`'s Arrhenius equation.
119
+ - [`chemistrykit.polymer`](https://chemistrykit.readthedocs.io/en/latest/examples/polymer.html) -- polymer chemistry: ideal random-walk chain statistics and the Flory exponent for real chains under theta/good/poor solvent conditions; molecular-weight-distribution statistics and the closed-form Flory-Schulz distribution; step-growth kinetics via the Carothers equation; and chain-growth/free-radical polymerization kinetics built on `chemistrykit.kinetics`'s reaction-network engine.
120
+ - [`chemistrykit.crystal`](https://chemistrykit.readthedocs.io/en/latest/examples/crystal.html) -- crystallography and solid-state chemistry: the 7 crystal systems and general unit-cell volume; hard-sphere packing (packing fraction, coordination number) for SC/BCC/FCC/HCP lattices; ionic-crystal lattice energy via the Born-Lande and Kapustinskii equations, backed by a genuinely converging (Evjen-method) numerical Madelung constant; Bragg's law and powder-XRD peak positions with structure factors and systematic absences; and Schottky/Frenkel point-defect equilibrium.
121
+ - [`chemistrykit.analytical`](https://chemistrykit.readthedocs.io/en/latest/examples/analytical.html) -- analytical chemistry: redox and complexometric (EDTA) titration-curve simulation with equivalence-point detection, alongside `chemistrykit.solutions`'s acid-base titrations; chromatographic plate theory and the van Deemter equation (resolution, selectivity); linear-regression calibration curves with IUPAC-convention limits of detection/quantitation; and propagation-of-uncertainty formulas plus Dixon's Q-test for outlier rejection.
122
+
123
+ Shared infrastructure, used across the subpackages above rather than
124
+ standalone toolkits:
125
+
126
+ - `chemistrykit.constants` -- chemical constants (R, NA, k_B, Faraday's
127
+ constant, ...) from `scipy.constants`, plus a small built-in
128
+ periodic-table data table and a few well-defined unit conversions.
129
+ - `chemistrykit.integrators` -- shared numerical ODE integrators (RK4,
130
+ leapfrog, Yoshida4, adaptive Dormand-Prince) used across the other
131
+ subpackages.
132
+
133
+ ## Test
134
+
135
+ Tests live alongside each subpackage, at `chemistrykit/<name>/tests/`.
136
+
137
+ ```bash
138
+ pytest # everything
139
+ pytest chemistrykit/kinetics/tests # a single subpackage
140
+
141
+ # docstring examples, across every subpackage:
142
+ MPLBACKEND=Agg pytest --doctest-modules chemistrykit \
143
+ --ignore-glob="*/tests/*"
144
+ ```
145
+
146
+ Both commands, plus `ruff check`/`ruff format --check`, run in CI on
147
+ every PR (`.github/workflows/ci.yml`) across Python 3.9-3.12 on Linux and
148
+ macOS. See [CONTRIBUTING.md](CONTRIBUTING.md) before opening a PR.
149
+
150
+ ### Coverage
151
+
152
+ ```bash
153
+ MPLBACKEND=Agg pytest -q --cov=chemistrykit --cov-report=term
154
+ ```
155
+
156
+ 774 tests, 96% line coverage overall. Per-subpackage coverage:
157
+
158
+ | Subpackage | Coverage | | Subpackage | Coverage |
159
+ |:--|--:|---|:--|--:|
160
+ | `analytical` | 99% | | `solutions` | 99% |
161
+ | `crystal` | 99% | | `spectro` | 99% |
162
+ | `electrochem` | 99% | | `statmech` | 99% |
163
+ | `kinetics` | 93% | | `structure` | 98% |
164
+ | `md` | 89% | | `surface` | 99% |
165
+ | `photochem` | 95% | | `thermo` | 99% |
166
+ | `polymer` | 99% | | `integrators` | 47% |
167
+ | `quantum` | 98% | | `constants` | 84% |
168
+
169
+ `visualizers/` modules are smoke-tested only (correct return type/shape,
170
+ or that `anim.save()` succeeds) rather than covered line-by-line, per the
171
+ testing convention in [CLAUDE.md](CLAUDE.md). `integrators` sits lower
172
+ because several of its fixed-step/adaptive methods aren't exercised
173
+ directly by its own tests, only indirectly through the subpackages
174
+ (`kinetics`, `md`) that call into it; `constants` includes a few
175
+ rarely-used unit-conversion helpers not hit by any test.
176
+
177
+ ## Docs
178
+
179
+ Built docs are hosted at <https://cpoli.github.io/chemistrykit/>, served
180
+ from the `gh-pages` branch. To build
181
+ locally:
182
+
183
+ ```bash
184
+ pip install -e ".[docs]"
185
+ cd docs && make html
186
+ ```
187
+
188
+ ## Citation
189
+
190
+ If you use chemistrykit in your research, please cite it — see
191
+ [CITATION.cff](CITATION.cff).
192
+
193
+ ## Contributing
194
+
195
+ See [CONTRIBUTING.md](CONTRIBUTING.md). Please note that this project
196
+ follows the [Contributor Covenant](CODE_OF_CONDUCT.md).
197
+
198
+ ## License
199
+
200
+ MIT -- see [LICENSE](LICENSE).
@@ -0,0 +1,150 @@
1
+ # chemistrykit
2
+
3
+ | | |
4
+ |:--|:-:|
5
+ | Package | [![PyPI version](https://img.shields.io/pypi/v/chemistrykit)](https://pypi.org/project/chemistrykit/) [![Python versions](https://img.shields.io/pypi/pyversions/chemistrykit)](https://pypi.org/project/chemistrykit/) |
6
+ | Quality | [![License](https://img.shields.io/github/license/cpoli/chemistrykit)](https://github.com/cpoli/chemistrykit/blob/main/LICENSE) [![CI](https://github.com/cpoli/chemistrykit/actions/workflows/ci.yml/badge.svg)](https://github.com/cpoli/chemistrykit/actions/workflows/ci.yml) [![Coverage](https://img.shields.io/codecov/c/github/cpoli/chemistrykit)](https://codecov.io/gh/cpoli/chemistrykit) [![Coverage (manual)](https://img.shields.io/badge/coverage-96%25-brightgreen)](#coverage) |
7
+ | Documentation | [![Docs](https://img.shields.io/badge/docs-cpoli.github.io%2Fchemistrykit-blue)](https://cpoli.github.io/chemistrykit/) |
8
+ | Code style | [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) |
9
+ | Downloads | [![Downloads](https://static.pepy.tech/badge/chemistrykit)](https://pepy.tech/project/chemistrykit) [![Downloads/Month](https://static.pepy.tech/badge/chemistrykit/month)](https://pepy.tech/project/chemistrykit) |
10
+ | Community | [![GitHub Stars](https://img.shields.io/github/stars/cpoli/chemistrykit?style=social)](https://github.com/cpoli/chemistrykit) [![GitHub Forks](https://img.shields.io/github/forks/cpoli/chemistrykit?style=social)](https://github.com/cpoli/chemistrykit) [![Contributors](https://img.shields.io/github/contributors/cpoli/chemistrykit)](https://github.com/cpoli/chemistrykit/graphs/contributors) [![Last Commit](https://img.shields.io/github/last-commit/cpoli/chemistrykit)](https://github.com/cpoli/chemistrykit/commits/main) |
11
+
12
+ A unified numerical toolkit for computational chemistry, spanning the
13
+ field end to end: Arrhenius kinetics and oscillating reaction networks,
14
+ Huckel aromaticity and variational quantum chemistry, Nernst cells and
15
+ Butler-Volmer electrochemistry, NMR multiplets and Franck-Condon
16
+ spectra, crystal lattice energies and powder XRD, polymer chain
17
+ statistics and photochemical quenching -- with each domain's docs
18
+ tracing the field's own foundational breakthroughs in chronological,
19
+ pedagogical order, every historical milestone linked directly to the
20
+ runnable code that reproduces it. Pure-numerical throughout -- no
21
+ cheminformatics dependencies (no RDKit/ASE/PySCF/OpenMM) -- sharing
22
+ common ODE integrators, chemical constants, and a consistent NumPy-based
23
+ API. Conventionally imported as `ck`. chemistrykit clones the
24
+ architecture and engineering conventions of the sibling project
25
+ [physicskit](https://github.com/physicskit/physicskit) (`pk`).
26
+
27
+ All 14 domains from `chemistrykit-spec.md`'s build plan are implemented
28
+ -- see [Subpackages](#subpackages) for the full list, or browse the docs
29
+ at <https://chemistrykit.readthedocs.io>.
30
+
31
+ ## Install
32
+
33
+ ```bash
34
+ python -m venv .venv && source .venv/bin/activate
35
+ pip install -e ".[dev]"
36
+ ```
37
+
38
+ ## Quick start
39
+
40
+ ```python
41
+ import chemistrykit as ck
42
+ import numpy as np
43
+
44
+ # Closed-form first-order decay and its half-life
45
+ rate_law = ck.kinetics.FirstOrder(k=0.1, C0=1.0)
46
+ print(rate_law.half_life()) # ln(2) / k
47
+
48
+ # A general stoichiometric reaction network: A -> B -> C
49
+ network = ck.kinetics.StoichiometricNetwork.consecutive(k1=1.0, k2=0.3, A0=1.0)
50
+ result = network.integrate((0.0, 10.0), dt=1e-3, method="rk4")
51
+ print(result.concentration("B")[-1])
52
+ ```
53
+
54
+ ## Subpackages
55
+
56
+ Domain subpackages, each with runnable examples linked below:
57
+
58
+ - [`chemistrykit.kinetics`](https://chemistrykit.readthedocs.io/en/latest/examples/kinetics.html) -- reaction kinetics: integrated rate laws and half-lives, the Arrhenius equation and activation-energy fitting, Michaelis-Menten enzyme kinetics with Lineweaver-Burk linearization and inhibition, a general stoichiometry-matrix reaction-network engine (parallel/consecutive/reversible/steady-state-approximation chains), and the Brusselator oscillating reaction network.
59
+ - [`chemistrykit.thermo`](https://chemistrykit.readthedocs.io/en/latest/examples/thermo.html) -- chemical thermodynamics: equations of state (ideal gas, van der Waals, Redlich-Kwong), Clausius-Clapeyron phase boundaries, reaction equilibrium (Kp/Kc, van't Hoff, and a Gibbs-energy-minimization equilibrium-composition solver), and Raoult's/Henry's law mixtures with colligative properties.
60
+ - [`chemistrykit.solutions`](https://chemistrykit.readthedocs.io/en/latest/examples/solutions.html) -- solution chemistry: pH/pOH and weak acid/base equilibria with Henderson-Hasselbalch buffers, acid-base titration curves, Ksp solubility equilibria and the common-ion effect, and Debye-Huckel activity coefficients.
61
+ - [`chemistrykit.md`](https://chemistrykit.readthedocs.io/en/latest/examples/md.html) -- molecular dynamics and force fields: the Lennard-Jones fluid in reduced units (periodic boundary conditions, a Verlet neighbor list, pressure, g(r)), Morse/Buckingham/harmonic bonded potentials, and velocity-rescaling/Nose-Hoover thermostats.
62
+ - [`chemistrykit.statmech`](https://chemistrykit.readthedocs.io/en/latest/examples/statmech.html) -- statistical mechanics of molecules: translational/rotational/vibrational partition functions and their thermodynamic functions, the Maxwell-Boltzmann speed distribution, and a canonical-ensemble lattice-gas adsorption model.
63
+ - [`chemistrykit.quantum`](https://chemistrykit.readthedocs.io/en/latest/examples/quantum.html) -- quantum chemistry: particle-in-a-box models (with the free-electron model of conjugated-dye color); the quantum harmonic oscillator vs. the exact Morse potential; the rigid rotor; hydrogen-like orbitals; Huckel molecular-orbital theory and its 4n+2 aromaticity rule; a minimal variational treatment of H2+; and Rayleigh-Schrodinger perturbation theory for the anharmonic oscillator.
64
+ - [`chemistrykit.spectro`](https://chemistrykit.readthedocs.io/en/latest/examples/spectro.html) -- spectroscopy: the Beer-Lambert absorbance law and its stray-light deviation from linearity; rigid-rotor rotational spectra with isotope shifts; harmonic vs. Morse vibrational band positions plus a Wilson GF-matrix triatomic normal-mode calculation; Franck-Condon vibronic progressions; and a first-order NMR multiplet simulator.
65
+ - [`chemistrykit.structure`](https://chemistrykit.readthedocs.io/en/latest/examples/structure.html) -- molecular structure and bonding: a lightweight `Molecule` container; VSEPR geometry prediction with real 3D coordinate generation; point-group determination from 3D coordinates and character tables; bond order from the Pauling length correlation and Huckel-theory MO coefficients; and formal-charge/oxidation-state assignment from a Lewis structure.
66
+ - [`chemistrykit.electrochem`](https://chemistrykit.readthedocs.io/en/latest/examples/electrochem.html) -- electrochemistry: the Nernst equation for standard and concentration cells with Debye-Huckel activity corrections; a curated standard-reduction-potential table with redox-couple balancing; Butler-Volmer electrode kinetics and Tafel-plot linearization; galvanic vs. electrolytic cells and Faraday's laws of electrolysis; and a simplified constant-current battery discharge model with Peukert's-law rate dependence.
67
+ - [`chemistrykit.photochem`](https://chemistrykit.readthedocs.io/en/latest/examples/photochem.html) -- photochemistry: Jablonski-diagram excited-state kinetics built on `chemistrykit.kinetics`'s reaction-network engine; fluorescence/phosphorescence quantum yields and the photochemical quantum yield via Beer-Lambert; Stern-Volmer quenching with a static-vs-dynamic diagnostic; and photostationary-state kinetics for a two-state photoswitch.
68
+ - [`chemistrykit.surface`](https://chemistrykit.readthedocs.io/en/latest/examples/surface.html) -- surface chemistry and catalysis: Langmuir, Freundlich, and BET adsorption isotherms with their standard linearizations for fitting parameters from data; Langmuir-Hinshelwood single- and dual-site surface-reaction kinetics; and a turnover-frequency/rate-enhancement catalysis model built on `chemistrykit.kinetics`'s Arrhenius equation.
69
+ - [`chemistrykit.polymer`](https://chemistrykit.readthedocs.io/en/latest/examples/polymer.html) -- polymer chemistry: ideal random-walk chain statistics and the Flory exponent for real chains under theta/good/poor solvent conditions; molecular-weight-distribution statistics and the closed-form Flory-Schulz distribution; step-growth kinetics via the Carothers equation; and chain-growth/free-radical polymerization kinetics built on `chemistrykit.kinetics`'s reaction-network engine.
70
+ - [`chemistrykit.crystal`](https://chemistrykit.readthedocs.io/en/latest/examples/crystal.html) -- crystallography and solid-state chemistry: the 7 crystal systems and general unit-cell volume; hard-sphere packing (packing fraction, coordination number) for SC/BCC/FCC/HCP lattices; ionic-crystal lattice energy via the Born-Lande and Kapustinskii equations, backed by a genuinely converging (Evjen-method) numerical Madelung constant; Bragg's law and powder-XRD peak positions with structure factors and systematic absences; and Schottky/Frenkel point-defect equilibrium.
71
+ - [`chemistrykit.analytical`](https://chemistrykit.readthedocs.io/en/latest/examples/analytical.html) -- analytical chemistry: redox and complexometric (EDTA) titration-curve simulation with equivalence-point detection, alongside `chemistrykit.solutions`'s acid-base titrations; chromatographic plate theory and the van Deemter equation (resolution, selectivity); linear-regression calibration curves with IUPAC-convention limits of detection/quantitation; and propagation-of-uncertainty formulas plus Dixon's Q-test for outlier rejection.
72
+
73
+ Shared infrastructure, used across the subpackages above rather than
74
+ standalone toolkits:
75
+
76
+ - `chemistrykit.constants` -- chemical constants (R, NA, k_B, Faraday's
77
+ constant, ...) from `scipy.constants`, plus a small built-in
78
+ periodic-table data table and a few well-defined unit conversions.
79
+ - `chemistrykit.integrators` -- shared numerical ODE integrators (RK4,
80
+ leapfrog, Yoshida4, adaptive Dormand-Prince) used across the other
81
+ subpackages.
82
+
83
+ ## Test
84
+
85
+ Tests live alongside each subpackage, at `chemistrykit/<name>/tests/`.
86
+
87
+ ```bash
88
+ pytest # everything
89
+ pytest chemistrykit/kinetics/tests # a single subpackage
90
+
91
+ # docstring examples, across every subpackage:
92
+ MPLBACKEND=Agg pytest --doctest-modules chemistrykit \
93
+ --ignore-glob="*/tests/*"
94
+ ```
95
+
96
+ Both commands, plus `ruff check`/`ruff format --check`, run in CI on
97
+ every PR (`.github/workflows/ci.yml`) across Python 3.9-3.12 on Linux and
98
+ macOS. See [CONTRIBUTING.md](CONTRIBUTING.md) before opening a PR.
99
+
100
+ ### Coverage
101
+
102
+ ```bash
103
+ MPLBACKEND=Agg pytest -q --cov=chemistrykit --cov-report=term
104
+ ```
105
+
106
+ 774 tests, 96% line coverage overall. Per-subpackage coverage:
107
+
108
+ | Subpackage | Coverage | | Subpackage | Coverage |
109
+ |:--|--:|---|:--|--:|
110
+ | `analytical` | 99% | | `solutions` | 99% |
111
+ | `crystal` | 99% | | `spectro` | 99% |
112
+ | `electrochem` | 99% | | `statmech` | 99% |
113
+ | `kinetics` | 93% | | `structure` | 98% |
114
+ | `md` | 89% | | `surface` | 99% |
115
+ | `photochem` | 95% | | `thermo` | 99% |
116
+ | `polymer` | 99% | | `integrators` | 47% |
117
+ | `quantum` | 98% | | `constants` | 84% |
118
+
119
+ `visualizers/` modules are smoke-tested only (correct return type/shape,
120
+ or that `anim.save()` succeeds) rather than covered line-by-line, per the
121
+ testing convention in [CLAUDE.md](CLAUDE.md). `integrators` sits lower
122
+ because several of its fixed-step/adaptive methods aren't exercised
123
+ directly by its own tests, only indirectly through the subpackages
124
+ (`kinetics`, `md`) that call into it; `constants` includes a few
125
+ rarely-used unit-conversion helpers not hit by any test.
126
+
127
+ ## Docs
128
+
129
+ Built docs are hosted at <https://cpoli.github.io/chemistrykit/>, served
130
+ from the `gh-pages` branch. To build
131
+ locally:
132
+
133
+ ```bash
134
+ pip install -e ".[docs]"
135
+ cd docs && make html
136
+ ```
137
+
138
+ ## Citation
139
+
140
+ If you use chemistrykit in your research, please cite it — see
141
+ [CITATION.cff](CITATION.cff).
142
+
143
+ ## Contributing
144
+
145
+ See [CONTRIBUTING.md](CONTRIBUTING.md). Please note that this project
146
+ follows the [Contributor Covenant](CODE_OF_CONDUCT.md).
147
+
148
+ ## License
149
+
150
+ MIT -- see [LICENSE](LICENSE).
@@ -0,0 +1,69 @@
1
+ """chemistrykit: unified numerical toolkit for computational chemistry.
2
+
3
+ Import as ``ck`` by convention::
4
+
5
+ import chemistrykit as ck
6
+ ck.kinetics.FirstOrder(k=0.1, C0=1.0)
7
+ ck.kinetics.StoichiometricNetwork.consecutive(k1=1.0, k2=0.3)
8
+ ck.thermo.VanDerWaals(a=0.1448, b=3.913e-5)
9
+ ck.solutions.WeakAcid(Ca=0.1, Ka=1.8e-5).pH()
10
+ ck.md.LJFluid.from_lattice(n_per_side=4, density=0.6, temperature=1.0)
11
+ ck.statmech.MaxwellBoltzmannSpeedDistribution(mass=6.63e-26, temperature=298.15)
12
+ ck.structure.determine_point_group(water_molecule)
13
+ ck.spectro.rotational_spectrum(rotor, J_max=10, temperature=300.0)
14
+ ck.electrochem.nernst_potential(E_standard=0.34, n=2, Q=0.01)
15
+ ck.photochem.jablonski_network(kf=2.0, kic=1.0, kisc=0.5, kp=0.3, kic_T=0.2)
16
+ ck.surface.LangmuirIsotherm(K=2.0, qmax=5.0).loading(P=1.0)
17
+ ck.polymer.IdealChain().end_to_end_distance(n=1000, b=0.5)
18
+ ck.crystal.FaceCenteredCubicPacking().packing_fraction()
19
+ ck.analytical.fit_calibration([0, 1, 2, 3], [0.1, 1.0, 2.1, 2.9]).lod()
20
+ ck.constants.R
21
+ ck.integrators.rk4_integrate(...)
22
+
23
+ chemistrykit mirrors the architecture of the sibling project physicskit
24
+ (pk): one subpackage per chemistry domain, sharing common ODE integrators
25
+ (:mod:`chemistrykit.integrators`) and physical/chemical constants
26
+ (:mod:`chemistrykit.constants`). All 14 domains from
27
+ ``chemistrykit-spec.md``'s build plan are implemented; see ``__all__``
28
+ below for the full list.
29
+ """
30
+
31
+ from chemistrykit import (
32
+ analytical,
33
+ constants,
34
+ crystal,
35
+ electrochem,
36
+ integrators,
37
+ kinetics,
38
+ md,
39
+ photochem,
40
+ polymer,
41
+ quantum,
42
+ solutions,
43
+ spectro,
44
+ statmech,
45
+ structure,
46
+ surface,
47
+ thermo,
48
+ )
49
+
50
+ __version__ = "0.1.0"
51
+
52
+ __all__ = [
53
+ "constants",
54
+ "integrators",
55
+ "kinetics",
56
+ "thermo",
57
+ "solutions",
58
+ "md",
59
+ "statmech",
60
+ "quantum",
61
+ "spectro",
62
+ "structure",
63
+ "electrochem",
64
+ "photochem",
65
+ "surface",
66
+ "polymer",
67
+ "crystal",
68
+ "analytical",
69
+ ]
@@ -0,0 +1,61 @@
1
+ """chemistrykit.analytical: analytical chemistry.
2
+
3
+ Acid-base titration curves are provided by
4
+ :mod:`chemistrykit.solutions.systems.titration`; this subpackage adds
5
+ redox and complexometric (EDTA) titration-curve simulation with
6
+ equivalence-point detection; chromatographic plate theory and the van
7
+ Deemter equation (resolution, selectivity); linear-regression calibration
8
+ curves with IUPAC-convention limits of detection/quantitation; and
9
+ propagation-of-uncertainty formulas plus Dixon's Q-test for outlier
10
+ rejection.
11
+ """
12
+
13
+ __version__ = "0.1.0"
14
+
15
+ from chemistrykit.analytical.core.base_system import TitrationCurve, TitrationCurveResult
16
+ from chemistrykit.analytical.systems.calibration import LinearCalibration, fit_calibration
17
+ from chemistrykit.analytical.systems.chromatography import (
18
+ minimum_plate_height,
19
+ optimum_flow_velocity,
20
+ plate_height,
21
+ resolution,
22
+ retention_factor,
23
+ selectivity_factor,
24
+ simulate_chromatogram,
25
+ theoretical_plates,
26
+ van_deemter_H,
27
+ )
28
+ from chemistrykit.analytical.systems.qtest import Q_CRITICAL_TABLE, QTestResult, dixon_q_test
29
+ from chemistrykit.analytical.systems.titration import EDTATitration, RedoxTitration
30
+ from chemistrykit.analytical.systems.uncertainty import (
31
+ propagate_power,
32
+ propagate_product,
33
+ propagate_sum,
34
+ propagate_uncertainty,
35
+ )
36
+
37
+ __all__ = [
38
+ "__version__",
39
+ "TitrationCurve",
40
+ "TitrationCurveResult",
41
+ "RedoxTitration",
42
+ "EDTATitration",
43
+ "theoretical_plates",
44
+ "plate_height",
45
+ "van_deemter_H",
46
+ "optimum_flow_velocity",
47
+ "minimum_plate_height",
48
+ "retention_factor",
49
+ "selectivity_factor",
50
+ "resolution",
51
+ "simulate_chromatogram",
52
+ "LinearCalibration",
53
+ "fit_calibration",
54
+ "propagate_sum",
55
+ "propagate_product",
56
+ "propagate_power",
57
+ "propagate_uncertainty",
58
+ "Q_CRITICAL_TABLE",
59
+ "QTestResult",
60
+ "dixon_q_test",
61
+ ]
@@ -0,0 +1,118 @@
1
+ r"""Abstract base class for potentiometric-style titration-curve models, and a note on scope.
2
+
3
+ :class:`TitrationCurve` captures the one genuinely polymorphic shape in
4
+ this domain: several titration *types* (redox, complexometric --
5
+ :mod:`chemistrykit.analytical.systems.titration`) that all reduce to
6
+ "compute some scalar response as a function of titrant volume, then find
7
+ the equivalence point as the point of steepest response change" -- the
8
+ same shape that :class:`chemistrykit.solutions.core.base_system.Titration`
9
+ already captures for acid-base titrations (pH vs. volume).
10
+
11
+ **Why a new ABC here, rather than reusing** :class:`chemistrykit.solutions.core.base_system.Titration`:
12
+ that class's abstract method is named and documented specifically as
13
+ ``pH_at`` (a *hydrogen-ion* activity readout), which is the wrong
14
+ abstraction for a redox titration's electrode potential `E` or a
15
+ complexometric titration's `pM`. Rather than force those into a
16
+ pH-flavored interface (or reach across a domain boundary the way
17
+ ``chemistrykit.photochem`` reaches into ``chemistrykit.kinetics`` for
18
+ substantial shared machinery -- not warranted here, since the shared
19
+ logic is a handful of lines), :class:`TitrationCurve` reimplements the
20
+ same small pattern (curve, steepest-ascent-or-descent equivalence-point
21
+ detection) with a response-type-neutral abstract method name, exactly
22
+ the way :mod:`chemistrykit.surface.utils.regression`,
23
+ :mod:`chemistrykit.electrochem.utils.regression`, and
24
+ :mod:`chemistrykit.photochem.utils.regression` each keep their own small
25
+ ``linear_fit`` rather than importing one another's. Acid-base titration
26
+ curves are *not* reimplemented here at all -- :mod:`chemistrykit.analytical`'s
27
+ examples and tests use
28
+ :mod:`chemistrykit.solutions.systems.titration`'s classes directly for
29
+ that case, side by side with the new redox/complexometric models below.
30
+
31
+ Chromatography (:mod:`chemistrykit.analytical.systems.chromatography`),
32
+ calibration curves (:mod:`chemistrykit.analytical.systems.calibration`),
33
+ uncertainty propagation (:mod:`chemistrykit.analytical.systems.uncertainty`),
34
+ and the Q-test (:mod:`chemistrykit.analytical.systems.qtest`) are each a
35
+ self-contained set of formulas with no swappable sibling, so -- following
36
+ ``chemistrykit.electrochem``/``chemistrykit.photochem``/``chemistrykit.surface``'s
37
+ precedent -- they stay as plain functions (plus small result dataclasses)
38
+ in their own ``systems/`` modules.
39
+ """
40
+
41
+ from __future__ import annotations
42
+
43
+ from abc import ABC, abstractmethod
44
+ from dataclasses import dataclass
45
+
46
+ import numpy as np
47
+
48
+ __all__ = ["TitrationCurveResult", "TitrationCurve"]
49
+
50
+
51
+ @dataclass
52
+ class TitrationCurveResult:
53
+ """Container for the output of a :meth:`TitrationCurve.curve` call."""
54
+
55
+ V: np.ndarray
56
+ """ndarray: Volume(s) of titrant added, in L (or any consistent volume unit)."""
57
+
58
+ response: np.ndarray
59
+ """ndarray: The titration's response variable at each volume in `V`
60
+ (e.g. electrode potential `E` in volts, or `pM`)."""
61
+
62
+
63
+ class TitrationCurve(ABC):
64
+ """Common base for a potentiometric titration-curve model whose response is not pH.
65
+
66
+ Concrete subclasses implement :meth:`response_at`; :meth:`curve` and
67
+ :meth:`find_equivalence_point` are then available for free, mirroring
68
+ :meth:`chemistrykit.solutions.core.base_system.Titration.curve`/
69
+ :meth:`~chemistrykit.solutions.core.base_system.Titration.find_equivalence_point`.
70
+ """
71
+
72
+ @abstractmethod
73
+ def response_at(self, V: np.ndarray) -> np.ndarray:
74
+ """Return the titration's response variable at each titrant volume in `V`.
75
+
76
+ Parameters
77
+ ----------
78
+ V : ndarray
79
+ Volume(s) of titrant added, in L.
80
+
81
+ Returns
82
+ -------
83
+ ndarray
84
+ """
85
+
86
+ def curve(self, V) -> TitrationCurveResult:
87
+ """Compute the full titration curve over a range of titrant volumes.
88
+
89
+ Parameters
90
+ ----------
91
+ V : array-like of float
92
+ Volumes of titrant added, in L.
93
+
94
+ Returns
95
+ -------
96
+ TitrationCurveResult
97
+ """
98
+ V = np.atleast_1d(np.asarray(V, dtype=np.float64))
99
+ response = np.asarray(self.response_at(V), dtype=np.float64)
100
+ return TitrationCurveResult(V=V, response=response)
101
+
102
+ def find_equivalence_point(self, V) -> float:
103
+ r"""Numerically locate the equivalence point as the point of steepest response change.
104
+
105
+ Parameters
106
+ ----------
107
+ V : array-like of float
108
+ A sufficiently fine grid of titrant volumes spanning the
109
+ equivalence point, in L.
110
+
111
+ Returns
112
+ -------
113
+ float
114
+ """
115
+ result = self.curve(V)
116
+ d_response_dV = np.gradient(result.response, result.V)
117
+ idx = int(np.argmax(np.abs(d_response_dV)))
118
+ return float(result.V[idx])