Skip to content

Commit c736a98

Browse files
author
Guilian Luchini
authored
v3.2 (#60)
* Fixes a bug for parsing ORCA spc with MiniPrint * Updates for new release * Replace "bobbypaton" with "patonlab" for urls * Update tests
1 parent 8d29b55 commit c736a98

7 files changed

Lines changed: 126 additions & 40 deletions

File tree

.travis-install.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ if [[$TRAVIS_OS_NAME == 'osx']]; then
44
brew update
55
brew install pyenv-virtualenv
66
case "${TOXENV}" in
7-
py35)
8-
pyenv install 3.5.2
9-
export PYENV_VERSION=3.5.2
10-
;;
117
py36)
128
pyenv install 3.6.7
139
export PYENV_VERSION=3.6.7
@@ -20,6 +16,14 @@ if [[$TRAVIS_OS_NAME == 'osx']]; then
2016
pyenv install 3.8.1
2117
export PYENV_VERSION=3.8.1
2218
;;
19+
py39)
20+
pyenv install 3.9
21+
export PYENV_VERSION=3.9
22+
;;
23+
py310)
24+
pyenv install 3.10
25+
export PYENV_VERSION=3.10
26+
;;
2327
esac
2428
export PATH="/Users/travis/.pyenv/shims:${PATH}"
2529
pyenv-virtualenv venv

.travis.yml

Lines changed: 73 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,46 @@ dist: trusty
44
matrix:
55
include:
66
- os: linux
7-
python: 3.5
8-
env: TOXENV=py35
7+
python: 3.6
8+
env: TOXENV=py36
9+
dist: trusty
910
install:
1011
- "./.travis-install.sh"
1112
- pip install pytest
13+
- pip install --upgrade numpy
1214
- python -m pip install .
1315
script:
1416
- pytest -v
1517
- os: linux
16-
python: 3.6
17-
env: TOXENV=py36
18+
python: 3.8
19+
env: TOXENV=py38
20+
dist: xenial
1821
install:
1922
- "./.travis-install.sh"
2023
- pip install pytest
21-
- pip install --upgrade numpy
2224
- python -m pip install .
2325
script:
2426
- pytest -v
2527
- os: linux
26-
python: 3.8
27-
env: TOXENV=py38
28+
python: 3.9
29+
env: TOXENV=py39
2830
dist: xenial
2931
install:
3032
- "./.travis-install.sh"
3133
- pip install pytest
3234
- python -m pip install .
3335
script:
3436
- pytest -v
37+
- os: linux
38+
python: 3.10
39+
env: TOXENV=py310
40+
dist: focal
41+
install:
42+
- "./.travis-install.sh"
43+
- pip install pytest
44+
- python -m pip install .
45+
script:
46+
- pytest -v
3547
- os: osx
3648
language: generic
3749
env: TOXENV=py36
@@ -61,6 +73,26 @@ matrix:
6173
- python3 -m pip install .
6274
script:
6375
- pytest -v
76+
- os: osx
77+
language: generic
78+
env: TOXENV=py39
79+
dist: xenial
80+
install:
81+
- "./.travis-install.sh"
82+
- pip3 install pytest
83+
- python3 -m pip install .
84+
script:
85+
- pytest -v
86+
- os: osx
87+
language: generic
88+
env: TOXENV=py310
89+
dist: xenial
90+
install:
91+
- "./.travis-install.sh"
92+
- pip3 install pytest
93+
- python3 -m pip install .
94+
script:
95+
- pytest -v
6496
- os: windows
6597
language: shell
6698
before_install:
@@ -112,6 +144,40 @@ matrix:
112144
- python -m pip install .
113145
script:
114146
- pytest -v
147+
- os: windows
148+
language: shell
149+
before_install:
150+
- choco install python --version=3.9
151+
- python --version
152+
- python -m pip install --upgrade pip
153+
- pip install --upgrade pytest
154+
- pip install codecov
155+
- pip install numpy
156+
- pip install cython
157+
env: PATH=/c/Python39:/c/Python39/Scripts:$PATH
158+
install:
159+
- "./.travis-install.sh"
160+
- pip install pytest
161+
- python -m pip install .
162+
script:
163+
- pytest -v
164+
- os: windows
165+
language: shell
166+
before_install:
167+
- choco install python --version=3.10
168+
- python --version
169+
- python -m pip install --upgrade pip
170+
- pip install --upgrade pytest
171+
- pip install codecov
172+
- pip install numpy
173+
- pip install cython
174+
env: PATH=/c/Python310:/c/Python310/Scripts:$PATH
175+
install:
176+
- "./.travis-install.sh"
177+
- pip install pytest
178+
- python -m pip install .
179+
script:
180+
- pytest -v
115181
deploy:
116182
provider: pypi
117183
username: "__token__"

