Repository: alchemistry/alchemlyb

Issue:
estimators.TI.separate_dhdl will not pass the metadata with multiple index columns as input
Code to reproduce

```
>>> import alchemlyb
>>> from alchemtest.gmx import load_ABFE
>>> from alchemlyb.parsing.gmx import extract_dHdl
>>> from alchemlyb.estimators import TI
>>> dhdl = alchemlyb.concat([extract_dHdl(load_ABFE()['data']['complex'][i], 
                                      310) for i in range(30)])
>>> ti = TI().fit(dhdl)
>>> ti.separate_dhdl()[0].attrs
{}
```

Where it should give.
```
>>> ti.separate_dhdl()[0].attrs
{'temperature': 310, 'energy_unit': 'kT'}
```

Discussion:

Patch:
diff --git a/CHANGES b/CHANGES
index 5012b79..8d30f71 100644
--- a/CHANGES
+++ b/CHANGES
@@ -26,6 +26,7 @@ Deprecations
 
 Fixes
   - Fix the support for pandas >= 1.3 (issue #147, PR #148).
+  - Fix separate_dhdl not work for multiple columns (issue #149, PR #151).
 
 Changes
   - The scipy constant for gas constant is used for parsers instead of the
diff --git a/src/alchemlyb/estimators/ti_.py b/src/alchemlyb/estimators/ti_.py
index 731c736..e7c8eae 100644
--- a/src/alchemlyb/estimators/ti_.py
+++ b/src/alchemlyb/estimators/ti_.py
@@ -150,6 +150,7 @@ class TI(BaseEstimator):
                 for l in l_types:
                     if l != l_types[i]:
                         new = new.reset_index(l, drop=True)
+                new.attrs = self.dhdl.attrs
                 dhdl_list.append(new)
         return dhdl_list
 


Test patch:
diff --git a/src/alchemlyb/tests/test_ti_estimators.py b/src/alchemlyb/tests/test_ti_estimators.py
index 0d639d8..fcadaed 100644
--- a/src/alchemlyb/tests/test_ti_estimators.py
+++ b/src/alchemlyb/tests/test_ti_estimators.py
@@ -11,7 +11,7 @@ from alchemlyb.estimators import TI
 import alchemtest.gmx
 import alchemtest.amber
 import alchemtest.gomc
-from alchemtest.gmx import load_benzene
+from alchemtest.gmx import load_benzene, load_ABFE
 from alchemlyb.parsing.gmx import extract_dHdl
 
 
@@ -170,7 +170,6 @@ class Test_Units():
         bz = load_benzene().data
         dHdl_coul = alchemlyb.concat(
             [extract_dHdl(xvg, T=300) for xvg in bz['Coulomb']])
-        dHdl_coul.attrs = extract_dHdl(load_benzene().data['Coulomb'][0], T=300).attrs
         return dHdl_coul
 
     def test_ti(self, dhdl):
@@ -188,3 +187,21 @@ class Test_Units():
         for dhdl in dhdl_list:
             assert dhdl.attrs['temperature'] == 300
             assert dhdl.attrs['energy_unit'] == 'kT'
+
+class Test_MultipleColumnUnits():
+    '''Test the case where the index has multiple columns'''
+    @staticmethod
+    @pytest.fixture(scope='class')
+    def dhdl():
+        data = load_ABFE()['data']['complex']
+        dhdl = alchemlyb.concat(
+            [extract_dHdl(data[i],
+                          300) for i in range(30)])
+        return dhdl
+
+    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'
\ No newline at end of file