Révision 77f8c47b modules/screening.py
b/modules/screening.py | ||
---|---|---|
146 | 146 |
logger.error(err) |
147 | 147 |
raise ValueError(err) |
148 | 148 |
norm_vec = np.round(norm_vec, 2) / np.linalg.norm(np.round(norm_vec, 2)) |
149 |
logger.info(f"The perpendicular vector to the surface at site '{idxs}' is " |
|
150 |
f"{norm_vec}") |
|
149 |
if not np.isnan(norm_vec).any(): |
|
150 |
logger.info(f"The perpendicular vector to the surface at site '{idxs}' " |
|
151 |
f"is {norm_vec}") |
|
151 | 152 |
return norm_vec |
152 | 153 |
|
153 | 154 |
|
... | ... | |
944 | 945 |
if isinstance(inp_norm_vect, str) and inp_norm_vect == 'auto': |
945 | 946 |
norm_vect = compute_norm_vect(surf, sites[s], |
946 | 947 |
inp_vars['pbc_cell']) |
948 |
if np.isnan(norm_vect).any(): |
|
949 |
logger.warning(f"Could not compute the normal vector to " |
|
950 |
f"site '{sites[s]}'. Skipping site.") |
|
951 |
continue |
|
947 | 952 |
else: |
948 | 953 |
norm_vect = inp_norm_vect |
949 | 954 |
for c, ctr in enumerate(molec_ctr_coords): |
Formats disponibles : Unified diff