orto 1.6.0__py3-none-any.whl → 1.6.1__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.
- orto/__version__.py +1 -1
- orto/cli.py +12 -2
- orto/data.py +21 -16
- orto/utils.py +2 -1
- {orto-1.6.0.dist-info → orto-1.6.1.dist-info}/METADATA +1 -1
- orto-1.6.1.dist-info/RECORD +17 -0
- orto-1.6.0.dist-info/RECORD +0 -17
- {orto-1.6.0.dist-info → orto-1.6.1.dist-info}/WHEEL +0 -0
- {orto-1.6.0.dist-info → orto-1.6.1.dist-info}/entry_points.txt +0 -0
- {orto-1.6.0.dist-info → orto-1.6.1.dist-info}/licenses/LICENSE +0 -0
- {orto-1.6.0.dist-info → orto-1.6.1.dist-info}/top_level.txt +0 -0
orto/__version__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '1.6.
|
|
1
|
+
__version__ = '1.6.1'
|
orto/cli.py
CHANGED
|
@@ -862,7 +862,7 @@ def plot_abs_func(uargs):
|
|
|
862
862
|
output_file
|
|
863
863
|
)
|
|
864
864
|
elif uargs.intensities == 'semi-classical':
|
|
865
|
-
all_datasets = oe.AbsorptionSemiClassicalDipoleExtractor.extract(
|
|
865
|
+
all_datasets = oe.AbsorptionSemiClassicalDipoleExtractor.extract( # noqa
|
|
866
866
|
output_file
|
|
867
867
|
)
|
|
868
868
|
|
|
@@ -872,7 +872,7 @@ def plot_abs_func(uargs):
|
|
|
872
872
|
d.AbsorptionData.from_extractor_dataset(
|
|
873
873
|
dataset,
|
|
874
874
|
uargs.intensities,
|
|
875
|
-
remove_zero_osc=
|
|
875
|
+
remove_zero_osc=uargs.zero_osc
|
|
876
876
|
)
|
|
877
877
|
for dataset in all_datasets
|
|
878
878
|
]
|
|
@@ -2023,6 +2023,16 @@ def read_args(arg_list=None):
|
|
|
2023
2023
|
)
|
|
2024
2024
|
)
|
|
2025
2025
|
|
|
2026
|
+
plot_abs.add_argument(
|
|
2027
|
+
'--zero_osc',
|
|
2028
|
+
default=1E-5,
|
|
2029
|
+
type=float,
|
|
2030
|
+
help=(
|
|
2031
|
+
'Oscillator strengths below this value are treated as zero\n'
|
|
2032
|
+
'Default: %(default)s'
|
|
2033
|
+
)
|
|
2034
|
+
)
|
|
2035
|
+
|
|
2026
2036
|
plot_xes = plot_parser.add_parser(
|
|
2027
2037
|
'xes',
|
|
2028
2038
|
description='Plots XES from CI calculation output',
|
orto/data.py
CHANGED
|
@@ -172,7 +172,7 @@ class AbsorptionData():
|
|
|
172
172
|
|
|
173
173
|
@classmethod
|
|
174
174
|
def from_extractor(cls, extractor: oe.AbsorptionExtractor,
|
|
175
|
-
remove_zero_osc:
|
|
175
|
+
remove_zero_osc: float = 1E-4) -> list['AbsorptionData']: # noqa
|
|
176
176
|
'''
|
|
177
177
|
Creates AbsorptionData object from data extractor
|
|
178
178
|
|
|
@@ -180,8 +180,8 @@ class AbsorptionData():
|
|
|
180
180
|
----------
|
|
181
181
|
extractor: Extractor
|
|
182
182
|
Data extractor object containing transition data
|
|
183
|
-
remove_zero_osc:
|
|
184
|
-
|
|
183
|
+
remove_zero_osc: float, default=1E-4
|
|
184
|
+
Remove transitions with oscillator strength below this value
|
|
185
185
|
|
|
186
186
|
Returns
|
|
187
187
|
-------
|
|
@@ -204,7 +204,7 @@ class AbsorptionData():
|
|
|
204
204
|
def from_extractor_dataset(cls,
|
|
205
205
|
dataset: dict[str, list[int | float]],
|
|
206
206
|
operator: str,
|
|
207
|
-
remove_zero_osc:
|
|
207
|
+
remove_zero_osc: float = 1E-4) -> 'AbsorptionData': # noqa
|
|
208
208
|
'''
|
|
209
209
|
Creates AbsorptionData object from data extractor
|
|
210
210
|
|
|
@@ -214,8 +214,8 @@ class AbsorptionData():
|
|
|
214
214
|
Dataset from orto AbsorptionExtractor.data
|
|
215
215
|
operator: str
|
|
216
216
|
Type of operator used to calculate transitions
|
|
217
|
-
remove_zero_osc:
|
|
218
|
-
|
|
217
|
+
remove_zero_osc: float, default=1E-4
|
|
218
|
+
Remove transitions with oscillator strength below this value
|
|
219
219
|
|
|
220
220
|
Returns
|
|
221
221
|
-------
|
|
@@ -228,16 +228,21 @@ class AbsorptionData():
|
|
|
228
228
|
|
|
229
229
|
# Remove transitions with zero oscillator strength from
|
|
230
230
|
# beginning and end of spectrum
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
first_nonzero = np.where(osc_strengths >
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
231
|
+
osc_strengths = np.array(osc_strengths)
|
|
232
|
+
# Find first non-zero oscillator strength
|
|
233
|
+
try:
|
|
234
|
+
first_nonzero = np.where(osc_strengths > remove_zero_osc)[0][0]
|
|
235
|
+
except IndexError:
|
|
236
|
+
raise DataFormattingError(
|
|
237
|
+
'No transitions with oscillator strength above '
|
|
238
|
+
f'{remove_zero_osc} found.'
|
|
239
|
+
)
|
|
240
|
+
# Find last non-zero oscillator strength
|
|
241
|
+
last_nonzero = np.where(osc_strengths > remove_zero_osc)[0][-1]
|
|
242
|
+
|
|
243
|
+
# Trim data
|
|
244
|
+
energies = energies[first_nonzero:last_nonzero + 1]
|
|
245
|
+
osc_strengths = osc_strengths[first_nonzero:last_nonzero + 1]
|
|
241
246
|
|
|
242
247
|
return cls(energies, osc_strengths, operator)
|
|
243
248
|
|
orto/utils.py
CHANGED
|
@@ -396,6 +396,7 @@ def find_unique_substring(names):
|
|
|
396
396
|
break
|
|
397
397
|
return unique_names
|
|
398
398
|
|
|
399
|
+
|
|
399
400
|
def is_floatable(string: str) -> bool:
|
|
400
401
|
'''
|
|
401
402
|
Checks if string can be converted to float
|
|
@@ -415,4 +416,4 @@ def is_floatable(string: str) -> bool:
|
|
|
415
416
|
float(string)
|
|
416
417
|
return True
|
|
417
418
|
except ValueError:
|
|
418
|
-
return False
|
|
419
|
+
return False
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
orto/__init__.py,sha256=IedlltYr3qYZxChNUdz62qogXA9Pos_MUvXdGXqAa0E,41
|
|
2
|
+
orto/__version__.py,sha256=purtuLvskAhEdNLSjxoYqUibNFbOHk0IB5Wc4KCA7l4,22
|
|
3
|
+
orto/cli.py,sha256=K3qJzw1stIff3YW88h7MLZuTVFIWGfnw7RaTFLRyhrk,76740
|
|
4
|
+
orto/constants.py,sha256=anxaiTykO8Q_CXliR7zuOAdnXZrQ2-C4ndaviyl7kGc,419
|
|
5
|
+
orto/data.py,sha256=YsfSD3yaebPmaGweeR0o-hBxN0Xi7WZ1PlWv-vnhnJc,11416
|
|
6
|
+
orto/exceptions.py,sha256=D7oNeAEGeJNt5thzt6PaCn5FY6JcbJOWUE1N1LVhhuE,159
|
|
7
|
+
orto/extractor.py,sha256=d2_pGQeIjK_JbsMINTawUgcO2vcPq0b9uQj9VKuI720,75953
|
|
8
|
+
orto/input.py,sha256=N8JbySSVEC_qmXZ7ppJsZ7Z1qel6PfalGYRtnX1hJ6U,9900
|
|
9
|
+
orto/job.py,sha256=SM0nlc_bqhhPvfuuykhMvaUnkwC3Gp-6RvYw_a0TyGc,5855
|
|
10
|
+
orto/plotter.py,sha256=-8Lgv-kDjw_wHZrDrQzQGT521gSZ3IJdIeLqzdQgflQ,17656
|
|
11
|
+
orto/utils.py,sha256=GcMZ9uebOSnkPQT_U5O0X49LUtTu8YpXZxEsNKgXNTY,9838
|
|
12
|
+
orto-1.6.1.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
|
|
13
|
+
orto-1.6.1.dist-info/METADATA,sha256=Gxi6rsbFM8jx-4YxqII-Pb1fNE1FSPEdIZeHUfBMnDU,1184
|
|
14
|
+
orto-1.6.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
15
|
+
orto-1.6.1.dist-info/entry_points.txt,sha256=HXenCglMp_03JkN34pK2phkjXK9CFcXTGHKv5QaVY8I,39
|
|
16
|
+
orto-1.6.1.dist-info/top_level.txt,sha256=hQ-z28gTN_FZ2B5Kiwxr_9cUTcCoib9W5HjbkceDXw4,5
|
|
17
|
+
orto-1.6.1.dist-info/RECORD,,
|
orto-1.6.0.dist-info/RECORD
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
orto/__init__.py,sha256=IedlltYr3qYZxChNUdz62qogXA9Pos_MUvXdGXqAa0E,41
|
|
2
|
-
orto/__version__.py,sha256=bYN93DTWr8alkTnO3wj31CU5gqTshxIcsbXUcJcUAc8,22
|
|
3
|
-
orto/cli.py,sha256=AH9Cnfu21XGTs2ygLZGb8yxzJPe1gxxnF9qOsm_H1II,76491
|
|
4
|
-
orto/constants.py,sha256=anxaiTykO8Q_CXliR7zuOAdnXZrQ2-C4ndaviyl7kGc,419
|
|
5
|
-
orto/data.py,sha256=r6Ht1X0-FhjUbEAAi3a9F2R2_QG3QFElaAAcZNz4GRQ,11213
|
|
6
|
-
orto/exceptions.py,sha256=D7oNeAEGeJNt5thzt6PaCn5FY6JcbJOWUE1N1LVhhuE,159
|
|
7
|
-
orto/extractor.py,sha256=d2_pGQeIjK_JbsMINTawUgcO2vcPq0b9uQj9VKuI720,75953
|
|
8
|
-
orto/input.py,sha256=N8JbySSVEC_qmXZ7ppJsZ7Z1qel6PfalGYRtnX1hJ6U,9900
|
|
9
|
-
orto/job.py,sha256=SM0nlc_bqhhPvfuuykhMvaUnkwC3Gp-6RvYw_a0TyGc,5855
|
|
10
|
-
orto/plotter.py,sha256=-8Lgv-kDjw_wHZrDrQzQGT521gSZ3IJdIeLqzdQgflQ,17656
|
|
11
|
-
orto/utils.py,sha256=fghKZnrO1HTtOZPZRbNK6QTgUOXiIQ6NEFvesDSoY0o,9836
|
|
12
|
-
orto-1.6.0.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
|
|
13
|
-
orto-1.6.0.dist-info/METADATA,sha256=zfjB9HzSeKgJKRlTqLMw2AmqspP1nyYAlJZDa_vS3kE,1184
|
|
14
|
-
orto-1.6.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
15
|
-
orto-1.6.0.dist-info/entry_points.txt,sha256=HXenCglMp_03JkN34pK2phkjXK9CFcXTGHKv5QaVY8I,39
|
|
16
|
-
orto-1.6.0.dist-info/top_level.txt,sha256=hQ-z28gTN_FZ2B5Kiwxr_9cUTcCoib9W5HjbkceDXw4,5
|
|
17
|
-
orto-1.6.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|