pyphyschemtools 0.1.0__py3-none-any.whl → 0.1.2__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.
- pyphyschemtools/.__init__.py.swp +0 -0
- pyphyschemtools/.ipynb_checkpoints/Chem3D-checkpoint.py +835 -0
- pyphyschemtools/.ipynb_checkpoints/PeriodicTable-checkpoint.py +294 -0
- pyphyschemtools/.ipynb_checkpoints/aithermo-checkpoint.py +349 -0
- pyphyschemtools/.ipynb_checkpoints/core-checkpoint.py +120 -0
- pyphyschemtools/.ipynb_checkpoints/spectra-checkpoint.py +471 -0
- pyphyschemtools/.ipynb_checkpoints/survey-checkpoint.py +1048 -0
- pyphyschemtools/.ipynb_checkpoints/sympyUtilities-checkpoint.py +51 -0
- pyphyschemtools/.ipynb_checkpoints/tools4AS-checkpoint.py +964 -0
- pyphyschemtools/.readthedocs.yaml +23 -0
- pyphyschemtools/Chem3D.py +12 -8
- pyphyschemtools/ML.py +6 -4
- pyphyschemtools/PeriodicTable.py +9 -4
- pyphyschemtools/__init__.py +3 -3
- pyphyschemtools/aithermo.py +5 -6
- pyphyschemtools/core.py +7 -6
- pyphyschemtools/spectra.py +78 -58
- pyphyschemtools/survey.py +0 -449
- pyphyschemtools/sympyUtilities.py +9 -9
- pyphyschemtools/tools4AS.py +12 -8
- {pyphyschemtools-0.1.0.dist-info → pyphyschemtools-0.1.2.dist-info}/METADATA +2 -2
- {pyphyschemtools-0.1.0.dist-info → pyphyschemtools-0.1.2.dist-info}/RECORD +30 -20
- /pyphyschemtools/{icons-logos-banner → icons_logos_banner}/Logo_pyPhysChem_border.svg +0 -0
- /pyphyschemtools/{icons-logos-banner → icons_logos_banner}/__init__.py +0 -0
- /pyphyschemtools/{icons-logos-banner → icons_logos_banner}/logo.png +0 -0
- /pyphyschemtools/{icons-logos-banner → icons_logos_banner}/tools4pyPC_banner.png +0 -0
- /pyphyschemtools/{icons-logos-banner → icons_logos_banner}/tools4pyPC_banner.svg +0 -0
- {pyphyschemtools-0.1.0.dist-info → pyphyschemtools-0.1.2.dist-info}/WHEEL +0 -0
- {pyphyschemtools-0.1.0.dist-info → pyphyschemtools-0.1.2.dist-info}/licenses/LICENSE +0 -0
- {pyphyschemtools-0.1.0.dist-info → pyphyschemtools-0.1.2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Read the Docs configuration file
|
|
2
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
3
|
+
|
|
4
|
+
# Required
|
|
5
|
+
version: 2
|
|
6
|
+
|
|
7
|
+
# Set the OS, Python version, and other tools you might need
|
|
8
|
+
build:
|
|
9
|
+
os: ubuntu-24.04
|
|
10
|
+
tools:
|
|
11
|
+
python: "3.11"
|
|
12
|
+
|
|
13
|
+
# Build documentation in the "docs/" directory with Sphinx
|
|
14
|
+
sphinx:
|
|
15
|
+
configuration: docs/conf.py
|
|
16
|
+
|
|
17
|
+
# Optional but recommended
|
|
18
|
+
python:
|
|
19
|
+
install:
|
|
20
|
+
- method: pip
|
|
21
|
+
path: .
|
|
22
|
+
extra_requirements:
|
|
23
|
+
- docs
|
pyphyschemtools/Chem3D.py
CHANGED
|
@@ -223,14 +223,15 @@ class molView:
|
|
|
223
223
|
"""
|
|
224
224
|
Initializes a molecular/crystal viewer and coordinate extractor.
|
|
225
225
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
226
|
+
This class acts as a bridge between various molecular data sources and
|
|
227
|
+
the py3Dmol interactive viewer. It can operate in 'Full' mode (display +
|
|
228
|
+
analysis) or 'Headless' mode (analysis only) by toggling the `viewer` parameter.
|
|
229
229
|
|
|
230
|
-
|
|
231
|
-
|
|
230
|
+
The class automatically extracts geometric data into the `self.data` attribute
|
|
231
|
+
(an XYZData object), allowing for volume, dimension, and cavity calculations.
|
|
232
232
|
|
|
233
233
|
Display molecular and crystal structures in py3Dmol from various sources:
|
|
234
|
+
|
|
234
235
|
- XYZ/PDB/CIF local files
|
|
235
236
|
- XYZ-format string
|
|
236
237
|
- PubChem CID
|
|
@@ -239,9 +240,10 @@ class molView:
|
|
|
239
240
|
- RSCB PDB ID
|
|
240
241
|
|
|
241
242
|
Three visualization styles are available:
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
243
|
+
|
|
244
|
+
- 'bs' : ball-and-stick (default)
|
|
245
|
+
- 'cpk' : CPK space-filling spheres (with adjustable size)
|
|
246
|
+
- 'cartoon': protein backbone representation
|
|
245
247
|
|
|
246
248
|
Upon creation, an interactive 3D viewer is shown directly in a Jupyter notebook cell, unless the headless viewer parameter is set to False.
|
|
247
249
|
|
|
@@ -249,6 +251,7 @@ class molView:
|
|
|
249
251
|
----------
|
|
250
252
|
mol : str or ase.Atoms
|
|
251
253
|
The molecular structure to visualize.
|
|
254
|
+
|
|
252
255
|
- If `source='file'`, this should be a path to a structure file (XYZ, PDB, etc.)
|
|
253
256
|
- If `source='mol'`, this should be a string containing the structure (XYZ, PDB...)
|
|
254
257
|
- If `source='cif'`, this should be a cif file (string)
|
|
@@ -260,6 +263,7 @@ class molView:
|
|
|
260
263
|
The type of the input `mol` (default: 'file').
|
|
261
264
|
style : {'bs', 'cpk', 'cartoon'}, optional
|
|
262
265
|
Visualization style (default: 'bs').
|
|
266
|
+
|
|
263
267
|
- 'bs' → ball-and-stick
|
|
264
268
|
- 'cpk' → CPK space-filling spheres
|
|
265
269
|
- 'cartoon' → draws a smooth tube or ribbon through the protein backbone
|
pyphyschemtools/ML.py
CHANGED
|
@@ -22,11 +22,13 @@ def y2c(mc2i,y):
|
|
|
22
22
|
def categorizeY_2ohe(Ctot, y1, y2):
|
|
23
23
|
"""
|
|
24
24
|
one-hot-encodes a pandas column of categorical data
|
|
25
|
+
|
|
25
26
|
input:
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
- Ctot is the reference pandas column, necessary to find all unique categories in this column
|
|
28
|
+
- y1 and y2 are the actual pandas column that will be categorized. y1 and y2 are supposed to be the ytest and ytrain subsets of Ctot
|
|
28
29
|
output:
|
|
29
|
-
|
|
30
|
+
- y1ohe and y2ohe are the numpy arrays returned by this routine
|
|
31
|
+
|
|
30
32
|
"""
|
|
31
33
|
|
|
32
34
|
uv = Ctot.unique()
|
|
@@ -39,4 +41,4 @@ def categorizeY_2ohe(Ctot, y1, y2):
|
|
|
39
41
|
y2ohe = y2c(mapc2i,y2)
|
|
40
42
|
print(f"Structure (shape) des tableaux renvoyés par categorize1C_2ohe. y1 : {y1ohe.shape}, y2 : {y2ohe.shape}")
|
|
41
43
|
del mapc2i, uv
|
|
42
|
-
return y1ohe, y2ohe
|
|
44
|
+
return y1ohe, y2ohe
|
pyphyschemtools/PeriodicTable.py
CHANGED
|
@@ -47,10 +47,15 @@ class TableauPeriodique:
|
|
|
47
47
|
Ce patch, appliqué à self.elements, créé par l'appel à create_vis_dataframe(), va servir à :
|
|
48
48
|
- ajouter des informations en français : les noms des éléments et des séries (familles) auxquelles ils appartiennent
|
|
49
49
|
- retirer les éléments du groupe 12 de la famille des métaux de transition, qui est le choix CONTESTABLE par défaut de la bibliothèque mendeleev
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
50
|
+
|
|
51
|
+
input :
|
|
52
|
+
elements est un dataframe pandas préalablement créé par la fonction create_vis_dataframe() de mendeleev.vis
|
|
53
|
+
|
|
54
|
+
output :
|
|
55
|
+
elements avec deux nouvelles colonnes name_seriesFr et nom, qui contient dorénavant les noms des éléments en français
|
|
56
|
+
+ correction des données name_series et series_id pour les éléments Zn, Cd, Hg, Cn
|
|
57
|
+
+ de nouvelles colonnes qui contiennent l'énergie de première ionisation et les isotopes naturels
|
|
58
|
+
|
|
54
59
|
'''
|
|
55
60
|
def series_eng2fr(s):
|
|
56
61
|
'''Correspondance entre nom des séries (familles) en anglais et en français'''
|
pyphyschemtools/__init__.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# tools4pyPhysChem/__init__.py
|
|
2
|
-
__version__ = "0.1.
|
|
3
|
-
__last_update__ = "2026-02-
|
|
2
|
+
__version__ = "0.1.2"
|
|
3
|
+
__last_update__ = "2026-02-02"
|
|
4
4
|
|
|
5
5
|
import importlib
|
|
6
6
|
import importlib.util
|
|
@@ -26,7 +26,7 @@ def __getattr__(name):
|
|
|
26
26
|
|
|
27
27
|
modules_to_search = [
|
|
28
28
|
".ML", ".PeriodicTable", ".Chem3D",
|
|
29
|
-
".aithermo", ".cheminformatics", ".kinetics",
|
|
29
|
+
".aithermo", ".cheminformatics", ".kinetics",
|
|
30
30
|
".spectra", ".survey",
|
|
31
31
|
".sympyUtilities", ".tools4AS"
|
|
32
32
|
]
|
pyphyschemtools/aithermo.py
CHANGED
|
@@ -53,20 +53,19 @@ class aiThermo:
|
|
|
53
53
|
extract surface names and legend labels.
|
|
54
54
|
|
|
55
55
|
Args:
|
|
56
|
-
vib (bool): If True, filters for files including vibrational corrections
|
|
57
|
-
(prefixed with 'vib_'). If False, looks for standard thermodynamic data.
|
|
56
|
+
vib (bool): If True, filters for files including vibrational corrections (prefixed with ``vib_``). If False, looks for standard thermodynamic data.
|
|
58
57
|
|
|
59
58
|
Returns:
|
|
60
59
|
tuple: A triplet containing:
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
graphical legends.
|
|
60
|
+
- file_paths (list of str): Absolute or relative paths to the .dat files.
|
|
61
|
+
- names (list of str): Internal identifiers for each surface phase.
|
|
62
|
+
- legends (list of str): LaTeX-formatted or plain text labels for graphical legends.
|
|
65
63
|
|
|
66
64
|
Notes:
|
|
67
65
|
- The lists are returned in reverse order to ensure correct layering
|
|
68
66
|
during 3D plotting.
|
|
69
67
|
- Relies on 'ListOfStableSurfaces.dat' existing in the folder_path.
|
|
68
|
+
|
|
70
69
|
"""
|
|
71
70
|
self._check_folder()
|
|
72
71
|
from .core import centertxt
|
pyphyschemtools/core.py
CHANGED
|
@@ -15,13 +15,14 @@ def centerTitle(content=None):
|
|
|
15
15
|
def centertxt(content=None,font='sans', size=12,weight="normal",bgc="#000000",fgc="#ffffff"):
|
|
16
16
|
'''
|
|
17
17
|
centers and renders as HTML a text in the notebook
|
|
18
|
+
|
|
18
19
|
input:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
- content = the text to render (default: None)
|
|
21
|
+
- font = font family (default: 'sans', values allowed = 'sans-serif' | 'serif' | 'monospace' | 'cursive' | 'fantasy' | ...)
|
|
22
|
+
- size = font size (default: 12)
|
|
23
|
+
- weight = font weight (default: 'normal', values allowed = 'normal' | 'bold' | 'bolder' | 'lighter' | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 )
|
|
24
|
+
- bgc = background color (name or hex code, default = '#ffffff')
|
|
25
|
+
- fgc = foreground color (name or hex code, default = '#000000')
|
|
25
26
|
'''
|
|
26
27
|
from IPython.display import display, HTML
|
|
27
28
|
display(HTML(f"<div style='text-align:center; font-family: {font}; font-weight: {weight}; font-size:{size}px;background-color: {bgc};color: {fgc}'>{content}</div>"))
|
pyphyschemtools/spectra.py
CHANGED
|
@@ -28,7 +28,8 @@ class SpectrumSimulator:
|
|
|
28
28
|
Returns:
|
|
29
29
|
None: This method initializes the instance attributes.
|
|
30
30
|
Calculates:
|
|
31
|
-
|
|
31
|
+
sigmanm = half-width of the Gaussian band, in nm
|
|
32
|
+
|
|
32
33
|
"""
|
|
33
34
|
self.sigma_ev = sigma_ev
|
|
34
35
|
# Conversion constante eV -> nm sigma
|
|
@@ -55,15 +56,18 @@ class SpectrumSimulator:
|
|
|
55
56
|
return fig, graph
|
|
56
57
|
|
|
57
58
|
def _calc_epsiG(self,lambdaX,lambdai,fi):
|
|
58
|
-
|
|
59
|
+
"""
|
|
59
60
|
calculates a Gaussian band shape around a vertical transition
|
|
61
|
+
|
|
60
62
|
input:
|
|
61
63
|
- lambdaX = wavelength variable, in nm
|
|
62
64
|
- lambdai = vertical excitation wavelength for i_th state, in nm
|
|
63
65
|
- fi = oscillator strength for state i (dimensionless)
|
|
66
|
+
|
|
64
67
|
output :
|
|
65
68
|
molar absorption coefficient, in L mol-1 cm-1
|
|
66
|
-
|
|
69
|
+
|
|
70
|
+
"""
|
|
67
71
|
import scipy.constants as sc
|
|
68
72
|
import numpy as np
|
|
69
73
|
c = sc.c*1e2 #cm-1
|
|
@@ -78,20 +82,21 @@ class SpectrumSimulator:
|
|
|
78
82
|
return epsi
|
|
79
83
|
|
|
80
84
|
def _Absorbance(self,eps,opl,cc):
|
|
81
|
-
|
|
85
|
+
"""
|
|
82
86
|
Calculates the Absorbance with the Beer-Lambert law
|
|
87
|
+
|
|
83
88
|
input:
|
|
84
89
|
- eps = molar absorption coefficient, in L mol-1 cm-1
|
|
85
90
|
- opl = optical path length, in cm
|
|
86
91
|
- cc = concentration of the attenuating species, in mol.L-1
|
|
92
|
+
|
|
87
93
|
output :
|
|
88
94
|
Absorbance, A (dimensionless)
|
|
89
|
-
|
|
95
|
+
|
|
96
|
+
"""
|
|
90
97
|
return eps*opl*cc
|
|
91
98
|
|
|
92
99
|
def _sumStatesWithGf(self,wavel,wavelTAB,feTAB):
|
|
93
|
-
'''
|
|
94
|
-
'''
|
|
95
100
|
import numpy as np
|
|
96
101
|
sumInt = np.zeros(len(wavel))
|
|
97
102
|
for l in wavel:
|
|
@@ -100,7 +105,7 @@ class SpectrumSimulator:
|
|
|
100
105
|
return sumInt
|
|
101
106
|
|
|
102
107
|
def _FindPeaks(self,sumInt,height,prom=1):
|
|
103
|
-
|
|
108
|
+
"""
|
|
104
109
|
Finds local maxima within the spectrum based on height and prominence.
|
|
105
110
|
|
|
106
111
|
Prominence is crucial when switching between linear and logarithmic scales:
|
|
@@ -117,7 +122,8 @@ class SpectrumSimulator:
|
|
|
117
122
|
Returns:
|
|
118
123
|
- PeakIndex: Indices of the detected peaks in the wavelength array.
|
|
119
124
|
- PeakHeight: The intensity values at these peak positions.
|
|
120
|
-
|
|
125
|
+
|
|
126
|
+
"""
|
|
121
127
|
from scipy.signal import find_peaks
|
|
122
128
|
peaks = find_peaks(sumInt, height = height, threshold = None, distance = 1, prominence=prom)
|
|
123
129
|
PeakIndex = peaks[0]
|
|
@@ -130,8 +136,8 @@ class SpectrumSimulator:
|
|
|
130
136
|
return PeakIndex,PeakHeight
|
|
131
137
|
|
|
132
138
|
def _FindShoulders(self, data, tP):
|
|
133
|
-
|
|
134
|
-
###not working
|
|
139
|
+
"""
|
|
140
|
+
###not working###
|
|
135
141
|
Detects shoulders using the second derivative.
|
|
136
142
|
A shoulder appears as a peak in the negative second derivative.
|
|
137
143
|
|
|
@@ -145,7 +151,8 @@ class SpectrumSimulator:
|
|
|
145
151
|
- shoulder_idx (ndarray): Array of indices where shoulders were found.
|
|
146
152
|
- shoulder_heights (ndarray): The intensity values at these positions
|
|
147
153
|
extracted from the input data.
|
|
148
|
-
|
|
154
|
+
|
|
155
|
+
"""
|
|
149
156
|
import numpy as np
|
|
150
157
|
# Calculate the second derivative (rate of change of the slope)
|
|
151
158
|
d2 = np.gradient(np.gradient(data))
|
|
@@ -162,11 +169,13 @@ class SpectrumSimulator:
|
|
|
162
169
|
|
|
163
170
|
def _pickPeak(self,wavel,peaksIndex,peaksH,color,\
|
|
164
171
|
shift=500,height=500,posAnnotation=200, ylog=False):
|
|
165
|
-
|
|
172
|
+
"""
|
|
166
173
|
Annotates peaks with a small vertical tick and the wavelength value.
|
|
167
174
|
Adjusts offsets based on whether the plot is in log10 scale or linear.
|
|
168
175
|
In log mode, peaksH must already be log10 values.
|
|
169
|
-
|
|
176
|
+
|
|
177
|
+
"""
|
|
178
|
+
|
|
170
179
|
s=shift
|
|
171
180
|
h=height
|
|
172
181
|
a=posAnnotation
|
|
@@ -202,19 +211,20 @@ class SpectrumSimulator:
|
|
|
202
211
|
|
|
203
212
|
def plotTDDFTSpectrum(self,wavel,sumInt,wavelTAB,feTAB,tP,ylog,labelSpectrum,colorS='#0000ff',colorT='#0000cf'):
|
|
204
213
|
|
|
205
|
-
|
|
214
|
+
"""
|
|
206
215
|
Called by plotEps_lambda_TDDFT. Plots a single simulated UV-Vis spectrum, i.e. after
|
|
207
216
|
gaussian broadening, together with the TDDFT vertical transitions (i.e. plotted as lines)
|
|
208
217
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
+
Args:
|
|
219
|
+
wavel: array of gaussian-broadened wavelengths, in nm
|
|
220
|
+
sumInt: corresponding molar absorptiopn coefficients, in L. mol-1 cm-1
|
|
221
|
+
wavelTAB: wavelength of TDDFT, e.g. discretized, transitions
|
|
222
|
+
ylog: log plot of epsilon
|
|
223
|
+
tP: threshold for finding the peaks
|
|
224
|
+
feTAB: TDDFT oscillator strength for each transition of wavelTAB
|
|
225
|
+
labelSpectrum: title for the spectrum
|
|
226
|
+
|
|
227
|
+
"""
|
|
218
228
|
|
|
219
229
|
# # --- DEBUG START ---
|
|
220
230
|
# if ylog:
|
|
@@ -261,19 +271,26 @@ class SpectrumSimulator:
|
|
|
261
271
|
epsMax=None, titles=None, tP = 10, \
|
|
262
272
|
ylog=False,\
|
|
263
273
|
filename=None):
|
|
264
|
-
|
|
274
|
+
"""
|
|
265
275
|
Plots a TDDFT VUV simulated spectrum (vertical transitions and transitions summed with gaussian functions)
|
|
266
|
-
between lambdamin and lambdamax
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
276
|
+
between lambdamin and lambdamax
|
|
277
|
+
|
|
278
|
+
The sum of states is done in the range
|
|
279
|
+
[lambdamin-50, lambdamax+50] nm.
|
|
280
|
+
|
|
281
|
+
Args:
|
|
282
|
+
datFile: list of pathway/names to "XXX_ExcStab.dat" files generated by 'GParser Gaussian.log -S'
|
|
283
|
+
lambdamin, lambdamax: plot range
|
|
284
|
+
epsMax: y axis graph limit
|
|
285
|
+
titles: list of titles (1 per spectrum plot)
|
|
286
|
+
tP: threshold for finding the peaks (default = 10 L. mol-1 cm-1)
|
|
287
|
+
ylog: y logarithmic axis (default: False).
|
|
288
|
+
save: saves in a png file (300 dpi) if True (default = False)
|
|
289
|
+
filename: saves figure in a 300 dpi png file if not None (default), with filename=full pathway
|
|
290
|
+
|
|
291
|
+
"""
|
|
292
|
+
import matplotlib.ticker as ticker
|
|
293
|
+
|
|
277
294
|
if self.fig is not None:
|
|
278
295
|
graph = self.graph
|
|
279
296
|
fig = self.fig
|
|
@@ -296,7 +313,6 @@ class SpectrumSimulator:
|
|
|
296
313
|
|
|
297
314
|
graph.set_xlim(lambdamin,lambdamax)
|
|
298
315
|
|
|
299
|
-
import matplotlib.ticker as ticker
|
|
300
316
|
graph.xaxis.set_major_locator(ticker.MultipleLocator(50)) # sets a tick for every integer multiple of the base (here 250) within the view interval
|
|
301
317
|
|
|
302
318
|
istate,state,wavel,fe,SSq = np.genfromtxt(datFile,skip_header=1,dtype="<U20,<U20,float,float,<U20",unpack=True)
|
|
@@ -333,25 +349,27 @@ class SpectrumSimulator:
|
|
|
333
349
|
titles=None, linestyles=[], annotateP=[], tP = 0.1,\
|
|
334
350
|
resetColors=False,\
|
|
335
351
|
filename=None):
|
|
336
|
-
|
|
352
|
+
"""
|
|
337
353
|
Plots a simulated TDDFT VUV absorbance spectrum (transitions summed with gaussian functions)
|
|
338
354
|
between lambdamin and lambdamax (sum of states done in the range [lambdamin-50, lambdamlax+50] nm)
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
+
|
|
356
|
+
Args:
|
|
357
|
+
datFiles: list of pathway/name to files generated by 'GParser Gaussian.log -S'
|
|
358
|
+
C0: list of concentrations needed to calculate A = epsilon x l x c (in mol.L-1)
|
|
359
|
+
lambdamin, lambdamax: plot range (x axis)
|
|
360
|
+
Amax: y axis graph limit
|
|
361
|
+
titles: list of titles (1 per spectrum plot)
|
|
362
|
+
linestyles: list of line styles(default = "-", i.e. a continuous line)
|
|
363
|
+
annotateP: list of Boolean (annotate lambda max True or False. Default = True)
|
|
364
|
+
tP: threshold for finding the peaks (default = 0.1)
|
|
365
|
+
resetColors (bool): If True, resets the matplotlib color cycle
|
|
366
|
+
to the first color. This allows different series
|
|
367
|
+
(e.g., gas phase vs. solvent) to share the same
|
|
368
|
+
color coding for each molecule across multiple calls. Default: False
|
|
369
|
+
save: saves in a png file (300 dpi) if True (default = False)
|
|
370
|
+
filename: saves figure in a 300 dpi png file if not None (default), with filename=full pathway
|
|
371
|
+
|
|
372
|
+
"""
|
|
355
373
|
|
|
356
374
|
if self.fig is None:
|
|
357
375
|
fig, graph = self._initializePlot()
|
|
@@ -394,11 +412,12 @@ class SpectrumSimulator:
|
|
|
394
412
|
def plotAbs_lambda_exp(self, csvFiles, C0, lambdamin=200, lambdamax=800,\
|
|
395
413
|
Amax=2.0, titles=None, linestyles=[], annotateP=[], tP = 0.1,\
|
|
396
414
|
filename=None):
|
|
397
|
-
|
|
415
|
+
"""
|
|
398
416
|
Plots an experimental VUV absorbance spectrum read from a csv file between lambdamin and lambdamax
|
|
399
|
-
|
|
417
|
+
|
|
418
|
+
Args:
|
|
400
419
|
- superpose: False = plots a new graph, otherwise the plot is superposed to a previously created one
|
|
401
|
-
|
|
420
|
+
(probably with plotAbs_lambda_TDDFT())
|
|
402
421
|
- csvfiles: list of pathway/name to experimental csvFiles (see examples for the format)
|
|
403
422
|
- C0: list of experimental concentrations, i.e. for each sample
|
|
404
423
|
- lambdamin, lambdamax: plot range (x axis)
|
|
@@ -409,7 +428,8 @@ class SpectrumSimulator:
|
|
|
409
428
|
- tP: threshold for finding the peaks (default = 0.1)
|
|
410
429
|
- save: saves in a png file (300 dpi) if True (default = False)
|
|
411
430
|
- filename: saves figure in a 300 dpi png file if not None (default), with filename=full pathway
|
|
412
|
-
|
|
431
|
+
|
|
432
|
+
"""
|
|
413
433
|
if linestyles == []: linestyles = len(csvFiles)*['--']
|
|
414
434
|
if annotateP == []: annotateP = len(csvFiles)*[True]
|
|
415
435
|
|