pyeasyspin 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 (340) hide show
  1. pyeasyspin-0.1.0/.gitignore +10 -0
  2. pyeasyspin-0.1.0/LICENSE +24 -0
  3. pyeasyspin-0.1.0/PKG-INFO +170 -0
  4. pyeasyspin-0.1.0/README.md +141 -0
  5. pyeasyspin-0.1.0/docs/API.md +335 -0
  6. pyeasyspin-0.1.0/docs/DEVIATIONS.md +260 -0
  7. pyeasyspin-0.1.0/pyeasyspin/__init__.py +59 -0
  8. pyeasyspin-0.1.0/pyeasyspin/_ham.py +57 -0
  9. pyeasyspin-0.1.0/pyeasyspin/_io.py +151 -0
  10. pyeasyspin-0.1.0/pyeasyspin/_mat.py +106 -0
  11. pyeasyspin-0.1.0/pyeasyspin/_matlab.py +504 -0
  12. pyeasyspin-0.1.0/pyeasyspin/_parallel.py +264 -0
  13. pyeasyspin-0.1.0/pyeasyspin/_public.py +1 -0
  14. pyeasyspin-0.1.0/pyeasyspin/_registry.py +61 -0
  15. pyeasyspin-0.1.0/pyeasyspin/_struct.py +35 -0
  16. pyeasyspin-0.1.0/pyeasyspin/_wignerd_tab.py +1146 -0
  17. pyeasyspin-0.1.0/pyeasyspin/config.py +31 -0
  18. pyeasyspin-0.1.0/pyeasyspin/data/_Fresnel_data_.mat +0 -0
  19. pyeasyspin-0.1.0/pyeasyspin/data/isotopedata.txt +416 -0
  20. pyeasyspin-0.1.0/pyeasyspin/data/spacegroups.txt +637 -0
  21. pyeasyspin-0.1.0/pyeasyspin/fn/__init__.py +0 -0
  22. pyeasyspin-0.1.0/pyeasyspin/fn/adddefaults.py +32 -0
  23. pyeasyspin-0.1.0/pyeasyspin/fn/addnoise.py +65 -0
  24. pyeasyspin-0.1.0/pyeasyspin/fn/allclose.py +22 -0
  25. pyeasyspin-0.1.0/pyeasyspin/fn/allcombinations.py +30 -0
  26. pyeasyspin-0.1.0/pyeasyspin/fn/amu.py +8 -0
  27. pyeasyspin-0.1.0/pyeasyspin/fn/ang2vec.py +28 -0
  28. pyeasyspin-0.1.0/pyeasyspin/fn/angstrom.py +6 -0
  29. pyeasyspin-0.1.0/pyeasyspin/fn/anisosubsys.py +30 -0
  30. pyeasyspin-0.1.0/pyeasyspin/fn/apowin.py +53 -0
  31. pyeasyspin-0.1.0/pyeasyspin/fn/autocorrfft.py +15 -0
  32. pyeasyspin-0.1.0/pyeasyspin/fn/avogadro.py +6 -0
  33. pyeasyspin-0.1.0/pyeasyspin/fn/barn.py +6 -0
  34. pyeasyspin-0.1.0/pyeasyspin/fn/basecorr.py +87 -0
  35. pyeasyspin-0.1.0/pyeasyspin/fn/blochsteady.py +258 -0
  36. pyeasyspin-0.1.0/pyeasyspin/fn/bmagn.py +8 -0
  37. pyeasyspin-0.1.0/pyeasyspin/fn/bohrrad.py +8 -0
  38. pyeasyspin-0.1.0/pyeasyspin/fn/boltzm.py +6 -0
  39. pyeasyspin-0.1.0/pyeasyspin/fn/cardamom.py +465 -0
  40. pyeasyspin-0.1.0/pyeasyspin/fn/cardamom_estimatedifftensor.py +77 -0
  41. pyeasyspin-0.1.0/pyeasyspin/fn/cardamom_propagatedm.py +339 -0
  42. pyeasyspin-0.1.0/pyeasyspin/fn/cardamom_rejectionsample3d.py +44 -0
  43. pyeasyspin-0.1.0/pyeasyspin/fn/cardamom_sobol_generate.py +161 -0
  44. pyeasyspin-0.1.0/pyeasyspin/fn/cardamom_tensortraj.py +31 -0
  45. pyeasyspin-0.1.0/pyeasyspin/fn/cgmatrix.py +51 -0
  46. pyeasyspin-0.1.0/pyeasyspin/fn/chili.py +1208 -0
  47. pyeasyspin-0.1.0/pyeasyspin/fn/chili_basisbuild.py +84 -0
  48. pyeasyspin-0.1.0/pyeasyspin/fn/chili_conjgrad.py +69 -0
  49. pyeasyspin-0.1.0/pyeasyspin/fn/chili_contfracspec.py +50 -0
  50. pyeasyspin-0.1.0/pyeasyspin/fn/chili_eqpopvec.py +477 -0
  51. pyeasyspin-0.1.0/pyeasyspin/fn/chili_lanczos.py +98 -0
  52. pyeasyspin-0.1.0/pyeasyspin/fn/chili_lm.py +866 -0
  53. pyeasyspin-0.1.0/pyeasyspin/fn/chili_startingvector.py +82 -0
  54. pyeasyspin-0.1.0/pyeasyspin/fn/chili_xlmk.py +125 -0
  55. pyeasyspin-0.1.0/pyeasyspin/fn/chkmlver.py +6 -0
  56. pyeasyspin-0.1.0/pyeasyspin/fn/clebschgordan.py +22 -0
  57. pyeasyspin-0.1.0/pyeasyspin/fn/clight.py +6 -0
  58. pyeasyspin-0.1.0/pyeasyspin/fn/commute.py +18 -0
  59. pyeasyspin-0.1.0/pyeasyspin/fn/compisoloop.py +107 -0
  60. pyeasyspin-0.1.0/pyeasyspin/fn/convspec.py +78 -0
  61. pyeasyspin-0.1.0/pyeasyspin/fn/crosscorrfft.py +58 -0
  62. pyeasyspin-0.1.0/pyeasyspin/fn/crystalfield.py +5 -0
  63. pyeasyspin-0.1.0/pyeasyspin/fn/ctafft.py +31 -0
  64. pyeasyspin-0.1.0/pyeasyspin/fn/cubicsolve.py +146 -0
  65. pyeasyspin-0.1.0/pyeasyspin/fn/curry.py +335 -0
  66. pyeasyspin-0.1.0/pyeasyspin/fn/cwepr_plot.py +34 -0
  67. pyeasyspin-0.1.0/pyeasyspin/fn/datasmooth.py +54 -0
  68. pyeasyspin-0.1.0/pyeasyspin/fn/degree.py +6 -0
  69. pyeasyspin-0.1.0/pyeasyspin/fn/deriv.py +29 -0
  70. pyeasyspin-0.1.0/pyeasyspin/fn/diffsuperop.py +178 -0
  71. pyeasyspin-0.1.0/pyeasyspin/fn/diffsuperop_LMK.py +160 -0
  72. pyeasyspin-0.1.0/pyeasyspin/fn/dipbackground.py +31 -0
  73. pyeasyspin-0.1.0/pyeasyspin/fn/dipkernel.py +42 -0
  74. pyeasyspin-0.1.0/pyeasyspin/fn/diptensor.py +74 -0
  75. pyeasyspin-0.1.0/pyeasyspin/fn/easyspin.py +6 -0
  76. pyeasyspin-0.1.0/pyeasyspin/fn/easyspin_compile.py +6 -0
  77. pyeasyspin-0.1.0/pyeasyspin/fn/easyspin_info.py +6 -0
  78. pyeasyspin-0.1.0/pyeasyspin/fn/echarge.py +6 -0
  79. pyeasyspin-0.1.0/pyeasyspin/fn/eeint.py +5 -0
  80. pyeasyspin-0.1.0/pyeasyspin/fn/eigfields.py +5 -0
  81. pyeasyspin-0.1.0/pyeasyspin/fn/elapsedtime.py +29 -0
  82. pyeasyspin-0.1.0/pyeasyspin/fn/elementno2symbol.py +11 -0
  83. pyeasyspin-0.1.0/pyeasyspin/fn/elementsymbol2no.py +17 -0
  84. pyeasyspin-0.1.0/pyeasyspin/fn/emass.py +8 -0
  85. pyeasyspin-0.1.0/pyeasyspin/fn/endorfrq.py +324 -0
  86. pyeasyspin-0.1.0/pyeasyspin/fn/endorfrq_perturb.py +287 -0
  87. pyeasyspin-0.1.0/pyeasyspin/fn/eprconvert.py +48 -0
  88. pyeasyspin-0.1.0/pyeasyspin/fn/eprload.py +106 -0
  89. pyeasyspin-0.1.0/pyeasyspin/fn/eprload_ActiveSpectrum.py +15 -0
  90. pyeasyspin-0.1.0/pyeasyspin/fn/eprload_AdaniDAT.py +22 -0
  91. pyeasyspin-0.1.0/pyeasyspin/fn/eprload_AdaniJSON.py +73 -0
  92. pyeasyspin-0.1.0/pyeasyspin/fn/eprload_BrukerBES3T.py +185 -0
  93. pyeasyspin-0.1.0/pyeasyspin/fn/eprload_BrukerESP.py +184 -0
  94. pyeasyspin-0.1.0/pyeasyspin/fn/eprload_MAGRES.py +30 -0
  95. pyeasyspin-0.1.0/pyeasyspin/fn/eprload_MagnettechBinary.py +62 -0
  96. pyeasyspin-0.1.0/pyeasyspin/fn/eprload_MagnettechXML.py +97 -0
  97. pyeasyspin-0.1.0/pyeasyspin/fn/eprload_VarianE9ETH.py +19 -0
  98. pyeasyspin-0.1.0/pyeasyspin/fn/eprload_d00WISETH.py +21 -0
  99. pyeasyspin-0.1.0/pyeasyspin/fn/eprload_jeol.py +222 -0
  100. pyeasyspin-0.1.0/pyeasyspin/fn/eprload_qeseETH.py +35 -0
  101. pyeasyspin-0.1.0/pyeasyspin/fn/eprload_specman.py +248 -0
  102. pyeasyspin-0.1.0/pyeasyspin/fn/eprsave.py +102 -0
  103. pyeasyspin-0.1.0/pyeasyspin/fn/eps0.py +8 -0
  104. pyeasyspin-0.1.0/pyeasyspin/fn/equivcouple.py +18 -0
  105. pyeasyspin-0.1.0/pyeasyspin/fn/equivsplit.py +17 -0
  106. pyeasyspin-0.1.0/pyeasyspin/fn/erot.py +56 -0
  107. pyeasyspin-0.1.0/pyeasyspin/fn/eschecker.py +6 -0
  108. pyeasyspin-0.1.0/pyeasyspin/fn/esfit.py +738 -0
  109. pyeasyspin-0.1.0/pyeasyspin/fn/esfit_algdefaults.py +70 -0
  110. pyeasyspin-0.1.0/pyeasyspin/fn/esfit_argsparams.py +211 -0
  111. pyeasyspin-0.1.0/pyeasyspin/fn/esfit_genetic.py +169 -0
  112. pyeasyspin-0.1.0/pyeasyspin/fn/esfit_grid.py +101 -0
  113. pyeasyspin-0.1.0/pyeasyspin/fn/esfit_levmar.py +265 -0
  114. pyeasyspin-0.1.0/pyeasyspin/fn/esfit_montecarlo.py +87 -0
  115. pyeasyspin-0.1.0/pyeasyspin/fn/esfit_simplex.py +204 -0
  116. pyeasyspin-0.1.0/pyeasyspin/fn/esfit_swarm.py +119 -0
  117. pyeasyspin-0.1.0/pyeasyspin/fn/esspline1d.py +85 -0
  118. pyeasyspin-0.1.0/pyeasyspin/fn/esspline2d.py +44 -0
  119. pyeasyspin-0.1.0/pyeasyspin/fn/eulang.py +52 -0
  120. pyeasyspin-0.1.0/pyeasyspin/fn/euler2quat.py +46 -0
  121. pyeasyspin-0.1.0/pyeasyspin/fn/evolt.py +7 -0
  122. pyeasyspin-0.1.0/pyeasyspin/fn/evolve.py +303 -0
  123. pyeasyspin-0.1.0/pyeasyspin/fn/ewrls.py +85 -0
  124. pyeasyspin-0.1.0/pyeasyspin/fn/exciteprofile.py +116 -0
  125. pyeasyspin-0.1.0/pyeasyspin/fn/expm_.py +132 -0
  126. pyeasyspin-0.1.0/pyeasyspin/fn/exponfit.py +162 -0
  127. pyeasyspin-0.1.0/pyeasyspin/fn/eyekron.py +20 -0
  128. pyeasyspin-0.1.0/pyeasyspin/fn/faddeeva.py +26 -0
  129. pyeasyspin-0.1.0/pyeasyspin/fn/faraday.py +7 -0
  130. pyeasyspin-0.1.0/pyeasyspin/fn/fastmotion.py +199 -0
  131. pyeasyspin-0.1.0/pyeasyspin/fn/fdaxis.py +20 -0
  132. pyeasyspin-0.1.0/pyeasyspin/fn/fieldmod.py +49 -0
  133. pyeasyspin-0.1.0/pyeasyspin/fn/fresnelC.py +94 -0
  134. pyeasyspin-0.1.0/pyeasyspin/fn/fresnelS.py +10 -0
  135. pyeasyspin-0.1.0/pyeasyspin/fn/gammae.py +8 -0
  136. pyeasyspin-0.1.0/pyeasyspin/fn/garlic.py +723 -0
  137. pyeasyspin-0.1.0/pyeasyspin/fn/gaussian.py +99 -0
  138. pyeasyspin-0.1.0/pyeasyspin/fn/generateoribasis.py +64 -0
  139. pyeasyspin-0.1.0/pyeasyspin/fn/getdstrainops.py +50 -0
  140. pyeasyspin-0.1.0/pyeasyspin/fn/gethamdata.py +46 -0
  141. pyeasyspin-0.1.0/pyeasyspin/fn/gethamdata_hO.py +61 -0
  142. pyeasyspin-0.1.0/pyeasyspin/fn/getmatrix.py +39 -0
  143. pyeasyspin-0.1.0/pyeasyspin/fn/gfree.py +10 -0
  144. pyeasyspin-0.1.0/pyeasyspin/fn/gridinterp.py +130 -0
  145. pyeasyspin-0.1.0/pyeasyspin/fn/gridparam.py +20 -0
  146. pyeasyspin-0.1.0/pyeasyspin/fn/ham.py +104 -0
  147. pyeasyspin-0.1.0/pyeasyspin/fn/ham_cf.py +44 -0
  148. pyeasyspin-0.1.0/pyeasyspin/fn/ham_ee.py +55 -0
  149. pyeasyspin-0.1.0/pyeasyspin/fn/ham_ez.py +61 -0
  150. pyeasyspin-0.1.0/pyeasyspin/fn/ham_ezho.py +194 -0
  151. pyeasyspin-0.1.0/pyeasyspin/fn/ham_hf.py +46 -0
  152. pyeasyspin-0.1.0/pyeasyspin/fn/ham_nn.py +49 -0
  153. pyeasyspin-0.1.0/pyeasyspin/fn/ham_nq.py +36 -0
  154. pyeasyspin-0.1.0/pyeasyspin/fn/ham_nz.py +63 -0
  155. pyeasyspin-0.1.0/pyeasyspin/fn/ham_oz.py +59 -0
  156. pyeasyspin-0.1.0/pyeasyspin/fn/ham_so.py +47 -0
  157. pyeasyspin-0.1.0/pyeasyspin/fn/ham_zf.py +68 -0
  158. pyeasyspin-0.1.0/pyeasyspin/fn/hamsymm.py +255 -0
  159. pyeasyspin-0.1.0/pyeasyspin/fn/hartree.py +8 -0
  160. pyeasyspin-0.1.0/pyeasyspin/fn/hbar.py +8 -0
  161. pyeasyspin-0.1.0/pyeasyspin/fn/hccm.py +42 -0
  162. pyeasyspin-0.1.0/pyeasyspin/fn/hfine.py +5 -0
  163. pyeasyspin-0.1.0/pyeasyspin/fn/hil2liouv.py +23 -0
  164. pyeasyspin-0.1.0/pyeasyspin/fn/hilberttrans.py +26 -0
  165. pyeasyspin-0.1.0/pyeasyspin/fn/histcountsn.py +32 -0
  166. pyeasyspin-0.1.0/pyeasyspin/fn/hsdim.py +21 -0
  167. pyeasyspin-0.1.0/pyeasyspin/fn/isotopologues.py +331 -0
  168. pyeasyspin-0.1.0/pyeasyspin/fn/isto.py +63 -0
  169. pyeasyspin-0.1.0/pyeasyspin/fn/isto2stev.py +25 -0
  170. pyeasyspin-0.1.0/pyeasyspin/fn/istotensor.py +34 -0
  171. pyeasyspin-0.1.0/pyeasyspin/fn/jacobianest.py +134 -0
  172. pyeasyspin-0.1.0/pyeasyspin/fn/jjjsymbol.py +51 -0
  173. pyeasyspin-0.1.0/pyeasyspin/fn/kroneye.py +20 -0
  174. pyeasyspin-0.1.0/pyeasyspin/fn/ksymmetrizer.py +50 -0
  175. pyeasyspin-0.1.0/pyeasyspin/fn/larmorfrq.py +17 -0
  176. pyeasyspin-0.1.0/pyeasyspin/fn/letter2vec.py +18 -0
  177. pyeasyspin-0.1.0/pyeasyspin/fn/levels.py +111 -0
  178. pyeasyspin-0.1.0/pyeasyspin/fn/levelsplot.py +240 -0
  179. pyeasyspin-0.1.0/pyeasyspin/fn/liouvhamiltonian.py +164 -0
  180. pyeasyspin-0.1.0/pyeasyspin/fn/liouvhamiltonian_LMK.py +98 -0
  181. pyeasyspin-0.1.0/pyeasyspin/fn/lisum1i.py +80 -0
  182. pyeasyspin-0.1.0/pyeasyspin/fn/logmsg.py +25 -0
  183. pyeasyspin-0.1.0/pyeasyspin/fn/lorentzian.py +48 -0
  184. pyeasyspin-0.1.0/pyeasyspin/fn/lpsvd.py +115 -0
  185. pyeasyspin-0.1.0/pyeasyspin/fn/lshape.py +32 -0
  186. pyeasyspin-0.1.0/pyeasyspin/fn/magint.py +288 -0
  187. pyeasyspin-0.1.0/pyeasyspin/fn/makespec.py +36 -0
  188. pyeasyspin-0.1.0/pyeasyspin/fn/md_readdcd.py +133 -0
  189. pyeasyspin-0.1.0/pyeasyspin/fn/md_readgro.py +85 -0
  190. pyeasyspin-0.1.0/pyeasyspin/fn/md_readpsf.py +108 -0
  191. pyeasyspin-0.1.0/pyeasyspin/fn/md_readtrr.py +62 -0
  192. pyeasyspin-0.1.0/pyeasyspin/fn/md_savedcd.py +62 -0
  193. pyeasyspin-0.1.0/pyeasyspin/fn/mdhmm.py +208 -0
  194. pyeasyspin-0.1.0/pyeasyspin/fn/mdhmm_em.py +194 -0
  195. pyeasyspin-0.1.0/pyeasyspin/fn/mdhmm_kmeans.py +120 -0
  196. pyeasyspin-0.1.0/pyeasyspin/fn/mdhmm_lbfgsb.py +102 -0
  197. pyeasyspin-0.1.0/pyeasyspin/fn/mdhmm_lbfgsb_wrapper.py +51 -0
  198. pyeasyspin-0.1.0/pyeasyspin/fn/mdload.py +270 -0
  199. pyeasyspin-0.1.0/pyeasyspin/fn/mdtraj2oripot.py +31 -0
  200. pyeasyspin-0.1.0/pyeasyspin/fn/mhz2mt.py +12 -0
  201. pyeasyspin-0.1.0/pyeasyspin/fn/mlpsvd.py +86 -0
  202. pyeasyspin-0.1.0/pyeasyspin/fn/molgas.py +7 -0
  203. pyeasyspin-0.1.0/pyeasyspin/fn/mt2mhz.py +9 -0
  204. pyeasyspin-0.1.0/pyeasyspin/fn/mu0.py +8 -0
  205. pyeasyspin-0.1.0/pyeasyspin/fn/multimatmult.py +25 -0
  206. pyeasyspin-0.1.0/pyeasyspin/fn/multimatmult_.py +46 -0
  207. pyeasyspin-0.1.0/pyeasyspin/fn/multinucstick.py +50 -0
  208. pyeasyspin-0.1.0/pyeasyspin/fn/ndkron.py +24 -0
  209. pyeasyspin-0.1.0/pyeasyspin/fn/nmagn.py +8 -0
  210. pyeasyspin-0.1.0/pyeasyspin/fn/nmass.py +8 -0
  211. pyeasyspin-0.1.0/pyeasyspin/fn/nnint.py +5 -0
  212. pyeasyspin-0.1.0/pyeasyspin/fn/nquad.py +5 -0
  213. pyeasyspin-0.1.0/pyeasyspin/fn/nucabund.py +7 -0
  214. pyeasyspin-0.1.0/pyeasyspin/fn/nucdata.py +65 -0
  215. pyeasyspin-0.1.0/pyeasyspin/fn/nucfrq2d.py +105 -0
  216. pyeasyspin-0.1.0/pyeasyspin/fn/nucgval.py +7 -0
  217. pyeasyspin-0.1.0/pyeasyspin/fn/nuclist2string.py +8 -0
  218. pyeasyspin-0.1.0/pyeasyspin/fn/nucqmom.py +7 -0
  219. pyeasyspin-0.1.0/pyeasyspin/fn/nucspin.py +7 -0
  220. pyeasyspin-0.1.0/pyeasyspin/fn/nucspinadd.py +198 -0
  221. pyeasyspin-0.1.0/pyeasyspin/fn/nucspinkeep.py +20 -0
  222. pyeasyspin-0.1.0/pyeasyspin/fn/nucspinrmv.py +76 -0
  223. pyeasyspin-0.1.0/pyeasyspin/fn/nucstring2list.py +38 -0
  224. pyeasyspin-0.1.0/pyeasyspin/fn/orca2easyspin.py +147 -0
  225. pyeasyspin-0.1.0/pyeasyspin/fn/orca2easyspin_maintxt.py +369 -0
  226. pyeasyspin-0.1.0/pyeasyspin/fn/orca2easyspin_propbin.py +199 -0
  227. pyeasyspin-0.1.0/pyeasyspin/fn/orca2easyspin_proptxt.py +192 -0
  228. pyeasyspin-0.1.0/pyeasyspin/fn/orifun_M2L.py +38 -0
  229. pyeasyspin-0.1.0/pyeasyspin/fn/oripotentialplot.py +171 -0
  230. pyeasyspin-0.1.0/pyeasyspin/fn/orisel.py +95 -0
  231. pyeasyspin-0.1.0/pyeasyspin/fn/p_crystalorientations.py +60 -0
  232. pyeasyspin-0.1.0/pyeasyspin/fn/p_excitationgeometry.py +66 -0
  233. pyeasyspin-0.1.0/pyeasyspin/fn/p_gridsetup.py +95 -0
  234. pyeasyspin-0.1.0/pyeasyspin/fn/p_samplerotation.py +39 -0
  235. pyeasyspin-0.1.0/pyeasyspin/fn/p_sampletype.py +66 -0
  236. pyeasyspin-0.1.0/pyeasyspin/fn/parsefieldparams.py +28 -0
  237. pyeasyspin-0.1.0/pyeasyspin/fn/parseoption.py +30 -0
  238. pyeasyspin-0.1.0/pyeasyspin/fn/pepper.py +702 -0
  239. pyeasyspin-0.1.0/pyeasyspin/fn/photoselect.py +59 -0
  240. pyeasyspin-0.1.0/pyeasyspin/fn/planck.py +6 -0
  241. pyeasyspin-0.1.0/pyeasyspin/fn/plegendre.py +55 -0
  242. pyeasyspin-0.1.0/pyeasyspin/fn/pmass.py +8 -0
  243. pyeasyspin-0.1.0/pyeasyspin/fn/pqorder.py +35 -0
  244. pyeasyspin-0.1.0/pyeasyspin/fn/projecttriangles.py +108 -0
  245. pyeasyspin-0.1.0/pyeasyspin/fn/projectzones.py +77 -0
  246. pyeasyspin-0.1.0/pyeasyspin/fn/propint.py +90 -0
  247. pyeasyspin-0.1.0/pyeasyspin/fn/pulse.py +724 -0
  248. pyeasyspin-0.1.0/pyeasyspin/fn/quat2euler.py +45 -0
  249. pyeasyspin-0.1.0/pyeasyspin/fn/quat2rotmat.py +28 -0
  250. pyeasyspin-0.1.0/pyeasyspin/fn/quatinv.py +11 -0
  251. pyeasyspin-0.1.0/pyeasyspin/fn/quatmult.py +21 -0
  252. pyeasyspin-0.1.0/pyeasyspin/fn/quatvecmult.py +25 -0
  253. pyeasyspin-0.1.0/pyeasyspin/fn/rapidscan2spc.py +69 -0
  254. pyeasyspin-0.1.0/pyeasyspin/fn/rbos.py +98 -0
  255. pyeasyspin-0.1.0/pyeasyspin/fn/rcfilt.py +46 -0
  256. pyeasyspin-0.1.0/pyeasyspin/fn/referenceisotope.py +28 -0
  257. pyeasyspin-0.1.0/pyeasyspin/fn/rescaledata.py +95 -0
  258. pyeasyspin-0.1.0/pyeasyspin/fn/resfields.py +990 -0
  259. pyeasyspin-0.1.0/pyeasyspin/fn/resfields_eig.py +147 -0
  260. pyeasyspin-0.1.0/pyeasyspin/fn/resfields_perturb.py +464 -0
  261. pyeasyspin-0.1.0/pyeasyspin/fn/resfreqs_matrix.py +674 -0
  262. pyeasyspin-0.1.0/pyeasyspin/fn/resfreqs_perturb.py +417 -0
  263. pyeasyspin-0.1.0/pyeasyspin/fn/resonator.py +217 -0
  264. pyeasyspin-0.1.0/pyeasyspin/fn/resonatorprofile.py +86 -0
  265. pyeasyspin-0.1.0/pyeasyspin/fn/rfmixer.py +142 -0
  266. pyeasyspin-0.1.0/pyeasyspin/fn/rotateframe.py +27 -0
  267. pyeasyspin-0.1.0/pyeasyspin/fn/rotaxi2mat.py +27 -0
  268. pyeasyspin-0.1.0/pyeasyspin/fn/rotmat2axi.py +17 -0
  269. pyeasyspin-0.1.0/pyeasyspin/fn/rotmat2quat.py +43 -0
  270. pyeasyspin-0.1.0/pyeasyspin/fn/rotview.py +140 -0
  271. pyeasyspin-0.1.0/pyeasyspin/fn/runprivate.py +6 -0
  272. pyeasyspin-0.1.0/pyeasyspin/fn/rydberg.py +8 -0
  273. pyeasyspin-0.1.0/pyeasyspin/fn/s_plotting.py +156 -0
  274. pyeasyspin-0.1.0/pyeasyspin/fn/s_predefinedexperiments.py +70 -0
  275. pyeasyspin-0.1.0/pyeasyspin/fn/s_propagationsetup.py +139 -0
  276. pyeasyspin-0.1.0/pyeasyspin/fn/s_relaxationsuperoperator.py +49 -0
  277. pyeasyspin-0.1.0/pyeasyspin/fn/s_reorder_events.py +65 -0
  278. pyeasyspin-0.1.0/pyeasyspin/fn/s_sequencer.py +871 -0
  279. pyeasyspin-0.1.0/pyeasyspin/fn/s_thyme.py +706 -0
  280. pyeasyspin-0.1.0/pyeasyspin/fn/saffron.py +1544 -0
  281. pyeasyspin-0.1.0/pyeasyspin/fn/salt.py +702 -0
  282. pyeasyspin-0.1.0/pyeasyspin/fn/sf_pathways.py +81 -0
  283. pyeasyspin-0.1.0/pyeasyspin/fn/sf_peaks.py +400 -0
  284. pyeasyspin-0.1.0/pyeasyspin/fn/sham.py +5 -0
  285. pyeasyspin-0.1.0/pyeasyspin/fn/sigeq.py +32 -0
  286. pyeasyspin-0.1.0/pyeasyspin/fn/signalprocessing.py +127 -0
  287. pyeasyspin-0.1.0/pyeasyspin/fn/sitetransforms.py +124 -0
  288. pyeasyspin-0.1.0/pyeasyspin/fn/soint.py +5 -0
  289. pyeasyspin-0.1.0/pyeasyspin/fn/sop.py +173 -0
  290. pyeasyspin-0.1.0/pyeasyspin/fn/spherharm.py +49 -0
  291. pyeasyspin-0.1.0/pyeasyspin/fn/sphgrid.py +175 -0
  292. pyeasyspin-0.1.0/pyeasyspin/fn/sphrand.py +32 -0
  293. pyeasyspin-0.1.0/pyeasyspin/fn/spidyan.py +264 -0
  294. pyeasyspin-0.1.0/pyeasyspin/fn/spinladder.py +113 -0
  295. pyeasyspin-0.1.0/pyeasyspin/fn/spinvec.py +10 -0
  296. pyeasyspin-0.1.0/pyeasyspin/fn/stackplot.py +98 -0
  297. pyeasyspin-0.1.0/pyeasyspin/fn/stev.py +94 -0
  298. pyeasyspin-0.1.0/pyeasyspin/fn/stochtraj_calcanistorque.py +58 -0
  299. pyeasyspin-0.1.0/pyeasyspin/fn/stochtraj_diffusion.py +273 -0
  300. pyeasyspin-0.1.0/pyeasyspin/fn/stochtraj_grstat.py +46 -0
  301. pyeasyspin-0.1.0/pyeasyspin/fn/stochtraj_jump.py +166 -0
  302. pyeasyspin-0.1.0/pyeasyspin/fn/stochtraj_proprottraj.py +85 -0
  303. pyeasyspin-0.1.0/pyeasyspin/fn/stochtraj_wignerdquat.py +46 -0
  304. pyeasyspin-0.1.0/pyeasyspin/fn/tensor_cart2sph.py +41 -0
  305. pyeasyspin-0.1.0/pyeasyspin/fn/tensor_sph2cart.py +33 -0
  306. pyeasyspin-0.1.0/pyeasyspin/fn/transmitter.py +63 -0
  307. pyeasyspin-0.1.0/pyeasyspin/fn/unitconvert.py +53 -0
  308. pyeasyspin-0.1.0/pyeasyspin/fn/validate_dynord.py +159 -0
  309. pyeasyspin-0.1.0/pyeasyspin/fn/validate_exp.py +278 -0
  310. pyeasyspin-0.1.0/pyeasyspin/fn/validatespinsys.py +743 -0
  311. pyeasyspin-0.1.0/pyeasyspin/fn/vec2ang.py +40 -0
  312. pyeasyspin-0.1.0/pyeasyspin/fn/voigtian.py +74 -0
  313. pyeasyspin-0.1.0/pyeasyspin/fn/wigner3j.py +233 -0
  314. pyeasyspin-0.1.0/pyeasyspin/fn/wigner6j.py +62 -0
  315. pyeasyspin-0.1.0/pyeasyspin/fn/wignerd.py +135 -0
  316. pyeasyspin-0.1.0/pyeasyspin/fn/wrappedgaussian.py +35 -0
  317. pyeasyspin-0.1.0/pyeasyspin/fn/xml2struct.py +97 -0
  318. pyeasyspin-0.1.0/pyeasyspin/fn/zeeman.py +5 -0
  319. pyeasyspin-0.1.0/pyeasyspin/fn/zeemanho.py +5 -0
  320. pyeasyspin-0.1.0/pyeasyspin/fn/zfield.py +5 -0
  321. pyeasyspin-0.1.0/pyeasyspin/fn/zfsframes.py +59 -0
  322. pyeasyspin-0.1.0/pyproject.toml +43 -0
  323. pyeasyspin-0.1.0/tests/reference/cases.json +50 -0
  324. pyeasyspin-0.1.0/tests/reference/make_reference.m +27 -0
  325. pyeasyspin-0.1.0/tests/reference/ref_copper_axial.mat +0 -0
  326. pyeasyspin-0.1.0/tests/reference/ref_manganese_ii.mat +0 -0
  327. pyeasyspin-0.1.0/tests/reference/ref_nitroxide_fastmotion.mat +0 -0
  328. pyeasyspin-0.1.0/tests/reference/ref_nitroxide_rigid.mat +0 -0
  329. pyeasyspin-0.1.0/tests/reference/ref_nitroxide_slowmotion.mat +0 -0
  330. pyeasyspin-0.1.0/tests/reference/ref_proton_3p_eseem.mat +0 -0
  331. pyeasyspin-0.1.0/tests/reference/ref_proton_endor.mat +0 -0
  332. pyeasyspin-0.1.0/tests/reference/ref_vanadyl.mat +0 -0
  333. pyeasyspin-0.1.0/tests/test_chili_basis.py +267 -0
  334. pyeasyspin-0.1.0/tests/test_chili_rank1.py +189 -0
  335. pyeasyspin-0.1.0/tests/test_logmsg.py +29 -0
  336. pyeasyspin-0.1.0/tests/test_matlab_style.py +60 -0
  337. pyeasyspin-0.1.0/tests/test_parallel.py +122 -0
  338. pyeasyspin-0.1.0/tests/test_reference.py +37 -0
  339. pyeasyspin-0.1.0/tests/test_resfields_hybrid.py +94 -0
  340. pyeasyspin-0.1.0/tests/test_signals_pulses.py +128 -0
