orto 0.26.3__py3-none-any.whl → 0.27.0__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 +5 -5
- orto/extractor.py +57 -22
- {orto-0.26.3.dist-info → orto-0.27.0.dist-info}/METADATA +1 -1
- orto-0.27.0.dist-info/RECORD +13 -0
- {orto-0.26.3.dist-info → orto-0.27.0.dist-info}/WHEEL +1 -1
- orto-0.26.3.dist-info/RECORD +0 -13
- {orto-0.26.3.dist-info → orto-0.27.0.dist-info}/entry_points.txt +0 -0
- {orto-0.26.3.dist-info → orto-0.27.0.dist-info}/top_level.txt +0 -0
orto/__version__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '0.
|
|
1
|
+
__version__ = '0.27.0'
|
orto/cli.py
CHANGED
|
@@ -108,7 +108,7 @@ def extract_sf_energies_func(uargs):
|
|
|
108
108
|
if len(all_data) > 1:
|
|
109
109
|
f.write(f'# Section {it + 1:d}\n')
|
|
110
110
|
|
|
111
|
-
f.write('State, Root, Multiplicity, Relative Energy (cm
|
|
111
|
+
f.write('State, Root, Multiplicity, Relative Energy (cm⁻¹)\n')
|
|
112
112
|
|
|
113
113
|
f.write(
|
|
114
114
|
f'1, {data['root'][0]:d}, {data['multiplicity'][0]:d}, 0\n' # noqa
|
|
@@ -190,7 +190,7 @@ def extract_so_energies_func(uargs):
|
|
|
190
190
|
if len(all_energies) > 1:
|
|
191
191
|
f.write(f'# Section {it + 1:d}\n')
|
|
192
192
|
|
|
193
|
-
f.write('State, Relative Energy (cm
|
|
193
|
+
f.write('State, Relative Energy (cm⁻¹)\n')
|
|
194
194
|
|
|
195
195
|
for eit, energy in enumerate(energies):
|
|
196
196
|
f.write(
|
|
@@ -701,7 +701,7 @@ def distort_func(uargs):
|
|
|
701
701
|
data = oe.FrequencyExtractor.extract(uargs.output_file)
|
|
702
702
|
|
|
703
703
|
ut.cprint(
|
|
704
|
-
'Distorting along mode #{}: {: .2f} cm
|
|
704
|
+
'Distorting along mode #{}: {: .2f} cm⁻¹'.format(
|
|
705
705
|
uargs.mode_number,
|
|
706
706
|
data[0]['energy (cm^-1)'][uargs.mode_number]
|
|
707
707
|
),
|
|
@@ -907,7 +907,7 @@ def extract_freq_func(uargs, save=True):
|
|
|
907
907
|
uargs.num = len(data[0]['energy (cm^-1)'])
|
|
908
908
|
|
|
909
909
|
if not save:
|
|
910
|
-
print('Frequencies (cm
|
|
910
|
+
print('Frequencies (cm⁻¹) and intensities (km/mol)')
|
|
911
911
|
for frq, inty in zip(
|
|
912
912
|
data[0]['energy (cm^-1)'][:uargs.num],
|
|
913
913
|
data[0]['IR Intensity (km mol^-1)'][:uargs.num]
|
|
@@ -919,7 +919,7 @@ def extract_freq_func(uargs, save=True):
|
|
|
919
919
|
with open(out_name, 'w') as f:
|
|
920
920
|
f.write(
|
|
921
921
|
f'# Frequencies and intensities from {uargs.output_file}\n')
|
|
922
|
-
f.write('# Frequency (cm
|
|
922
|
+
f.write('# Frequency (cm⁻¹), Intensity (km/mol)\n')
|
|
923
923
|
for frq, inty in zip(
|
|
924
924
|
data[0]['energy (cm^-1)'][:uargs.num],
|
|
925
925
|
data[0]['IR Intensity (km mol^-1)'][:uargs.num]
|
orto/extractor.py
CHANGED
|
@@ -424,8 +424,8 @@ class AILFTOrbEnergyExtractor(extto.BetweenExtractor):
|
|
|
424
424
|
|
|
425
425
|
class FrequencyExtractor(extto.BetweenExtractor):
|
|
426
426
|
'''
|
|
427
|
-
Extracts Vibrational mode energies, eigenvectors,
|
|
428
|
-
|
|
427
|
+
Extracts Vibrational mode energies, eigenvectors, intensities, \n
|
|
428
|
+
and irreps from output file
|
|
429
429
|
'''
|
|
430
430
|
|
|
431
431
|
# Regex Start Pattern
|
|
@@ -448,6 +448,7 @@ class FrequencyExtractor(extto.BetweenExtractor):
|
|
|
448
448
|
- tx\n
|
|
449
449
|
- ty\n
|
|
450
450
|
- tz\n
|
|
451
|
+
- irrep\n
|
|
451
452
|
and all values are numpy arrays.\n
|
|
452
453
|
Dimensions are n_atoms*3, 1 for all arrays other than displacements.
|
|
453
454
|
'''
|
|
@@ -477,37 +478,51 @@ class FrequencyExtractor(extto.BetweenExtractor):
|
|
|
477
478
|
[float(val) for val in freq_pattern.findall(block)]
|
|
478
479
|
)
|
|
479
480
|
|
|
481
|
+
# Check if symmetry is enabled by searching for
|
|
482
|
+
# "Point group" in block
|
|
483
|
+
if re.search(r'Point group', block):
|
|
484
|
+
symmetry = True
|
|
485
|
+
else:
|
|
486
|
+
symmetry = False
|
|
487
|
+
|
|
480
488
|
n_atoms = len(wavenumbers) // 3
|
|
481
489
|
|
|
490
|
+
# Displacements section can be different depending on symmetry
|
|
491
|
+
if symmetry:
|
|
492
|
+
displacement_pattern = re.compile(
|
|
493
|
+
r'(?: +\d+){1,10}\s(?: +\d+\-[A-Za-z]+[0-9]*[A-Za-z]*){1,10}\s((?: +\d+ +(?: +-?\d\.\d{6}){1,10}\s)*)' # noqa
|
|
494
|
+
)
|
|
495
|
+
else:
|
|
496
|
+
displacement_pattern = re.compile(
|
|
497
|
+
r'(?: +\d+){1,6} +\s((?: +\d+ +(?: +-?\d\.\d{6}){1,6}\s)*)'
|
|
498
|
+
)
|
|
499
|
+
|
|
482
500
|
# Extract Displacements
|
|
483
501
|
disp_table = re.findall(
|
|
484
|
-
|
|
502
|
+
displacement_pattern,
|
|
485
503
|
block
|
|
486
504
|
)
|
|
487
505
|
|
|
488
506
|
# and combine in a single dataframe
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
index_col=0
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
for chunk in disp_table[1:]:
|
|
497
|
-
_df = pd.read_csv(
|
|
498
|
-
StringIO(chunk),
|
|
499
|
-
sep=r'\s{2,}',
|
|
500
|
-
engine='python',
|
|
501
|
-
index_col=0
|
|
507
|
+
all_df = [
|
|
508
|
+
pd.read_csv(
|
|
509
|
+
StringIO(dt),
|
|
510
|
+
sep=r'\s+',
|
|
511
|
+
index_col=[0],
|
|
512
|
+
header=None,
|
|
513
|
+
skipinitialspace=True,
|
|
502
514
|
)
|
|
503
|
-
|
|
515
|
+
for dt in disp_table
|
|
516
|
+
]
|
|
517
|
+
# Combine list of dataframe chunks into a single dataframe
|
|
518
|
+
combined_df = pd.concat(all_df, axis=1, join='outer')
|
|
504
519
|
|
|
505
520
|
# convert to numpy array
|
|
506
|
-
|
|
521
|
+
disp_array = combined_df.to_numpy()
|
|
507
522
|
# and reshape
|
|
508
|
-
disp_x =
|
|
509
|
-
disp_y =
|
|
510
|
-
disp_z =
|
|
523
|
+
disp_x = disp_array[0::3, :]
|
|
524
|
+
disp_y = disp_array[1::3, :]
|
|
525
|
+
disp_z = disp_array[2::3, :]
|
|
511
526
|
disp = np.zeros((n_atoms, n_atoms * 3, 3))
|
|
512
527
|
disp[:, :, 0] = disp_x
|
|
513
528
|
disp[:, :, 1] = disp_y
|
|
@@ -586,6 +601,25 @@ class FrequencyExtractor(extto.BetweenExtractor):
|
|
|
586
601
|
# Convert to units of 1000 cm mol^-1
|
|
587
602
|
eps = alin * 100
|
|
588
603
|
|
|
604
|
+
# Get irreducible representations
|
|
605
|
+
if symmetry:
|
|
606
|
+
irrep_pattern = re.compile(
|
|
607
|
+
r'(?: +\d+){1,10}\s((?: +\d+\-[A-Za-z]+[0-9]*[A-Za-z]*){1,10}\s)(?: +\d+ +(?: +-?\d\.\d{6}){1,10}\s)*' # noqa
|
|
608
|
+
)
|
|
609
|
+
irrep_blocks = re.findall(
|
|
610
|
+
irrep_pattern,
|
|
611
|
+
block
|
|
612
|
+
)
|
|
613
|
+
irreps = np.concatenate([
|
|
614
|
+
[
|
|
615
|
+
irrep
|
|
616
|
+
for irrep in iblock.replace('\n','').split()
|
|
617
|
+
]
|
|
618
|
+
for iblock in irrep_blocks
|
|
619
|
+
])
|
|
620
|
+
else:
|
|
621
|
+
irreps = np.array([''] * len(wavenumbers))
|
|
622
|
+
|
|
589
623
|
data = {
|
|
590
624
|
'energy (cm^-1)': wavenumbers,
|
|
591
625
|
'displacements': disp,
|
|
@@ -594,7 +628,8 @@ class FrequencyExtractor(extto.BetweenExtractor):
|
|
|
594
628
|
't2 (a.u.^2)': t2,
|
|
595
629
|
'tx (a.u.)': tx,
|
|
596
630
|
'ty (a.u.)': ty,
|
|
597
|
-
'tz (a.u.)': tz
|
|
631
|
+
'tz (a.u.)': tz,
|
|
632
|
+
'irrep': irreps
|
|
598
633
|
}
|
|
599
634
|
|
|
600
635
|
return data
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
orto/__init__.py,sha256=iSR4TAfpJn1_mwTnnncgwmWBz3q_ImdmhnOORKcOvE0,63
|
|
2
|
+
orto/__version__.py,sha256=m4LkmsY19lpwrK_42z1nyRmX2kinCvycxpRYq9Tomek,23
|
|
3
|
+
orto/cli.py,sha256=ljRUy_dJyJwJv4HHZNkZeGocd16nCiT7ZUoWSUdNOpc,59395
|
|
4
|
+
orto/extractor.py,sha256=SSjfDPwtDU3RiAY7qjpmD2Gmxg8AT3zOawhfkwnHpIE,67554
|
|
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-0.27.0.dist-info/METADATA,sha256=n5UZZmsrpg5MTuJ-ug-OESbjxeJ7AE8CC9eUv5ayhfY,1141
|
|
10
|
+
orto-0.27.0.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
|
|
11
|
+
orto-0.27.0.dist-info/entry_points.txt,sha256=HXenCglMp_03JkN34pK2phkjXK9CFcXTGHKv5QaVY8I,39
|
|
12
|
+
orto-0.27.0.dist-info/top_level.txt,sha256=hQ-z28gTN_FZ2B5Kiwxr_9cUTcCoib9W5HjbkceDXw4,5
|
|
13
|
+
orto-0.27.0.dist-info/RECORD,,
|
orto-0.26.3.dist-info/RECORD
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
orto/__init__.py,sha256=iSR4TAfpJn1_mwTnnncgwmWBz3q_ImdmhnOORKcOvE0,63
|
|
2
|
-
orto/__version__.py,sha256=2FwstevkfcPI8LAlvZ09KlLyS7-7r6zK6p3zBeY2Ms8,23
|
|
3
|
-
orto/cli.py,sha256=dtFxOCyLl-onr9fr89r3frbrRWe3El7EurN85c_FYNY,59385
|
|
4
|
-
orto/extractor.py,sha256=Gr3qnwHh77zrDrIe_RD8S2Lq5RXjLCa-B3SYM4PyskU,66298
|
|
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-0.26.3.dist-info/METADATA,sha256=LSdKlscqgLHhAMYW6ZWoDl8G_9D6a94VCrj2fVtZ_cc,1141
|
|
10
|
-
orto-0.26.3.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
|
|
11
|
-
orto-0.26.3.dist-info/entry_points.txt,sha256=HXenCglMp_03JkN34pK2phkjXK9CFcXTGHKv5QaVY8I,39
|
|
12
|
-
orto-0.26.3.dist-info/top_level.txt,sha256=hQ-z28gTN_FZ2B5Kiwxr_9cUTcCoib9W5HjbkceDXw4,5
|
|
13
|
-
orto-0.26.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|