commit cf40df1b75ce7757d074c7ae05b0d85719a897e5
Author: Carles Marti <carles.marti-aliod@ens-lyon.fr>
Date:   Wed Sep 30 19:12:13 2020 +0200

    Revert "Set of changes allowing to record orientational sampling efficiency. Although not to be included in the productive version, interesting to have them recorded in VCS."
    
    This reverts commit b25f77a4

diff --git a/modules/screening.py b/modules/screening.py
index 81e1642..f61a29f 100644
--- a/modules/screening.py
+++ b/modules/screening.py
@@ -533,7 +533,7 @@ def ads_euler(orig_molec, slab, ctr_coord, site_coord, num_pts,
         conformer.
     """
     from copy import deepcopy
-    slab_ads_list, coll_confs, dup_confs = [], [], []
+    slab_ads_list = []
     prealigned_molec = align_molec(orig_molec, ctr_coord, norm_vect)
     # rotation around z
     for alpha in np.arange(0, 360, 360 / num_pts):
@@ -549,20 +549,16 @@ def ads_euler(orig_molec, slab, ctr_coord, site_coord, num_pts,
                                                      norm_vect,
                                                      slab_nghbs, molec_nghbs,
                                                      coll_coeff)
-                if not collision:
-                    if not any([np.allclose(slab_molec.positions, conf.positions)
-                                for conf in slab_ads_list]):
-                        slab_ads_list.append(slab_molec)
-                    else:
-                        dup_confs.append(slab_molec)
-                    # if h_donor is not False:
-                    #     slab_ads_list.extend(dissociation(slab_molec, h_donor,
-                    #                                       h_acceptor,
-                    #                                       len(slab)))
-                else:
-                    coll_confs.append(slab_molec)
-    return slab_ads_list, coll_confs, dup_confs
+                if not collision and not any([np.allclose(slab_molec.positions,
+                                                          conf.positions)
+                                              for conf in slab_ads_list]):
+                    slab_ads_list.append(slab_molec)
+                    if h_donor is not False:
+                        slab_ads_list.extend(dissociation(slab_molec, h_donor,
+                                                          h_acceptor,
+                                                          len(slab)))
 
+    return slab_ads_list
 
 def internal_rotate(molecule, surf, ctr1_mol, ctr2_mol, ctr3_mol, ctr1_surf,
                     ctr2_surf, bond_vector, bond_angle_target,
@@ -864,7 +860,7 @@ def ads_internal(orig_molec, slab, ctr1_mol, ctr2_mol, ctr3_mol, ctr1_surf,
         conformer.
     """
     from copy import deepcopy
-    slab_ads_list, coll_confs, dup_confs = [], [], []
+    slab_ads_list = []
     # Rotation over bond angle
     for alpha in np.arange(90, 180+1, 90 / max(1, num_pts-1))[:num_pts]:
         # Rotation over surf-adsorbate dihedral angle
@@ -886,20 +882,17 @@ def ads_internal(orig_molec, slab, ctr1_mol, ctr2_mol, ctr3_mol, ctr1_surf,
                                                      num_pts, min_coll_height,
                                                      norm_vect, slab_nghbs,
                                                      molec_nghbs, coll_coeff)
-                if not collision:
-                    if not any([np.allclose(slab_molec.positions, conf.positions)
-                                for conf in slab_ads_list]):
-                        slab_ads_list.append(slab_molec)
-                    else:
-                        dup_confs.append(slab_molec)
-                    # if h_donor is not False:
-                    #     slab_ads_list.extend(dissociation(slab_molec, h_donor,
-                    #                                       h_acceptor,
-                    #                                       len(slab)))
-                else:
-                    coll_confs.append(slab_molec)
-
-    return slab_ads_list, coll_confs, dup_confs
+                if not collision and \
+                        not any([np.allclose(slab_molec.positions,
+                                             conf.positions)
+                                 for conf in slab_ads_list]):
+                    slab_ads_list.append(slab_molec)
+                    if h_donor is not False:
+                        slab_ads_list.extend(dissociation(slab_molec, h_donor,
+                                                          h_acceptor,
+                                                          len(slab)))
+
+    return slab_ads_list
 
 
 def adsorb_confs(conf_list, surf, inp_vars):
@@ -929,7 +922,7 @@ def adsorb_confs(conf_list, surf, inp_vars):
         surf.set_pbc(True)
         surf.set_cell(inp_vars['pbc_cell'])
 
-    surf_ads_list, colli_confs, dupl_confs = [], [], []
+    surf_ads_list = []
     sites_coords = get_atom_coords(surf, sites)
     if coll_coeff is not False:
         surf_cutoffs = natural_cutoffs(surf, mult=coll_coeff)
@@ -954,13 +947,11 @@ def adsorb_confs(conf_list, surf, inp_vars):
                 norm_vect = inp_norm_vect
             for c, ctr in enumerate(molec_ctr_coords):
                 if angles == 'euler':
-                    good_confs, coll_confs, dup_confs = ads_euler(conf, surf,
-                        ctr, site, num_pts, min_coll_height, coll_coeff,
-                        norm_vect, surf_nghbs, molec_nghbs, h_donor, h_acceptor)
-                    surf_ads_list.extend(good_confs)
-                    colli_confs.extend(coll_confs)
-                    dupl_confs.extend(dup_confs)
-
+                    surf_ads_list.extend(ads_euler(conf, surf, ctr, site,
+                                                   num_pts, min_coll_height,
+                                                   coll_coeff, norm_vect,
+                                                   surf_nghbs, molec_nghbs,
+                                                   h_donor, h_acceptor))
                 elif angles == 'chemcat':
                     mol_ctr1 = molec_ctrs[c]
                     mol_ctr2 = inp_vars["molec_ctrs2"][c]
@@ -968,14 +959,15 @@ def adsorb_confs(conf_list, surf, inp_vars):
                     surf_ctr1 = sites[s]
                     surf_ctr2 = inp_vars["surf_ctrs2"][s]
                     max_h = inp_vars["max_helic_angle"]
-                    good_confs, coll_confs, dup_confs = ads_internal(conf, surf,
-                                                                     mol_ctr1, mol_ctr2, mol_ctr3, surf_ctr1, surf_ctr2,
-                                                                     num_pts, min_coll_height, coll_coeff, norm_vect,
-                                                                     surf_nghbs, molec_nghbs, h_donor, h_acceptor, max_h)
-                    surf_ads_list.extend(good_confs)
-                    colli_confs.extend(coll_confs)
-                    dupl_confs.extend(dup_confs)
-    return surf_ads_list, colli_confs, dupl_confs
+                    surf_ads_list.extend(ads_chemcat(conf, surf, mol_ctr1,
+                                                     mol_ctr2, mol_ctr3,
+                                                     surf_ctr1, surf_ctr2,
+                                                     num_pts, min_coll_height,
+                                                     coll_coeff, norm_vect,
+                                                     surf_nghbs, molec_nghbs,
+                                                     h_donor, h_acceptor,
+                                                     max_h))
+    return surf_ads_list
 
 
 def run_screening(inp_vars):
@@ -1024,14 +1016,11 @@ def run_screening(inp_vars):
                                       inp_vars['confs_per_magn'],
                                       inp_vars['code'])
     surf = adapt_format('ase', inp_vars['surf_file'], inp_vars['special_atoms'])
-    surf_ads_list, colli_confs, dupl_confs = adsorb_confs(selected_confs, surf,
-                                                          inp_vars)
+    surf_ads_list = adsorb_confs(selected_confs, surf, inp_vars)
     if len(surf_ads_list) > inp_vars['max_structures']:
         surf_ads_list = random.sample(surf_ads_list, inp_vars['max_structures'])
-    logger.info(f"Good: {len(surf_ads_list)}, Collision: {len(colli_confs)},"
-                f" Duplicate: {len(dupl_confs)}")
-    # logger.info(f'Generated {len(surf_ads_list)} adsorbate-surface atomic '
-    #             f'configurations to carry out a calculation of.')
+    logger.info(f'Generated {len(surf_ads_list)} adsorbate-surface atomic '
+                f'configurations to carry out a calculation of.')
 
     run_calc('screening', inp_vars, surf_ads_list)
     logger.info('Finished the procedures for the screening of adsorbate-surface'
