4
1
mirror of https://github.com/pfloos/quack synced 2024-12-22 04:14:26 +01:00

ensure QUACK_ROOT is defined

This commit is contained in:
Abdallah Ammar 2024-11-01 10:59:35 +01:00
parent 52894ba30e
commit 3552975cee

View File

@ -1,6 +1,6 @@
#!/usr/bin/env python
import os
import os, sys
import argparse
import pyscf
from pyscf import gto
@ -8,6 +8,10 @@ import numpy as np
import subprocess
#Find the value of the environnement variable QUACK_ROOT. If not present we use the current repository
if "QUACK_ROOT" not in os.environ:
print("Please set the QUACK_ROOT environment variable, for example:\n")
print("$ export QUACK_ROOT={0}".format(os.getcwd()))
sys.exit(1)
QuAcK_dir=os.environ.get('QUACK_ROOT','./')
#Create the argument parser object and gives a description of the script