@@ -0,0 +1,10 @@
1
+ __pycache__/
2
+ *.pyc
3
+ *.nbi
4
+ *.nbc
5
+ .pytest_cache/
6
+ build/
7
+ dist/
8
+ *.egg-info/
9
+ .venv/
10
+ *.asv
@@ -0,0 +1,24 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2006-2024 Stefan Stoll and other 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.
22
+
23
+ ---
24
+ pyeasyspin is a Python port of EasySpin v6.0.12; the notice above applies to it.
@@ -0,0 +1,170 @@
1
+ Metadata-Version: 2.5
2
+ Name: pyeasyspin
3
+ Version: 0.1.0
4
+ Summary: Unofficial Python port of the EasySpin EPR simulation and analysis toolbox (EasySpin 6.0.12)
5
+ Project-URL: Homepage, https://github.com/Sulaimaninator/pyeasyspin
6
+ Project-URL: Issues, https://github.com/Sulaimaninator/pyeasyspin/issues
7
+ Project-URL: EasySpin, https://easyspin.org
8
+ Author: Sulaiman
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: ENDOR,EPR,ESEEM,ESR,EasySpin,simulation,spectroscopy,spin Hamiltonian
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Scientific/Engineering :: Chemistry
16
+ Classifier: Topic :: Scientific/Engineering :: Physics
17
+ Requires-Python: >=3.11
18
+ Requires-Dist: loky>=3.4
19
+ Requires-Dist: numba>=0.60
20
+ Requires-Dist: numpy>=2.0
21
+ Requires-Dist: scipy>=1.13
22
+ Requires-Dist: threadpoolctl>=3.1
23
+ Provides-Extra: plot
24
+ Requires-Dist: matplotlib>=3.9; extra == 'plot'
25
+ Provides-Extra: test
26
+ Requires-Dist: matplotlib>=3.9; extra == 'test'
27
+ Requires-Dist: pytest>=7; extra == 'test'
28
+ Description-Content-Type: text/markdown
29
+
30
+ # pyeasyspin
31
+
32
+ An unofficial Python port of [EasySpin](https://easyspin.org), the MATLAB toolbox for simulating
33
+ and analysing electron paramagnetic resonance (EPR) spectra. It follows EasySpin 6.0.12 function by
34
+ function: the same function names, the same `Sys`/`Exp`/`Opt` fields, the same units, and results
35
+ that agree with EasySpin to about 1e-6 of the peak (exceptions are listed in
36
+ [docs/DEVIATIONS.md](docs/DEVIATIONS.md)).
37
+
38
+ pyeasyspin is not affiliated with or endorsed by the EasySpin authors. If you use it in published
39
+ work, please cite EasySpin:
40
+
41
+ > S. Stoll, A. Schweiger, "EasySpin, a comprehensive software package for spectral simulation and
42
+ > analysis in EPR", *J. Magn. Reson.* **178**, 42–55 (2006).
43
+
44
+ ## Installation
45
+
46
+ ```bash
47
+ pip install pyeasyspin
48
+ ```
49
+
50
+ or, for the latest version from GitHub:
51
+
52
+ ```bash
53
+ pip install git+https://github.com/Sulaimaninator/pyeasyspin
54
+ ```
55
+
56
+ Python 3.11 or later. Dependencies: NumPy, SciPy and Numba; Matplotlib for plotting
57
+ (`pip install "pyeasyspin[plot]"`). The first call of some functions takes a few seconds while
58
+ Numba compiles them.
59
+
60
+ ## Example
61
+
62
+ A script reads much like its MATLAB version:
63
+
64
+ ```python
65
+ from pyeasyspin import *
66
+ import matplotlib.pyplot as plt
67
+
68
+ # Nitroxide, rigid limit, X band
69
+ Sys = Struct()
70
+ Sys.g = [2.0088, 2.0061, 2.0027]
71
+ Sys.Nucs = '14N'
72
+ Sys.A = [16, 16, 86] # MHz
73
+ Sys.lwpp = [0, 0.3] # mT
74
+
75
+ Exp = Struct()
76
+ Exp.mwFreq = 9.5 # GHz
77
+ Exp.Range = [328, 349] # mT
78
+
79
+ B, spc = pepper(Sys, Exp) # field axis (mT) and first-derivative spectrum
80
+ plt.plot(B, spc)
81
+ ```
82
+
83
+ `import pyeasyspin as es` (then `es.pepper`, `es.Struct(g=2.0, lwpp=1.0)`, ...) works as well, and
84
+ `pepper(Sys, Exp, plot=True)` plots the spectrum the way MATLAB's `pepper(Sys,Exp)` does.
85
+
86
+ ## Speed
87
+
88
+ A single simulation runs at about the speed of EasySpin in MATLAB (median of five calls, Intel
89
+ Core i7-1255U laptop):
90
+
91
+ | | EasySpin 6.0.12 | pyeasyspin |
92
+ |---|---|---|
93
+ | Nitroxide powder (`pepper`) | 0.25 s | 0.13 s |
94
+ | Cu(II) powder (`pepper`) | 0.047 s | 0.035 s |
95
+ | Mn(II), S = 5/2 (`pepper`) | 0.23 s | 0.26 s |
96
+ | Three-pulse ESEEM (`saffron`) | 0.043 s | 0.019 s |
97
+ | Nitroxide, slow motion (`chili`) | 0.19 s | 0.58 s |
98
+
99
+ Work that consists of many independent simulations runs on all CPU cores, with no extra toolbox:
100
+
101
+ - `esfit` computes the model points of each step in parallel (the particles of a swarm iteration,
102
+ a genetic generation, grid points, finite-difference Jacobians, simplex candidates). The fit
103
+ follows the same path and gives the same numbers as a serial run.
104
+ - `pepper` splits large orientation grids across cores.
105
+ - `pyeasyspin.parallel_map` runs any batch of simulations, such as a parameter scan.
106
+
107
+ Fitting a Cu(II) powder spectrum (7 parameters; the same data, starting point and settings), on
108
+ the same laptop:
109
+
110
+ | | EasySpin 6.0.12 | pyeasyspin, 1 core | pyeasyspin, all cores |
111
+ |---|---|---|---|
112
+ | Levenberg–Marquardt | 125 s | 126 s | 38 s |
113
+ | Particle swarm, 20 particles | 2186 s | | 692 s |
114
+
115
+ Both fits end at EasySpin's result: the rmsd agrees to six digits, and the fitted parameters agree
116
+ to 2e-6 (Levenberg–Marquardt) and 4e-11 (swarm, which followed EasySpin's random-number path). The
117
+ speed-up depends on the number of cores.
118
+
119
+ `pyeasyspin.config.Workers` sets the number of worker processes (`'auto'`, the default, uses all
120
+ cores; `1` turns parallel evaluation off). The first parallel call starts the workers, which takes
121
+ a few seconds; later calls reuse them.
122
+
123
+ ## What is included
124
+
125
+ All of EasySpin's simulation and analysis functions:
126
+
127
+ - cw EPR: `pepper` (solids), `garlic` (isotropic and fast motion), `chili` (slow motion),
128
+ `cardamom` (trajectory-based);
129
+ - ENDOR (`salt`), pulse EPR (`saffron`, `spidyan`), resonance fields and frequencies, energy levels;
130
+ - fitting (`esfit`, without the GUI);
131
+ - spin operators and Hamiltonians, rotations and orientation grids, line shapes, isotope data,
132
+ physical constants, data import (`eprload`) and processing.
133
+
134
+ Not included: EasySpin's interactive GUIs (the `esfit` window and the `isotopes` browser), the
135
+ deprecated `esfit_legacy`, and installation and update helpers.
136
+
137
+ ## Differences from MATLAB
138
+
139
+ - Structures are `pyeasyspin.Struct`, a `dict` with attribute access (`Sys.g` and `Sys['g']`).
140
+ - Functions with several outputs return a tuple, in MATLAB's order. Where EasySpin's behaviour
141
+ depends on the number of requested outputs, the function takes a `nargout` keyword.
142
+ - Row and column vectors come back as 1-D NumPy arrays, so they plot and index like ordinary
143
+ vectors; matrices keep MATLAB's layout. `pyeasyspin.config.MatlabShapes = True` returns
144
+ MATLAB's exact 1 × N and N × 1 shapes instead.
145
+ - EasySpin plots when a function is called without outputs; here that is `plot=True`.
146
+ - Indices that users see (transitions, sites, ...) stay 1-based, as in EasySpin.
147
+ - Random numbers come from NumPy, so most stochastic results (noise, trajectories) agree with
148
+ EasySpin statistically rather than draw for draw.
149
+ - Some genuine errors in EasySpin 6.0.12 are corrected. Each correction is listed in
150
+ [docs/DEVIATIONS.md](docs/DEVIATIONS.md). For many of them a module flag (for example
151
+ `pyeasyspin.fn.chili.EASYSPIN_RESCALE = True`) restores EasySpin's original behaviour.
152
+
153
+ [docs/API.md](docs/API.md) lists every function with its Python signature.
154
+
155
+ ## How it was validated
156
+
157
+ EasySpin 6.0.12's own test suite was run in MATLAB with every function call recorded, and each
158
+ recorded call was replayed in Python and compared output by output: 1e-6 of the peak for spectra
159
+ and 1e-10 for exact mathematics. The recorded data are too large to distribute. The tests in this
160
+ repository check the package on its own, including a comparison with EasySpin reference spectra
161
+ for standard systems (`tests/reference`):
162
+
163
+ ```bash
164
+ pip install "pyeasyspin[test]"
165
+ pytest
166
+ ```
167
+
168
+ ## License
169
+
170
+ MIT, as EasySpin. See [LICENSE](LICENSE).
@@ -0,0 +1,141 @@
1
+ # pyeasyspin
2
+
3
+ An unofficial Python port of [EasySpin](https://easyspin.org), the MATLAB toolbox for simulating
4
+ and analysing electron paramagnetic resonance (EPR) spectra. It follows EasySpin 6.0.12 function by
5
+ function: the same function names, the same `Sys`/`Exp`/`Opt` fields, the same units, and results
6
+ that agree with EasySpin to about 1e-6 of the peak (exceptions are listed in
7
+ [docs/DEVIATIONS.md](docs/DEVIATIONS.md)).
8
+
9
+ pyeasyspin is not affiliated with or endorsed by the EasySpin authors. If you use it in published
10
+ work, please cite EasySpin:
11
+
12
+ > S. Stoll, A. Schweiger, "EasySpin, a comprehensive software package for spectral simulation and
13
+ > analysis in EPR", *J. Magn. Reson.* **178**, 42–55 (2006).
14
+
15
+ ## Installation
16
+
17
+ ```bash
18
+ pip install pyeasyspin
19
+ ```
20
+
21
+ or, for the latest version from GitHub:
22
+
23
+ ```bash
24
+ pip install git+https://github.com/Sulaimaninator/pyeasyspin
25
+ ```
26
+
27
+ Python 3.11 or later. Dependencies: NumPy, SciPy and Numba; Matplotlib for plotting
28
+ (`pip install "pyeasyspin[plot]"`). The first call of some functions takes a few seconds while
29
+ Numba compiles them.
30
+
31
+ ## Example
32
+
33
+ A script reads much like its MATLAB version:
34
+
35
+ ```python
36
+ from pyeasyspin import *
37
+ import matplotlib.pyplot as plt
38
+
39
+ # Nitroxide, rigid limit, X band
40
+ Sys = Struct()
41
+ Sys.g = [2.0088, 2.0061, 2.0027]
42
+ Sys.Nucs = '14N'
43
+ Sys.A = [16, 16, 86] # MHz
44
+ Sys.lwpp = [0, 0.3] # mT
45
+
46
+ Exp = Struct()
47
+ Exp.mwFreq = 9.5 # GHz
48
+ Exp.Range = [328, 349] # mT
49
+
50
+ B, spc = pepper(Sys, Exp) # field axis (mT) and first-derivative spectrum
51
+ plt.plot(B, spc)
52
+ ```
53
+
54
+ `import pyeasyspin as es` (then `es.pepper`, `es.Struct(g=2.0, lwpp=1.0)`, ...) works as well, and
55
+ `pepper(Sys, Exp, plot=True)` plots the spectrum the way MATLAB's `pepper(Sys,Exp)` does.
56
+
57
+ ## Speed
58
+
59
+ A single simulation runs at about the speed of EasySpin in MATLAB (median of five calls, Intel
60
+ Core i7-1255U laptop):
61
+
62
+ | | EasySpin 6.0.12 | pyeasyspin |
63
+ |---|---|---|
64
+ | Nitroxide powder (`pepper`) | 0.25 s | 0.13 s |
65
+ | Cu(II) powder (`pepper`) | 0.047 s | 0.035 s |
66
+ | Mn(II), S = 5/2 (`pepper`) | 0.23 s | 0.26 s |
67
+ | Three-pulse ESEEM (`saffron`) | 0.043 s | 0.019 s |
68
+ | Nitroxide, slow motion (`chili`) | 0.19 s | 0.58 s |
69
+
70
+ Work that consists of many independent simulations runs on all CPU cores, with no extra toolbox:
71
+
72
+ - `esfit` computes the model points of each step in parallel (the particles of a swarm iteration,
73
+ a genetic generation, grid points, finite-difference Jacobians, simplex candidates). The fit
74
+ follows the same path and gives the same numbers as a serial run.
75
+ - `pepper` splits large orientation grids across cores.
76
+ - `pyeasyspin.parallel_map` runs any batch of simulations, such as a parameter scan.
77
+
78
+ Fitting a Cu(II) powder spectrum (7 parameters; the same data, starting point and settings), on
79
+ the same laptop:
80
+
81
+ | | EasySpin 6.0.12 | pyeasyspin, 1 core | pyeasyspin, all cores |
82
+ |---|---|---|---|
83
+ | Levenberg–Marquardt | 125 s | 126 s | 38 s |
84
+ | Particle swarm, 20 particles | 2186 s | | 692 s |
85
+
86
+ Both fits end at EasySpin's result: the rmsd agrees to six digits, and the fitted parameters agree
87
+ to 2e-6 (Levenberg–Marquardt) and 4e-11 (swarm, which followed EasySpin's random-number path). The
88
+ speed-up depends on the number of cores.
89
+
90
+ `pyeasyspin.config.Workers` sets the number of worker processes (`'auto'`, the default, uses all
91
+ cores; `1` turns parallel evaluation off). The first parallel call starts the workers, which takes
92
+ a few seconds; later calls reuse them.
93
+
94
+ ## What is included
95
+
96
+ All of EasySpin's simulation and analysis functions:
97
+
98
+ - cw EPR: `pepper` (solids), `garlic` (isotropic and fast motion), `chili` (slow motion),
99
+ `cardamom` (trajectory-based);
100
+ - ENDOR (`salt`), pulse EPR (`saffron`, `spidyan`), resonance fields and frequencies, energy levels;
101
+ - fitting (`esfit`, without the GUI);
102
+ - spin operators and Hamiltonians, rotations and orientation grids, line shapes, isotope data,
103
+ physical constants, data import (`eprload`) and processing.
104
+
105
+ Not included: EasySpin's interactive GUIs (the `esfit` window and the `isotopes` browser), the
106
+ deprecated `esfit_legacy`, and installation and update helpers.
107
+
108
+ ## Differences from MATLAB
109
+
110
+ - Structures are `pyeasyspin.Struct`, a `dict` with attribute access (`Sys.g` and `Sys['g']`).
111
+ - Functions with several outputs return a tuple, in MATLAB's order. Where EasySpin's behaviour
112
+ depends on the number of requested outputs, the function takes a `nargout` keyword.
113
+ - Row and column vectors come back as 1-D NumPy arrays, so they plot and index like ordinary
114
+ vectors; matrices keep MATLAB's layout. `pyeasyspin.config.MatlabShapes = True` returns
115
+ MATLAB's exact 1 × N and N × 1 shapes instead.
116
+ - EasySpin plots when a function is called without outputs; here that is `plot=True`.
117
+ - Indices that users see (transitions, sites, ...) stay 1-based, as in EasySpin.
118
+ - Random numbers come from NumPy, so most stochastic results (noise, trajectories) agree with
119
+ EasySpin statistically rather than draw for draw.
120
+ - Some genuine errors in EasySpin 6.0.12 are corrected. Each correction is listed in
121
+ [docs/DEVIATIONS.md](docs/DEVIATIONS.md). For many of them a module flag (for example
122
+ `pyeasyspin.fn.chili.EASYSPIN_RESCALE = True`) restores EasySpin's original behaviour.
123
+
124
+ [docs/API.md](docs/API.md) lists every function with its Python signature.
125
+
126
+ ## How it was validated
127
+
128
+ EasySpin 6.0.12's own test suite was run in MATLAB with every function call recorded, and each
129
+ recorded call was replayed in Python and compared output by output: 1e-6 of the peak for spectra
130
+ and 1e-10 for exact mathematics. The recorded data are too large to distribute. The tests in this
131
+ repository check the package on its own, including a comparison with EasySpin reference spectra
132
+ for standard systems (`tests/reference`):
133
+
134
+ ```bash
135
+ pip install "pyeasyspin[test]"
136
+ pytest
137
+ ```
138
+
139
+ ## License
140
+
141
+ MIT, as EasySpin. See [LICENSE](LICENSE).