diff --git a/interfaces/adfsuite/crs.py b/interfaces/adfsuite/crs.py index dad7bc2d..335cba31 100644 --- a/interfaces/adfsuite/crs.py +++ b/interfaces/adfsuite/crs.py @@ -114,12 +114,19 @@ def get_results(self, section = None) -> dict: # first get the two ranges for the indices ncomp = self.readkf(section, 'ncomp') nitems = self.readkf(section, 'nitems') + nstruct = self.readkf(section, 'nstruct') np_dict = { "section" : section } + np_dict['ncomp'] = ncomp for prop in props: tmp = self.readkf(section,prop) - if prop == "filename": - np_dict[prop] = [str(x).strip() for x in tmp.split()] + if ((prop == "filename") or (prop == "name")): + chunk_length = len(tmp)//ncomp + np_dict[prop] = [tmp[i:i + chunk_length].strip() for i in range(0, len(tmp), chunk_length)] + continue + if prop == 'struct names': + chunk_length = len(tmp)//nstruct + np_dict[prop] = [tmp[i:i + chunk_length].strip() for i in range(0, len(tmp), chunk_length)] continue if not isinstance(tmp,list): np_dict[prop] = tmp diff --git a/tools/units.py b/tools/units.py index 4bc6f18d..7f954be1 100644 --- a/tools/units.py +++ b/tools/units.py @@ -173,7 +173,7 @@ class Units: continue dipole[k+'*'+k1]= v*v1 dipole[k+k1] = v*v1 - dipole['au'] = dipole['a.u.'] = dipole['e*bohr'] = 1.0 + dipole['au'] = dipole['a.u.'] = dipole['e*bohr'] dipole['debye'] = dipole['D'] = dipole['Cm'] * constants['c']* 1e21 # from support info https://doi.org/10.48550/arXiv.2310.13310 it is preferable to highlight that this is molecular polarizability,