Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Successful CRYSTAL output is treated as erroneous in a workflow #71

Open
blokhin opened this issue Jul 21, 2024 · 2 comments
Open

Successful CRYSTAL output is treated as erroneous in a workflow #71

blokhin opened this issue Jul 21, 2024 · 2 comments
Assignees
Labels
blocker bug Something isn't working enhancement New feature or request

Comments

@blokhin
Copy link
Member

blokhin commented Jul 21, 2024

# verdi process list -a -p7
  PK  Created    Process label               Process State    Process status
----  ---------  --------------------------  ---------------  ---------------------------------------
<...>
2952  21h ago    CrystalParallelCalculation  ⨯ Excepted


# verdi process report 2952

*** 2952 [SrTiO3/221: Phonon frequencies [1]]: None
*** Scheduler output: N/A
*** Scheduler errors:
CRYSTAL by AiiDA
EXTERNAL
SCELPHONO
<...>
NODE    3 CPU TIME =     34871.178
    TOTAL CPU TIME =    139483.440

*** 2 LOG MESSAGES:
+-> WARNING at 2024-07-20 02:11:56.370200+02:00
 | could not parse scheduler output: the `_scheduler-stdout.txt` file is missing
+-> REPORT at 2024-07-20 02:11:56.508106+02:00
 | [2952|CrystalParallelCalculation|on_except]: Traceback (most recent call last):
 |   File "/usr/local/lib/python3.11/dist-packages/plumpy/process_states.py", line 228, in execute
 |     result = self.run_fn(*self.args, **self.kwargs)
 |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 |   File "/usr/local/lib/python3.11/dist-packages/aiida/engine/processes/calcjobs/calcjob.py", line 473, in parse
 |     exit_code_retrieved = self.parse_retrieved_output(retrieved_temporary_folder)
 |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 |   File "/usr/local/lib/python3.11/dist-packages/aiida/engine/processes/calcjobs/calcjob.py", line 564, in parse_retrieved_output
 |     exit_code = parser.parse(**parse_kwargs)
 |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 |   File "/usr/local/lib/python3.11/dist-packages/aiida_crystal_dft/parsers/cry_pycrystal.py", line 125, in parse
 |     self.add_node(self._linkname_trajectory, f, self.parse_out_trajectory)
 |   File "/usr/local/lib/python3.11/dist-packages/aiida_crystal_dft/parsers/cry_pycrystal.py", line 137, in add_node
 |     parse_result = callback(f)
 |                    ^^^^^^^^^^^
 |   File "/usr/local/lib/python3.11/dist-packages/aiida_crystal_dft/parsers/cry_pycrystal.py", line 166, in parse_out_trajectory
 |     traj.set_structurelist(structs)
 |   File "/usr/local/lib/python3.11/dist-packages/aiida/orm/nodes/data/array/trajectory.py", line 190, in set_structurelist
 |     raise ValueError('Symbol lists have to be the same for all of the supplied structures')
 | ValueError: Symbol lists have to be the same for all of the supplied structures
@blokhin blokhin added bug Something isn't working enhancement New feature or request blocker labels Jul 21, 2024
@akvatol
Copy link
Contributor

akvatol commented Jul 24, 2024

This exception is caused by the presence of the SCELPHONO keyword in the calculation, because the phonon calculation creates a supercell that has more atoms than the original cell, here is an example of a trajectory for which the exception is thrown:

In[14]: pars.stdout_parser.get_trajectory()
Out[14]: 
[Atoms(symbols='Li2Pt', pbc=True, cell=[[2.923816996254444, 2.923816996254444, 0.0], [-3.994008292900281, 1.0701912966458385, 0.0], [0.0, 0.0, 2.67463495]]),
 Atoms(symbols='Li2PtLi5Pt2LiPt', pbc=True, cell=[[2.923816996254444, 2.923816996254444, 0.0], [-5.064199595131991, 5.064199595131991, 0.0], [0.0, 0.0, 5.3492699]])

To get rid of it, we need to add a fallback that is triggered when phonon calculation is specified in the node parameters.

@akvatol
Copy link
Contributor

akvatol commented Jul 28, 2024

@blokhin Would it be ok if the parser just threw a warning like this in the logger, or should it completly ignore trajectories in phonon calculations? That seems like a lot of unnecessary information.

Warning: Caught ValueError for node with label 'Li2Pt/191: Phonon frequencies [1]': Symbol lists have to be the same for all of the supplied structures
WARNING:aiida.parser.CrystalParser:Caught ValueError for node with label 'Li2Pt/191: Phonon frequencies [1]': Symbol lists have to be the same for all of the supplied structures

akvatol added a commit to akvatol/aiida-crystal-dft that referenced this issue Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker bug Something isn't working enhancement New feature or request
Development

No branches or pull requests

2 participants