goodvibes/GoodVibes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
########### Authors: Rob Paton, Ignacio Funes-Ardoiz ############
5050
########### Guilian Luchini, Juan V. Alegre- ############
5151
########### Requena, Yanfei Guan, Sibo Lin ############
52-
########### Last modified: May 27, 2020 ############
52+
########### Last modified: August 8, 2022 ############
5353
####################################################################"""
5454

5555
import math, os.path, sys, time
@@ -79,7 +79,7 @@
7979
pass
8080

8181
# VERSION NUMBER
82-
__version__ = "3.1.1"
82+
__version__ = "3.2"
8383

8484
SUPPORTED_EXTENSIONS = set(('.out', '.log'))
8585

goodvibes/io.py

Lines changed: 36 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def parse_data(file):
228228
if os.path.exists(possible_filename):
229229
with open(possible_filename) as f:
230230
data = f.readlines()
231-
ccdata = ccread(possible_filename)
231+
232232
if data is None:
233233
raise ValueError("File {} does not exist".format(file))
234234

@@ -243,14 +243,28 @@ def parse_data(file):
243243
program = "NWChem"
244244
break
245245
repeated_link1 = 0
246-
spe = ccdata.scfenergies[-1]
247-
if hasattr(ccdata, "mpenergies"):
248-
spe = ccdata.mpenergies[-1]
249-
if hasattr(ccdata, "ccenergies"):
250-
spe = ccdata.ccenergies[-1]
251-
spe = convertor(spe, "eV", "hartree")
252-
charge = ccdata.charge
253-
multiplicity = ccdata.mult
246+
247+
if program != "Orca":
248+
try:
249+
possible_filenames = (stub + ".log", stub + ".out")
250+
for possible_filename in possible_filenames:
251+
if os.path.exists(possible_filename):
252+
ccdata = ccread(possible_filename)
253+
except IndexError:
254+
ccdata = None
255+
if ccdata:
256+
try:
257+
spe = ccdata.scfenergies[-1]
258+
if hasattr(ccdata, "mpenergies"):
259+
spe = ccdata.mpenergies[-1]
260+
if hasattr(ccdata, "ccenergies"):
261+
spe = ccdata.ccenergies[-1]
262+
spe = convertor(spe, "eV", "hartree")
263+
charge = ccdata.charge
264+
multiplicity = ccdata.mult
265+
except AttributeError:
266+
pass
267+
254268
for line in data:
255269
if program == "Gaussian":
256270
if line.strip().startswith('E2('):
@@ -282,9 +296,22 @@ def parse_data(file):
282296
elif program == "Orca":
283297
if 'Program Version' in line.strip():
284298
version_program = "ORCA version " + line.split()[2]
299+
if line.strip().startswith('FINAL SINGLE POINT ENERGY'):
300+
spe = float(line.strip().split()[4])
301+
if "Total Charge" in line.strip() and "...." in line.strip():
302+
charge = int(line.strip("=").split()[-1])
303+
if "Multiplicity" in line.strip() and "...." in line.strip():
304+
multiplicity = int(line.strip("=").split()[-1])
285305
elif program == "NWChem":
286306
if 'nwchem branch' in line.strip():
287307
version_program = "NWChem version " + line.split()[3]
308+
if ccdata == None:
309+
if line.strip().startswith('Total DFT energy'):
310+
spe = float(line.strip().split()[4])
311+
if "charge" in line.strip():
312+
charge = int(line.strip().split()[-1])
313+
if "mult " in line.strip():
314+
multiplicity = int(line.strip().split()[-1])
288315

