Révision 03fab2dd modules/dos_input.py
b/modules/dos_input.py | ||
---|---|---|
187 | 187 |
return True |
188 | 188 |
|
189 | 189 |
|
190 |
def check_inp_file(inp_file, code): |
|
191 |
if code == 'cp2k': |
|
192 |
from pycp2k import CP2K |
|
193 |
cp2k = CP2K() |
|
194 |
try_command(cp2k.parse, |
|
195 |
[(UnboundLocalError, "Invalid CP2K input file")], inp_file) |
|
196 |
|
|
197 |
|
|
190 | 198 |
def get_run_type(): |
191 | 199 |
isolated, screening, refinement = (False, False, False) |
192 | 200 |
run_type_vals = ['isolated', 'screening', 'refinement', 'adsorption', |
... | ... | |
576 | 584 |
logger.error(no_opt_err % (opt, 'Isolated')) |
577 | 585 |
raise NoOptionError(opt, 'Isolated') |
578 | 586 |
return_vars['isol_inp_file'] = get_isol_inp_file() |
587 |
check_inp_file(return_vars['isol_inp_file'], return_vars['code']) |
|
579 | 588 |
return_vars['molec_file'] = get_molec_file() |
580 | 589 |
|
581 | 590 |
# Facultative options (Default/Fallback value present) |
Formats disponibles : Unified diff