diff --git a/stable/champ/qp_convert.py b/stable/champ/qp_convert.py index c6e6459..fb8b8a5 100755 --- a/stable/champ/qp_convert.py +++ b/stable/champ/qp_convert.py @@ -94,13 +94,21 @@ process = subprocess.Popen( out, err = process.communicate() basis_raw, sym_raw, _ = out.decode().split("\n\n\n") +basis_split = basis_raw.split('\n') # _ __ # |_) _. _ o _ (_ _ _|_ # |_) (_| _> | _> __) (/_ |_ # -basis_without_header = "\n".join(basis_raw.split("\n")[11:]) +beginning = 0 +for x in basis_split: + if x.startswith("Basis set"): + break + beginning += 1 + +beginning+=2 +basis_without_header = "\n".join(basis_split[beginning:]) import re l_basis_raw = re.split('\n\s*\n', basis_without_header)