Révision 3d56e566 modules/dos_input.py
b/modules/dos_input.py | ||
---|---|---|
455 | 455 |
'z': [0.0, 0.0, 1.0]} |
456 | 456 |
surf_norm_vect_str = dos_inp.get('Screening', 'surf_norm_vect', |
457 | 457 |
fallback="0.0 0.0 1.0") |
458 |
try: |
|
459 |
surf_norm_vect = str2lst(surf_norm_vect_str, float) |
|
458 |
|
|
459 |
if len(surf_norm_vect_str) == 1 and surf_norm_vect_str in coords: |
|
460 |
surf_norm_vect = coords[surf_norm_vect_str] |
|
461 |
else: |
|
462 |
surf_norm_vect = try_command(str2lst, [(ValueError, err)], |
|
463 |
surf_norm_vect_str) |
|
460 | 464 |
if len(surf_norm_vect) != 3: |
461 | 465 |
logger.error(err) |
462 | 466 |
raise ValueError(err) |
463 |
except ValueError: |
|
464 |
if len(surf_norm_vect_str) != 1 or surf_norm_vect_str not in coords: |
|
465 |
logger.error(err) |
|
466 |
raise ValueError(err) |
|
467 |
else: |
|
468 |
surf_norm_vect = coords[surf_norm_vect_str] |
|
467 |
|
|
469 | 468 |
return np.array(surf_norm_vect) |
470 | 469 |
|
471 | 470 |
|
Formats disponibles : Unified diff