Skip to content

Commit

Permalink
Automatic Sync from SCM-svn to GitHub
Browse files Browse the repository at this point in the history
syncing the following commits:
WeiLinChen: SCMSUITE-- SO101 modified the output for filename, name and struct name
GiulioBenedini: correction a bug in conversion the dipole units SO209
  • Loading branch information
scmtestadf committed Jan 5, 2024
1 parent 023d7e7 commit c824303
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions interfaces/adfsuite/crs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tools/units.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c824303

Please sign in to comment.