eagleplot 3.0.0__py3-none-any.whl

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 (73) hide show
  1. eagleplot/Home.py +362 -0
  2. eagleplot/__init__.py +19 -0
  3. eagleplot/annotations.py +215 -0
  4. eagleplot/assets/logo.ico +0 -0
  5. eagleplot/assets/logo.png +0 -0
  6. eagleplot/assets/nccu-horiz-logo.png +0 -0
  7. eagleplot/assets/nccu-wings.png +0 -0
  8. eagleplot/batch.py +446 -0
  9. eagleplot/cli.py +719 -0
  10. eagleplot/data_tools.py +849 -0
  11. eagleplot/example-data/Artificial/bimodal_distribution.csv +501 -0
  12. eagleplot/example-data/Artificial/correlation_matrix.npy +0 -0
  13. eagleplot/example-data/Artificial/gaussian_surface.npy +0 -0
  14. eagleplot/example-data/Artificial/grouped_categorical.csv +241 -0
  15. eagleplot/example-data/Artificial/ir_spectrum.csv +1802 -0
  16. eagleplot/example-data/Artificial/molecular_properties.csv +121 -0
  17. eagleplot/example-data/Artificial/normal_distribution.csv +401 -0
  18. eagleplot/example-data/Artificial/reaction_kinetics.csv +121 -0
  19. eagleplot/example-data/Artificial/scatter_correlation.csv +201 -0
  20. eagleplot/example-data/Artificial/sine_cosine_waves.csv +301 -0
  21. eagleplot/gallery/box_plot.png +0 -0
  22. eagleplot/gallery/contour_plot.png +0 -0
  23. eagleplot/gallery/distribution_plot.png +0 -0
  24. eagleplot/gallery/heatmap.png +0 -0
  25. eagleplot/gallery/histogram.png +0 -0
  26. eagleplot/gallery/interactive_3d_surface.png +0 -0
  27. eagleplot/gallery/interactive_heatmap.png +0 -0
  28. eagleplot/gallery/interactive_histogram.png +0 -0
  29. eagleplot/gallery/interactive_line.png +0 -0
  30. eagleplot/gallery/interactive_scatter.png +0 -0
  31. eagleplot/gallery/line_plot.png +0 -0
  32. eagleplot/gallery/manifest.json +196 -0
  33. eagleplot/gallery/regression_plot.png +0 -0
  34. eagleplot/gallery/scatter_plot.png +0 -0
  35. eagleplot/io.py +1008 -0
  36. eagleplot/math.py +1210 -0
  37. eagleplot/molecular/__init__.py +21 -0
  38. eagleplot/molecular/atom_data.py +287 -0
  39. eagleplot/molecular/parsers.py +747 -0
  40. eagleplot/nist.py +241 -0
  41. eagleplot/pages/10_Molecular_Viz.py +225 -0
  42. eagleplot/pages/11_Batch_Analysis.py +325 -0
  43. eagleplot/pages/12_Help.py +199 -0
  44. eagleplot/pages/13_Settings.py +388 -0
  45. eagleplot/pages/1_Data_Upload.py +521 -0
  46. eagleplot/pages/2_Quick_Plot.py +1693 -0
  47. eagleplot/pages/3_Analysis_Tools.py +2510 -0
  48. eagleplot/pages/4_Multi_Plot_Dashboard.py +791 -0
  49. eagleplot/pages/5_Advanced_Plotting.py +691 -0
  50. eagleplot/pages/6_Export_Results.py +442 -0
  51. eagleplot/pages/7_Gallery.py +201 -0
  52. eagleplot/pages/8_Data_Tools.py +434 -0
  53. eagleplot/pages/9_Spectroscopy.py +821 -0
  54. eagleplot/pages/__init__.py +8 -0
  55. eagleplot/peaks.py +513 -0
  56. eagleplot/plotting.py +2630 -0
  57. eagleplot/plugin_loader.py +208 -0
  58. eagleplot/report.py +448 -0
  59. eagleplot/signal.py +494 -0
  60. eagleplot/spectroscopy.py +830 -0
  61. eagleplot/utils/__init__.py +76 -0
  62. eagleplot/utils/access.py +77 -0
  63. eagleplot/utils/data_preview.py +352 -0
  64. eagleplot/utils/plot_config.py +2721 -0
  65. eagleplot/utils/session_state.py +535 -0
  66. eagleplot/utils/theming.py +312 -0
  67. eagleplot/utils/user_settings.py +294 -0
  68. eagleplot-3.0.0.dist-info/METADATA +304 -0
  69. eagleplot-3.0.0.dist-info/RECORD +73 -0
  70. eagleplot-3.0.0.dist-info/WHEEL +5 -0
  71. eagleplot-3.0.0.dist-info/entry_points.txt +2 -0
  72. eagleplot-3.0.0.dist-info/licenses/LICENSE +21 -0
  73. eagleplot-3.0.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,21 @@
