This needs to be changed and be triggered when max_stage_iteration is reached.
I discovered this as a bug also in aiida-vasp plugin. If workchain requests the restart, plugin copies all files in the calculations folder to the new calculations folder (expect INCAR, KPOINTS, POTCAR, and few others). Therefore, we will have vasprun.xml from previous calculation too. If for any reason, calculation failes, plugin will retrived files and triggers parsing, it sees the vasprun.xml but does not have any clue that it is from another run.
It needs to be fixed in plugin by only copying WAVECAR and CHGCAR. That's all we need.
In current implementation, if the calculations is not converged, it will result in triggering exit code and workchain will not try to do another trial: https://github.com/morgan-group-bath/aiida-bjm/blob/ec68aa97d24fdf1ea43bcbfb4f419362abef6fe2/aiida_bjm/workchains/vasp_multistage.py#L411-L415
This needs to be changed and be triggered when
max_stage_iteration
is reached.I discovered this as a bug also in
aiida-vasp
plugin. If workchain requests the restart, plugin copies all files in the calculations folder to the new calculations folder (expectINCAR
,KPOINTS
,POTCAR
, and few others). Therefore, we will havevasprun.xml
from previous calculation too. If for any reason, calculation failes, plugin will retrived files and triggers parsing, it sees thevasprun.xml
but does not have any clue that it is from another run. It needs to be fixed in plugin by only copyingWAVECAR
andCHGCAR
. That's all we need.