diff --git a/Ref/Molecules/g09_zmat_to_qp_create.py b/Ref/Molecules/qp_create_ezfio_from_g09_zmat similarity index 54% rename from Ref/Molecules/g09_zmat_to_qp_create.py rename to Ref/Molecules/qp_create_ezfio_from_g09_zmat index 3efb614..02c0579 100755 --- a/Ref/Molecules/g09_zmat_to_qp_create.py +++ b/Ref/Molecules/qp_create_ezfio_from_g09_zmat @@ -1,7 +1,39 @@ #!/usr/bin/env python2 +""" +convert zmatrix and input for spin multiplicity and charge from the SI of +J. Chem. Phys. 131, 154112 (2009); https://doi.org/10.1063/1.3247288 + +into a zmatrix usable by the QP, and spits the correct command to execute +Usage: + qp_create_ezfio_from_g09_zmat g09_zmat basis + +Produces the ezfio folder g09_zmat.ezfio + +""" import sys import os +import subprocess + + +try: + import qp_path +except ImportError: + print "source .quantum_package.rc" + raise +try: + QP_ROOT = os.environ["QP_ROOT"] + QP_EZFIO = os.environ["QP_EZFIO"] +except KeyError: + print "Error: QP_ROOT environment variable not found." + sys.exit(1) +else: + sys.path = [QP_EZFIO + "/Python", + QP_ROOT + "/install/resultsFile", + QP_ROOT + "/install", + QP_ROOT + "/scripts"] + sys.path + + def findall(sub, string): """ @@ -54,4 +86,6 @@ file_zmat = open(zmat_file,"w+") for l in zmat: file_zmat.write(l +'\n') -print("qp_create_ezfio -m %s -c %s -b %s -o %s %s" % (spin,charge,basis,ezfio,zmat_file)) +command="qp_create_ezfio -m %s -c %s -b %s -o %s %s" % (spin,charge,basis,ezfio,zmat_file) +print command +#os.system(command)