NaN energies during optical conductivity calculation (update: parser issue leading to default values used, defaults are insufficient)
I followed the 'optical conductivity' example for solids, then modified it to my system, thus:
'''
optical conductivity example time-dependent
CalculationMode = gs
FromScratch = yes
ExperimentalFeatures = true
PeriodicDimensions = 3
Spacing = 0.1*angstrom
%LatticeVectors
1.0 | 0.0 | 0.0
0.0 | 1.0 | 0.0
0.0 | 0.0 | 1.0
%
a = 2.9869396*angstrom
%LatticeParameters a | a | a
%
%ReducedCoordinates
"H" | 0.500000 | 0.000000 | 0.000000
"H" | 0.000000 | 0.500000 | 0.000000
"H" | 0.000000 | 0.000000 | 0.500000
"H" | 0.500000 | 0.500000 | 0.000000
"H" | 0.500000 | 0.000000 | 0.500000
"H" | 0.000000 | 0.500000 | 0.500000
"S" | 0.000000 | 0.000000 | 0.000000
"S" | 0.500000 | 0.500000 | 0.500000
%
SpinComponents = spinors
RelativisticCorrection = spin_orbit
GuessMagnetDensity = random
PseudopotentialSet = hgh_lda
ConvRelDens=1.0e-6
EigensolverTolerance=1.0e-7
Eigensolver=rmmdiis
MaximumIter=-1
SmearingFunction=fermi_dirac
ExtraStates = 20
ExtraStatesToConverge = 10
nk = 4
%KPointsGrid
nk | nk | nk
%
% KPointsUseSymmetries = yes
%SymmetryBreakDir
1 | 0 | 0
%
td
optical conductivity example time-dependent
CalculationMode = td
FromScratch = no
ExperimentalFeatures = true
Debug = trace
DebugTrapSignals = yes
PeriodicDimensions = 3
Spacing = 0.1*angstrom
%LatticeVectors
1.0 | 0.0 | 0.0
0.0 | 1.0 | 0.0
0.0 | 0.0 | 1.0
%
a = 2.9869396*angstrom
%LatticeParameters
a | a | a
%
%ReducedCoordinates
"H" | 0.500000 | 0.000000 | 0.000000
"H" | 0.000000 | 0.500000 | 0.000000
"H" | 0.000000 | 0.000000 | 0.500000
"H" | 0.500000 | 0.500000 | 0.000000
"H" | 0.500000 | 0.000000 | 0.500000
"H" | 0.000000 | 0.500000 | 0.500000
"S" | 0.000000 | 0.000000 | 0.000000
"S" | 0.500000 | 0.500000 | 0.500000
%
SpinComponents = spinors
RelativisticCorrection = spin_orbit
GuessMagnetDensity = random
PseudopotentialSet = hgh_lda
ConvRelDens=1.0e-6
EigensolverTolerance=1.0e-7
Eigensolver=rmmdiis
MaximumIter=-1
SmearingFunction=fermi_dirac
ExtraStates = 20
ExtraStatesToConverge = 10
nk = 4
%KPointsGrid
nk | nk | nk
%
% KPointsUseSymmetries = yes
%SymmetryBreakDir
1 | 0 | 0
%
%TDExternalFields
vector_potential | 1.0 | 0.0 | 0.0 | 0.0 | "envelope_step"
%
%TDFunctions
"envelope_step" | tdf_from_expr | "0.01*step(t)"
%
%TDOutput
total_current
%
TDTimeStep = 0.3
TDPropagationTime = 1500
TDExponentialMethod = lanczos
TDExpOrder = 16
#PropagationSpectrumDampMode = exponential
Output
Version : mercatoris
Commit : a8dcca5e5b4b49e226152e941df3c176eab4c585
Configuration time : Tue Sep 12 22:54:53 EDT 2023
Configuration options : maxdim3 mpi sse2 libxc5 libxc_fxc
Optional libraries : gdlib metis
Architecture : x86_64
C compiler : mpicc (gcc)
C compiler flags : -g -O2
C++ compiler : g++
C++ compiler flags : -g -O2
Fortran compiler : mpif90 (gfortran) (GCC version 9.3.0)
Fortran compiler flags : -O3
Result
********************* Time-Dependent Simulation **********************
Iter Time Energy SC Steps Elapsed Time
1 0.032256 -23.501874 1 16.539
2 0.064513 -23.501874 1 16.266
3 0.096769 -23.501874 1 16.224
4 0.129026 -23.501874 1 16.105
5 0.161282 -23.501874 1 15.792
6 0.193539 -23.501874 1 16.165
7 0.225795 -23.501874 1 16.604
8 0.258052 -23.501874 1 16.579
9 0.290308 -23.501874 1 16.445
10 0.322565 NaN 1 19.292
11 0.354821 NaN 1 16.352
and the energy is NaN from then on
Even with Debug = trace, no error was thrown
Edited by Nicolas Tancogne-Dejean