def molfrag(request):
    cls = request.param
    return cls(
        tmpdir,
        freqs=(0.4425,),
        damping=0.004556,
        pf=penalty_function(2.0 / AU2ANG ** 2),
    )
Beispiel #2
0
 def setUp(self):
     self.tmp = os.path.join( os.path.dirname( __file__ ), DIR)
     self.mf = MolFrag( tmpdir = self.tmp, max_l =0, pol = 0,
             freqs = None,
             pf = penalty_function(2.0),
             sf = shift_function,
             gc = None)
     self.maxDiff = None
Beispiel #3
0
def molfrag(request):
    tmp = os.path.join(os.path.dirname(__file__), DIR)
    cls = request.param
    return cls(
        tmpdir=tmp,
        max_l=0,
        pol=0,
        freqs=None,
        pf=penalty_function(2.0),
        sf=shift_function,
        gc=None,
    )
Beispiel #4
0
def molfrag(request):
    cls = request.param
    tmp = pathlib.Path(__file__).parent / DIR
    return cls(
        tmp,
        max_l=2,
        pol=2,
        freqs=None,
        pf=penalty_function(2.0),
        sf=shift_function,
        gc=None,
    )
Beispiel #5
0
 def setUp(self):
     self.m = MolFrag(tmpdir, freqs=(0, ), pf=penalty_function(2.0/AU2ANG**2))
     self.maxDiff = None
Beispiel #6
0
def molfrag(request):
    cls = request.param
    return cls(tmpdir, freqs=(0.0,), pf=penalty_function(2.0 / AU2ANG ** 2))
Beispiel #7
0
 def setUp(self):
 # modify Gagliardi penalty function to include unit conversion bug
     self.m = MolFrag(tmpdir, freqs=(0.4425,), damping=0.004556, pf=penalty_function(2.0/AU2ANG**2))
Beispiel #8
0
from util import full
from util.full import Matrix

from loprop.core import LoPropTransformer, penalty_function, AU2ANG, pairs
from loprop.dalton import MolFragDalton
from loprop.veloxchem import MolFragVeloxChem

from .common import LoPropTestCase
from . import h2o_data as ref

case = "h2o"
thisdir = pathlib.Path(__file__).parent
tmpdir = pathlib.Path(thisdir) / case / "tmp"
settings = dict(
    freqs=(0, ),
    pf=penalty_function(2.0 / AU2ANG**2),
    checkpoint_file=tmpdir / "h2o.loprop.h5",
    scf_checkpoint_file=tmpdir / "h2o.scf.h5",
)


@pytest.fixture
def molfrag(request):
    cls = request.param
    return cls(tmpdir, **settings)


@pytest.fixture
def transformer(request):
    cls = request.param
    S = cls(tmpdir, **settings).S()