Skip to content

Commit 8c6e194

Browse files
authoredSep 13, 2022
Update setup.py (#72)
* Update setup.py Require newer versions of dependencies. `msgpack-python` is the conda name. setup.py needs to use the pip name - `msgpack`. * Bury commits for condaforge
1 parent 102ca36 commit 8c6e194

File tree

2 files changed

+17
-20
lines changed

2 files changed

+17
-20
lines changed
 

‎optking/tests/test_opthelper.py

+13-16
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@
33
# 2. optking still has a module level parameters and history,
44
# that could be eliminated, so not yet multi-object safe.
55
# 3. Have not yet restarted from json or disk, but should be close to working.
6-
import psi4
76
import optking
87
import pytest
98

109

1110
def test_step_by_step():
12-
11+
import psi4
1312
h2o = psi4.geometry(
1413
"""
1514
O
@@ -63,22 +62,19 @@ def test_step_by_step():
6362

6463

6564
def test_lj_external_gradient():
66-
h2o = psi4.geometry(
65+
import qcelemental as qcel
66+
import numpy as np
67+
68+
h2o = qcel.models.Molecule.from_data(
69+
"""
70+
O 0.00000000 0.00000000 -0.12947689
71+
H 0.00000000 -1.49418674 1.02744610
72+
H 0.00000000 1.49418674 1.02744610
6773
"""
68-
O
69-
H 1 1.0
70-
H 1 1.0 2 104.5
71-
"""
7274
)
7375

74-
psi4.core.clean_options()
75-
psi4_options = {
76-
"basis": "sto-3g",
77-
}
7876
optking_options = {"g_convergence": "gau_verytight", "intrafrag_hess": "SIMPLE"}
7977

80-
psi4.set_options(psi4_options)
81-
8278
opt = optking.CustomHelper(h2o, optking_options)
8379

8480
for step in range(30):
@@ -103,11 +99,14 @@ def test_lj_external_gradient():
10399
assert conv is True
104100
E = json_output["energies"][-1] # TEST
105101
RefEnergy = -0.03 # - epsilon * 3, where -epsilon is depth of each Vij well
106-
assert psi4.compare_values(RefEnergy, E, 6, "L-J Energy upon optimization")
102+
assert np.isclose(RefEnergy, E, rtol=1e-05, atol=1e-6)
107103

108104

109105
# Demonstrate a complete export/import of OptHelper object
110106
def test_stepwise_export():
107+
import psi4
108+
import pprint
109+
111110
h2o = psi4.geometry(
112111
"""
113112
O
@@ -129,8 +128,6 @@ def test_stepwise_export():
129128
opt = optking.CustomHelper(h2o)
130129
optSaved = opt.to_dict()
131130

132-
import pprint
133-
134131
pp = pprint.PrettyPrinter(indent=2)
135132
pp.pprint(optSaved)
136133

‎setup.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
packages=setuptools.find_packages(),
2323
include_package_data=True,
2424
install_requires=[
25-
"numpy>=1.7",
26-
"qcelemental>=0.12.0",
27-
"qcengine>=0.12.0",
28-
"msgpack-python",
25+
"numpy>=1.20",
26+
"qcelemental>=0.20.0",
27+
"qcengine>=0.20.0",
28+
"msgpack>=1.0",
2929
],
3030
extras_require={
3131
"docs": [

0 commit comments

Comments
 (0)
Please sign in to comment.