Skip to content

Commit

Permalink
mopac ci lane. pin to qcel 0.25 (#372)
Browse files Browse the repository at this point in the history
* mopac ci lane. pin to qcel 0.25

* pin qcel

* more mopac

* update mopac install msg
  • Loading branch information
loriab authored Jul 8, 2022
1 parent 4348720 commit 7c87644
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions devtools/conda-envs/opt-disp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ dependencies:
- blas=*=mkl # not needed but an example of disuading solver from openblas and old psi
#- intel-openmp!=2019.5
- rdkit
- mopac

# Mixed Tests
- dftd3 3.2.1
Expand Down
5 changes: 4 additions & 1 deletion qcengine/programs/mopac.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ def __init__(self, **kwargs):
@staticmethod
def found(raise_error: bool = False) -> bool:
return which(
"mopac", return_bool=True, raise_error=raise_error, raise_msg="Please install via http://openmopac.net."
"mopac",
return_bool=True,
raise_error=raise_error,
raise_msg="Please install via `conda install -c conda-forge mopac`",
)

def get_version(self) -> str:
Expand Down
6 changes: 3 additions & 3 deletions qcengine/programs/tests/test_programs.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,13 +188,13 @@ def test_mopac_task():
}

ret = qcng.compute(input_data, "mopac", raise_error=True)
assert ret.extras.keys() >= {"heat_of_formation", "energy_electronic", "dip_vec"}
assert ret.extras.keys() >= {"heat_of_formation", "dip_vec"}
energy = pytest.approx(-0.08474117913025125, rel=1.0e-5)

# Check gradient
ret = qcng.compute(input_data, "mopac", raise_error=True)
assert ret.extras.keys() >= {"heat_of_formation", "energy_electronic", "dip_vec"}
assert np.linalg.norm(ret.return_result) == pytest.approx(0.03543560156912385, rel=1.0e-4)
assert ret.extras.keys() >= {"heat_of_formation", "dip_vec"}
assert np.linalg.norm(ret.return_result) == pytest.approx(0.03543560156912385, rel=3.0e-4)
assert ret.properties.return_energy == energy

# Check energy
Expand Down
2 changes: 1 addition & 1 deletion qcengine/tests/test_procedures.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def test_geometric_retries(failure_engine, input_data):
pytest.param(
"mopac",
{"method": "PM6"},
[1.7927843431811934, 2.893333237502448, 107.60441967992045],
[1.793052302291527, 2.893333237502448, 107.57254391453196],
marks=using("mopac"),
),
pytest.param(
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
cmdclass=versioneer.get_cmdclass(),
packages=setuptools.find_packages(),
setup_requires=[] + pytest_runner,
install_requires=["pyyaml", "py-cpuinfo", "psutil", "qcelemental>=0.24.0", "pydantic>=1.8.2"],
install_requires=["pyyaml", "py-cpuinfo", "psutil", "qcelemental>=0.24.0,<0.26.0", "pydantic>=1.8.2"],
entry_points={"console_scripts": ["qcengine=qcengine.cli:main"]},
extras_require={
"docs": [
Expand Down

0 comments on commit 7c87644

Please sign in to comment.