mirror of
https://github.com/pfloos/quack
synced 2025-01-03 10:05:49 +01:00
absolute path for bench
This commit is contained in:
parent
2c312cfc57
commit
a44839e67d
@ -60,7 +60,7 @@ parser.add_argument(
|
|||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'-t', '--thresh',
|
'-t', '--thresh',
|
||||||
type=float,
|
type=float,
|
||||||
default=1e-8,
|
default=1e-7,
|
||||||
help='Threshold for acceptable difference (default: 1e-8)'
|
help='Threshold for acceptable difference (default: 1e-8)'
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -101,13 +101,14 @@ class Quack_Job:
|
|||||||
def prep_inp(self):
|
def prep_inp(self):
|
||||||
|
|
||||||
# geometry
|
# geometry
|
||||||
generate_xyz(self.geom, filename="{}.xyz".format(self.mol))
|
generate_xyz(self.geom, filename="{}/mol/{}.xyz".format(quack_root, self.mol))
|
||||||
|
|
||||||
# input files
|
# input files
|
||||||
for inp in ["methods", "options"]:
|
for inp in ["methods", "options"]:
|
||||||
inp_file = "{}.{}".format(inp, self.methd.upper())
|
inp_file = "{}.{}".format(inp, self.methd.upper())
|
||||||
if os.path.exists("inp/{}".format(inp_file)):
|
if os.path.exists("inp/{}".format(inp_file)):
|
||||||
shutil.copy("inp/{}".format(inp_file), "../mol/{}".format(inp_file))
|
shutil.copy("{}/tests/inp/{}".format(quack_root, inp_file),
|
||||||
|
"{}/input/{}".format(quack_root, inp))
|
||||||
else:
|
else:
|
||||||
print_col("File 'inp/{}' does not exist.".format(inp_file), "red")
|
print_col("File 'inp/{}' does not exist.".format(inp_file), "red")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@ -184,10 +185,10 @@ class Quack_Job:
|
|||||||
print_col(f" ☹️ {key}: ❌ {data_ref[key]} ≠ {data_new[key]}", "red")
|
print_col(f" ☹️ {key}: ❌ {data_ref[key]} ≠ {data_new[key]}", "red")
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
print_col(f"Error: The file '{filepath}' does not exist.", "red")
|
print_col(f"Error: The file '{filepath}' does not exist.", "red")
|
||||||
sys.exist(1)
|
sys.exit(1)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print_col(f"An error occurred: {str(e)}", "red")
|
print_col(f"An error occurred: {str(e)}", "red")
|
||||||
sys.exist(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
# ---
|
# ---
|
||||||
|
Loading…
Reference in New Issue
Block a user