orto 1.7.1__py3-none-any.whl → 1.8.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 +53 -2
- orto/data.py +21 -0
- {orto-1.7.1.dist-info → orto-1.8.1.dist-info}/METADATA +1 -1
- {orto-1.7.1.dist-info → orto-1.8.1.dist-info}/RECORD +9 -9
- {orto-1.7.1.dist-info → orto-1.8.1.dist-info}/WHEEL +0 -0
- {orto-1.7.1.dist-info → orto-1.8.1.dist-info}/entry_points.txt +0 -0
- {orto-1.7.1.dist-info → orto-1.8.1.dist-info}/licenses/LICENSE +0 -0
- {orto-1.7.1.dist-info → orto-1.8.1.dist-info}/top_level.txt +0 -0
orto/__version__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '1.
|
|
1
|
+
__version__ = '1.8.1'
|
orto/cli.py
CHANGED
|
@@ -820,8 +820,11 @@ def plot_abs_func(uargs, save_data_only=False):
|
|
|
820
820
|
|
|
821
821
|
# Find unique name from multiple file names
|
|
822
822
|
if len(uargs.output_file) > 1:
|
|
823
|
-
|
|
824
|
-
|
|
823
|
+
if uargs.unique_names:
|
|
824
|
+
base_names = [of.stem for of in uargs.output_file]
|
|
825
|
+
unique_names = ut.find_unique_substring(base_names)
|
|
826
|
+
else:
|
|
827
|
+
unique_names = [of.stem for of in uargs.output_file]
|
|
825
828
|
legend = True
|
|
826
829
|
else:
|
|
827
830
|
legend = False
|
|
@@ -928,6 +931,10 @@ def plot_abs_func(uargs, save_data_only=False):
|
|
|
928
931
|
else:
|
|
929
932
|
x_max = uargs.xlim[1]
|
|
930
933
|
|
|
934
|
+
# Trim transitions to a specific number of states if requested
|
|
935
|
+
if uargs.trim_transitions is not None:
|
|
936
|
+
abs_data.trim_to_n(uargs.trim_transitions)
|
|
937
|
+
|
|
931
938
|
# Generate spectrum
|
|
932
939
|
abs_data.generate_spectrum(
|
|
933
940
|
fwhm=uargs.linewidth,
|
|
@@ -2016,6 +2023,28 @@ def read_args(arg_list=None):
|
|
|
2016
2023
|
)
|
|
2017
2024
|
)
|
|
2018
2025
|
|
|
2026
|
+
gen_abs.add_argument(
|
|
2027
|
+
'--unique_names',
|
|
2028
|
+
action='store_true',
|
|
2029
|
+
default=False,
|
|
2030
|
+
help=(
|
|
2031
|
+
'Attempt to shorten file names in plot legend\n'
|
|
2032
|
+
'Default: %(default)s'
|
|
2033
|
+
)
|
|
2034
|
+
)
|
|
2035
|
+
|
|
2036
|
+
gen_abs.add_argument(
|
|
2037
|
+
'--trim_transitions',
|
|
2038
|
+
'-tt',
|
|
2039
|
+
type=int,
|
|
2040
|
+
default=None,
|
|
2041
|
+
help=(
|
|
2042
|
+
'Trim to first n transitions\n'
|
|
2043
|
+
'where n is an integer\n'
|
|
2044
|
+
'Default: %(default)s'
|
|
2045
|
+
)
|
|
2046
|
+
)
|
|
2047
|
+
|
|
2019
2048
|
plot_subprog = all_subparsers.add_parser(
|
|
2020
2049
|
'plot',
|
|
2021
2050
|
description='Plot data from orca file',
|
|
@@ -2159,6 +2188,28 @@ def read_args(arg_list=None):
|
|
|
2159
2188
|
)
|
|
2160
2189
|
)
|
|
2161
2190
|
|
|
2191
|
+
plot_abs.add_argument(
|
|
2192
|
+
'--unique_names',
|
|
2193
|
+
action='store_true',
|
|
2194
|
+
default=False,
|
|
2195
|
+
help=(
|
|
2196
|
+
'Attempt to shorten file names in plot legend\n'
|
|
2197
|
+
'Default: %(default)s'
|
|
2198
|
+
)
|
|
2199
|
+
)
|
|
2200
|
+
|
|
2201
|
+
plot_abs.add_argument(
|
|
2202
|
+
'--trim_transitions',
|
|
2203
|
+
'-tt',
|
|
2204
|
+
type=int,
|
|
2205
|
+
default=None,
|
|
2206
|
+
help=(
|
|
2207
|
+
'Trim to first n transitions\n'
|
|
2208
|
+
'where n is an integer\n'
|
|
2209
|
+
'Default: %(default)s'
|
|
2210
|
+
)
|
|
2211
|
+
)
|
|
2212
|
+
|
|
2162
2213
|
plot_xes = plot_parser.add_parser(
|
|
2163
2214
|
'xes',
|
|
2164
2215
|
description='Plots XES from CI calculation output',
|
orto/data.py
CHANGED
|
@@ -181,6 +181,27 @@ class AbsorptionData():
|
|
|
181
181
|
self._spectrum = spectrum
|
|
182
182
|
return
|
|
183
183
|
|
|
184
|
+
def trim_to_n(self, n_transitions: int) -> None:
|
|
185
|
+
'''
|
|
186
|
+
Trims data to given number of transitions
|
|
187
|
+
|
|
188
|
+
Parameters
|
|
189
|
+
----------
|
|
190
|
+
n_transitions: int
|
|
191
|
+
Number of transitions to keep from the start of the data
|
|
192
|
+
|
|
193
|
+
Returns
|
|
194
|
+
-------
|
|
195
|
+
None
|
|
196
|
+
'''
|
|
197
|
+
|
|
198
|
+
self.energies = self.energies[:n_transitions]
|
|
199
|
+
self.osc_strengths = self.osc_strengths[:n_transitions]
|
|
200
|
+
|
|
201
|
+
self.spectrum = None
|
|
202
|
+
|
|
203
|
+
return
|
|
204
|
+
|
|
184
205
|
@classmethod
|
|
185
206
|
def from_extractor(cls, extractor: oe.AbsorptionExtractor,
|
|
186
207
|
remove_zero_osc: float = 1E-4) -> list['AbsorptionData']: # noqa
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
orto/__init__.py,sha256=IedlltYr3qYZxChNUdz62qogXA9Pos_MUvXdGXqAa0E,41
|
|
2
|
-
orto/__version__.py,sha256=
|
|
3
|
-
orto/cli.py,sha256=
|
|
2
|
+
orto/__version__.py,sha256=7MCtJDgGo9X0p4xZ0jS5djhQPWK-HOaXAyASTwUa4Fc,22
|
|
3
|
+
orto/cli.py,sha256=L2i5FHwXSH8AdE2hZHA0VcqJv1oxxGZ3MUgPSE9Dn_E,81704
|
|
4
4
|
orto/constants.py,sha256=anxaiTykO8Q_CXliR7zuOAdnXZrQ2-C4ndaviyl7kGc,419
|
|
5
|
-
orto/data.py,sha256=
|
|
5
|
+
orto/data.py,sha256=960LHFeG7l626X_WA-8YxvG2toNAsgNvLo86OoYAmBY,14910
|
|
6
6
|
orto/exceptions.py,sha256=D7oNeAEGeJNt5thzt6PaCn5FY6JcbJOWUE1N1LVhhuE,159
|
|
7
7
|
orto/extractor.py,sha256=d2_pGQeIjK_JbsMINTawUgcO2vcPq0b9uQj9VKuI720,75953
|
|
8
8
|
orto/input.py,sha256=N8JbySSVEC_qmXZ7ppJsZ7Z1qel6PfalGYRtnX1hJ6U,9900
|
|
9
9
|
orto/job.py,sha256=SM0nlc_bqhhPvfuuykhMvaUnkwC3Gp-6RvYw_a0TyGc,5855
|
|
10
10
|
orto/plotter.py,sha256=IATM7vBauT3StFXqk_4DKzCSiTnUunrCeNYRBKM3eUE,17695
|
|
11
11
|
orto/utils.py,sha256=GcMZ9uebOSnkPQT_U5O0X49LUtTu8YpXZxEsNKgXNTY,9838
|
|
12
|
-
orto-1.
|
|
13
|
-
orto-1.
|
|
14
|
-
orto-1.
|
|
15
|
-
orto-1.
|
|
16
|
-
orto-1.
|
|
17
|
-
orto-1.
|
|
12
|
+
orto-1.8.1.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
|
|
13
|
+
orto-1.8.1.dist-info/METADATA,sha256=iFQdVfoNx5SpWOOcw4gC69tj7zewzVcQq4Wugv781xE,1184
|
|
14
|
+
orto-1.8.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
15
|
+
orto-1.8.1.dist-info/entry_points.txt,sha256=HXenCglMp_03JkN34pK2phkjXK9CFcXTGHKv5QaVY8I,39
|
|
16
|
+
orto-1.8.1.dist-info/top_level.txt,sha256=hQ-z28gTN_FZ2B5Kiwxr_9cUTcCoib9W5HjbkceDXw4,5
|
|
17
|
+
orto-1.8.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|