Permalink
Browse files

disp: rebase fixes

  • Loading branch information...
loriab committed Oct 26, 2018
1 parent 9fbe9f6 commit ccf121c39a8e44ab931beeb63725c196f18b4858
@@ -37,10 +37,11 @@
import numpy as np
import qcelemental as qcel
from .. import __version__
#from .. import qcvars
from .. import molparse
from ..util import update_with_error, parse_dertype
from ..util import parse_dertype
from ..pdict import PreservingDict
from ..exceptions import *
from ..datastructures import QCAspect, print_variables
@@ -228,7 +229,7 @@ def dftd3_plant(jobrec):
dftd3rec['dftd3par'] = dftd3_coeff_formatter(dftd3rec['dashlevel'], dftd3rec['dashparams'])
dftd3rec['dftd3_geometry'] = molparse.to_string(jobrec['molecule'], dtype='xyz', units='Angstrom', ghost_format='')
dftd3rec['dftd3_geometry'] = qcel.molparse.to_string(jobrec['molecule'], dtype='xyz', units='Angstrom', ghost_format='')
command = ['dftd3', 'dftd3_geometry.xyz']
if jobrec['driver'] == 'gradient':
@@ -34,6 +34,7 @@
import qcelemental as qcel
from .util import parse_dertype
from .libmintsmolecule import *
from .psiutil import compare_values, compare_integers, compare_molrecs
from .bfs import BFS
@@ -186,6 +186,12 @@ def compare_molrecs(expected, computed, tol, label, forgive=None, verbose=1, rel
thresh = 10 ** -tol if tol >= 1 else tol
# TEMP TODO just in case working from qcel head, not 0.1
if forgive is None:
forgive = ['provenance']
if 'provenance' not in forgive:
forgive.append('provenance')
# Need to manipulate the dictionaries a bit, so hold values
xptd = copy.deepcopy(expected)
cptd = copy.deepcopy(computed)
@@ -215,6 +221,11 @@ def massage_dicts(dicary):
dicary['fragment_multiplicities'] = [(m if m is None else int(m)) for m in dicary['fragment_multiplicities']]
if 'fragment_separators' in dicary:
dicary['fragment_separators'] = [(s if s is None else int(s)) for s in dicary['fragment_separators']]
# forgive generator version changes
if 'provenance' in dicary:
for prov in dicary['provenance']:
prov.pop('version')
return dicary
xptd = massage_dicts(xptd)
@@ -4,6 +4,8 @@
import pytest
import qcelemental as qcel
from utils import *
import qcdb
@@ -177,7 +179,7 @@ def test_recon_2e():
def test_3():
sys = qcdb.molparse.from_string(eneyne)['qm']
sys = qcel.molparse.from_string(eneyne)['qm']
res = intf_dftd3.run_dftd3_from_arrays(molrec=sys, name_hint='b3lyp', level_hint='d3bj')
assert compare_strings('B3LYP-D3(BJ)', compute_key(res['options']), 'key')

0 comments on commit ccf121c

Please sign in to comment.