mirror of
https://github.com/pfloos/quack
synced 2024-12-22 12:23:50 +01:00
ensure QUACK_ROOT is defined
This commit is contained in:
parent
52894ba30e
commit
3552975cee
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user