1
+ """Molecular data structures, parsers, and visualization helpers."""
2
+
3
+ from .parsers import (
4
+ VibrationalMode,
5
+ VibrationalData,
6
+ parse_vibrations,
7
+ parse_gaussian_vibrations,
8
+ parse_orca_vibrations,
9
+ parse_molden_vibrations,
10
+ build_molecule_figure,
11
+ )
12
+
13
+ __all__ = [
14
+ "VibrationalMode",
15
+ "VibrationalData",
16
+ "parse_vibrations",
17
+ "parse_gaussian_vibrations",
18
+ "parse_orca_vibrations",
19
+ "parse_molden_vibrations",
20
+ "build_molecule_figure",
21
+ ]
@@ -0,0 +1,287 @@
1
+ """Atomic property data for molecular visualization.
2
+
3
+ Provides element colors (CPK scheme), symbols, van der Waals radii,
4
+ and helper functions for element lookups by atomic number.
5
+ """
6
+
7
+ BOHR_TO_ANGSTROM = 0.529177210903
8
+
9
+ # CPK-style colors indexed by atomic number (index 0 = unknown/placeholder)
10
+ _atom_colors_raw = [
11
+ "#000000", # 0 unknown
12
+ "#FFFFFF", # 1 H
13
+ "cyan", # 2 He
14
+ "violet", # 3 Li
15
+ "#B22222", # 4 Be
16
+ "beige", # 5 B
17
+ "#444444", # 6 C
18
+ "blue", # 7 N
19
+ "red", # 8 O
20
+ "green", # 9 F
21
+ "cyan", # 10 Ne
22
+ "#FF1493", # 11 Na
23
+ "#A52A2A", # 12 Mg
24
+ "#800080", # 13 Al
25
+ "#D2691E", # 14 Si
26
+ "#228B22", # 15 P
27
+ "yellow", # 16 S
28
+ "green", # 17 Cl
29
+ "cyan", # 18 Ar
30
+ "#0000CD", # 19 K
31
+ "#8B4513", # 20 Ca
32
+ "#8FBC8F", # 21 Sc
33
+ "#B8860B", # 22 Ti
34
+ "#4682B4", # 23 V
35
+ "#B22222", # 24 Cr
36
+ "#2E8B57", # 25 Mn
37
+ "#FFD700", # 26 Fe
38
+ "#DAA520", # 27 Co
39
+ "#A52A2A", # 28 Ni
40
+ "#4169E1", # 29 Cu
41
+ "#708090", # 30 Zn
42
+ "#C0C0C0", # 31 Ga
43
+ "#808000", # 32 Ge
44
+ "#00FF00", # 33 As
45
+ "#00CED1", # 34 Se
46
+ "#0000FF", # 35 Br
47
+ "cyan", # 36 Kr
48
+ "#8A2BE2", # 37 Rb
49
+ "#8B4513", # 38 Sr
50
+ "#9400D3", # 39 Y
51
+ "#FF4500", # 40 Zr
52
+ "#4682B4", # 41 Nb
53
+ "#B22222", # 42 Mo
54
+ "#FFD700", # 43 Tc
55
+ "#A52A2A", # 44 Ru
56
+ "#228B22", # 45 Rh
57
+ "#8B4513", # 46 Pd
58
+ "#00CED1", # 47 Ag
59
+ "#696969", # 48 Cd
60
+ "#C0C0C0", # 49 In
61
+ "#808000", # 50 Sn
62
+ "#228B22", # 51 Sb
63
+ "#D2691E", # 52 Te
64
+ "#00FF00", # 53 I
65
+ "cyan", # 54 Xe
66
+ "#8A2BE2", # 55 Cs
67
+ "#8B4513", # 56 Ba
68
+ "#FF4500", # 57 La
69
+ ]
70
+
71
+ # Pad to 119 entries (elements up to Og, index 118)
72
+ atom_colors: list[str] = _atom_colors_raw + ["#C0C0C0"] * (119 - len(_atom_colors_raw))
73
+
74
+ # Element symbols indexed by atomic number (index 0 = unknown placeholder)
75
+ atom_symbols: list[str] = [
76
+ "unk",
77
+ "H",
78
+ "He",
79
+ "Li",
80
+ "Be",
81
+ "B",
82
+ "C",
83
+ "N",
84
+ "O",
85
+ "F",
86
+ "Ne",
87
+ "Na",
88
+ "Mg",
89
+ "Al",
90
+ "Si",
91
+ "P",
92
+ "S",
93
+ "Cl",
94
+ "Ar",
95
+ "K",
96
+ "Ca",
97
+ "Sc",
98
+ "Ti",
99
+ "V",
100
+ "Cr",
101
+ "Mn",
102
+ "Fe",
103
+ "Co",
104
+ "Ni",
105
+ "Cu",
106
+ "Zn",
107
+ "Ga",
108
+ "Ge",
109
+ "As",
110
+ "Se",
111
+ "Br",
112
+ "Kr",
113
+ "Rb",
114
+ "Sr",
115
+ "Y",
116
+ "Zr",
117
+ "Nb",
118
+ "Mo",
119
+ "Tc",
120
+ "Ru",
121
+ "Rh",
122
+ "Pd",
123
+ "Ag",
124
+ "Cd",
125
+ "In",
126
+ "Sn",
127
+ "Sb",
128
+ "Te",
129
+ "I",
130
+ "Xe",
131
+ "Cs",
132
+ "Ba",
133
+ "La",
134
+ "Ce",
135
+ "Pr",
136
+ "Nd",
137
+ "Pm",
138
+ "Sm",
139
+ "Eu",
140
+ "Gd",
141
+ "Tb",
142
+ "Dy",
143
+ "Ho",
144
+ "Er",
145
+ "Tm",
146
+ "Yb",
147
+ "Lu",
148
+ "Hf",
149
+ "Ta",
150
+ "W",
151
+ "Re",
152
+ "Os",
153
+ "Ir",
154
+ "Pt",
155
+ "Au",
156
+ "Hg",
157
+ "Tl",
158
+ "Pb",
159
+ "Bi",
160
+ "Po",
161
+ "At",
162
+ "Rn",
163
+ "Fr",
164
+ "Ra",
165
+ "Ac",
166
+ "Th",
167
+ "Pa",
168
+ "U",
169
+ "Np",
170
+ "Pu",
171
+ "Am",
172
+ "Cm",
173
+ "Bk",
174
+ "Cf",
175
+ "Es",
176
+ "Fm",
177
+ "Md",
178
+ "No",
179
+ "Lr",
180
+ "Rf",
181
+ "Db",
182
+ "Sg",
183
+ "Bh",
184
+ "Hs",
185
+ "Mt",
186
+ "Ds",
187
+ "Rg",
188
+ "Cn",
189
+ "Nh",
190
+ "Fl",
191
+ "Mc",
192
+ "Lv",
193
+ "Ts",
194
+ "Og",
195
+ ]
196
+
197
+ # Van der Waals radii in Angstroms indexed by atomic number (index 0 = fallback)
198
+ _vdw_radii_raw = [
199
+ 1.70, # 0 unknown/fallback
200
+ 1.20, # 1 H
201
+ 1.40, # 2 He
202
+ 1.82, # 3 Li
203
+ 1.53, # 4 Be
204
+ 1.92, # 5 B
205
+ 1.70, # 6 C
206
+ 1.55, # 7 N
207
+ 1.52, # 8 O
208
+ 1.47, # 9 F
209
+ 1.54, # 10 Ne
210
+ 2.27, # 11 Na
211
+ 1.73, # 12 Mg
212
+ 1.84, # 13 Al
213
+ 2.10, # 14 Si
214
+ 1.80, # 15 P
215
+ 1.80, # 16 S
216
+ 1.75, # 17 Cl
217
+ 1.88, # 18 Ar
218
+ 2.75, # 19 K
219
+ 2.31, # 20 Ca
220
+ 2.11, # 21 Sc
221
+ 2.00, # 22 Ti
222
+ 2.00, # 23 V
223
+ 2.00, # 24 Cr
224
+ 2.00, # 25 Mn
225
+ 2.00, # 26 Fe
226
+ 2.00, # 27 Co
227
+ 1.63, # 28 Ni
228
+ 1.40, # 29 Cu
229
+ 1.39, # 30 Zn
230
+ 1.87, # 31 Ga
231
+ 2.11, # 32 Ge
232
+ 1.85, # 33 As
233
+ 1.90, # 34 Se
234
+ 1.85, # 35 Br
235
+ 2.02, # 36 Kr
236
+ ]
237
+
238
+ # Pad to 119 entries with 2.00 Å as a reasonable default
239
+ vdw_radii: list[float] = _vdw_radii_raw + [2.00] * (119 - len(_vdw_radii_raw))
240
+
241
+ # Reverse lookup: element symbol → atomic number
242
+ symbol_to_number: dict[str, int] = {sym: i for i, sym in enumerate(atom_symbols)}
243
+
244
+
245
+ def get_atom_color(atomic_number: int) -> str:
246
+ """Return the CPK color string for an element.
247
+
248
+ Args:
249
+ atomic_number: Atomic number (1-based; 0 returns the unknown color).
250
+
251
+ Returns:
252
+ Hex color string or named color. Falls back to ``"#C0C0C0"`` (silver)
253
+ for out-of-range values.
254
+ """
255
+ if 0 <= atomic_number < len(atom_colors):
256
+ return atom_colors[atomic_number]
257
+ return "#C0C0C0"
258
+
259
+
260
+ def get_atom_symbol(atomic_number: int) -> str:
261
+ """Return the element symbol for an atomic number.
262
+
263
+ Args:
264
+ atomic_number: Atomic number (1-based).
265
+
266
+ Returns:
267
+ Element symbol string (e.g. ``"C"``, ``"O"``). Returns ``"?"``
268
+ for out-of-range values.
269
+ """
270
+ if 0 <= atomic_number < len(atom_symbols):
271
+ return atom_symbols[atomic_number]
272
+ return "?"
273
+
274
+
275
+ def get_vdw_radius(atomic_number: int) -> float:
276
+ """Return the van der Waals radius (Å) for an element.
277
+
278
+ Args:
279
+ atomic_number: Atomic number (1-based).
280
+
281
+ Returns:
282
+ Van der Waals radius in Angstroms. Returns ``1.70`` for
283
+ out-of-range values.
284
+ """
285
+ if 0 <= atomic_number < len(vdw_radii):
286
+ return vdw_radii[atomic_number]
287
+ return 1.70