tilde-lab / aiida-crystal-dft

AiiDA plugin for the ab initio modeling suite CRYSTAL, developed in Turin University
MIT License
3 stars 4 forks source link

Phonon template problem #53

Open blokhin opened 3 years ago

blokhin commented 3 years ago

root@aiida-rev-6:~# verdi process report 14584


*** 14584 [Mg3Ru2/213/cP20: Phonon frequency [1]]: None
*** Scheduler output: N/A
*** Scheduler errors: N/A
*** 1 LOG MESSAGES:
+-> REPORT at 2021-02-20 02:55:54.580211+00:00
 | [14584|CrystalParallelCalculation|on_except]: Traceback (most recent call last):
 |   File "/usr/local/lib/python3.7/dist-packages/aiida/engine/processes/calcjobs/tasks.py", line 79, in do_upload
 |     calc_info = process.presubmit(folder)
 |   File "/usr/local/lib/python3.7/dist-packages/aiida/engine/processes/calcjobs/calcjob.py", line 445, in presubmit
 |     calc_info = self.prepare_for_submission(folder)
 |   File "/usr/local/lib/python3.7/dist-packages/aiida_crystal_dft/calculations/parallel.py", line 26, in prepare_for_submission
 |     self._prepare_input_files(folder)
 |   File "/usr/local/lib/python3.7/dist-packages/aiida_crystal_dft/calculations/common.py", line 152, in _prepare_input_files
 |     f.write(str(d12_file))
 |   File "/usr/local/lib/python3.7/dist-packages/aiida_crystal_dft/io/d12.py", line 29, in __str__
 |     render = template.render(basis=self._basis, **self._input)
 |   File "/usr/lib/python3/dist-packages/jinja2/asyncsupport.py", line 76, in render
 |     return original_render(self, *args, **kwargs)
 |   File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 1008, in render
 |     return self.environment.handle_exception(exc_info, True)
 |   File "/usr/lib/python3/dist-packages/jinja2/environment.py", line 780, in handle_exception
 |     reraise(exc_type, exc_value, tb)
 |   File "/usr/lib/python3/dist-packages/jinja2/_compat.py", line 37, in reraise
 |     raise value.with_traceback(tb)
 |   File "/usr/local/lib/python3.7/dist-packages/aiida_crystal_dft/schemas/jinja/d12.j2", line 16, in top-level template code
 |     {% include 'geometry_phonons.j2' %}
 |   File "/usr/local/lib/python3.7/dist-packages/aiida_crystal_dft/schemas/jinja/geometry_phonons.j2", line 14, in top-level template code
 |     {{ macros.optional_key(geometry.phonons.INTENS, 'technique') -}}
 |   File "/usr/lib/python3/dist-packages/jinja2/runtime.py", line 579, in _invoke
 |     rv = self._func(*arguments)
 |   File "/usr/local/lib/python3.7/dist-packages/aiida_crystal_dft/schemas/jinja/macros.j2", line 15, in template
 |     {% if key in parent %}
 | TypeError: argument of type 'bool' is not iterable
blokhin commented 3 years ago

This seems to cause the problem: {'INTENS': True, ...}

ansobolev commented 2 years ago

OK, I'll look into it. This doesn't happen for every phonon calculation, does it?

blokhin commented 2 years ago

@ansobolev yes, only if intensities calculation requested