mdapy 1.0.9__tar.gz → 2.0.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 (530) hide show
  1. mdapy-2.0.0/.gitattributes +5 -0
  2. mdapy-2.0.0/.gitignore +32 -0
  3. mdapy-2.0.0/CITATION.cff +23 -0
  4. mdapy-2.0.0/CMakeLists.txt +129 -0
  5. mdapy-2.0.0/LICENSE +373 -0
  6. mdapy-2.0.0/PKG-INFO +253 -0
  7. mdapy-2.0.0/README.md +203 -0
  8. mdapy-2.0.0/pyproject.toml +119 -0
  9. mdapy-2.0.0/src/cpp/analysis/dislocations.cpp +204 -0
  10. mdapy-2.0.0/src/cpp/analysis/dislocations.h +58 -0
  11. mdapy-2.0.0/src/cpp/analysis/distribution.cpp +320 -0
  12. mdapy-2.0.0/src/cpp/analysis/distribution.h +65 -0
  13. mdapy-2.0.0/src/cpp/analysis/dxa_clusters.cpp +404 -0
  14. mdapy-2.0.0/src/cpp/analysis/dxa_clusters.h +82 -0
  15. mdapy-2.0.0/src/cpp/analysis/dxa_mapping.cpp +314 -0
  16. mdapy-2.0.0/src/cpp/analysis/dxa_mapping.h +67 -0
  17. mdapy-2.0.0/src/cpp/analysis/dxa_math.h +91 -0
  18. mdapy-2.0.0/src/cpp/analysis/dxa_mesh.cpp +299 -0
  19. mdapy-2.0.0/src/cpp/analysis/dxa_mesh.h +66 -0
  20. mdapy-2.0.0/src/cpp/analysis/dxa_structure.cpp +404 -0
  21. mdapy-2.0.0/src/cpp/analysis/dxa_structure.h +41 -0
  22. mdapy-2.0.0/src/cpp/analysis/dxa_tracer.cpp +1210 -0
  23. mdapy-2.0.0/src/cpp/analysis/dxa_tracer.h +67 -0
  24. mdapy-2.0.0/src/cpp/analysis/elastic_strain.cpp +118 -0
  25. mdapy-2.0.0/src/cpp/analysis/elastic_strain.h +46 -0
  26. mdapy-2.0.0/src/cpp/analysis/geometry.cpp +633 -0
  27. mdapy-2.0.0/src/cpp/analysis/geometry.h +95 -0
  28. mdapy-2.0.0/src/cpp/analysis/isosurface.cpp +162 -0
  29. mdapy-2.0.0/src/cpp/analysis/isosurface.h +34 -0
  30. mdapy-2.0.0/src/cpp/analysis/rings.cpp +257 -0
  31. mdapy-2.0.0/src/cpp/analysis/rings.h +43 -0
  32. mdapy-2.0.0/src/cpp/analysis/soap.cpp +229 -0
  33. mdapy-2.0.0/src/cpp/analysis/soap.h +59 -0
  34. mdapy-2.0.0/src/cpp/analysis/steinhardt.cpp +353 -0
  35. mdapy-2.0.0/src/cpp/analysis/steinhardt.h +51 -0
  36. mdapy-2.0.0/src/cpp/analysis/strain.cpp +242 -0
  37. mdapy-2.0.0/src/cpp/analysis/strain.h +61 -0
  38. mdapy-2.0.0/src/cpp/analysis/surface_mesh.cpp +334 -0
  39. mdapy-2.0.0/src/cpp/analysis/surface_mesh.h +64 -0
  40. mdapy-2.0.0/src/cpp/analysis/tessellation.cpp +265 -0
  41. mdapy-2.0.0/src/cpp/analysis/tessellation.h +37 -0
  42. mdapy-2.0.0/src/cpp/analysis/voronoi.cpp +598 -0
  43. mdapy-2.0.0/src/cpp/analysis/voronoi.h +84 -0
  44. mdapy-2.0.0/src/cpp/bindings/analysis.cpp +991 -0
  45. mdapy-2.0.0/src/cpp/bindings/build.cpp +220 -0
  46. mdapy-2.0.0/src/cpp/bindings/calculators.cpp +289 -0
  47. mdapy-2.0.0/src/cpp/bindings/control.h +79 -0
  48. mdapy-2.0.0/src/cpp/bindings/core.cpp +68 -0
  49. mdapy-2.0.0/src/cpp/bindings/frames.h +56 -0
  50. mdapy-2.0.0/src/cpp/bindings/identify.cpp +469 -0
  51. mdapy-2.0.0/src/cpp/bindings/io.cpp +261 -0
  52. mdapy-2.0.0/src/cpp/bindings/list_view.h +72 -0
  53. mdapy-2.0.0/src/cpp/bindings/module.cpp +60 -0
  54. mdapy-2.0.0/src/cpp/bindings/neighbor.cpp +305 -0
  55. mdapy-2.0.0/src/cpp/bindings/testing.cpp +194 -0
  56. mdapy-2.0.0/src/cpp/bindings/visualization.cpp +190 -0
  57. mdapy-2.0.0/src/cpp/build/crystal.cpp +79 -0
  58. mdapy-2.0.0/src/cpp/build/crystal.h +37 -0
  59. mdapy-2.0.0/src/cpp/build/polycrystal.cpp +332 -0
  60. mdapy-2.0.0/src/cpp/build/polycrystal.h +53 -0
  61. mdapy-2.0.0/src/cpp/build/sqs.cpp +205 -0
  62. mdapy-2.0.0/src/cpp/build/sqs.h +44 -0
  63. mdapy-2.0.0/src/cpp/calculators/eam.cpp +143 -0
  64. mdapy-2.0.0/src/cpp/calculators/eam.h +65 -0
  65. mdapy-2.0.0/src/cpp/calculators/nep.cpp +634 -0
  66. mdapy-2.0.0/src/cpp/calculators/nep.h +80 -0
  67. mdapy-2.0.0/src/cpp/core/buffer.h +46 -0
  68. mdapy-2.0.0/src/cpp/core/hardware.cpp +76 -0
  69. mdapy-2.0.0/src/cpp/core/hardware.h +19 -0
  70. mdapy-2.0.0/src/cpp/core/index.h +37 -0
  71. mdapy-2.0.0/src/cpp/core/parallel.cpp +535 -0
  72. mdapy-2.0.0/src/cpp/core/parallel.h +118 -0
  73. mdapy-2.0.0/src/cpp/core/voronoi_cell.h +292 -0
  74. mdapy-2.0.0/src/cpp/core/wrap.h +72 -0
  75. mdapy-2.0.0/src/cpp/identify/cna.h +92 -0
  76. mdapy-2.0.0/src/cpp/identify/grains.cpp +879 -0
  77. mdapy-2.0.0/src/cpp/identify/grains.h +77 -0
  78. mdapy-2.0.0/src/cpp/identify/planar_faults.cpp +144 -0
  79. mdapy-2.0.0/src/cpp/identify/planar_faults.h +43 -0
  80. mdapy-2.0.0/src/cpp/identify/ptm.cpp +777 -0
  81. mdapy-2.0.0/src/cpp/identify/ptm.h +65 -0
  82. mdapy-2.0.0/src/cpp/identify/ptm_data.cpp +631 -0
  83. mdapy-2.0.0/src/cpp/identify/ptm_data.h +97 -0
  84. mdapy-2.0.0/src/cpp/identify/ptm_tools.cpp +665 -0
  85. mdapy-2.0.0/src/cpp/identify/ptm_tools.h +109 -0
  86. mdapy-2.0.0/src/cpp/identify/structure.cpp +605 -0
  87. mdapy-2.0.0/src/cpp/identify/structure.h +120 -0
  88. mdapy-2.0.0/src/cpp/io/powers_of_five.h +675 -0
  89. mdapy-2.0.0/src/cpp/io/text.cpp +1317 -0
  90. mdapy-2.0.0/src/cpp/io/text.h +104 -0
  91. mdapy-2.0.0/src/cpp/neighbor/cell_list.cpp +620 -0
  92. mdapy-2.0.0/src/cpp/neighbor/cell_list.h +304 -0
  93. mdapy-2.0.0/src/cpp/neighbor/frame.h +113 -0
  94. mdapy-2.0.0/src/cpp/neighbor/frames.cpp +41 -0
  95. mdapy-2.0.0/src/cpp/neighbor/frames.h +59 -0
  96. mdapy-2.0.0/src/cpp/neighbor/kd_tree.cpp +662 -0
  97. mdapy-2.0.0/src/cpp/neighbor/kd_tree.h +138 -0
  98. mdapy-2.0.0/src/cpp/neighbor/list_view.h +94 -0
  99. mdapy-2.0.0/src/cpp/visualization/render.cpp +1102 -0
  100. mdapy-2.0.0/src/cpp/visualization/render.h +109 -0
  101. mdapy-2.0.0/src/cpp/visualization/render_d3d12.cpp +503 -0
  102. mdapy-2.0.0/src/cpp/visualization/render_d3d12.dxil +0 -0
  103. mdapy-2.0.0/src/cpp/visualization/render_d3d12.hlsl +609 -0
  104. mdapy-2.0.0/src/cpp/visualization/render_d3d12_rt.dxil +0 -0
  105. mdapy-2.0.0/src/cpp/visualization/render_gpu.h +85 -0
  106. mdapy-2.0.0/src/cpp/visualization/render_metal.mm +931 -0
  107. mdapy-2.0.0/src/cpp/visualization/render_vulkan.comp +593 -0
  108. mdapy-2.0.0/src/cpp/visualization/render_vulkan.cpp +862 -0
  109. mdapy-2.0.0/src/cpp/visualization/render_vulkan.spv +0 -0
  110. mdapy-2.0.0/src/cpp/visualization/render_vulkan_rt.spv +0 -0
  111. mdapy-2.0.0/src/mdapy/__init__.py +67 -0
  112. mdapy-2.0.0/src/mdapy/analysis/__init__.py +140 -0
  113. mdapy-2.0.0/src/mdapy/analysis/_binning.py +158 -0
  114. mdapy-2.0.0/src/mdapy/analysis/_bonds.py +726 -0
  115. mdapy-2.0.0/src/mdapy/analysis/_correlation.py +271 -0
  116. mdapy-2.0.0/src/mdapy/analysis/_dislocations.py +508 -0
  117. mdapy-2.0.0/src/mdapy/analysis/_displacement.py +115 -0
  118. mdapy-2.0.0/src/mdapy/analysis/_distribution.py +433 -0
  119. mdapy-2.0.0/src/mdapy/analysis/_dynamics.py +547 -0
  120. mdapy-2.0.0/src/mdapy/analysis/_elastic_strain.py +163 -0
  121. mdapy-2.0.0/src/mdapy/analysis/_entropy.py +159 -0
  122. mdapy-2.0.0/src/mdapy/analysis/_isosurface.py +73 -0
  123. mdapy-2.0.0/src/mdapy/analysis/_polyhedra.py +186 -0
  124. mdapy-2.0.0/src/mdapy/analysis/_rings.py +232 -0
  125. mdapy-2.0.0/src/mdapy/analysis/_species.py +277 -0
  126. mdapy-2.0.0/src/mdapy/analysis/_statistics.py +235 -0
  127. mdapy-2.0.0/src/mdapy/analysis/_steinhardt.py +279 -0
  128. mdapy-2.0.0/src/mdapy/analysis/_strain.py +184 -0
  129. mdapy-2.0.0/src/mdapy/analysis/_surface_mesh.py +234 -0
  130. mdapy-2.0.0/src/mdapy/analysis/_symmetry.py +236 -0
  131. mdapy-2.0.0/src/mdapy/analysis/_temperature.py +121 -0
  132. mdapy-2.0.0/src/mdapy/analysis/_voronoi.py +234 -0
  133. mdapy-2.0.0/src/mdapy/analysis/_wigner_seitz.py +118 -0
  134. mdapy-2.0.0/src/mdapy/build/__init__.py +56 -0
  135. mdapy-2.0.0/src/mdapy/build/_alloy.py +59 -0
  136. mdapy-2.0.0/src/mdapy/build/_anisotropic.py +106 -0
  137. mdapy-2.0.0/src/mdapy/build/_crystal.py +340 -0
  138. mdapy-2.0.0/src/mdapy/build/_defects.py +321 -0
  139. mdapy-2.0.0/src/mdapy/build/_dislocation.py +178 -0
  140. mdapy-2.0.0/src/mdapy/build/_dislocation_models.py +468 -0
  141. mdapy-2.0.0/src/mdapy/build/_graphene.py +238 -0
  142. mdapy-2.0.0/src/mdapy/build/_polycrystal.py +497 -0
  143. mdapy-2.0.0/src/mdapy/build/_sqs.py +119 -0
  144. mdapy-2.0.0/src/mdapy/calculators/__init__.py +22 -0
  145. mdapy-2.0.0/src/mdapy/calculators/_base.py +170 -0
  146. mdapy-2.0.0/src/mdapy/calculators/_eam.py +359 -0
  147. mdapy-2.0.0/src/mdapy/calculators/_lammps.py +300 -0
  148. mdapy-2.0.0/src/mdapy/calculators/_nep.py +401 -0
  149. mdapy-2.0.0/src/mdapy/calculators/_vasp.py +215 -0
  150. mdapy-2.0.0/src/mdapy/calculators/_zhou.py +133 -0
  151. mdapy-2.0.0/src/mdapy/calculators/testing.py +254 -0
  152. mdapy-2.0.0/src/mdapy/core/__init__.py +15 -0
  153. mdapy-2.0.0/src/mdapy/core/_atoms.py +59 -0
  154. mdapy-2.0.0/src/mdapy/core/_conditions.py +271 -0
  155. mdapy-2.0.0/src/mdapy/core/_frames.py +83 -0
  156. mdapy-2.0.0/src/mdapy/core/box.py +511 -0
  157. mdapy-2.0.0/src/mdapy/core/indices.py +16 -0
  158. mdapy-2.0.0/src/mdapy/core/mesh.py +224 -0
  159. mdapy-2.0.0/src/mdapy/core/result.py +33 -0
  160. mdapy-2.0.0/src/mdapy/core/system.py +917 -0
  161. mdapy-2.0.0/src/mdapy/core/threads.py +166 -0
  162. mdapy-2.0.0/src/mdapy/core/topology.py +209 -0
  163. mdapy-2.0.0/src/mdapy/core/versions.py +94 -0
  164. mdapy-2.0.0/src/mdapy/elements.py +705 -0
  165. mdapy-2.0.0/src/mdapy/errors.py +67 -0
  166. mdapy-2.0.0/src/mdapy/identify/__init__.py +39 -0
  167. mdapy-2.0.0/src/mdapy/identify/_grains.py +314 -0
  168. mdapy-2.0.0/src/mdapy/identify/_planar_faults.py +184 -0
  169. mdapy-2.0.0/src/mdapy/identify/_ptm.py +275 -0
  170. mdapy-2.0.0/src/mdapy/identify/_structure.py +526 -0
  171. mdapy-2.0.0/src/mdapy/interop/__init__.py +25 -0
  172. mdapy-2.0.0/src/mdapy/interop/_ase.py +178 -0
  173. mdapy-2.0.0/src/mdapy/interop/_ase_calculator.py +199 -0
  174. mdapy-2.0.0/src/mdapy/interop/_freud.py +88 -0
  175. mdapy-2.0.0/src/mdapy/interop/_ovito.py +245 -0
  176. mdapy-2.0.0/src/mdapy/interop/_pymatgen.py +123 -0
  177. mdapy-2.0.0/src/mdapy/io/__init__.py +30 -0
  178. mdapy-2.0.0/src/mdapy/io/_cif.py +340 -0
  179. mdapy-2.0.0/src/mdapy/io/_extxyz.py +628 -0
  180. mdapy-2.0.0/src/mdapy/io/_files.py +227 -0
  181. mdapy-2.0.0/src/mdapy/io/_lammps_data.py +1091 -0
  182. mdapy-2.0.0/src/mdapy/io/_lammps_dump.py +592 -0
  183. mdapy-2.0.0/src/mdapy/io/_native.py +475 -0
  184. mdapy-2.0.0/src/mdapy/io/_outcar.py +200 -0
  185. mdapy-2.0.0/src/mdapy/io/_pdb.py +188 -0
  186. mdapy-2.0.0/src/mdapy/io/_poscar.py +234 -0
  187. mdapy-2.0.0/src/mdapy/io/_registry.py +268 -0
  188. mdapy-2.0.0/src/mdapy/io/_text.py +191 -0
  189. mdapy-2.0.0/src/mdapy/io/_trajectory.py +397 -0
  190. mdapy-2.0.0/src/mdapy/lattice_dynamics/__init__.py +52 -0
  191. mdapy-2.0.0/src/mdapy/lattice_dynamics/_elastic.py +259 -0
  192. mdapy-2.0.0/src/mdapy/lattice_dynamics/_md_elastic.py +135 -0
  193. mdapy-2.0.0/src/mdapy/lattice_dynamics/_phonons.py +1365 -0
  194. mdapy-2.0.0/src/mdapy/lattice_dynamics/_quasi_harmonic.py +340 -0
  195. mdapy-2.0.0/src/mdapy/lattice_dynamics/_sheets.py +50 -0
  196. mdapy-2.0.0/src/mdapy/lattice_dynamics/_thermal_elastic.py +308 -0
  197. mdapy-2.0.0/src/mdapy/lattice_dynamics/_thermal_phonons.py +342 -0
  198. mdapy-2.0.0/src/mdapy/mlip/__init__.py +42 -0
  199. mdapy-2.0.0/src/mdapy/mlip/_selection.py +254 -0
  200. mdapy-2.0.0/src/mdapy/mlip/_soap.py +240 -0
  201. mdapy-2.0.0/src/mdapy/mlip/_training.py +495 -0
  202. mdapy-2.0.0/src/mdapy/neighbor/__init__.py +14 -0
  203. mdapy-2.0.0/src/mdapy/neighbor/_expand.py +92 -0
  204. mdapy-2.0.0/src/mdapy/neighbor/_neighbor_list.py +547 -0
  205. mdapy-2.0.0/src/mdapy/neighbor/_overlapping.py +115 -0
  206. mdapy-2.0.0/src/mdapy/simulation/__init__.py +66 -0
  207. mdapy-2.0.0/src/mdapy/simulation/_defect_energies.py +288 -0
  208. mdapy-2.0.0/src/mdapy/simulation/_dynamics.py +441 -0
  209. mdapy-2.0.0/src/mdapy/simulation/_fault_free_energy.py +280 -0
  210. mdapy-2.0.0/src/mdapy/simulation/_free_energy.py +1042 -0
  211. mdapy-2.0.0/src/mdapy/simulation/_melting.py +547 -0
  212. mdapy-2.0.0/src/mdapy/simulation/_minimize.py +352 -0
  213. mdapy-2.0.0/src/mdapy/simulation/_phase_diagram.py +478 -0
  214. mdapy-2.0.0/src/mdapy/transform/__init__.py +30 -0
  215. mdapy-2.0.0/src/mdapy/transform/_affine.py +105 -0
  216. mdapy-2.0.0/src/mdapy/transform/_bonds.py +63 -0
  217. mdapy-2.0.0/src/mdapy/transform/_combine.py +115 -0
  218. mdapy-2.0.0/src/mdapy/transform/_drift.py +109 -0
  219. mdapy-2.0.0/src/mdapy/transform/_frames.py +149 -0
  220. mdapy-2.0.0/src/mdapy/transform/_periodic.py +167 -0
  221. mdapy-2.0.0/src/mdapy/transform/_slice.py +164 -0
  222. mdapy-2.0.0/src/mdapy/units.py +79 -0
  223. mdapy-2.0.0/src/mdapy/visualization/__init__.py +62 -0
  224. mdapy-2.0.0/src/mdapy/visualization/_colormap_tables.py +527 -0
  225. mdapy-2.0.0/src/mdapy/visualization/_elements.py +142 -0
  226. mdapy-2.0.0/src/mdapy/visualization/_legend.py +171 -0
  227. mdapy-2.0.0/src/mdapy/visualization/_movie.py +134 -0
  228. mdapy-2.0.0/src/mdapy/visualization/_render.py +1012 -0
  229. mdapy-2.0.0/src/mdapy/visualization/_scene.py +1076 -0
  230. mdapy-2.0.0/src/mdapy/visualization/_voxels.py +65 -0
  231. mdapy-2.0.0/src/mdapy/visualization/plot.py +726 -0
  232. mdapy-1.0.9/.gitmodules +0 -3
  233. mdapy-1.0.9/CMakeLists.txt +0 -595
  234. mdapy-1.0.9/LICENSE +0 -704
  235. mdapy-1.0.9/PKG-INFO +0 -55
  236. mdapy-1.0.9/README.rst +0 -362
  237. mdapy-1.0.9/THIRD_PARTY_NOTICES +0 -253
  238. mdapy-1.0.9/extern/NEPCPU/LICENSE +0 -674
  239. mdapy-1.0.9/extern/NEPCPU/dftd3para.h +0 -12491
  240. mdapy-1.0.9/extern/NEPCPU/ewald_nep.cpp +0 -282
  241. mdapy-1.0.9/extern/NEPCPU/ewald_nep.h +0 -46
  242. mdapy-1.0.9/extern/NEPCPU/neighbor_nep.cpp +0 -397
  243. mdapy-1.0.9/extern/NEPCPU/neighbor_nep.h +0 -39
  244. mdapy-1.0.9/extern/NEPCPU/nep.cpp +0 -3095
  245. mdapy-1.0.9/extern/NEPCPU/nep.h +0 -241
  246. mdapy-1.0.9/extern/NEPCPU/nep_utilities.h +0 -929
  247. mdapy-1.0.9/extern/ptm/CMakeLists.txt +0 -84
  248. mdapy-1.0.9/extern/ptm/LICENSE +0 -7
  249. mdapy-1.0.9/extern/ptm/README.md +0 -25
  250. mdapy-1.0.9/extern/ptm/ptm_alloy_types.cpp +0 -121
  251. mdapy-1.0.9/extern/ptm/ptm_alloy_types.h +0 -22
  252. mdapy-1.0.9/extern/ptm/ptm_canonical_coloured.cpp +0 -179
  253. mdapy-1.0.9/extern/ptm/ptm_canonical_coloured.h +0 -21
  254. mdapy-1.0.9/extern/ptm/ptm_constants.h +0 -107
  255. mdapy-1.0.9/extern/ptm/ptm_convex_hull_incremental.cpp +0 -415
  256. mdapy-1.0.9/extern/ptm/ptm_convex_hull_incremental.h +0 -39
  257. mdapy-1.0.9/extern/ptm/ptm_correspondences.cpp +0 -208
  258. mdapy-1.0.9/extern/ptm/ptm_correspondences.h +0 -26
  259. mdapy-1.0.9/extern/ptm/ptm_deformation_gradient.cpp +0 -30
  260. mdapy-1.0.9/extern/ptm/ptm_deformation_gradient.h +0 -256
  261. mdapy-1.0.9/extern/ptm/ptm_functions.h +0 -37
  262. mdapy-1.0.9/extern/ptm/ptm_fundamental_mappings.h +0 -405
  263. mdapy-1.0.9/extern/ptm/ptm_graph_data.cpp +0 -2072
  264. mdapy-1.0.9/extern/ptm/ptm_graph_data.h +0 -49
  265. mdapy-1.0.9/extern/ptm/ptm_graph_tools.cpp +0 -65
  266. mdapy-1.0.9/extern/ptm/ptm_graph_tools.h +0 -24
  267. mdapy-1.0.9/extern/ptm/ptm_index.cpp +0 -193
  268. mdapy-1.0.9/extern/ptm/ptm_initialize_data.cpp +0 -80
  269. mdapy-1.0.9/extern/ptm/ptm_initialize_data.h +0 -216
  270. mdapy-1.0.9/extern/ptm/ptm_map_templates.cpp +0 -173
  271. mdapy-1.0.9/extern/ptm/ptm_multishell.cpp +0 -184
  272. mdapy-1.0.9/extern/ptm/ptm_multishell.h +0 -28
  273. mdapy-1.0.9/extern/ptm/ptm_neighbour_ordering.cpp +0 -202
  274. mdapy-1.0.9/extern/ptm/ptm_neighbour_ordering.h +0 -22
  275. mdapy-1.0.9/extern/ptm/ptm_normalize_vertices.cpp +0 -68
  276. mdapy-1.0.9/extern/ptm/ptm_normalize_vertices.h +0 -22
  277. mdapy-1.0.9/extern/ptm/ptm_polar.cpp +0 -341
  278. mdapy-1.0.9/extern/ptm/ptm_polar.h +0 -25
  279. mdapy-1.0.9/extern/ptm/ptm_quat.cpp +0 -493
  280. mdapy-1.0.9/extern/ptm/ptm_quat.h +0 -181
  281. mdapy-1.0.9/extern/ptm/ptm_scaled_templates.h +0 -222
  282. mdapy-1.0.9/extern/ptm/ptm_solid_angles.cpp +0 -50
  283. mdapy-1.0.9/extern/ptm/ptm_solid_angles.h +0 -20
  284. mdapy-1.0.9/extern/ptm/ptm_structure_matcher.cpp +0 -382
  285. mdapy-1.0.9/extern/ptm/ptm_structure_matcher.h +0 -36
  286. mdapy-1.0.9/extern/ptm/ptm_templates.h +0 -238
  287. mdapy-1.0.9/extern/ptm/ptm_voronoi_cell.cpp +0 -1476
  288. mdapy-1.0.9/extern/ptm/ptm_voronoi_cell.h +0 -367
  289. mdapy-1.0.9/extern/ptm/ptm_voronoi_config.h +0 -172
  290. mdapy-1.0.9/extern/stb/LICENSE.txt +0 -37
  291. mdapy-1.0.9/extern/stb/README.md +0 -184
  292. mdapy-1.0.9/extern/stb/stb_image.h +0 -7988
  293. mdapy-1.0.9/extern/stb/stb_image_write.h +0 -1724
  294. mdapy-1.0.9/extern/tachyon/Copyright +0 -30
  295. mdapy-1.0.9/extern/tachyon/README +0 -120
  296. mdapy-1.0.9/extern/tachyon/src/.#TachyonOptiXShaders.cu.1.29 +0 -3082
  297. mdapy-1.0.9/extern/tachyon/src/.#TachyonOptiXShaders.cu.1.54 +0 -3626
  298. mdapy-1.0.9/extern/tachyon/src/ProfileHooks.h +0 -292
  299. mdapy-1.0.9/extern/tachyon/src/TachyonOptiX.cu +0 -3692
  300. mdapy-1.0.9/extern/tachyon/src/TachyonOptiX.h +0 -1330
  301. mdapy-1.0.9/extern/tachyon/src/TachyonOptiXShaders.cu +0 -3589
  302. mdapy-1.0.9/extern/tachyon/src/TachyonOptiXShaders.h +0 -1684
  303. mdapy-1.0.9/extern/tachyon/src/api.c +0 -1490
  304. mdapy-1.0.9/extern/tachyon/src/apigeom.c +0 -253
  305. mdapy-1.0.9/extern/tachyon/src/apitrigeom.c +0 -190
  306. mdapy-1.0.9/extern/tachyon/src/apitrigeom.h +0 -17
  307. mdapy-1.0.9/extern/tachyon/src/box.c +0 -145
  308. mdapy-1.0.9/extern/tachyon/src/box.h +0 -23
  309. mdapy-1.0.9/extern/tachyon/src/camera.c +0 -1087
  310. mdapy-1.0.9/extern/tachyon/src/camera.h +0 -46
  311. mdapy-1.0.9/extern/tachyon/src/coordsys.c +0 -58
  312. mdapy-1.0.9/extern/tachyon/src/coordsys.h +0 -13
  313. mdapy-1.0.9/extern/tachyon/src/cylinder.c +0 -255
  314. mdapy-1.0.9/extern/tachyon/src/cylinder.h +0 -34
  315. mdapy-1.0.9/extern/tachyon/src/extvol.c +0 -287
  316. mdapy-1.0.9/extern/tachyon/src/extvol.h +0 -26
  317. mdapy-1.0.9/extern/tachyon/src/global.c +0 -24
  318. mdapy-1.0.9/extern/tachyon/src/global.h +0 -19
  319. mdapy-1.0.9/extern/tachyon/src/grid.c +0 -693
  320. mdapy-1.0.9/extern/tachyon/src/grid.h +0 -73
  321. mdapy-1.0.9/extern/tachyon/src/hash.c +0 -275
  322. mdapy-1.0.9/extern/tachyon/src/hash.h +0 -43
  323. mdapy-1.0.9/extern/tachyon/src/image.h +0 -34
  324. mdapy-1.0.9/extern/tachyon/src/imageio.c +0 -412
  325. mdapy-1.0.9/extern/tachyon/src/imageio.h +0 -36
  326. mdapy-1.0.9/extern/tachyon/src/imap.c +0 -547
  327. mdapy-1.0.9/extern/tachyon/src/imap.h +0 -26
  328. mdapy-1.0.9/extern/tachyon/src/intersect.c +0 -201
  329. mdapy-1.0.9/extern/tachyon/src/intersect.h +0 -27
  330. mdapy-1.0.9/extern/tachyon/src/jpeg.c +0 -136
  331. mdapy-1.0.9/extern/tachyon/src/jpeg.h +0 -12
  332. mdapy-1.0.9/extern/tachyon/src/light.c +0 -298
  333. mdapy-1.0.9/extern/tachyon/src/light.h +0 -67
  334. mdapy-1.0.9/extern/tachyon/src/macros.h +0 -34
  335. mdapy-1.0.9/extern/tachyon/src/parallel.c +0 -628
  336. mdapy-1.0.9/extern/tachyon/src/parallel.h +0 -40
  337. mdapy-1.0.9/extern/tachyon/src/parvol.c +0 -220
  338. mdapy-1.0.9/extern/tachyon/src/parvol.h +0 -25
  339. mdapy-1.0.9/extern/tachyon/src/plane.c +0 -80
  340. mdapy-1.0.9/extern/tachyon/src/plane.h +0 -24
  341. mdapy-1.0.9/extern/tachyon/src/pngfile.c +0 -309
  342. mdapy-1.0.9/extern/tachyon/src/pngfile.h +0 -21
  343. mdapy-1.0.9/extern/tachyon/src/ppm.c +0 -136
  344. mdapy-1.0.9/extern/tachyon/src/ppm.h +0 -20
  345. mdapy-1.0.9/extern/tachyon/src/psd.c +0 -68
  346. mdapy-1.0.9/extern/tachyon/src/psd.h +0 -13
  347. mdapy-1.0.9/extern/tachyon/src/quadric.c +0 -137
  348. mdapy-1.0.9/extern/tachyon/src/quadric.h +0 -30
  349. mdapy-1.0.9/extern/tachyon/src/render.c +0 -640
  350. mdapy-1.0.9/extern/tachyon/src/render.h +0 -14
  351. mdapy-1.0.9/extern/tachyon/src/ring.c +0 -95
  352. mdapy-1.0.9/extern/tachyon/src/ring.h +0 -26
  353. mdapy-1.0.9/extern/tachyon/src/sgirgb.c +0 -80
  354. mdapy-1.0.9/extern/tachyon/src/sgirgb.h +0 -11
  355. mdapy-1.0.9/extern/tachyon/src/shade.c +0 -750
  356. mdapy-1.0.9/extern/tachyon/src/shade.h +0 -34
  357. mdapy-1.0.9/extern/tachyon/src/sphere.c +0 -133
  358. mdapy-1.0.9/extern/tachyon/src/sphere.h +0 -26
  359. mdapy-1.0.9/extern/tachyon/src/tachyon.h +0 -1304
  360. mdapy-1.0.9/extern/tachyon/src/tachyon_dep.h +0 -63
  361. mdapy-1.0.9/extern/tachyon/src/texture.c +0 -543
  362. mdapy-1.0.9/extern/tachyon/src/texture.h +0 -39
  363. mdapy-1.0.9/extern/tachyon/src/tgafile.c +0 -279
  364. mdapy-1.0.9/extern/tachyon/src/tgafile.h +0 -17
  365. mdapy-1.0.9/extern/tachyon/src/threads.c +0 -2203
  366. mdapy-1.0.9/extern/tachyon/src/threads.h +0 -617
  367. mdapy-1.0.9/extern/tachyon/src/trace.c +0 -567
  368. mdapy-1.0.9/extern/tachyon/src/trace.h +0 -37
  369. mdapy-1.0.9/extern/tachyon/src/triangle.c +0 -465
  370. mdapy-1.0.9/extern/tachyon/src/triangle.h +0 -66
  371. mdapy-1.0.9/extern/tachyon/src/ui.c +0 -60
  372. mdapy-1.0.9/extern/tachyon/src/ui.h +0 -24
  373. mdapy-1.0.9/extern/tachyon/src/util.c +0 -827
  374. mdapy-1.0.9/extern/tachyon/src/util.h +0 -156
  375. mdapy-1.0.9/extern/tachyon/src/vector.c +0 -96
  376. mdapy-1.0.9/extern/tachyon/src/vector.h +0 -24
  377. mdapy-1.0.9/extern/tachyon/src/vol.c +0 -314
  378. mdapy-1.0.9/extern/tachyon/src/vol.h +0 -17
  379. mdapy-1.0.9/extern/tachyon/src/winbmp.c +0 -100
  380. mdapy-1.0.9/extern/tachyon/src/winbmp.h +0 -11
  381. mdapy-1.0.9/extern/voro++/LICENSE +0 -39
  382. mdapy-1.0.9/extern/voro++/README.md +0 -151
  383. mdapy-1.0.9/extern/voro++/src/Doxyfile +0 -2604
  384. mdapy-1.0.9/extern/voro++/src/Makefile +0 -38
  385. mdapy-1.0.9/extern/voro++/src/Makefile.dep +0 -43
  386. mdapy-1.0.9/extern/voro++/src/README +0 -21
  387. mdapy-1.0.9/extern/voro++/src/c_info.hh +0 -35
  388. mdapy-1.0.9/extern/voro++/src/cell_2d.cc +0 -611
  389. mdapy-1.0.9/extern/voro++/src/cell_2d.hh +0 -197
  390. mdapy-1.0.9/extern/voro++/src/cell_3d.cc +0 -2643
  391. mdapy-1.0.9/extern/voro++/src/cell_3d.hh +0 -557
  392. mdapy-1.0.9/extern/voro++/src/cmd_line.cc +0 -615
  393. mdapy-1.0.9/extern/voro++/src/common.cc +0 -239
  394. mdapy-1.0.9/extern/voro++/src/common.hh +0 -33
  395. mdapy-1.0.9/extern/voro++/src/config.hh +0 -131
  396. mdapy-1.0.9/extern/voro++/src/container_2d.cc +0 -846
  397. mdapy-1.0.9/extern/voro++/src/container_2d.hh +0 -544
  398. mdapy-1.0.9/extern/voro++/src/container_3d.cc +0 -889
  399. mdapy-1.0.9/extern/voro++/src/container_3d.hh +0 -653
  400. mdapy-1.0.9/extern/voro++/src/container_tri.cc +0 -1139
  401. mdapy-1.0.9/extern/voro++/src/container_tri.hh +0 -615
  402. mdapy-1.0.9/extern/voro++/src/iter_2d.cc +0 -725
  403. mdapy-1.0.9/extern/voro++/src/iter_2d.hh +0 -361
  404. mdapy-1.0.9/extern/voro++/src/iter_3d.cc +0 -1194
  405. mdapy-1.0.9/extern/voro++/src/iter_3d.hh +0 -594
  406. mdapy-1.0.9/extern/voro++/src/particle_list.cc +0 -273
  407. mdapy-1.0.9/extern/voro++/src/particle_list.hh +0 -145
  408. mdapy-1.0.9/extern/voro++/src/particle_order.hh +0 -80
  409. mdapy-1.0.9/extern/voro++/src/rad_option.hh +0 -262
  410. mdapy-1.0.9/extern/voro++/src/unitcell.cc +0 -226
  411. mdapy-1.0.9/extern/voro++/src/unitcell.hh +0 -76
  412. mdapy-1.0.9/extern/voro++/src/v_base_2d.cc +0 -88
  413. mdapy-1.0.9/extern/voro++/src/v_base_2d.hh +0 -73
  414. mdapy-1.0.9/extern/voro++/src/v_base_3d.cc +0 -95
  415. mdapy-1.0.9/extern/voro++/src/v_base_3d.hh +0 -81
  416. mdapy-1.0.9/extern/voro++/src/v_base_wl_2d.cc +0 -28
  417. mdapy-1.0.9/extern/voro++/src/v_base_wl_3d.cc +0 -76
  418. mdapy-1.0.9/extern/voro++/src/v_compute_2d.cc +0 -744
  419. mdapy-1.0.9/extern/voro++/src/v_compute_2d.hh +0 -119
  420. mdapy-1.0.9/extern/voro++/src/v_compute_3d.cc +0 -990
  421. mdapy-1.0.9/extern/voro++/src/v_compute_3d.hh +0 -138
  422. mdapy-1.0.9/extern/voro++/src/voro++.cc +0 -23
  423. mdapy-1.0.9/extern/voro++/src/voro++.hh +0 -340
  424. mdapy-1.0.9/extern/voro++/src/wall.cc +0 -76
  425. mdapy-1.0.9/extern/voro++/src/wall.hh +0 -160
  426. mdapy-1.0.9/extern/voro++/src/wall_2d.cc +0 -60
  427. mdapy-1.0.9/extern/voro++/src/wall_2d.hh +0 -64
  428. mdapy-1.0.9/extern/voro++/src/wall_3d.cc +0 -130
  429. mdapy-1.0.9/extern/voro++/src/wall_3d.hh +0 -113
  430. mdapy-1.0.9/extern/voro++/src/worklist_2d.hh +0 -29
  431. mdapy-1.0.9/extern/voro++/src/worklist_3d.hh +0 -29
  432. mdapy-1.0.9/extern/voro++/src/worklist_gen_2d.pl +0 -203
  433. mdapy-1.0.9/extern/voro++/src/worklist_gen_3d.pl +0 -224
  434. mdapy-1.0.9/pyproject.toml +0 -85
  435. mdapy-1.0.9/src/TachyonOptiX.cu +0 -3676
  436. mdapy-1.0.9/src/TachyonOptiX.h +0 -1330
  437. mdapy-1.0.9/src/ackland_jones_analysis.cpp +0 -178
  438. mdapy-1.0.9/src/atomic_strain.cpp +0 -222
  439. mdapy-1.0.9/src/atomic_temperature.cpp +0 -119
  440. mdapy-1.0.9/src/bond_analysis.cpp +0 -285
  441. mdapy-1.0.9/src/box.h +0 -245
  442. mdapy-1.0.9/src/build_bond.cpp +0 -94
  443. mdapy-1.0.9/src/centro_symmetry_parameter.cpp +0 -99
  444. mdapy-1.0.9/src/chill_plus.cpp +0 -184
  445. mdapy-1.0.9/src/cluster.cpp +0 -157
  446. mdapy-1.0.9/src/cna.cpp +0 -513
  447. mdapy-1.0.9/src/common_neighbor_parameter.cpp +0 -142
  448. mdapy-1.0.9/src/eam.cpp +0 -217
  449. mdapy-1.0.9/src/eam.h +0 -47
  450. mdapy-1.0.9/src/fast_knn.cpp +0 -1031
  451. mdapy-1.0.9/src/identify_fcc_planar_faults.cpp +0 -250
  452. mdapy-1.0.9/src/lindemann.cpp +0 -153
  453. mdapy-1.0.9/src/mdapy/__init__.py +0 -86
  454. mdapy-1.0.9/src/mdapy/ackland_jones_analysis.py +0 -107
  455. mdapy-1.0.9/src/mdapy/angular_distribution_function.py +0 -246
  456. mdapy-1.0.9/src/mdapy/atomic_strain.py +0 -246
  457. mdapy-1.0.9/src/mdapy/atomic_temperature.py +0 -117
  458. mdapy-1.0.9/src/mdapy/bond_analysis.py +0 -237
  459. mdapy-1.0.9/src/mdapy/bond_stiffness.py +0 -870
  460. mdapy-1.0.9/src/mdapy/box.py +0 -509
  461. mdapy-1.0.9/src/mdapy/build_bond.py +0 -25
  462. mdapy-1.0.9/src/mdapy/build_lattice.py +0 -1242
  463. mdapy-1.0.9/src/mdapy/calculator.py +0 -174
  464. mdapy-1.0.9/src/mdapy/centro_symmetry_parameter.py +0 -107
  465. mdapy-1.0.9/src/mdapy/chill_plus.py +0 -107
  466. mdapy-1.0.9/src/mdapy/cluster_analysis.py +0 -132
  467. mdapy-1.0.9/src/mdapy/common_neighbor_analysis.py +0 -154
  468. mdapy-1.0.9/src/mdapy/common_neighbor_parameter.py +0 -115
  469. mdapy-1.0.9/src/mdapy/create_polycrystal.py +0 -848
  470. mdapy-1.0.9/src/mdapy/data.py +0 -3483
  471. mdapy-1.0.9/src/mdapy/eam.py +0 -1497
  472. mdapy-1.0.9/src/mdapy/elastic.py +0 -734
  473. mdapy-1.0.9/src/mdapy/identify_diamond_structure.py +0 -129
  474. mdapy-1.0.9/src/mdapy/identify_fcc_planar_faults.py +0 -84
  475. mdapy-1.0.9/src/mdapy/knn.py +0 -163
  476. mdapy-1.0.9/src/mdapy/lammps_potential.py +0 -383
  477. mdapy-1.0.9/src/mdapy/lammps_runner.py +0 -510
  478. mdapy-1.0.9/src/mdapy/lindemann_parameter.py +0 -253
  479. mdapy-1.0.9/src/mdapy/load_save.py +0 -2021
  480. mdapy-1.0.9/src/mdapy/md_elastic.py +0 -1199
  481. mdapy-1.0.9/src/mdapy/mean_squared_displacement.py +0 -224
  482. mdapy-1.0.9/src/mdapy/minimizer.py +0 -379
  483. mdapy-1.0.9/src/mdapy/neighbor.py +0 -142
  484. mdapy-1.0.9/src/mdapy/nep.py +0 -431
  485. mdapy-1.0.9/src/mdapy/nep4ase.py +0 -357
  486. mdapy-1.0.9/src/mdapy/orthogonal_cell.py +0 -394
  487. mdapy-1.0.9/src/mdapy/parallel.py +0 -53
  488. mdapy-1.0.9/src/mdapy/phonon.py +0 -596
  489. mdapy-1.0.9/src/mdapy/pigz.py +0 -362
  490. mdapy-1.0.9/src/mdapy/plotset.py +0 -329
  491. mdapy-1.0.9/src/mdapy/polyhedral_template_matching.py +0 -167
  492. mdapy-1.0.9/src/mdapy/potential_tool.py +0 -748
  493. mdapy-1.0.9/src/mdapy/qha_elastic.py +0 -1561
  494. mdapy-1.0.9/src/mdapy/radial_distribution_function.py +0 -279
  495. mdapy-1.0.9/src/mdapy/render.py +0 -1098
  496. mdapy-1.0.9/src/mdapy/spatial_binning.py +0 -289
  497. mdapy-1.0.9/src/mdapy/spline.py +0 -189
  498. mdapy-1.0.9/src/mdapy/sqs.py +0 -613
  499. mdapy-1.0.9/src/mdapy/steinhardt_bond_orientation.py +0 -302
  500. mdapy-1.0.9/src/mdapy/structure_entropy.py +0 -145
  501. mdapy-1.0.9/src/mdapy/structure_factor.py +0 -713
  502. mdapy-1.0.9/src/mdapy/system.py +0 -2759
  503. mdapy-1.0.9/src/mdapy/tool_function.py +0 -423
  504. mdapy-1.0.9/src/mdapy/trajectory.py +0 -1330
  505. mdapy-1.0.9/src/mdapy/unwrap_trajectory.py +0 -259
  506. mdapy-1.0.9/src/mdapy/visualize.py +0 -494
  507. mdapy-1.0.9/src/mdapy/void_analysis.py +0 -116
  508. mdapy-1.0.9/src/mdapy/voronoi.py +0 -447
  509. mdapy-1.0.9/src/mdapy/warren_cowley_parameter.py +0 -193
  510. mdapy-1.0.9/src/mdapy/wigner_seitz_defect.py +0 -135
  511. mdapy-1.0.9/src/neighbor.cpp +0 -859
  512. mdapy-1.0.9/src/neppy.cpp +0 -299
  513. mdapy-1.0.9/src/polycrystal.cpp +0 -144
  514. mdapy-1.0.9/src/polyhedral_template_matching.cpp +0 -338
  515. mdapy-1.0.9/src/radial_distribution_function.cpp +0 -331
  516. mdapy-1.0.9/src/repeat_cell.cpp +0 -66
  517. mdapy-1.0.9/src/spline.cpp +0 -56
  518. mdapy-1.0.9/src/spline.h +0 -500
  519. mdapy-1.0.9/src/split_file.cpp +0 -155
  520. mdapy-1.0.9/src/sqs.cpp +0 -550
  521. mdapy-1.0.9/src/steinhardt_bond_orientation.cpp +0 -790
  522. mdapy-1.0.9/src/structure_entropy.cpp +0 -113
  523. mdapy-1.0.9/src/structure_factor.cpp +0 -706
  524. mdapy-1.0.9/src/tachyon_optix_impl.cu +0 -540
  525. mdapy-1.0.9/src/tachyon_optix_render.h +0 -64
  526. mdapy-1.0.9/src/tachyon_render.cpp +0 -420
  527. mdapy-1.0.9/src/tachyon_render.h +0 -358
  528. mdapy-1.0.9/src/type.h +0 -21
  529. mdapy-1.0.9/src/voronoi.cpp +0 -549
  530. mdapy-1.0.9/src/warren_cowley_parameter.cpp +0 -86
