-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
27 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |