neumannrf / electronic-structure-experiment

Uses the CP2K software package to run DFT simulations on nanoporous materials.
Apache License 2.0
2 stars 0 forks source link

Add option to restart CP2K simulations #5

Closed lipelopesoliveira closed 9 months ago

lipelopesoliveira commented 9 months ago

This PR adds a option to restart the charge density and structure optimization calculation as result of #3.

To restart a simulation it is only necessary to add the --Restart tag on the input.

Example:

structure_optimization.py --FrameworkName ${FrameworkName} \
                          --Functional "PBE" \
                          --DispersionCorrection "DFTD3(BJ)" \
                          --PWCutoff 1200 \
                          --KeepSymmetry \
                          --BasisSet "TZV2P" \
                          --Restart \
                          ${OutputFolder}

Warning: To restart a simulation it is necessary that a {FrameworkName}-1.restart file exists on the output folder, otherwise CP2K will rise an error since it will not be able to find the restart file and the simulation will fail.

This PR also fix the naming of the optimization images, that started on 0 while it should start on 1.

Closes #3