@@ -0,0 +1,5 @@
1
+ # the bytes of the compiled shaders depend on those of their source
2
+ *.hlsl text eol=lf
3
+ *.comp text eol=lf
4
+ *.dxil binary
5
+ *.spv binary
mdapy-2.0.0/.gitignore ADDED
@@ -0,0 +1,32 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ .eggs/
6
+ dist/
7
+ wheelhouse/
8
+
9
+ # Build
10
+ /build/
11
+ /_skbuild/
12
+
13
+ # Tests and coverage
14
+ .pytest_cache/
15
+ .coverage
16
+ .coverage.*
17
+ coverage.xml
18
+ coverage.json
19
+ htmlcov/
20
+
21
+ # Tools
22
+ .ruff_cache/
23
+ .mypy_cache/
24
+
25
+ # Docs
26
+ /site/
27
+
28
+ # Editors and local tooling
29
+ /.vscode/
30
+ /.idea/
31
+ /.claude/
32
+ .DS_Store
@@ -0,0 +1,23 @@
1
+ cff-version: 1.2.0
2
+ message: "If MDAPY contributes to a publication, please cite the paper below."
3
+ title: MDAPY
4
+ type: software
5
+ authors:
6
+ - family-names: Wu
7
+ given-names: Yong-Chao
8
+ repository-code: "https://github.com/mushroomfire/mdapy"
9
+ url: "https://mushroomfire.github.io/mdapy/"
10
+ license: MPL-2.0
11
+ preferred-citation:
12
+ type: article
13
+ title: "mdapy: A flexible and efficient analysis software for molecular dynamics simulations"
14
+ authors:
15
+ - family-names: Wu
16
+ given-names: Yong-Chao
17
+ - family-names: Shao
18
+ given-names: Jian-Li
19
+ journal: Computer Physics Communications
20
+ volume: 290
21
+ start: 108764
22
+ year: 2023
23
+ doi: 10.1016/j.cpc.2023.108764
@@ -0,0 +1,129 @@
1
+ cmake_minimum_required(VERSION 3.18...3.31)
2
+ project(mdapy LANGUAGES CXX)
3
+
4
+ set(CMAKE_CXX_STANDARD 17)
5
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
6
+ set(CMAKE_CXX_EXTENSIONS OFF)
7
+
8
+ option(MDAPY_WERROR "Treat compiler warnings as errors" OFF)
9
+ option(MDAPY_INDEX64 "64-bit atom indices, for more than 2^31 - 1 atoms" OFF)
10
+ option(MDAPY_METAL "Pictures traced on the GPU with Metal (macOS only)" ON)
11
+ option(MDAPY_VULKAN "Pictures traced on the GPU with Vulkan (Linux only)" ON)
12
+ option(MDAPY_D3D12 "Pictures traced on the GPU with Direct3D 12 (Windows only)" ON)
13
+ set(MDAPY_SANITIZE "" CACHE STRING
14
+ "Sanitizer build: 'address' (AddressSanitizer + UndefinedBehaviorSanitizer) or 'thread' (ThreadSanitizer)")
15
+
16
+ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
17
+ set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
18
+ endif()
19
+
20
+ # SKBUILD_SABI_COMPONENT is set by scikit-build-core when building an abi3 wheel.
21
+ find_package(Python 3.11 REQUIRED
22
+ COMPONENTS Interpreter Development.Module ${SKBUILD_SABI_COMPONENT})
23
+ find_package(nanobind CONFIG REQUIRED)
24
+ find_package(Threads REQUIRED)
25
+
26
+ # A single extension module, mdapy._core, holds all compiled code. Each
27
+ # functional area registers its own submodule from src/cpp/bindings/.
28
+ file(GLOB_RECURSE MDAPY_CPP_SOURCES CONFIGURE_DEPENDS
29
+ "${CMAKE_CURRENT_SOURCE_DIR}/src/cpp/*.cpp")
30
+
31
+ # NB_SUPPRESS_WARNINGS marks nanobind's headers as system headers, so the strict
32
+ # warning flags below (and -Werror) apply to mdapy's own code only. NOMINSIZE
33
+ # keeps the optimization of the build type: nanobind would otherwise compile
34
+ # the whole module, kernels included, for size with -Os.
35
+ nanobind_add_module(_core STABLE_ABI NB_STATIC NB_SUPPRESS_WARNINGS NOMINSIZE
36
+ ${MDAPY_CPP_SOURCES})
37
+ target_include_directories(_core PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src/cpp")
38
+ target_link_libraries(_core PRIVATE Threads::Threads)
39
+ if(MDAPY_INDEX64)
40
+ target_compile_definitions(_core PRIVATE MDAPY_INDEX64)
41
+ endif()
42
+ # The rays of pictures on the GPU: Objective-C++ for Metal, whose shader is
43
+ # compiled when first used, so the build needs no Metal compiler.
44
+ if(APPLE AND MDAPY_METAL)
45
+ enable_language(OBJCXX)
46
+ target_sources(_core PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src/cpp/visualization/render_metal.mm")
47
+ set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/src/cpp/visualization/render_metal.mm"
48
+ PROPERTIES COMPILE_OPTIONS "-fobjc-arc")
49
+ target_compile_definitions(_core PRIVATE MDAPY_METAL)
50
+ target_link_libraries(_core PRIVATE "-framework Metal" "-framework Foundation")
51
+ endif()
52
+ # On Linux with Vulkan, whose loader is opened when first used, so the build
53
+ # needs its headers only and mdapy runs without it. The shader is the SPIR-V
54
+ # of render_vulkan.comp, held in the sources: the build needs no compiler.
55
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND MDAPY_VULKAN)
56
+ find_path(MDAPY_VULKAN_INCLUDE_DIR vulkan/vulkan_core.h)
57
+ if(MDAPY_VULKAN_INCLUDE_DIR)
58
+ # kSpirv, and kSpirvRayQuery for the ray tracing units
59
+ set(spirv_arrays "")
60
+ foreach(pair "render_vulkan:kSpirv" "render_vulkan_rt:kSpirvRayQuery")
61
+ string(REPLACE ":" ";" pair "${pair}")
62
+ list(GET pair 0 spirv_name)
63
+ list(GET pair 1 spirv_array)
64
+ set(spirv "${CMAKE_CURRENT_SOURCE_DIR}/src/cpp/visualization/${spirv_name}.spv")
65
+ set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${spirv}")
66
+ file(READ "${spirv}" spirv_bytes HEX)
67
+ string(REGEX REPLACE "([0-9a-f][0-9a-f])" "0x\\1," spirv_bytes "${spirv_bytes}")
68
+ string(APPEND spirv_arrays "const unsigned char ${spirv_array}[] = {${spirv_bytes}};\n")
69
+ endforeach()
70
+ file(CONFIGURE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/generated/visualization/render_vulkan_spirv.h"
71
+ CONTENT "// render_vulkan.spv and render_vulkan_rt.spv, written by CMake\n#pragma once\n${spirv_arrays}"
72
+ @ONLY)
73
+ target_include_directories(_core PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/generated")
74
+ target_include_directories(_core SYSTEM PRIVATE "${MDAPY_VULKAN_INCLUDE_DIR}")
75
+ target_compile_definitions(_core PRIVATE MDAPY_VULKAN)
76
+ target_link_libraries(_core PRIVATE ${CMAKE_DL_LIBS})
77
+ else()
78
+ message(STATUS "No Vulkan headers: pictures are traced on the processor only")
79
+ endif()
80
+ endif()
81
+ # On Windows with Direct3D 12, whose libraries are opened when first used, so the
82
+ # build needs the headers of the Windows SDK only and mdapy runs without them. The
83
+ # shader is the DXIL of render_d3d12.hlsl, held in the sources: the build needs
84
+ # no compiler.
85
+ if(WIN32 AND MDAPY_D3D12)
86
+ # kDxil, and kDxilRayQuery for the ray tracing units
87
+ set(dxil_arrays "")
88
+ foreach(pair "render_d3d12:kDxil" "render_d3d12_rt:kDxilRayQuery")
89
+ string(REPLACE ":" ";" pair "${pair}")
90
+ list(GET pair 0 dxil_name)
91
+ list(GET pair 1 dxil_array)
92
+ set(dxil "${CMAKE_CURRENT_SOURCE_DIR}/src/cpp/visualization/${dxil_name}.dxil")
93
+ set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${dxil}")
94
+ file(READ "${dxil}" dxil_bytes HEX)
95
+ string(REGEX REPLACE "([0-9a-f][0-9a-f])" "0x\\1," dxil_bytes "${dxil_bytes}")
96
+ string(APPEND dxil_arrays "const unsigned char ${dxil_array}[] = {${dxil_bytes}};\n")
97
+ endforeach()
98
+ file(CONFIGURE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/generated/visualization/render_d3d12_dxil.h"
99
+ CONTENT "// render_d3d12.dxil and render_d3d12_rt.dxil, written by CMake\n#pragma once\n${dxil_arrays}"
100
+ @ONLY)
101
+ target_include_directories(_core PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/generated")
102
+ target_compile_definitions(_core PRIVATE MDAPY_D3D12)
103
+ endif()
104
+
105
+ if(MSVC)
106
+ target_compile_options(_core PRIVATE /W4 /permissive- /EHsc)
107
+ if(MDAPY_WERROR)
108
+ target_compile_options(_core PRIVATE /WX)
109
+ endif()
110
+ else()
111
+ # No fused multiply-add contraction: results are the same bits with every
112
+ # compiler and processor.
113
+ target_compile_options(_core PRIVATE -Wall -Wextra -Wpedantic -Wshadow -ffp-contract=off)
114
+ if(MDAPY_WERROR)
115
+ target_compile_options(_core PRIVATE -Werror)
116
+ endif()
117
+ if(MDAPY_SANITIZE STREQUAL "address")
118
+ target_compile_options(_core PRIVATE
119
+ -fsanitize=address,undefined -fno-omit-frame-pointer -fno-sanitize-recover=undefined)
120
+ target_link_options(_core PRIVATE -fsanitize=address,undefined)
121
+ elseif(MDAPY_SANITIZE STREQUAL "thread")
122
+ target_compile_options(_core PRIVATE -fsanitize=thread -fno-omit-frame-pointer)
123
+ target_link_options(_core PRIVATE -fsanitize=thread)
124
+ elseif(NOT MDAPY_SANITIZE STREQUAL "")
125
+ message(FATAL_ERROR "MDAPY_SANITIZE must be empty, 'address' or 'thread'")
126
+ endif()
127
+ endif()
128
+
129
+ install(TARGETS _core LIBRARY DESTINATION mdapy)
mdapy-2.0.0/LICENSE ADDED
@@ -0,0 +1,373 @@
1
+ Mozilla Public License Version 2.0
2
+ ==================================
3
+
4
+ 1. Definitions
5
+ --------------
6
+
7
+ 1.1. "Contributor"
8
+ means each individual or legal entity that creates, contributes to
9
+ the creation of, or owns Covered Software.
10
+
11
+ 1.2. "Contributor Version"
12
+ means the combination of the Contributions of others (if any) used
13
+ by a Contributor and that particular Contributor's Contribution.
14
+
15
+ 1.3. "Contribution"
16
+ means Covered Software of a particular Contributor.
17
+
18
+ 1.4. "Covered Software"
19
+ means Source Code Form to which the initial Contributor has attached
20
+ the notice in Exhibit A, the Executable Form of such Source Code
21
+ Form, and Modifications of such Source Code Form, in each case
22
+ including portions thereof.
23
+
24
+ 1.5. "Incompatible With Secondary Licenses"
25
+ means
26
+
27
+ (a) that the initial Contributor has attached the notice described
28
+ in Exhibit B to the Covered Software; or
29
+
30
+ (b) that the Covered Software was made available under the terms of
31
+ version 1.1 or earlier of the License, but not also under the
32
+ terms of a Secondary License.
33
+
34
+ 1.6. "Executable Form"
35
+ means any form of the work other than Source Code Form.
36
+
37
+ 1.7. "Larger Work"
38
+ means a work that combines Covered Software with other material, in
39
+ a separate file or files, that is not Covered Software.
40
+
41
+ 1.8. "License"
42
+ means this document.
43
+
44
+ 1.9. "Licensable"
45
+ means having the right to grant, to the maximum extent possible,
46
+ whether at the time of the initial grant or subsequently, any and
47
+ all of the rights conveyed by this License.
48
+
49
+ 1.10. "Modifications"
50
+ means any of the following:
51
+
52
+ (a) any file in Source Code Form that results from an addition to,
53
+ deletion from, or modification of the contents of Covered
54
+ Software; or
55
+
56
+ (b) any new file in Source Code Form that contains any Covered
57
+ Software.
58
+
59
+ 1.11. "Patent Claims" of a Contributor
60
+ means any patent claim(s), including without limitation, method,
61
+ process, and apparatus claims, in any patent Licensable by such
62
+ Contributor that would be infringed, but for the grant of the
63
+ License, by the making, using, selling, offering for sale, having
64
+ made, import, or transfer of either its Contributions or its
65
+ Contributor Version.
66
+
67
+ 1.12. "Secondary License"
68
+ means either the GNU General Public License, Version 2.0, the GNU
69
+ Lesser General Public License, Version 2.1, the GNU Affero General
70
+ Public License, Version 3.0, or any later versions of those
71
+ licenses.
72
+
73
+ 1.13. "Source Code Form"
74
+ means the form of the work preferred for making modifications.
75
+
76
+ 1.14. "You" (or "Your")
77
+ means an individual or a legal entity exercising rights under this
78
+ License. For legal entities, "You" includes any entity that
79
+ controls, is controlled by, or is under common control with You. For
80
+ purposes of this definition, "control" means (a) the power, direct
81
+ or indirect, to cause the direction or management of such entity,
82
+ whether by contract or otherwise, or (b) ownership of more than
83
+ fifty percent (50%) of the outstanding shares or beneficial
84
+ ownership of such entity.
85
+
86
+ 2. License Grants and Conditions
87
+ --------------------------------
88
+
89
+ 2.1. Grants
90
+
91
+ Each Contributor hereby grants You a world-wide, royalty-free,
92
+ non-exclusive license:
93
+
94
+ (a) under intellectual property rights (other than patent or trademark)
95
+ Licensable by such Contributor to use, reproduce, make available,
96
+ modify, display, perform, distribute, and otherwise exploit its
97
+ Contributions, either on an unmodified basis, with Modifications, or
98
+ as part of a Larger Work; and
99
+
100
+ (b) under Patent Claims of such Contributor to make, use, sell, offer
101
+ for sale, have made, import, and otherwise transfer either its
102
+ Contributions or its Contributor Version.
103
+
104
+ 2.2. Effective Date
105
+
106
+ The licenses granted in Section 2.1 with respect to any Contribution
107
+ become effective for each Contribution on the date the Contributor first
108
+ distributes such Contribution.
109
+
110
+ 2.3. Limitations on Grant Scope
111
+
112
+ The licenses granted in this Section 2 are the only rights granted under
113
+ this License. No additional rights or licenses will be implied from the
114
+ distribution or licensing of Covered Software under this License.
115
+ Notwithstanding Section 2.1(b) above, no patent license is granted by a
116
+ Contributor:
117
+
118
+ (a) for any code that a Contributor has removed from Covered Software;
119
+ or
120
+
121
+ (b) for infringements caused by: (i) Your and any other third party's
122
+ modifications of Covered Software, or (ii) the combination of its
123
+ Contributions with other software (except as part of its Contributor
124
+ Version); or
125
+
126
+ (c) under Patent Claims infringed by Covered Software in the absence of
127
+ its Contributions.
128
+
129
+ This License does not grant any rights in the trademarks, service marks,
130
+ or logos of any Contributor (except as may be necessary to comply with
131
+ the notice requirements in Section 3.4).
132
+
133
+ 2.4. Subsequent Licenses
134
+
135
+ No Contributor makes additional grants as a result of Your choice to
136
+ distribute the Covered Software under a subsequent version of this
137
+ License (see Section 10.2) or under the terms of a Secondary License (if
138
+ permitted under the terms of Section 3.3).
139
+
140
+ 2.5. Representation
141
+
142
+ Each Contributor represents that the Contributor believes its
143
+ Contributions are its original creation(s) or it has sufficient rights
144
+ to grant the rights to its Contributions conveyed by this License.
145
+
146
+ 2.6. Fair Use
147
+
148
+ This License is not intended to limit any rights You have under
149
+ applicable copyright doctrines of fair use, fair dealing, or other
150
+ equivalents.
151
+
152
+ 2.7. Conditions
153
+
154
+ Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
155
+ in Section 2.1.
156
+
157
+ 3. Responsibilities
158
+ -------------------
159
+
160
+ 3.1. Distribution of Source Form
161
+
162
+ All distribution of Covered Software in Source Code Form, including any
163
+ Modifications that You create or to which You contribute, must be under
164
+ the terms of this License. You must inform recipients that the Source
165
+ Code Form of the Covered Software is governed by the terms of this
166
+ License, and how they can obtain a copy of this License. You may not
167
+ attempt to alter or restrict the recipients' rights in the Source Code
168
+ Form.
169
+
170
+ 3.2. Distribution of Executable Form
171
+
172
+ If You distribute Covered Software in Executable Form then:
173
+
174
+ (a) such Covered Software must also be made available in Source Code
175
+ Form, as described in Section 3.1, and You must inform recipients of
176
+ the Executable Form how they can obtain a copy of such Source Code
177
+ Form by reasonable means in a timely manner, at a charge no more
178
+ than the cost of distribution to the recipient; and
179
+
180
+ (b) You may distribute such Executable Form under the terms of this
181
+ License, or sublicense it under different terms, provided that the
182
+ license for the Executable Form does not attempt to limit or alter
183
+ the recipients' rights in the Source Code Form under this License.
184
+
185
+ 3.3. Distribution of a Larger Work
186
+
187
+ You may create and distribute a Larger Work under terms of Your choice,
188
+ provided that You also comply with the requirements of this License for
189
+ the Covered Software. If the Larger Work is a combination of Covered
190
+ Software with a work governed by one or more Secondary Licenses, and the
191
+ Covered Software is not Incompatible With Secondary Licenses, this
192
+ License permits You to additionally distribute such Covered Software
193
+ under the terms of such Secondary License(s), so that the recipient of
194
+ the Larger Work may, at their option, further distribute the Covered
195
+ Software under the terms of either this License or such Secondary
196
+ License(s).
197
+
198
+ 3.4. Notices
199
+
200
+ You may not remove or alter the substance of any license notices
201
+ (including copyright notices, patent notices, disclaimers of warranty,
202
+ or limitations of liability) contained within the Source Code Form of
203
+ the Covered Software, except that You may alter any license notices to
204
+ the extent required to remedy known factual inaccuracies.
205
+
206
+ 3.5. Application of Additional Terms
207
+
208
+ You may choose to offer, and to charge a fee for, warranty, support,
209
+ indemnity or liability obligations to one or more recipients of Covered
210
+ Software. However, You may do so only on Your own behalf, and not on
211
+ behalf of any Contributor. You must make it absolutely clear that any
212
+ such warranty, support, indemnity, or liability obligation is offered by
213
+ You alone, and You hereby agree to indemnify every Contributor for any
214
+ liability incurred by such Contributor as a result of warranty, support,
215
+ indemnity or liability terms You offer. You may include additional
216
+ disclaimers of warranty and limitations of liability specific to any
217
+ jurisdiction.
218
+
219
+ 4. Inability to Comply Due to Statute or Regulation
220
+ ---------------------------------------------------
221
+
222
+ If it is impossible for You to comply with any of the terms of this
223
+ License with respect to some or all of the Covered Software due to
224
+ statute, judicial order, or regulation then You must: (a) comply with
225
+ the terms of this License to the maximum extent possible; and (b)
226
+ describe the limitations and the code they affect. Such description must
227
+ be placed in a text file included with all distributions of the Covered
228
+ Software under this License. Except to the extent prohibited by statute
229
+ or regulation, such description must be sufficiently detailed for a
230
+ recipient of ordinary skill to be able to understand it.
231
+
232
+ 5. Termination
233
+ --------------
234
+
235
+ 5.1. The rights granted under this License will terminate automatically
236
+ if You fail to comply with any of its terms. However, if You become
237
+ compliant, then the rights granted under this License from a particular
238
+ Contributor are reinstated (a) provisionally, unless and until such
239
+ Contributor explicitly and finally terminates Your grants, and (b) on an
240
+ ongoing basis, if such Contributor fails to notify You of the
241
+ non-compliance by some reasonable means prior to 60 days after You have
242
+ come back into compliance. Moreover, Your grants from a particular
243
+ Contributor are reinstated on an ongoing basis if such Contributor
244
+ notifies You of the non-compliance by some reasonable means, this is the
245
+ first time You have received notice of non-compliance with this License
246
+ from such Contributor, and You become compliant prior to 30 days after
247
+ Your receipt of the notice.
248
+
249
+ 5.2. If You initiate litigation against any entity by asserting a patent
250
+ infringement claim (excluding declaratory judgment actions,
251
+ counter-claims, and cross-claims) alleging that a Contributor Version
252
+ directly or indirectly infringes any patent, then the rights granted to
253
+ You by any and all Contributors for the Covered Software under Section
254
+ 2.1 of this License shall terminate.
255
+
256
+ 5.3. In the event of termination under Sections 5.1 or 5.2 above, all
257
+ end user license agreements (excluding distributors and resellers) which
258
+ have been validly granted by You or Your distributors under this License
259
+ prior to termination shall survive termination.
260
+
261
+ ************************************************************************
262
+ * *
263
+ * 6. Disclaimer of Warranty *
264
+ * ------------------------- *
265
+ * *
266
+ * Covered Software is provided under this License on an "as is" *
267
+ * basis, without warranty of any kind, either expressed, implied, or *
268
+ * statutory, including, without limitation, warranties that the *
269
+ * Covered Software is free of defects, merchantable, fit for a *
270
+ * particular purpose or non-infringing. The entire risk as to the *
271
+ * quality and performance of the Covered Software is with You. *
272
+ * Should any Covered Software prove defective in any respect, You *
273
+ * (not any Contributor) assume the cost of any necessary servicing, *
274
+ * repair, or correction. This disclaimer of warranty constitutes an *
275
+ * essential part of this License. No use of any Covered Software is *
276
+ * authorized under this License except under this disclaimer. *
277
+ * *
278
+ ************************************************************************
279
+
280
+ ************************************************************************
281
+ * *
282
+ * 7. Limitation of Liability *
283
+ * -------------------------- *
284
+ * *
285
+ * Under no circumstances and under no legal theory, whether tort *
286
+ * (including negligence), contract, or otherwise, shall any *
287
+ * Contributor, or anyone who distributes Covered Software as *
288
+ * permitted above, be liable to You for any direct, indirect, *
289
+ * special, incidental, or consequential damages of any character *
290
+ * including, without limitation, damages for lost profits, loss of *
291
+ * goodwill, work stoppage, computer failure or malfunction, or any *
292
+ * and all other commercial damages or losses, even if such party *
293
+ * shall have been informed of the possibility of such damages. This *
294
+ * limitation of liability shall not apply to liability for death or *
295
+ * personal injury resulting from such party's negligence to the *
296
+ * extent applicable law prohibits such limitation. Some *
297
+ * jurisdictions do not allow the exclusion or limitation of *
298
+ * incidental or consequential damages, so this exclusion and *
299
+ * limitation may not apply to You. *
300
+ * *
301
+ ************************************************************************
302
+
303
+ 8. Litigation
304
+ -------------
305
+
306
+ Any litigation relating to this License may be brought only in the
307
+ courts of a jurisdiction where the defendant maintains its principal
308
+ place of business and such litigation shall be governed by laws of that
309
+ jurisdiction, without reference to its conflict-of-law provisions.
310
+ Nothing in this Section shall prevent a party's ability to bring
311
+ cross-claims or counter-claims.
312
+
313
+ 9. Miscellaneous
314
+ ----------------
315
+
316
+ This License represents the complete agreement concerning the subject
317
+ matter hereof. If any provision of this License is held to be
318
+ unenforceable, such provision shall be reformed only to the extent
319
+ necessary to make it enforceable. Any law or regulation which provides
320
+ that the language of a contract shall be construed against the drafter
321
+ shall not be used to construe this License against a Contributor.
322
+
323
+ 10. Versions of the License
324
+ ---------------------------
325
+
326
+ 10.1. New Versions
327
+
328
+ Mozilla Foundation is the license steward. Except as provided in Section
329
+ 10.3, no one other than the license steward has the right to modify or
330
+ publish new versions of this License. Each version will be given a
331
+ distinguishing version number.
332
+
333
+ 10.2. Effect of New Versions
334
+
335
+ You may distribute the Covered Software under the terms of the version
336
+ of the License under which You originally received the Covered Software,
337
+ or under the terms of any subsequent version published by the license
338
+ steward.
339
+
340
+ 10.3. Modified Versions
341
+
342
+ If you create software not governed by this License, and you want to
343
+ create a new license for such software, you may create and use a
344
+ modified version of this License if you rename the license and remove
345
+ any references to the name of the license steward (except to note that
346
+ such modified license differs from this License).
347
+
348
+ 10.4. Distributing Source Code Form that is Incompatible With Secondary
349
+ Licenses
350
+
351
+ If You choose to distribute Source Code Form that is Incompatible With
352
+ Secondary Licenses under the terms of this version of the License, the
353
+ notice described in Exhibit B of this License must be attached.
354
+
355
+ Exhibit A - Source Code Form License Notice
356
+ -------------------------------------------
357
+
358
+ This Source Code Form is subject to the terms of the Mozilla Public
359
+ License, v. 2.0. If a copy of the MPL was not distributed with this
360
+ file, You can obtain one at https://mozilla.org/MPL/2.0/.
361
+
362
+ If it is not possible or desirable to put the notice in a particular
363
+ file, then You may include the notice in a location (such as a LICENSE
364
+ file in a relevant directory) where a recipient would be likely to look
365
+ for such a notice.
366
+
367
+ You may add additional accurate notices of copyright ownership.
368
+
369
+ Exhibit B - "Incompatible With Secondary Licenses" Notice
370
+ ---------------------------------------------------------
371
+
372
+ This Source Code Form is "Incompatible With Secondary Licenses", as
373
+ defined by the Mozilla Public License, v. 2.0.