Skip to content

Commit

Permalink
more model names changes
Browse files Browse the repository at this point in the history
  • Loading branch information
loriab committed Nov 12, 2019
1 parent c9c8172 commit 5608093
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ H 0.0 -1.494 1.027
H 0.0 1.494 1.027
""")

>>> inp = qcel.models.ResultInput(
>>> inp = qcel.models.AtomicInput(
molecule=mol,
driver="energy",
model={"method": "SCF", "basis": "sto-3g"},
Expand Down
4 changes: 2 additions & 2 deletions qcengine/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ class Config(qcng.programs.ProgramHarness.Config):
def found(raise_error: bool = False) -> bool:
return True

def compute(self, input_data: 'ResultInput', config: 'JobConfig') -> 'Result':
def compute(self, input_data: 'AtomicInput', config: 'JobConfig') -> 'AtomicResult':
self.ncalls += 1
mode = self.iter_modes.pop(0)

Expand All @@ -102,7 +102,7 @@ def compute(self, input_data: 'ResultInput', config: 'JobConfig') -> 'Result':
grad = [0, 0, -grad_value, 0, 0, grad_value]

if mode == "pass":
return qcel.models.Result(
return qcel.models.AtomicResult(
**{
**input_data.dict(),
**{
Expand Down
4 changes: 2 additions & 2 deletions qcengine/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import sys
from typing import List

from qcelemental.models import OptimizationInput, ResultInput
from qcelemental.models import AtomicInput, OptimizationInput

from qcengine import cli, get_molecule, testing, util

Expand Down Expand Up @@ -63,7 +63,7 @@ def check_result(stdout):
assert output["provenance"]["creator"].lower() == "psi4"
assert output["success"] is True

inp = ResultInput(molecule=get_molecule("hydrogen"),
inp = AtomicInput(molecule=get_molecule("hydrogen"),
driver="energy",
model={"method": "hf", "basis": "6-31G"})

Expand Down
8 changes: 4 additions & 4 deletions qcengine/tests/test_harness_canonical.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import numpy as np
import pytest
from qcelemental.models import Molecule, ResultInput
from qcelemental.models import AtomicInput, Molecule

import qcengine as qcng
from qcengine import testing
Expand All @@ -30,7 +30,7 @@ def test_compute_energy(program, model):
if not testing.has_program(program):
pytest.skip("Program '{}' not found.".format(program))

inp = ResultInput(molecule=qcng.get_molecule("hydrogen"), driver="energy", model=model)
inp = AtomicInput(molecule=qcng.get_molecule("hydrogen"), driver="energy", model=model)
ret = qcng.compute(inp, program, raise_error=True)

assert ret.success is True
Expand All @@ -42,7 +42,7 @@ def test_compute_gradient(program, model):
if not testing.has_program(program):
pytest.skip("Program '{}' not found.".format(program))

inp = ResultInput(molecule=qcng.get_molecule("hydrogen"),
inp = AtomicInput(molecule=qcng.get_molecule("hydrogen"),
driver="gradient",
model=model,
extras={"mytag": "something"})
Expand Down Expand Up @@ -73,7 +73,7 @@ def test_compute_bad_models(program, model):

adriver = model.pop("driver", "energy")
amodel = model
inp = ResultInput(molecule=qcng.get_molecule("hydrogen"), driver=adriver, model=amodel)
inp = AtomicInput(molecule=qcng.get_molecule("hydrogen"), driver=adriver, model=amodel)

with pytest.raises(qcng.exceptions.InputError) as exc:
ret = qcng.compute(inp, program, raise_error=True)

0 comments on commit 5608093

Please sign in to comment.