orto 1.8.0__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 CHANGED
@@ -1 +1 @@
1
- __version__ = '1.8.0'
1
+ __version__ = '1.8.1'
orto/cli.py CHANGED
@@ -931,6 +931,10 @@ def plot_abs_func(uargs, save_data_only=False):
931
931
  else:
932
932
  x_max = uargs.xlim[1]
933
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
+
934
938
  # Generate spectrum
935
939
  abs_data.generate_spectrum(
936
940
  fwhm=uargs.linewidth,
@@ -2019,6 +2023,28 @@ def read_args(arg_list=None):
2019
2023
  )
2020
2024
  )
2021
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
+
2022
2048
  plot_subprog = all_subparsers.add_parser(
2023
2049
  'plot',
2024
2050
  description='Plot data from orca file',
@@ -2172,6 +2198,18 @@ def read_args(arg_list=None):
2172
2198
  )
2173
2199
  )
2174
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
+
2175
2213
  plot_xes = plot_parser.add_parser(
2176
2214
  'xes',
2177
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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: orto
3
- Version: 1.8.0
3
+ Version: 1.8.1
4
4
  Summary: A package to make life easier when performing Orca calculations.
5
5
  Home-page: https://orto.kragskow.group
6
6
  Author: Jon Kragskow
@@ -1,17 +1,17 @@
1
1
  orto/__init__.py,sha256=IedlltYr3qYZxChNUdz62qogXA9Pos_MUvXdGXqAa0E,41
2
- orto/__version__.py,sha256=xM8KgdV4KJGZbMUy8tPzc62kL9LzIER0XAX4CTGiDFM,22
3
- orto/cli.py,sha256=Jbrc08vGV9OZY5G44sd7M_c56UC8hYI08ZC87HRyPtI,80777
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=cNO8gQj6aZP-xriWUY2HchZ6iWZxVZnlrvAD4qhWT_o,14436
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.8.0.dist-info/licenses/LICENSE,sha256=46mU2C5kSwOnkqkw9XQAJlhBL2JAf1_uCD8lVcXyMRg,7652
13
- orto-1.8.0.dist-info/METADATA,sha256=RAh5Qee-q9kSlf3Qpi9Egt0LZw6-t6a_dAUfJnCXN4A,1184
14
- orto-1.8.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
15
- orto-1.8.0.dist-info/entry_points.txt,sha256=HXenCglMp_03JkN34pK2phkjXK9CFcXTGHKv5QaVY8I,39
16
- orto-1.8.0.dist-info/top_level.txt,sha256=hQ-z28gTN_FZ2B5Kiwxr_9cUTcCoib9W5HjbkceDXw4,5
17
- orto-1.8.0.dist-info/RECORD,,
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