commit 96d422c7dc208fb2a7828ee5b46f921e224765d7
Author: Carles Martí <carles.marti2@gmail.com>
Date:   Thu Dec 10 18:07:58 2020 +0100

    Corrected bug when printing isolated and refinement most stable structures.

diff --git a/modules/isolated.py b/modules/isolated.py
index db37d1a..8ea63e0 100644
--- a/modules/isolated.py
+++ b/modules/isolated.py
@@ -163,11 +163,14 @@ def run_isolated(inp_vars):
         logger.error(err_msg)
         raise ValueError(err_msg)
     run_calc('isolated', inp_vars, ase_atms_list)
-    finished_calcs, failed_calcs = check_finished_calcs('isolated',
+    logger.info("Finished the procedures for the isolated molecule section. ")
+    if inp_vars["batch_q_sys"]:
+        finished_calcs, failed_calcs = check_finished_calcs('isolated',
                                                             inp_vars['code'])
-    conf_list = collect_confs(finished_calcs, inp_vars['code'], 'isolated',
+        conf_list = collect_confs(finished_calcs, inp_vars['code'], 'isolated',
                               inp_vars['special_atoms'])
-    most_stable_conf = select_stable_confs(conf_list, 0)[0]
-    logger.info("Finished the procedures for the isolated molecule section. "
-                f"Most stable conformers is {most_stable_conf.info['id']}, "
-                f"with a total energy of {most_stable_conf.info['energy']} eV.")
+        most_stable_conf = select_stable_confs(conf_list, 0)[0]
+
+        logger.info(f"Most stable conformers is {most_stable_conf.info['iso']},"
+                    f" with a total energy of {most_stable_conf.info['energy']}"
+                    f" eV.")
diff --git a/modules/refinement.py b/modules/refinement.py
index fbfa3df..30c6dbe 100644
--- a/modules/refinement.py
+++ b/modules/refinement.py
@@ -60,22 +60,23 @@ def run_refinement(inp_vars):
     selected_confs = select_stable_confs(conf_list, inp_vars['energy_cutoff'])
     logger.info(f"Selected {len(selected_confs)} structures to carry out the"
                 f" refinement")
-    # run_calc('refinement', inp_vars, selected_confs)
-    finished_calcs, failed_calcs = check_finished_calcs('refinement',
-                                                        inp_vars['code'])
-    conf_list = collect_confs(finished_calcs, inp_vars['code'], 'refinement',
-                              inp_vars['special_atoms'])
-    sorted_confs = select_stable_confs(conf_list, np.inf)
+    run_calc('refinement', inp_vars, selected_confs)
     logger.info("Finished the procedures for the refinement of "
                 "adsorbate-surface structures section. ")
-    logger.info("Most stable structure "
-                f"is {sorted_confs[0].info['ref']} with a total energy of "
-                f"{sorted_confs[0].info['energy']} eV.")
-    confs_str = "\n".join([" ".join((str(conf.info['ref']), 'E =',
-                                     str(conf.info['energy'] -
+    if inp_vars["batch_q_sys"]:
+        finished_calcs, failed_calcs = check_finished_calcs('refinement',
+                                                            inp_vars['code'])
+        conf_list = collect_confs(finished_calcs, inp_vars['code'],
+                                  'refinement', inp_vars['special_atoms'])
+        sorted_confs = select_stable_confs(conf_list, np.inf)
+        logger.info(f"Most stable structure is {sorted_confs[0].info['ref']} "
+                    f"with a total energy of {sorted_confs[0].info['energy']} "
+                    f"eV.")
+        confs_str = "\n".join([" ".join((str(conf.info['ref']), 'E =',
+                                         str(conf.info['energy'] -
                                          sorted_confs[0].info['energy']),
-                                     'eV'))
-                           for conf in sorted_confs])
-    logger.info("The relative energies, of all structures obtained at the "
-                "refinement stage, respect the most stable one "
-                f"({sorted_confs[0].info['ref']}) are:\n{confs_str}")
+                                         'eV'))
+                               for conf in sorted_confs])
+        logger.info("The relative energies, of all structures obtained at the "
+                    "refinement stage, respect the most stable one "
+                    f"({sorted_confs[0].info['ref']}) are:\n{confs_str}")
