orto 1.0.1__py3-none-any.whl → 1.0.3__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 +65 -27
- orto/constants.py +8 -0
- orto/exceptions.py +5 -0
- orto/extractor.py +6 -10
- orto/input.py +30 -29
- {orto-1.0.1.dist-info → orto-1.0.3.dist-info}/METADATA +1 -1
- orto-1.0.3.dist-info/RECORD +15 -0
- orto-1.0.1.dist-info/RECORD +0 -13
- {orto-1.0.1.dist-info → orto-1.0.3.dist-info}/WHEEL +0 -0
- {orto-1.0.1.dist-info → orto-1.0.3.dist-info}/entry_points.txt +0 -0
- {orto-1.0.1.dist-info → orto-1.0.3.dist-info}/top_level.txt +0 -0
orto/__version__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '1.0.
|
|
1
|
+
__version__ = '1.0.3'
|
orto/cli.py
CHANGED
|
@@ -6,25 +6,16 @@ import pathlib
|
|
|
6
6
|
import os
|
|
7
7
|
import copy
|
|
8
8
|
import subprocess
|
|
9
|
-
|
|
10
|
-
import scipy.constants as constants
|
|
9
|
+
import csv
|
|
11
10
|
import numpy as np
|
|
12
|
-
from extto import DataNotFoundError
|
|
13
11
|
import re
|
|
14
12
|
from mmap import mmap, ACCESS_READ
|
|
15
13
|
from shutil import move as shutilmove
|
|
16
14
|
|
|
17
|
-
|
|
18
|
-
from docx import Document
|
|
19
|
-
from docx.enum.text import WD_ALIGN_PARAGRAPH
|
|
20
|
-
from docx.enum.table import WD_ALIGN_VERTICAL
|
|
21
|
-
from docx.shared import Pt
|
|
22
|
-
|
|
23
|
-
from . import plotter
|
|
24
|
-
from . import extractor as oe
|
|
25
15
|
from . import job
|
|
26
16
|
from . import utils as ut
|
|
27
|
-
from . import
|
|
17
|
+
from . import constants as cst
|
|
18
|
+
from .exceptions import DataNotFoundError, DataFormattingError
|
|
28
19
|
|
|
29
20
|
_SHOW_CONV = {
|
|
30
21
|
'on': True,
|
|
@@ -56,6 +47,7 @@ def extract_coords_func(uargs, save=True):
|
|
|
56
47
|
-------
|
|
57
48
|
None
|
|
58
49
|
'''
|
|
50
|
+
from . import extractor as oe
|
|
59
51
|
|
|
60
52
|
# Open file and extract coordinates
|
|
61
53
|
labels, coords = oe.get_coords(
|
|
@@ -83,6 +75,11 @@ def extract_sf_energies_func(uargs):
|
|
|
83
75
|
'''
|
|
84
76
|
Wrapper for cli call to extract spin-free energies
|
|
85
77
|
'''
|
|
78
|
+
from . import extractor as oe
|
|
79
|
+
from docx import Document
|
|
80
|
+
from docx.enum.text import WD_ALIGN_PARAGRAPH
|
|
81
|
+
from docx.enum.table import WD_ALIGN_VERTICAL
|
|
82
|
+
from docx.shared import Pt
|
|
86
83
|
|
|
87
84
|
all_data = oe.SpinFreeEnergyExtractor().extract(
|
|
88
85
|
uargs.output_file
|
|
@@ -166,6 +163,7 @@ def extract_so_energies_func(uargs):
|
|
|
166
163
|
'''
|
|
167
164
|
Wrapper for cli call to extract spin-orbit energies
|
|
168
165
|
'''
|
|
166
|
+
from . import extractor as oe
|
|
169
167
|
|
|
170
168
|
all_energies = oe.SpinOrbitEnergyExtractor().extract(
|
|
171
169
|
uargs.output_file
|
|
@@ -206,6 +204,11 @@ def extract_gmatrix_func(uargs, save=True):
|
|
|
206
204
|
-------
|
|
207
205
|
None
|
|
208
206
|
'''
|
|
207
|
+
from . import extractor as oe
|
|
208
|
+
from docx import Document
|
|
209
|
+
from docx.enum.text import WD_ALIGN_PARAGRAPH
|
|
210
|
+
from docx.enum.table import WD_ALIGN_VERTICAL
|
|
211
|
+
from docx.shared import Pt
|
|
209
212
|
|
|
210
213
|
choices = {
|
|
211
214
|
'total': oe.GMatrixExtractor,
|
|
@@ -407,6 +410,7 @@ def gen_job_func(uargs):
|
|
|
407
410
|
-------
|
|
408
411
|
None
|
|
409
412
|
'''
|
|
413
|
+
from . import input as inp
|
|
410
414
|
|
|
411
415
|
for input_file in uargs.input_files:
|
|
412
416
|
|
|
@@ -461,13 +465,13 @@ def gen_job_func(uargs):
|
|
|
461
465
|
# Check xyz file is present
|
|
462
466
|
try:
|
|
463
467
|
inp.check_xyz(oj.input_file, uargs.skip_xyz)
|
|
464
|
-
except (
|
|
468
|
+
except (DataNotFoundError, DataFormattingError) as e:
|
|
465
469
|
ut.red_exit(str(e))
|
|
466
470
|
|
|
467
471
|
# Check for moread and moinp
|
|
468
472
|
try:
|
|
469
473
|
inp.check_moinp_moread(oj.input_file)
|
|
470
|
-
except (
|
|
474
|
+
except (DataNotFoundError, DataFormattingError) as e:
|
|
471
475
|
ut.red_exit(str(e))
|
|
472
476
|
|
|
473
477
|
# Submitter configuration options
|
|
@@ -478,7 +482,7 @@ def gen_job_func(uargs):
|
|
|
478
482
|
try:
|
|
479
483
|
n_procs = inp.get_nprocs(oj.input_file)
|
|
480
484
|
maxcore = inp.get_maxcore(oj.input_file)
|
|
481
|
-
except (
|
|
485
|
+
except (DataNotFoundError, DataFormattingError) as e:
|
|
482
486
|
ut.red_exit(str(e))
|
|
483
487
|
|
|
484
488
|
# If memory and procs specified as arguments, give warning when
|
|
@@ -543,6 +547,8 @@ def plot_abs_func(uargs):
|
|
|
543
547
|
'''
|
|
544
548
|
import matplotlib.pyplot as plt
|
|
545
549
|
import matplotlib as mpl
|
|
550
|
+
from . import plotter
|
|
551
|
+
from . import extractor as oe
|
|
546
552
|
|
|
547
553
|
# Set user specified font name
|
|
548
554
|
if os.getenv('orto_fontname'):
|
|
@@ -655,6 +661,21 @@ def plot_ir_func(uargs):
|
|
|
655
661
|
-------
|
|
656
662
|
None
|
|
657
663
|
'''
|
|
664
|
+
import matplotlib.pyplot as plt
|
|
665
|
+
import matplotlib as mpl
|
|
666
|
+
from . import plotter
|
|
667
|
+
from . import extractor as oe
|
|
668
|
+
|
|
669
|
+
# Set user specified font name
|
|
670
|
+
if os.getenv('orto_fontname'):
|
|
671
|
+
try:
|
|
672
|
+
plt.rcParams['font.family'] = os.getenv('orto_fontname')
|
|
673
|
+
except ValueError:
|
|
674
|
+
ut.cprint('Error in orto_fontname environment variable', 'red')
|
|
675
|
+
sys.exit(1)
|
|
676
|
+
|
|
677
|
+
# Change matplotlib font size to be larger
|
|
678
|
+
mpl.rcParams.update({'font.size': 12})
|
|
658
679
|
|
|
659
680
|
# Extract frequency information
|
|
660
681
|
data = oe.FrequencyExtractor.extract(uargs.output_file)
|
|
@@ -665,7 +686,7 @@ def plot_ir_func(uargs):
|
|
|
665
686
|
data = data[0]
|
|
666
687
|
|
|
667
688
|
# Plot infrared spectrum
|
|
668
|
-
|
|
689
|
+
plotter.plot_ir(
|
|
669
690
|
data['energy (cm^-1)'],
|
|
670
691
|
data['epsilon (L mol^-1 cm^-1)'],
|
|
671
692
|
linewidth=uargs.linewidth,
|
|
@@ -691,6 +712,7 @@ def distort_func(uargs):
|
|
|
691
712
|
None
|
|
692
713
|
|
|
693
714
|
'''
|
|
715
|
+
from . import extractor as oe
|
|
694
716
|
|
|
695
717
|
# Open file and extract coordinates
|
|
696
718
|
labels, coords = oe.get_coords(
|
|
@@ -737,6 +759,7 @@ def extract_orbs_func(uargs, save=True) -> None:
|
|
|
737
759
|
-------
|
|
738
760
|
None
|
|
739
761
|
'''
|
|
762
|
+
from . import extractor as oe
|
|
740
763
|
|
|
741
764
|
# Check for spin in file, if present
|
|
742
765
|
try:
|
|
@@ -896,6 +919,7 @@ def extract_freq_func(uargs, save=True):
|
|
|
896
919
|
-------
|
|
897
920
|
None
|
|
898
921
|
'''
|
|
922
|
+
from . import extractor as oe
|
|
899
923
|
|
|
900
924
|
# Extract frequency information
|
|
901
925
|
data = oe.FrequencyExtractor.extract(uargs.output_file)
|
|
@@ -945,6 +969,7 @@ def extract_pop_func(uargs, save=True) -> None:
|
|
|
945
969
|
-------
|
|
946
970
|
None
|
|
947
971
|
'''
|
|
972
|
+
from . import extractor as oe
|
|
948
973
|
|
|
949
974
|
if uargs.flavour in ['loewdin', 'lowdin']:
|
|
950
975
|
data = oe.LoewdinPopulationExtractor.extract(
|
|
@@ -1020,6 +1045,8 @@ def plot_susc_func(uargs) -> None:
|
|
|
1020
1045
|
'''
|
|
1021
1046
|
import matplotlib.pyplot as plt
|
|
1022
1047
|
import matplotlib as mpl
|
|
1048
|
+
from . import plotter
|
|
1049
|
+
from . import extractor as oe
|
|
1023
1050
|
|
|
1024
1051
|
# Change matplotlib font size to be larger
|
|
1025
1052
|
mpl.rcParams.update({'font.size': 12})
|
|
@@ -1042,22 +1069,28 @@ def plot_susc_func(uargs) -> None:
|
|
|
1042
1069
|
'green'
|
|
1043
1070
|
)
|
|
1044
1071
|
|
|
1045
|
-
# Load experimental data if provided
|
|
1046
1072
|
if uargs.exp_file is not None:
|
|
1047
|
-
exp_data =
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1073
|
+
exp_data = {'Temperature (K)': [], 'chi*T (cm3*K/mol)': []}
|
|
1074
|
+
with open(uargs.exp_file, newline='') as csvfile:
|
|
1075
|
+
reader = csv.DictReader(
|
|
1076
|
+
row for row in csvfile if not row.startswith('#')
|
|
1077
|
+
)
|
|
1078
|
+
for row in reader:
|
|
1079
|
+
exp_data['Temperature (K)'].append(
|
|
1080
|
+
float(row['Temperature (K)'])
|
|
1081
|
+
)
|
|
1082
|
+
exp_data['chi*T (cm3*K/mol)'].append(
|
|
1083
|
+
float(row['chi*T (cm3*K/mol)'])
|
|
1084
|
+
)
|
|
1052
1085
|
|
|
1053
1086
|
# Conversion factors from cm3 K mol^-1 to ...
|
|
1054
1087
|
convs = {
|
|
1055
|
-
'A3 K': 1E24 /
|
|
1088
|
+
'A3 K': 1E24 / cst.AVOGADRO,
|
|
1056
1089
|
'A3 mol-1 K': 1E24,
|
|
1057
|
-
'cm3 K': 1 /
|
|
1090
|
+
'cm3 K': 1 / cst.AVOGADRO,
|
|
1058
1091
|
'cm3 mol-1 K': 1,
|
|
1059
|
-
'emu K': 1 / (4 *
|
|
1060
|
-
'emu mol-1 K': 1 / (4 *
|
|
1092
|
+
'emu K': 1 / (4 * np.pi * cst.AVOGADRO),
|
|
1093
|
+
'emu mol-1 K': 1 / (4 * np.pi)
|
|
1061
1094
|
}
|
|
1062
1095
|
|
|
1063
1096
|
unit_labels = {
|
|
@@ -1083,7 +1116,10 @@ def plot_susc_func(uargs) -> None:
|
|
|
1083
1116
|
if uargs.exp_file is not None:
|
|
1084
1117
|
ax.plot(
|
|
1085
1118
|
exp_data['Temperature (K)'],
|
|
1086
|
-
|
|
1119
|
+
[
|
|
1120
|
+
val * convs[uargs.esusc_units]
|
|
1121
|
+
for val in exp_data['chi*T (cm3*K/mol)']
|
|
1122
|
+
],
|
|
1087
1123
|
lw=0,
|
|
1088
1124
|
marker='o',
|
|
1089
1125
|
fillstyle='none',
|
|
@@ -1120,6 +1156,8 @@ def plot_ailft_func(uargs) -> None:
|
|
|
1120
1156
|
'''
|
|
1121
1157
|
import matplotlib.pyplot as plt
|
|
1122
1158
|
import matplotlib as mpl
|
|
1159
|
+
from . import plotter
|
|
1160
|
+
from . import extractor as oe
|
|
1123
1161
|
|
|
1124
1162
|
# Change matplotlib font size to be larger
|
|
1125
1163
|
mpl.rcParams.update({'font.size': 12})
|
orto/constants.py
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
AVOGADRO = 6.02214076e23 # mol^-1
|
|
2
|
+
HARTREE2INVERSE_M = 2.194746313705E7 # m^-1
|
|
3
|
+
HARTREE2INVERSE_CM = 100 / HARTREE2INVERSE_M
|
|
4
|
+
ELECTRON_CHARGE = 1.602176487e-19 # C
|
|
5
|
+
ELECTRON_MASS = 9.10938215E-31 # kg
|
|
6
|
+
EPSILON_0 = 8.8541878128E-12 # F m^-1
|
|
7
|
+
SPEED_OF_LIGHT_M_S = 299792458.0 # m s^-1
|
|
8
|
+
SPEED_OF_LIGHT_CM_S = SPEED_OF_LIGHT_M_S * 100.0 # cm s^-1
|
orto/exceptions.py
ADDED
orto/extractor.py
CHANGED
|
@@ -7,12 +7,10 @@ import re
|
|
|
7
7
|
import pandas as pd
|
|
8
8
|
from io import StringIO
|
|
9
9
|
import pathlib
|
|
10
|
-
import scipy.constants as sc
|
|
11
10
|
import copy
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
DataFormattingError = extto.DataFormattingError
|
|
12
|
+
from .exceptions import DataFormattingError
|
|
13
|
+
from . import constants as const
|
|
16
14
|
|
|
17
15
|
|
|
18
16
|
class OrcaVersionExtractor(extto.LineExtractor):
|
|
@@ -569,26 +567,24 @@ class FrequencyExtractor(extto.BetweenExtractor):
|
|
|
569
567
|
# in atomic units
|
|
570
568
|
# b^2 = hbar/(2*c*nubar) --> 1/(2*nubar)
|
|
571
569
|
# m_e^-1/2 a_0
|
|
572
|
-
icm2eh = 100 / sc.physical_constants['hartree-inverse meter relationship'][0] # noqa
|
|
573
|
-
#
|
|
574
570
|
b2 = np.zeros_like(wavenumbers)
|
|
575
|
-
b2[n_missing:] = 1 / (2 *
|
|
571
|
+
b2[n_missing:] = 1 / (2 * const.HARTREE2INVERSE_CM * wavenumbers[n_missing:]) # noqa
|
|
576
572
|
# divide by sqrt(b2)
|
|
577
573
|
# to give units of e m_e^-1/2
|
|
578
574
|
t[n_missing:] /= np.sqrt(b2[n_missing:])
|
|
579
575
|
|
|
580
576
|
# Convert to SI
|
|
581
577
|
# First convert electrons to coulombs
|
|
582
|
-
t *=
|
|
578
|
+
t *= const.ELECTRON_CHARGE
|
|
583
579
|
|
|
584
580
|
# and then reciprocal atomic mass units (m_e^-1/2) to kg^-1/2
|
|
585
|
-
t *= (
|
|
581
|
+
t *= (const.ELECTRON_MASS)**-0.5
|
|
586
582
|
|
|
587
583
|
# Calculate A_e in units of m mol^-1
|
|
588
584
|
# this is "Intensity" in Orca
|
|
589
585
|
ae = np.ones_like(wavenumbers)
|
|
590
586
|
ae[:n_missing] = 0
|
|
591
|
-
ae *=
|
|
587
|
+
ae *= const.AVOGADRO / (12 * const.EPSILON_0 * const.SPEED_OF_LIGHT_M_S**2) # noqa
|
|
592
588
|
ae[n_missing:] *= t[n_missing:] ** 2
|
|
593
589
|
# and convert to km mol^-1
|
|
594
590
|
ae[n_missing:] /= 1000
|
orto/input.py
CHANGED
|
@@ -4,6 +4,7 @@ import numpy as np
|
|
|
4
4
|
import copy
|
|
5
5
|
import xyz_py as xyzp
|
|
6
6
|
|
|
7
|
+
from .exceptions import DataNotFoundError, DataFormattingError
|
|
7
8
|
from . import extractor as oe
|
|
8
9
|
from . import utils as ut
|
|
9
10
|
|
|
@@ -25,20 +26,20 @@ def get_nprocs(file_name: str | Path) -> int:
|
|
|
25
26
|
|
|
26
27
|
Raises
|
|
27
28
|
------
|
|
28
|
-
|
|
29
|
+
DataNotFoundError
|
|
29
30
|
If neither the PAL nor NProcs keyword is present in the input file
|
|
30
|
-
|
|
31
|
+
DataFormattingError
|
|
31
32
|
If both PAL and NProcs are present in the input file
|
|
32
|
-
|
|
33
|
+
DataFormattingError
|
|
33
34
|
If the PAL keyword is not a power of 2
|
|
34
|
-
|
|
35
|
+
DataFormattingError
|
|
35
36
|
If the %PAL block is malformed
|
|
36
37
|
'''
|
|
37
38
|
|
|
38
39
|
# Check for simple input line beginning with !
|
|
39
40
|
try:
|
|
40
41
|
simple = oe.SimpleInputExtractor.extract(file_name)
|
|
41
|
-
except
|
|
42
|
+
except DataNotFoundError:
|
|
42
43
|
ut.red_exit(
|
|
43
44
|
'Error: Missing simple input line (or !) in input file'
|
|
44
45
|
)
|
|
@@ -66,22 +67,22 @@ def get_nprocs(file_name: str | Path) -> int:
|
|
|
66
67
|
# Check for %PAL block in input file
|
|
67
68
|
try:
|
|
68
69
|
n_procs = oe.NProcsInputExtractor.extract(file_name)[0]
|
|
69
|
-
except
|
|
70
|
+
except DataNotFoundError:
|
|
70
71
|
if _palprocs:
|
|
71
72
|
n_procs = copy.copy(_palprocs)
|
|
72
73
|
_palprocs = 0
|
|
73
74
|
else:
|
|
74
|
-
raise
|
|
75
|
+
raise DataNotFoundError(
|
|
75
76
|
f'Missing number of processors in {file_name}\n'
|
|
76
77
|
'e.g. %pal nprocs 16 end'
|
|
77
78
|
)
|
|
78
|
-
except
|
|
79
|
-
raise
|
|
79
|
+
except DataFormattingError:
|
|
80
|
+
raise DataFormattingError(
|
|
80
81
|
f'%PAL block is malformed, perhaps missing END?\n in {file_name}'
|
|
81
82
|
)
|
|
82
83
|
|
|
83
84
|
if n_procs and _palprocs:
|
|
84
|
-
raise
|
|
85
|
+
raise DataFormattingError(
|
|
85
86
|
'Error: Both PAL and NProcs found in input file\n'
|
|
86
87
|
f'PAL: {_palprocs}, NProcs: {n_procs}'
|
|
87
88
|
)
|
|
@@ -107,15 +108,15 @@ def get_maxcore(file_name: str | Path) -> int:
|
|
|
107
108
|
|
|
108
109
|
Raises
|
|
109
110
|
------
|
|
110
|
-
|
|
111
|
+
DataNotFoundError
|
|
111
112
|
If %maxcore is not present in the input file
|
|
112
113
|
'''
|
|
113
114
|
|
|
114
115
|
# Load max core memory from input file
|
|
115
116
|
try:
|
|
116
117
|
maxcore = oe.MaxCoreInputExtractor.extract(file_name)[0]
|
|
117
|
-
except
|
|
118
|
-
raise
|
|
118
|
+
except DataNotFoundError:
|
|
119
|
+
raise DataNotFoundError(
|
|
119
120
|
f'Missing max core memory in {file_name}\n'
|
|
120
121
|
'e.g. %maxcore 3000'
|
|
121
122
|
)
|
|
@@ -142,21 +143,21 @@ def check_xyz(file_name: str | Path, skip_check) -> None:
|
|
|
142
143
|
|
|
143
144
|
Raises
|
|
144
145
|
------
|
|
145
|
-
|
|
146
|
+
DataNotFoundError
|
|
146
147
|
If neither *xyzfile nor *xyz are present in the input file
|
|
147
|
-
|
|
148
|
+
DataFormattingError
|
|
148
149
|
If xyz file is not formatted correctly
|
|
149
150
|
'''
|
|
150
151
|
|
|
151
152
|
# Get xyz file name and check it exists and is formatted correctly
|
|
152
153
|
try:
|
|
153
154
|
xyz_file = oe.XYZFileInputExtractor.extract(file_name)
|
|
154
|
-
except
|
|
155
|
+
except DataNotFoundError:
|
|
155
156
|
xyz_file = []
|
|
156
157
|
|
|
157
158
|
try:
|
|
158
159
|
xyzline = oe.XYZInputExtractor.extract(file_name)
|
|
159
|
-
except
|
|
160
|
+
except DataNotFoundError:
|
|
160
161
|
xyzline = []
|
|
161
162
|
|
|
162
163
|
if not len(xyz_file) and not len(xyzline):
|
|
@@ -183,7 +184,7 @@ def check_xyz(file_name: str | Path, skip_check) -> None:
|
|
|
183
184
|
allow_indices=False
|
|
184
185
|
)
|
|
185
186
|
except xyzp.XYZError as e:
|
|
186
|
-
raise
|
|
187
|
+
raise DataFormattingError(
|
|
187
188
|
f'{e}\n Use -sx to skip this check at your peril'
|
|
188
189
|
)
|
|
189
190
|
return
|
|
@@ -207,31 +208,31 @@ def check_moinp_moread(file_name: str | Path) -> None:
|
|
|
207
208
|
|
|
208
209
|
Raises
|
|
209
210
|
------
|
|
210
|
-
|
|
211
|
+
DataNotFoundError
|
|
211
212
|
If only one of MORead and MOInp are present in the input file
|
|
212
|
-
|
|
213
|
+
DataFormattingError
|
|
213
214
|
If the stem of the input file and MOInp file are the same
|
|
214
|
-
|
|
215
|
+
DataNotFoundError
|
|
215
216
|
If the MOInp file cannot be found
|
|
216
|
-
|
|
217
|
+
DataFormattingError
|
|
217
218
|
If the MOInp file has no extension
|
|
218
219
|
'''
|
|
219
220
|
|
|
220
221
|
# Check if MORead and/or MOInp are present
|
|
221
222
|
try:
|
|
222
223
|
moread = oe.MOReadExtractor.extract(file_name)
|
|
223
|
-
except
|
|
224
|
+
except DataNotFoundError:
|
|
224
225
|
moread = []
|
|
225
226
|
try:
|
|
226
227
|
moinp = oe.MOInpExtractor.extract(file_name)
|
|
227
|
-
except
|
|
228
|
+
except DataNotFoundError:
|
|
228
229
|
moinp = []
|
|
229
230
|
|
|
230
231
|
# Error if only one word present or if more than one of each word
|
|
231
232
|
if len(moinp) ^ len(moread):
|
|
232
|
-
raise
|
|
233
|
+
raise DataFormattingError('Error: Missing one of MOInp or MORead')
|
|
233
234
|
if len(moinp) + len(moread) > 2:
|
|
234
|
-
raise
|
|
235
|
+
raise DataFormattingError(
|
|
235
236
|
'Error: Multiple MORead and/or MOInp detected'
|
|
236
237
|
)
|
|
237
238
|
|
|
@@ -239,17 +240,17 @@ def check_moinp_moread(file_name: str | Path) -> None:
|
|
|
239
240
|
# Error if input orbitals have same stem as input file
|
|
240
241
|
moinp = Path(moinp[0])
|
|
241
242
|
if moinp.stem == file_name.stem:
|
|
242
|
-
raise
|
|
243
|
+
raise DataFormattingError(
|
|
243
244
|
'Error: Stem of orbital and input files cannot match'
|
|
244
245
|
)
|
|
245
246
|
|
|
246
247
|
# Error if cannot find orbital file
|
|
247
248
|
if not moinp.suffix:
|
|
248
|
-
raise
|
|
249
|
+
raise DataFormattingError(
|
|
249
250
|
f'Error: Orbital file {moinp} has no extension'
|
|
250
251
|
)
|
|
251
252
|
if not moinp.exists():
|
|
252
|
-
raise
|
|
253
|
+
raise DataFormattingError(
|
|
253
254
|
f'Error: Orbital file {moinp} cannot be found'
|
|
254
255
|
)
|
|
255
256
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
orto/__init__.py,sha256=iSR4TAfpJn1_mwTnnncgwmWBz3q_ImdmhnOORKcOvE0,63
|
|
2
|
+
orto/__version__.py,sha256=qKK4BMzdt84HiCorJPWqgEfa_DbJeuGx_bIPrDui2vc,22
|
|
3
|
+
orto/cli.py,sha256=yckaw1kryADOWz-NZPzXpXYTp8L9X89TVqUErfg3RsY,61241
|
|
4
|
+
orto/constants.py,sha256=2obWYg306Lce4U9Qs4MHg1yZq7SHFkazG-cnkD5svpo,343
|
|
5
|
+
orto/exceptions.py,sha256=D7oNeAEGeJNt5thzt6PaCn5FY6JcbJOWUE1N1LVhhuE,159
|
|
6
|
+
orto/extractor.py,sha256=tO2oFf6Cgwdnh_m1v8r1rXQO2_FL7s-1KBqLPy6zNco,67384
|
|
7
|
+
orto/input.py,sha256=cVhApyjCbqIDA0uRGqmt3UwKEn7djPjSWob70Ghg9fw,7060
|
|
8
|
+
orto/job.py,sha256=SM0nlc_bqhhPvfuuykhMvaUnkwC3Gp-6RvYw_a0TyGc,5855
|
|
9
|
+
orto/plotter.py,sha256=ICrO03T_HGe-H1XKZ2qzsKYdPY44E0PKiXqIQQawd7I,15633
|
|
10
|
+
orto/utils.py,sha256=gVfGplkfc6xGYgLMi_7I_yAdWG-QKRaqQdy9v5F4Mck,7279
|
|
11
|
+
orto-1.0.3.dist-info/METADATA,sha256=JaD-1F-ZVeHqy8bNgnNiRjweFaREtA3t-JPk8o1hixY,1140
|
|
12
|
+
orto-1.0.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
13
|
+
orto-1.0.3.dist-info/entry_points.txt,sha256=HXenCglMp_03JkN34pK2phkjXK9CFcXTGHKv5QaVY8I,39
|
|
14
|
+
orto-1.0.3.dist-info/top_level.txt,sha256=hQ-z28gTN_FZ2B5Kiwxr_9cUTcCoib9W5HjbkceDXw4,5
|
|
15
|
+
orto-1.0.3.dist-info/RECORD,,
|
orto-1.0.1.dist-info/RECORD
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
orto/__init__.py,sha256=iSR4TAfpJn1_mwTnnncgwmWBz3q_ImdmhnOORKcOvE0,63
|
|
2
|
-
orto/__version__.py,sha256=3KXfAcA5rzzQXMtfwpHphgbJNZdA0XWaW96kdWVSZJw,22
|
|
3
|
-
orto/cli.py,sha256=xRcJw_65gQmpBsmruRe46r2gd7fBdLpoh9Z0oPLPcM8,59795
|
|
4
|
-
orto/extractor.py,sha256=kJnVI_Zwz7yorbojWdgxN-NSspJIY9pKoDb1RD2dHUg,67488
|
|
5
|
-
orto/input.py,sha256=UMYNPGeqOCNKvPYJVfVS2JU7Ost_xM1ZG28t5f9-Er0,7084
|
|
6
|
-
orto/job.py,sha256=SM0nlc_bqhhPvfuuykhMvaUnkwC3Gp-6RvYw_a0TyGc,5855
|
|
7
|
-
orto/plotter.py,sha256=ICrO03T_HGe-H1XKZ2qzsKYdPY44E0PKiXqIQQawd7I,15633
|
|
8
|
-
orto/utils.py,sha256=gVfGplkfc6xGYgLMi_7I_yAdWG-QKRaqQdy9v5F4Mck,7279
|
|
9
|
-
orto-1.0.1.dist-info/METADATA,sha256=tkPj-dCGN-DhaYdlyGkXVysH-4STdCAf4kPr-hXYbfU,1140
|
|
10
|
-
orto-1.0.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
11
|
-
orto-1.0.1.dist-info/entry_points.txt,sha256=HXenCglMp_03JkN34pK2phkjXK9CFcXTGHKv5QaVY8I,39
|
|
12
|
-
orto-1.0.1.dist-info/top_level.txt,sha256=hQ-z28gTN_FZ2B5Kiwxr_9cUTcCoib9W5HjbkceDXw4,5
|
|
13
|
-
orto-1.0.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|