diff --git a/codes/extract_coords_into_inp_xyz.py b/codes/extract_coords_into_inp_xyz.py index 094ae66..5aac4e6 100644 --- a/codes/extract_coords_into_inp_xyz.py +++ b/codes/extract_coords_into_inp_xyz.py @@ -8,9 +8,9 @@ import os -PBS_TEMPLATE = load_template("templates", "optimization_gamess_template.pbs") -INP_TEMPLATE = load_template("templates", "gamess_input_template.inp") -XYZ_TEMPLATE = load_template("templates", "structure_input_template.xyz") +PBS_TEMPLATE = load_template("optimization_gamess_template.pbs") +INP_TEMPLATE = load_template("gamess_input_template.inp") +XYZ_TEMPLATE = load_template("structure_input_template.xyz") def coords_as_dataframe(element_symbol: List[str], x_coord: List[str], y_coord: List[str], z_coord: List[str]) -> pd.DataFrame: @@ -48,7 +48,12 @@ def read_coordinates(n_atoms: int, gamess_output: List[str], line_number: int) - """ start, end = compute_start_end_indices(n_atoms, line_number, 4) data = [line.split() for line in gamess_output[start:end]] - element_symbol, x_coord, y_coord, z_coord = zip(*data) + + element_symbol = [line[0] for line in data] + x_coord = [line[2] for line in data] + y_coord = [line[3] for line in data] + z_coord = [line[4] for line in data] + return element_symbol, x_coord, y_coord, z_coord diff --git a/codes/write_dirs_files_for_gamess_qcxms.py b/codes/write_dirs_files_for_gamess_qcxms.py index 386e6de..d89fb69 100644 --- a/codes/write_dirs_files_for_gamess_qcxms.py +++ b/codes/write_dirs_files_for_gamess_qcxms.py @@ -277,13 +277,13 @@ def write_gamess_input(multiplicity: int, mol: object, molname: str, mol_input_p write_gamess_input(multiplicity, mol, molname, mol_input_path) spectrum_input_path = spectra_dir / ("qcxms" + ".in") - qcxms_template = load_template("templates", "qcxms_input_template.in") + template = load_template("qcxms_input_template.in") if not Path(spectrum_input_path).exists(): qcxms_params = read_parameters(args.params_filename, ["QC_Program", "QC_Level", "ntraj", "tmax", "tinit", "ieeatm"]) - write_from_template(parameters=qcxms_params, template=qcxms_template, file=spectrum_input_path) + write_from_template(parameters=qcxms_params, template=template, file=spectrum_input_path) mol_pbs_path = mol_dir / (inchikey + ".pbs") - pbs_template = load_template("templates", "optimization_gamess_template.pbs") + template = load_template("optimization_gamess_template.pbs") if not Path(mol_pbs_path).exists(): pbs_params = read_parameters(args.params_filename, ["WALLTIME", "NCPUS", "MEM", "SCRATCH_LOCAL", "USER_EMAIL"]) - write_from_template(parameters={"MOLNAME": inchikey, **pbs_params}, template=pbs_template, file=mol_pbs_path) + write_from_template(parameters={"MOLNAME": inchikey, **pbs_params}, template=template, file=mol_pbs_path)