From f838765834cb456fcf34735b2cb8495cd72d944e Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Tue, 19 Dec 2017 18:26:24 +0100 Subject: [PATCH] Multi-state modification for qmcpack --- plugins/QMC/README.rst | 8 ++++++++ plugins/QMC/qp_convert_qmcpack_to_ezfio.py | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/plugins/QMC/README.rst b/plugins/QMC/README.rst index 7e942878..129ca95e 100644 --- a/plugins/QMC/README.rst +++ b/plugins/QMC/README.rst @@ -2,6 +2,14 @@ QmcChem Module ============== +For multi-state calculations, to extract state 2 use: + +`` +QP_STATE=2 qp_run save_for_qmcpack x.ezfio +`` +(state 1 is the ground state). + + Documentation ============= diff --git a/plugins/QMC/qp_convert_qmcpack_to_ezfio.py b/plugins/QMC/qp_convert_qmcpack_to_ezfio.py index 8e8cea7b..acf48708 100755 --- a/plugins/QMC/qp_convert_qmcpack_to_ezfio.py +++ b/plugins/QMC/qp_convert_qmcpack_to_ezfio.py @@ -345,7 +345,10 @@ print "mo_num", mo_num print "det_num", n_det print "" -state = 0 +if "QP_STATE" in os.environ: + state = int(os.environ["QP_STATE"])-1 +else: + state = 0 psi_coef = psi_coef[state] encode = 8*bit_kind