From 04c75ab70c3b972617c7218d22bed02d137696f8 Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 24 Sep 2020 10:07:25 +0200 Subject: [PATCH] Fixed basis bug --- stable/champ/qp_convert.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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)