289316
# Solvation model and empirical dispersion detection
290317
if 'Gaussian' in version_program.strip():
@@ -434,17 +461,6 @@ def parse_data(file):
434461
empirical_dispersion3 = ' with zero damping'
435462
empirical_dispersion = empirical_dispersion1 + empirical_dispersion2 + empirical_dispersion3
436463
if 'NWChem' in version_program.strip():
437-
# keyword_line_1 = "gas phase"
438-
# keyword_line_2 = ''
439-
# keyword_line_3 = ''
440-
# for i, line in enumerate(data):
441-
# if 'CPCM SOLVATION MODEL' in line.strip():
442-
# keyword_line_1 = "CPCM,"
443-
# if 'SMD CDS free energy correction energy' in line.strip():
444-
# keyword_line_2 = "SMD,"
445-
# if "Solvent: " in line.strip():
446-
# keyword_line_3 = line.strip().split()[-1]
447-
# solvation_model = keyword_line_1 + keyword_line_2 + keyword_line_3
448464
empirical_dispersion1 = 'No empirical dispersion detected'
449465
empirical_dispersion2 = ''
450466
empirical_dispersion3 = ''

goodvibes/pes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -663,8 +663,8 @@ def graph_reaction_profile(graph_data, log, options, plt):
663663
[Path.MOVETO, Path.CURVE4, Path.CURVE4, Path.CURVE4]),
664664
fc="none", transform=ax.transData, color=color)
665665
ax.add_patch(path_patch)
666-
plt.hlines(data[path][j], j - 0.15, j + 0.15)
667-
plt.hlines(data[path][-1], len(data[path]) - 1.15, len(data[path]) - 0.85)
666+
plt.hlines(data[path][j], j - 0.15, j + 0.15,colors=['k'])
667+
plt.hlines(data[path][-1], len(data[path]) - 1.15, len(data[path]) - 0.85,colors=['k'])
668668

669669
if show_conf:
670670
markers = ['o', 's', 'x', 'P', 'D']

meta.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{% set name = "goodvibes" %}
2-
{% set version = "3.1.1" %}
2+
{% set version = "3.2" %}
33

44
package:
55
name: "{{ name|lower }}"
@@ -27,7 +27,7 @@ test:
2727
- goodvibes
2828

2929
about:
30-
home: https://github.com/bobbypaton/goodvibes
30+
home: https://github.com/patonlab/goodvibes
3131
license: MIT
3232
license_family: MIT
3333
license_file: LICENSE.txt

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
setup(
1111
name='goodvibes',
1212
packages=['goodvibes'],
13-
version='3.1.1',
13+
version='3.2',
1414
description='A python program to compute corrections to thermochemical data from frequency calculations',
1515
long_description=long_description,
1616
long_description_content_type='text/markdown',
1717
author='Paton Research Group',
1818
author_email='robert.paton@colostate.edu',
19-
url='https://github.com/bobbypaton/goodvibes',
20-
download_url='https://github.com/bobbypaton/GoodVibes/archive/v3.1.1.zip',
19+
url='https://github.com/patonlab/goodvibes',
20+
download_url='https://github.com/patonlab/GoodVibes/archive/v3.2.zip',
2121
keywords=['compchem', 'thermochemistry', 'gaussian', 'vibrational-entropies', 'temperature'],
2222
classifiers=[],
2323
install_requires=['numpy','cclib'],

0 commit comments

Comments
 (0)