Skip to content

Commit

Permalink
test test
Browse files Browse the repository at this point in the history
  • Loading branch information
kmlefran committed Sep 12, 2023
1 parent 4897792 commit ff63f49
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 26 deletions.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

from aiida.manage.configuration import load_documentation_profile

sys.path.insert(0, "/Users/chemlab/anaconda3/bin")
# sys.path.insert(0, "/Users/chemlab/anaconda3/bin")
import aiida_aimall

# -- AiiDA-related setup --------------------------------------------------
Expand Down
51 changes: 26 additions & 25 deletions tests/test_calculations.py
Original file line number Diff line number Diff line change
@@ -1,39 +1,40 @@
""" Tests for calculations."""
import os
# import os

from aiida.engine import run
from aiida.orm import Dict, SinglefileData # , load_code
from aiida.plugins import CalculationFactory, DataFactory
# from aiida.engine import run
# from aiida.orm import Dict, SinglefileData # , load_code
# from aiida.plugins import CalculationFactory, DataFactory
from aiida.plugins import DataFactory

from . import TEST_DIR
# from . import TEST_DIR


def test_process(aimall_code):
def test_data():
# def test_process():
"""Test running a calculation
note this does not test that the expected outputs are created of output parsing"""
# load_profile()
# Prepare input parameters
AimqbParameters = DataFactory("aimall")
parameters = AimqbParameters({"naat": 2, "nproc": 2, "atlaprhocps": True})
assert isinstance(parameters is AimqbParameters)
# file = SinglefileData(
# file=os.path.join(TEST_DIR, "input_files", "water_wb97xd_augccpvtz_qtaim.wfx")
# )
# # code = load_code("aimall")
# # set up calculation
# builder = CalculationFactory("aimall").get_builder()
# builder.code = aimall_code
# builder.parameters = parameters
# builder.file = file
# builder.metadata.options.resources = {
# "num_machines": 1,
# "tot_num_mpiprocs": 2,
# }

file = SinglefileData(
file=os.path.join(TEST_DIR, "input_files", "water_wb97xd_augccpvtz_qtaim.wfx")
)
# code = load_code("aimall")
# set up calculation
builder = CalculationFactory("aimall").get_builder()
builder.code = aimall_code
builder.parameters = parameters
builder.file = file
builder.metadata.options.resources = {
"num_machines": 1,
"tot_num_mpiprocs": 2,
}
# result = run(builder)
# computed_atomic_props = result["atomic_properties"]
# computed_bcp_props = result["bcp_properties"]

result = run(builder)
computed_atomic_props = result["atomic_properties"]
computed_bcp_props = result["bcp_properties"]

assert computed_atomic_props is Dict
assert computed_bcp_props is Dict
# assert type(computed_atomic_props) is Dict
# assert type(computed_bcp_props) is Dict

0 comments on commit ff63f49

Please sign in to comment.