Commit 378d392b authored by Niccolo.Ricardi's avatar Niccolo.Ricardi
Browse files

minor changes to get_nbas

parent 109b23d8
......@@ -276,9 +276,6 @@ def get_nbas(filepath, with_ccp=False, json_file="", log_file="", index=[2,3,4])
json_file=os.path.join(dir_, json_file)
else:
json_files = gl.glob(os.path.join(dir_,"*.json"))
if len(json_files) == 1:
json_file=json_files[0]
else:
kwargs = dict(to_console=False, to_file=True, to_json=True)
if json_file:
kwargs.update(dict(json_file=json_file))
......@@ -299,7 +296,7 @@ def get_nbas(filepath, with_ccp=False, json_file="", log_file="", index=[2,3,4])
nbas["nbasA"] = parsed["nbas"][index[1]][0]
nbas["nbasB"] = parsed["nbas"][index[2]][0]
else:
with open(file) as f:
with open(filepath) as f:
r = f.read()
pattern = r"There are (?P<shells>\d+) shells and (?P<bsf>\d+) basis functions"
parsed = re.findall(pattern, r)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment