Révision 9cd032cf modules/dos_input.py
b/modules/dos_input.py | ||
---|---|---|
58 | 58 |
new_answers = {'n': False, 'none': False, 'nay': False, |
59 | 59 |
'y': True, 'sí': True, 'aye': True, 'sure': True} |
60 | 60 |
for answer, val in new_answers.items(): |
61 |
dos_inp.BOOLEAN_STATES[answer] = val |
|
61 |
dos_inp.BOOLEAN_STATES[answer] = val # TODO Check value 0
|
|
62 | 62 |
turn_false_answers = [answer for answer in dos_inp.BOOLEAN_STATES |
63 | 63 |
if dos_inp.BOOLEAN_STATES[answer] is False] |
64 |
turn_true_answers = [answer for answer in dos_inp.BOOLEAN_STATES |
|
65 |
if dos_inp.BOOLEAN_STATES[answer]] |
|
64 | 66 |
|
65 | 67 |
no_sect_err = "Section '%s' not found on input file" |
66 | 68 |
no_opt_err = "Option '%s' not found on section '%s'" |
... | ... | |
637 | 639 |
return min_coll_height |
638 | 640 |
|
639 | 641 |
|
642 |
def get_exclude_ads_ctr(): |
|
643 |
err_msg = "exclude_ads_ctr must have a boolean value." |
|
644 |
exclude_ads_ctr = try_command(dos_inp.getboolean, [(ValueError, err_msg)], |
|
645 |
"Screening", "exclude_ads_ctr", |
|
646 |
fallback=False) |
|
647 |
return exclude_ads_ctr |
|
648 |
|
|
649 |
|
|
640 | 650 |
def get_H_donor(spec_atoms): |
641 | 651 |
from ase.data import chemical_symbols |
642 | 652 |
err_msg = "The value of 'h_donor' must be either False, a chemical symbol " \ |
... | ... | |
836 | 846 |
and inp_vars['collision_threshold'] is False: |
837 | 847 |
logger.warning("Collisions are deactivated: Overlapping of " |
838 | 848 |
"adsorbate and surface is possible") |
849 |
inp_vars['exclude_ads_ctr'] = get_exclude_ads_ctr() |
|
839 | 850 |
inp_vars['h_donor'] = get_H_donor(inp_vars['special_atoms']) |
840 | 851 |
inp_vars['max_structures'] = get_max_structures() |
841 | 852 |
inp_vars['use_molec_file'] = get_use_molec_file() |
Formats disponibles : Unified diff