def test_TI_separate_dhdl_single_column(): dHdl = gmx_benzene_coul_dHdl() estimator = TI().fit(dHdl) assert all( [isinstance(dhdl, pd.Series) for dhdl in estimator.separate_dhdl()]) assert [len(dhdl) for dhdl in estimator.separate_dhdl()] == [ 5, ]
def test_TI_separate_dhdl_no_pertubed(): '''The test for the case where two lambda are there and one is not pertubed''' dHdl = gmx_benzene_coul_dHdl() dHdl.insert(1, 'bound-lambda', [1.0, ] * len(dHdl)) dHdl.insert(1, 'bound', [1.0, ] * len(dHdl)) dHdl.set_index('bound-lambda', append=True, inplace=True) estimator = TI().fit(dHdl) assert all([isinstance(dhdl, pd.Series) for dhdl in estimator.separate_dhdl()]) assert [len(dhdl) for dhdl in estimator.separate_dhdl()] == [5, ]
def test_ti_separate_dhdl(self, dhdl): ti = TI().fit(dhdl) dhdl_list = ti.separate_dhdl() for dhdl in dhdl_list: assert dhdl.attrs['temperature'] == 300 assert dhdl.attrs['energy_unit'] == 'kT'
def test_TI_separate_dhdl_multiple_column(): dHdl = gomc_benzene_dHdl() estimator = TI().fit(dHdl) assert all( [isinstance(dhdl, pd.Series) for dhdl in estimator.separate_dhdl()]) assert sorted([len(dhdl) for dhdl in estimator.separate_dhdl()]) == [8, 16]