Trace(PS):32.0000000000 Electronic density on regular grids:-31.99999999800.0000000020 Core density on regular grids:31.9999999944-0.0000000056 Total charge density on r-space grids:-0.0000000036 Total charge density g-space grids:-0.0000000036
Electronic density on regular grids:-31.99999999800.0000000020 Core density on regular grids:31.9999999944-0.0000000056 Total charge density on r-space grids:-0.0000000036 Total charge density g-space grids:-0.0000000036
Overlap energy of the core charge distribution:0.00000000005320 Self energy of the core charge distribution:-82.06393942512820 Core Hamiltonian energy:16.92855916540793 Hartree energy:42.17635056223367 Exchange-correlation energy:-9.42142606564066 Electronic entropic energy:0.00000000000000 Fermi energy:0.00000000000000
Total energy:-32.38045576307407
高斯分布在多网格上的信息
1 2 3 4 5 6 7 8
------------------------------------------------------------------------------- ----MULTIGRIDINFO---- ------------------------------------------------------------------------------- count for grid 1:2720 cutoff [a.u.] 50.00 count for grid 2:5000 cutoff [a.u.] 16.67 count for grid 3:2760 cutoff [a.u.] 5.56 count for grid 4:16cutoff [a.u.] 1.85 total gridlevel count :10496
#!/bin/bash cutoffs="50 100 150 200 250 300 350 400 450 500" input_file=Si_bulk8.inp output_file=Si_bulk8.out plot_file=cutoff_data.ssv rel_cutoff=60 echo "# Grid cutoff vs total energy" > $plot_file echo "# Date: $(date)" >> $plot_file echo "# PWD: $PWD" >> $plot_file echo "# REL_CUTOFF = $rel_cutoff" >> $plot_file echo -n "# Cutoff (Ry) | Total Energy (Ha)" >> $plot_file grid_header=true for ii in $cutoffs ; do work_dir=cutoff_${ii}Ry total_energy=$(grep -e '^[ \t]*Total energy' $work_dir/$output_file | awk '{print $3}') ngrids=$(grep -e '^[ \t]*QS| Number of grid levels:' $work_dir/$output_file | \ awk '{print $6}') if $grid_header ; then for ((igrid=1; igrid <= ngrids; igrid++)) ; do printf " | NG on grid %d" $igrid >> $plot_file done printf "\n" >> $plot_file grid_header=false fi printf "%10.2f %15.10f" $ii $total_energy >> $plot_file for ((igrid=1; igrid <= ngrids; igrid++)) ; do grid=$(grep -e '^[ \t]*count for grid' $work_dir/$output_file | \ awk -v igrid=$igrid '(NR == igrid){print $5}') printf " %6d" $grid >> $plot_file done printf "\n" >> $plot_file done
最后cutoff_data.ssv中得到
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# Grid cutoff vs total energy # Date: Mon Jan 20 21:20:34 GMT 2014 # PWD: /home/tong/tutorials/converging_grid/sample_output # REL_CUTOFF = 60 # Cutoff (Ry) | Total Energy (Ha) | NG on grid 1 | NG on grid 2 | NG on grid 3 | NG on grid 4 50.00 -32.379532986450485432160 100.00 -32.380455763127205000276016 150.00 -32.380455485020323016543216 200.00 -32.38045549821880247233842760 250.00 -32.3804554859264408833842760 300.00 -32.3804554843264245650002776 350.00 -32.380455484656197656882776 400.00 -32.380455485156197630165448 450.00 -32.38045548510203230165448 500.00 -32.38045548500203230165448
#!/bin/bash rel_cutoffs="10 20 30 40 50 60 70 80 90 100" input_file=Si_bulk8.inp output_file=Si_bulk8.out plot_file=rel_cutoff_data.ssv cutoff=250 echo "# Rel Grid cutoff vs total energy" > $plot_file echo "# Date: $(date)" >> $plot_file echo "# PWD: $PWD" >> $plot_file echo "# CUTOFF = ${cutoff}" >> $plot_file echo -n "# Rel Cutoff (Ry) | Total Energy (Ha)" >> $plot_file grid_header=true for ii in $rel_cutoffs ; do work_dir=rel_cutoff_${ii}Ry total_energy=$(grep -e '^[ \t]*Total energy' $work_dir/$output_file | awk '{print $3}') ngrids=$(grep -e '^[ \t]*QS| Number of grid levels:' $work_dir/$output_file | \ awk '{print $6}') if $grid_header ; then or ((igrid=1; igrid <= ngrids; igrid++)) ; do printf " | NG on grid %d" $igrid >> $plot_file done printf "\n" >> $plot_file grid_header=false fi printf "%10.2f %15.10f" $ii $total_energy >> $plot_file for ((igrid=1; igrid <= ngrids; igrid++)) ; do grid=$(grep -e '^[ \t]*count for grid' $work_dir/$output_file | \ awk -v igrid=$igrid '(NR == igrid){print $5}') printf " %6d" $grid >> $plot_file done printf "\n" >> $plot_file done
得到rel_cutoff_data.ssv:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# Rel Grid cutoff vs total energy # Date: Mon Jan 20 00:45:14 GMT 2014 # PWD: /home/tong/tutorials/converging_grid/sample_output # CUTOFF = 250 # Rel Cutoff (Ry) | Total Energy (Ha) | NG on grid 1 | NG on grid 2 | NG on grid 3 | NG on grid 4 10.00 -32.39029800200020328464 20.00 -32.3816384686026440886144 30.00 -32.38051155760203230165448 40.00 -32.380511602556197630165448 50.00 -32.3804555002264245650002776 60.00 -32.3804554859264408833842760 70.00 -32.38045548591880247233842760 80.00 -32.38045548591880247233842760 90.00 -32.380455484820323016543216 100.00 -32.380455484820323016543216
随着REL_CUTOFF值的增加,更多的高斯映射到更精细的网格上。总能量误差减少到小于
当REL_CUTOFF大于或等于60 Ry 。结果因此表明60 Ry确实是REL_CUTOFF值的合适选择。
for ii in$cutoffs ; do work_dir=cutoff_${ii}Ry if [ ! -d $work_dir ] ; then mkdir $work_dir else rm -r $work_dir/* fi sed -e "s/LT_rel_cutoff/${rel_cutoff}/g" \ -e "s/LT_cutoff/${ii}/g" \ $template_file > $work_dir/$input_file done