Merge lp:~nickpapior/siesta/trunk-k-file into lp:siesta

Proposed by Nick Papior
Status: Merged
Approved by: Alberto Garcia
Approved revision: 702
Merged at revision: 698
Proposed branch: lp:~nickpapior/siesta/trunk-k-file
Merge into: lp:siesta
Diff against target: 9670 lines (+3312/-2590)
49 files modified
Docs/siesta.tex (+107/-48)
RELEASE_NOTES (+2/-0)
Src/Makefile (+62/-57)
Src/compute_dm.F (+8/-5)
Src/cranknic_evolk.F90 (+9/-9)
Src/final_H_f_stress.F (+7/-7)
Src/kpoint_grid.F90 (+0/-228)
Src/kpoint_pdos.F90 (+51/-209)
Src/kpoint_scf.F90 (+53/-0)
Src/kpoint_t.F90 (+598/-0)
Src/local_DOS.F (+3/-2)
Src/m_initwf.F90 (+16/-16)
Src/m_ncdf_siesta.F90 (+6/-6)
Src/m_transiesta.F90 (+7/-7)
Src/m_ts_fullk.F90 (+4/-4)
Src/m_ts_kpoints.F90 (+0/-323)
Src/m_ts_mumpsk.F90 (+4/-4)
Src/m_ts_trik.F90 (+8/-8)
Src/post_scf_work.F (+5/-3)
Src/projected_DOS.F (+18/-31)
Src/sankey_change_basis.F90 (+236/-236)
Src/siesta_analysis.F (+10/-8)
Src/siesta_dicts.F90 (+3/-3)
Src/siesta_forces.F90 (+1/-1)
Src/siesta_init.F (+13/-12)
Src/siesta_tddft.F90 (+6/-6)
Src/state_init.F (+18/-10)
Src/ts_init.F90 (+8/-8)
Src/ts_kpoint_scf.F90 (+89/-0)
Src/wavefunctions.F90 (+333/-333)
Src/writewave.F (+2/-2)
Tests/Reference/si_coop_kp_file.out (+483/-0)
Tests/si_coop_kp_file/makefile (+7/-0)
Tests/si_coop_kp_file/si_coop_kp_file.KP.input (+6/-0)
Tests/si_coop_kp_file/si_coop_kp_file.fdf (+41/-0)
Tests/si_coop_kp_file/si_coop_kp_file.pseudos (+1/-0)
Util/COOP/Makefile (+106/-98)
Util/Denchar/Src/Makefile (+67/-62)
Util/Gen-basis/Makefile (+106/-98)
Util/Grimme/Makefile (+106/-98)
Util/Helpers/Makefile (+106/-98)
Util/STM/ol-stm/Src/Makefile (+106/-98)
Util/SpPivot/Makefile (+106/-98)
Util/TS/TBtrans/Makefile (+60/-56)
Util/TS/ts2ts/Makefile (+106/-98)
Util/TS/tshs2tshs/Makefile (+106/-98)
Util/VCA/Makefile (+106/-98)
Util/build_all.sh (+5/-3)
version.info (+1/-1)
To merge this branch: bzr merge lp:~nickpapior/siesta/trunk-k-file
Reviewer Review Type Date Requested Status
Alberto Garcia Approve
Review via email: mp+346849@code.launchpad.net

Commit message

Restructured k-point sampling

  Now k-points may be user-supplied for further finetuning.
  This may be extremely useful in various situations:
  1) Detailed analysis on PDOS for spin-orbit calculations
  2) Faster convergence with fewer k-points
  3) Improved convergence for bias calculations by adding zoom-in
     k-points in the bias-window.
  4) And others.

  Now the kpoints are associated with a type:
    kpoint_t
  this will allow one to read k-points using kgrid.File flag.
  The precedence is much like the older implementation:

  1) kgrid.MonkhorstPack
  2) kgrid.Cutoff
  3) kgrid.File

  in that order. If none are specified, then the Gamma-point will be used.

  This meant that several places the code needed updating.
  - Projected DOS k-points
  - TranSiesta k-points
  - SCF k-points

  Now all references to the kpoint_grid module is using kpoint_scf_m module
  which uses the type.
  This not only reduces lots of duplicated code, but it also allows
  one implementation to benefit across all code segments.

  Also added a test that reads in the k-points from a file (si_coop_kp_file).

Description of the change

This commit cleans up the k-point read utilities and enables user-defined k-grids.

I.e. SCF, PDOS and TS k-point reads are done using the same code.
Secondly, the k-points are now stored in a type which may be more easily passed around.

To post a comment you must log in.
lp:~nickpapior/siesta/trunk-k-file updated
700. By Nick Papior

Made some memory usages smaller.

701. By Nick Papior

Updated Makefiles in Util directories

Revision history for this message
Alberto Garcia (albertog) wrote :

Very good overall. Just a couple of points:

1. The documentation for the Kgrid.file format in the manual is missing the first (index) column.

2. Apart from the sum_i{weight_i} = 1 check for the contents of the user-provided file, it might be good to add a sanity check on the sampling quality. For example, simulate the integration over the whole BZ of a simple 3D periodic model function epsilon(k) of the type that comes out of a one-parameter tight-binding. If the function is f, Sum_i{f(k_i)} should be close to 0 if the average band position is at zero.

I have a patch for 1. above and two other minor comments in the code:

=== modified file 'Docs/siesta.tex'
--- Docs/siesta.tex 2018-05-24 19:58:35 +0000
+++ Docs/siesta.tex 2018-05-26 06:45:39 +0000
@@ -3474,14 +3474,14 @@
   An example input may be (not physically justified in any sense):
   \begin{shellexample}
     4
- 0.0 0.0 0.0 0.25
- 0.5 0.5 0,5 0.25
- 0.2 0.2 0,2 0.25
- 0.3 0.3 0,3 0.25
+ 1 0.0 0.0 0.0 0.25
+ 2 0.5 0.5 0,5 0.25
+ 3 0.2 0.2 0,2 0.25
+ 4 0.3 0.3 0,3 0.25
   \end{shellexample}
- The first 3 columns are the k-point specification for each of the
- reciprocal lattice vectors while the fourth number is the weight for
- the k-point.
+ The first column is an index; the next 3 columns are the k-point
+ specification for each of the reciprocal lattice vectors, and the
+ last number is the weight for the k-point.

   \siesta\ checks whether the sum of weights equals 1. If not,
   \siesta\ will die.

=== modified file 'Src/kpoint_pdos.F90'
--- Src/kpoint_pdos.F90 2018-05-24 19:58:35 +0000
+++ Src/kpoint_pdos.F90 2018-05-26 06:44:10 +0000
@@ -42,7 +42,7 @@
     if ( kpoints_pdos%method == K_METHOD_NONE ) then

       ! The user hasn't specified anything.
- ! This means that we will use the
+ ! This means that we will use the scf sampling grid
       call kpoint_delete(kpoints_pdos)
       call kpoint_read(kpoints_pdos, '', ucell, TrSym)

=== modified file 'Src/kpoint_t.F90'
--- Src/kpoint_t.F90 2018-05-24 19:58:35 +0000
+++ Src/kpoint_t.F90 2018-05-26 06:44:03 +0000
@@ -152,7 +152,7 @@
     call kpoint_fdf_name(prefix, 'kgrid.MonkhorstPack', name_fdf)
     if ( fdf_block(name_fdf, bfdf) ) then

- ! The method is a k-point grid
+ ! The method is a k-point MP grid
       this%method = K_METHOD_MONKHORST_PACK

       ! Now read data

review: Needs Fixing
Revision history for this message
Nick Papior (nickpapior) wrote :

Thanks for the comments!

I have just amended a fix for your comments.

As for your suggestion 2 it requires the epsilon(k) to be rotational invariant such that one can be sure that all irreducible wedges (for any crystal) will yield the correct result. Or, did you have something else in mind?

lp:~nickpapior/siesta/trunk-k-file updated
702. By Nick Papior

Fixed Alberto's suggestions (except point #2).

Amended documentation for the kgrid.File format.

Revision history for this message
Alberto Garcia (albertog) wrote :

OK. The sanity check with the model function could wait, and it should be optional in any case, since you might need a user-defined list of k-points for many things besides full sampling.

Approved.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Docs/siesta.tex'
--- Docs/siesta.tex 2018-05-15 13:01:22 +0000
+++ Docs/siesta.tex 2018-05-27 11:17:14 +0000
@@ -3397,37 +3397,9 @@
33973397
3398\subsection{\texorpdfstring{$k$}{k}-point sampling}3398\subsection{\texorpdfstring{$k$}{k}-point sampling}
33993399
3400These are options for the k-point grid used in the SCF cycle. For3400These are options for the $k$-point grid used in the SCF cycle. For
3401other specialized grids, see the Macroscopic Polarization and Density3401other specialized grids, see Secs.~\ref{sec:macroscopic-polarization}
3402of States sections.3402and \ref{sec:dos}.
3403
3404\begin{fdfentry}{kgrid!Cutoff}[length]<$0.\,\mathrm{Bohr}$>
3405
3406 Parameter which determines the fineness of the k-grid used for
3407 Brillouin zone sampling. It is half the length of the smallest
3408 lattice vector of the supercell required to obtain the same sampling
3409 precision with a single k point. Ref: Moreno and Soler, PRB 45,
3410 13891 (1992).
3411
3412 \textit{Use:} If it is zero, only the gamma point is used. The resulting
3413 k-grid is chosen in an optimal way, according to the method of Moreno
3414 and Soler (using an effective supercell which is as spherical as
3415 possible, thus minimizing the number of k-points for a given
3416 precision). The grid is displaced for even numbers of effective mesh
3417 divisions. This parameter is not used if \fdf{kgrid!MonkhorstPack}
3418 is specified. If the unit cell changes during the calculation (for
3419 example, in a cell-optimization run, the k-point
3420 grid will change accordingly (see \fdf{ChangeKgridInMD} for the case
3421 of variable-cell molecular-dynamics runs, such as Parrinello-Rahman).
3422 This is analogous to the changes in the
3423 real-space grid, whose fineness is specified by an energy cutoff. If
3424 sudden changes in the number of k-points are not desired, then the
3425 Monkhorst-Pack data block should be used instead. In this case there
3426 will be an implicit change in the quality of the sampling as the cell
3427 changes. Both methods should be equivalent for a well-converged
3428 sampling.
3429
3430\end{fdfentry}
34313403
3432\begin{fdfentry}{kgrid!MonkhorstPack}[block]<$\Gamma$-point>3404\begin{fdfentry}{kgrid!MonkhorstPack}[block]<$\Gamma$-point>
3433 3405
@@ -3464,6 +3436,59 @@
34643436
3465\end{fdfentry}3437\end{fdfentry}
34663438
3439\begin{fdfentry}{kgrid!Cutoff}[length]<$0.\,\mathrm{Bohr}$>
3440
3441 Parameter which determines the fineness of the $k$-grid used for
3442 Brillouin zone sampling. It is half the length of the smallest
3443 lattice vector of the supercell required to obtain the same sampling
3444 precision with a single k point. Ref: Moreno and Soler, PRB 45,
3445 13891 (1992).
3446
3447 \textit{Use:} If it is zero, only the gamma point is used. The resulting
3448 k-grid is chosen in an optimal way, according to the method of Moreno
3449 and Soler (using an effective supercell which is as spherical as
3450 possible, thus minimizing the number of k-points for a given
3451 precision). The grid is displaced for even numbers of effective mesh
3452 divisions. This parameter is not used if \fdf{kgrid!MonkhorstPack}
3453 is specified. If the unit cell changes during the calculation (for
3454 example, in a cell-optimization run, the k-point
3455 grid will change accordingly (see \fdf{ChangeKgridInMD} for the case
3456 of variable-cell molecular-dynamics runs, such as Parrinello-Rahman).
3457 This is analogous to the changes in the
3458 real-space grid, whose fineness is specified by an energy cutoff. If
3459 sudden changes in the number of k-points are not desired, then the
3460 Monkhorst-Pack data block should be used instead. In this case there
3461 will be an implicit change in the quality of the sampling as the cell
3462 changes. Both methods should be equivalent for a well-converged
3463 sampling.
3464
3465\end{fdfentry}
3466
3467\begin{fdfentry}{kgrid!File}[string]<none>
3468
3469 Specify a file from where the $k$-points are read in. The format of
3470 the file is identical to the \sysfile{KP} file with the exception
3471 that the $k$-points are given in units of the reciprocal lattice
3472 vectors. I.e. the range of the $k$-points are $]-1/2 ; 1/2]$.
3473
3474 An example input may be (not physically justified in any sense):
3475 \begin{shellexample}
3476 4
3477 1 0.0 0.0 0.0 0.25
3478 2 0.5 0.5 0.5 0.25
3479 3 0.2 0.2 0.2 0.25
3480 4 0.3 0.3 0.3 0.25
3481 \end{shellexample}
3482 The first integer specifies the total number of $k$-points in the
3483 file. The first column is an index; the next 3 columns are the
3484 $k$-point specification for each of the reciprocal lattice vectors
3485 while the fifth column is the weight for the $k$-point.
3486
3487 \siesta\ checks whether the sum of weights equals 1. If not,
3488 \siesta\ will die.
3489
3490\end{fdfentry}
3491
3467\begin{fdflogicalF}{ChangeKgridInMD}3492\begin{fdflogicalF}{ChangeKgridInMD}
34683493
3469 If \fdftrue, the $k$-point grid is recomputed at every3494 If \fdftrue, the $k$-point grid is recomputed at every
@@ -3870,8 +3895,8 @@
3870\fdf{SCF.H!Tolerance} and high values of \fdf{MeshCutoff}. We3895\fdf{SCF.H!Tolerance} and high values of \fdf{MeshCutoff}. We
3871encourage the user to test carefully these options for each system. An3896encourage the user to test carefully these options for each system. An
3872additional point to take into account is the mixing scheme3897additional point to take into account is the mixing scheme
3873employed. You are encouraged to use \fdf{SCF.Mix:hamiltonian}3898employed. You are encouraged to use \fdf{SCF.Mix:Hamiltonian}
3874(currently is set up by default) instead of density matrix mixing,3899(currently this is the default) instead of density matrix mixing,
3875since it speeds up the convergence. The pseudopotentials have to be3900since it speeds up the convergence. The pseudopotentials have to be
3876properly generated and tested for each specific system and they have3901properly generated and tested for each specific system and they have
3877to be in their fully relativistic form, together with the non-linear3902to be in their fully relativistic form, together with the non-linear
@@ -4040,14 +4065,17 @@
40404065
4041 \begin{fdfoptions}4066 \begin{fdfoptions}
4042 \option[Hamiltonian]%4067 \option[Hamiltonian]%
4068 \fdfindex*{SCF.Mix:Hamiltonian}%
4043 \index{SCF!mixing!Hamiltonian}4069 \index{SCF!mixing!Hamiltonian}
4044 Mix the Hamiltonian matrix (default).4070 Mix the Hamiltonian matrix (default).
40454071
4046 \option[density]%4072 \option[density]%
4073 \fdfindex*{SCF.Mix:density}%
4047 \index{SCF!mixing!Density}4074 \index{SCF!mixing!Density}
4048 Mix the density matrix.4075 Mix the density matrix.
40494076
4050 \option[charge]%4077 \option[charge]%
4078 \fdfindex*{SCF.Mix:charge}%
4051 \index{SCF!mixing!Charge}4079 \index{SCF!mixing!Charge}
4052 Mix the real-space charge density. Note this is an experimental4080 Mix the real-space charge density. Note this is an experimental
4053 feature.4081 feature.
@@ -7558,7 +7586,8 @@
75587586
75597587
75607588
7561\subsection{Densities of states}7589\subsection{Density of states}
7590\label{sec:dos}
75627591
7563\subsubsection{Total density of states}7592\subsubsection{Total density of states}
7564There are several options to obtain the7593There are several options to obtain the
@@ -8001,7 +8030,7 @@
80018030
80028031
8003\subsection{Macroscopic polarization}8032\subsection{Macroscopic polarization}
80048033\label{sec:macroscopic-polarization}
80058034
8006\begin{fdfentry}{PolarizationGrids}[block]8035\begin{fdfentry}{PolarizationGrids}[block]
8007 \index{bulk polarization}%8036 \index{bulk polarization}%
@@ -10533,18 +10562,20 @@
1053310562
10534\begin{fdfentry}{MD.TypeOfRun}[string]<TDED>10563\begin{fdfentry}{MD.TypeOfRun}[string]<TDED>
1053510564
10536A new Molecular Dynamics option, \fdf{TDED}, has been10565 A new Molecular Dynamics option, \fdf{TDED}, has been included. The
10537included. The second run of \siesta\ uses this option with the files10566 second run of \siesta\ uses this option with the files
10538\sysfile{TDWF} and \sysfile{TDXV} present in the working directory. In this option ions10567 \sysfile{TDWF} and \sysfile{TDXV} present in the working directory.
10539and electrons are assumed to move simultaneously. The occupied10568 In this option ions and electrons are assumed to move
10540electronic states are time-evolved instead of the usual SCF10569 simultaneously. The occupied electronic states are time-evolved
10541calculations in each step. Choose this option even if you intend to10570 instead of the usual SCF calculations in each step. Choose this
10542do only-electron dynamics. If you want to do an electron dynamics-only10571 option even if you intend to do only-electron dynamics. If you want
10543calculation set \fdf{MD.FinalTimeStep} equal to $1$. For optical10572 to do an electron dynamics-only calculation set
10544response calculations switch off the external field during the second10573 \fdf{MD.FinalTimeStep} equal to $1$. For optical response
10545run. The \fdf{MD.LengthTimeStep}, unlike in the standard MD simulation,10574 calculations switch off the external field during the second
10546is defined by mulitpilication of \fdf{TDED.TimeStep} and \fdf{TDED.Nsteps}.10575 run. The \fdf{MD.LengthTimeStep}, unlike in the standard MD
10547In TDDFT calculations, the user defined \fdf{MD.LengthTimeStep} is ignored.10576 simulation, is defined by mulitpilication of \fdf{TDED.TimeStep} and
10577 \fdf{TDED.Nsteps}. In TDDFT calculations, the user defined
10578 \fdf{MD.LengthTimeStep} is ignored.
1054810579
10549\end{fdfentry}10580\end{fdfentry}
1055010581
@@ -11535,6 +11566,34 @@
11535 11566
11536\end{fdflogicalF}11567\end{fdflogicalF}
1153711568
11569\subsection{\texorpdfstring{$k$}{k}-point sampling}
11570
11571The options for $k$-point sampling are identical to the \siesta\
11572options, \fdf{kgrid!MonkhorstPack}, \fdf{kgrid!Cutoff} or
11573\fdf{kgrid!File}.
11574
11575One may however use specific \tsiesta\ $k$-points by using these
11576options:
11577
11578\begin{fdfentry}{TS.kgrid!MonkhorstPack}[block]<\fdfvalue{kgrid!MonkhorstPack}>%
11579
11580 See \fdf{kgrid!MonkhorstPack} for details.
11581
11582\end{fdfentry}
11583
11584\begin{fdfentry}{TS.kgrid!Cutoff}[length]<$0.\,\mathrm{Bohr}$>
11585
11586 See \fdf{kgrid!Cutoff} for details.
11587
11588\end{fdfentry}
11589
11590\begin{fdfentry}{TS.kgrid!File}[string]<none>
11591
11592 See \fdf{kgrid!File} for details.
11593
11594\end{fdfentry}
11595
11596
11538\subsubsection{Algorithm specific options}11597\subsubsection{Algorithm specific options}
1153911598
11540These options adhere to the specific solution methods available for11599These options adhere to the specific solution methods available for
@@ -12576,7 +12635,7 @@
12576 \sysfile{TSDE}. This file also contains geometry information12635 \sysfile{TSDE}. This file also contains geometry information
12577 etc. needed by \tsiesta\ and \tbtrans.12636 etc. needed by \tsiesta\ and \tbtrans.
1257812637
12579 \item[\sysfile{TSKP}]: The $k$-points used in the \tsiesta\ calculation. See12638 \item[\sysfile{TS.KP}]: The $k$-points used in the \tsiesta\ calculation. See
12580 \siesta\ \sysfile{KP} file for formatting information.12639 \siesta\ \sysfile{KP} file for formatting information.
1258112640
12582 \item[\sysfile{TSCCEQ*}]: The equilibrium complex contour integration paths.12641 \item[\sysfile{TSCCEQ*}]: The equilibrium complex contour integration paths.
1258312642
=== modified file 'RELEASE_NOTES'
--- RELEASE_NOTES 2018-04-15 15:29:11 +0000
+++ RELEASE_NOTES 2018-05-27 11:17:14 +0000
@@ -18,6 +18,8 @@
1818
19*** New features19*** New features
2020
21 - Enabled custom k-points in PDOS and SCF calculations.
22
21 - Added the CheSS solver as a new solution method. This is23 - Added the CheSS solver as a new solution method. This is
22 a linear scaling solver which calculates the density matrix and the24 a linear scaling solver which calculates the density matrix and the
23 energy density matrix.25 energy density matrix.
2426
=== modified file 'Src/Makefile'
--- Src/Makefile 2018-05-15 13:01:22 +0000
+++ Src/Makefile 2018-05-27 11:17:14 +0000
@@ -103,9 +103,10 @@
103 savepsi.o shaper.o timer_tree.o timer.o \103 savepsi.o shaper.o timer_tree.o timer.o \
104 vmb.o vmat.o vmatsp.o volcel.o \104 vmb.o vmat.o vmatsp.o volcel.o \
105 cgvc.o cgvc_zmatrix.o m_convergence.o \105 cgvc.o cgvc_zmatrix.o m_convergence.o \
106 iocg.o ioeig.o iofa.o iokp.o iomd.o kpoint_pdos.o typecell.o \106 kpoint_t.o kpoint_scf.o kpoint_pdos.o \
107 iocg.o ioeig.o iofa.o iokp.o iomd.o typecell.o \
107 ofc.o poison.o readsp.o radfft.o \108 ofc.o poison.o readsp.o radfft.o \
108 write_md_record.o kpoint_grid.o find_kgrid.o proximity_check.o\109 write_md_record.o find_kgrid.o proximity_check.o\
109 state_init.o siesta_move.o setup_hamiltonian.o compute_dm.o mixer.o\110 state_init.o siesta_move.o setup_hamiltonian.o compute_dm.o mixer.o\
110 scfconvergence_test.o post_scf_work.o state_analysis.o write_subs.o \111 scfconvergence_test.o post_scf_work.o state_analysis.o write_subs.o \
111 siesta_init.o struct_init.o siesta_options.o read_options.o siesta_geom.o \112 siesta_init.o struct_init.o siesta_options.o read_options.o siesta_geom.o \
@@ -443,7 +444,7 @@
443OBJS += m_ts_io.o444OBJS += m_ts_io.o
444445
445# TranSIESTA...446# TranSIESTA...
446TS_OBJS= m_ts_global_vars.o m_ts_options.o m_ts_aux.o m_ts_kpoints.o \447TS_OBJS= m_ts_global_vars.o m_ts_options.o m_ts_aux.o ts_kpoint_scf.o \
447 m_ts_iodm.o \448 m_ts_iodm.o \
448 m_ts_electrode.o m_ts_gf.o \449 m_ts_electrode.o m_ts_gf.o \
449 m_ts_cctype.o ts_init.o ts_show_regions.o m_ts_electype.o \450 m_ts_cctype.o ts_init.o ts_show_regions.o m_ts_electype.o \
@@ -629,7 +630,7 @@
629class_TriMat.o: alloc.o intrinsic_missing.o630class_TriMat.o: alloc.o intrinsic_missing.o
630coceri.o: files.o periodic_table.o precision.o units.o631coceri.o: files.o periodic_table.o precision.o units.o
631compute_dm.o: atomlist.o class_SpData1D.o compute_ebs_shift.o diagon.o632compute_dm.o: atomlist.o class_SpData1D.o compute_ebs_shift.o diagon.o
632compute_dm.o: iodmhs_netcdf.o kpoint_grid.o m_chess.o m_dminim.o m_energies.o633compute_dm.o: iodmhs_netcdf.o kpoint_scf.o m_chess.o m_dminim.o m_energies.o
633compute_dm.o: m_eo.o m_gamma.o m_hsx.o m_pexsi_driver.o m_rmaxh.o m_spin.o634compute_dm.o: m_eo.o m_gamma.o m_hsx.o m_pexsi_driver.o m_rmaxh.o m_spin.o
634compute_dm.o: m_steps.o m_transiesta.o m_ts_global_vars.o m_zminim.o635compute_dm.o: m_steps.o m_transiesta.o m_ts_global_vars.o m_zminim.o
635compute_dm.o: normalize_dm.o ordern.o parallel.o precision.o siesta_geom.o636compute_dm.o: normalize_dm.o ordern.o parallel.o precision.o siesta_geom.o
@@ -656,7 +657,7 @@
656cranknic_evolg.o: m_matswinvers.o m_spin.o m_steps.o parallel.o parallelsubs.o657cranknic_evolg.o: m_matswinvers.o m_spin.o m_steps.o parallel.o parallelsubs.o
657cranknic_evolg.o: precision.o siesta_options.o sparse_matrices.o sys.o units.o658cranknic_evolg.o: precision.o siesta_options.o sparse_matrices.o sys.o units.o
658cranknic_evolg.o: wavefunctions.o659cranknic_evolg.o: wavefunctions.o
659cranknic_evolk.o: atomlist.o cranknic_evolg.o kpoint_grid.o m_energies.o m_eo.o660cranknic_evolk.o: atomlist.o cranknic_evolg.o kpoint_scf.o m_energies.o m_eo.o
660cranknic_evolk.o: m_spin.o parallel.o parallelsubs.o precision.o661cranknic_evolk.o: m_spin.o parallel.o parallelsubs.o precision.o
661cranknic_evolk.o: siesta_options.o sparse_matrices.o units.o wavefunctions.o662cranknic_evolk.o: siesta_options.o sparse_matrices.o units.o wavefunctions.o
662create_Sparsity_SC.o: class_Sparsity.o geom_helper.o intrinsic_missing.o663create_Sparsity_SC.o: class_Sparsity.o geom_helper.o intrinsic_missing.o
@@ -731,10 +732,10 @@
731final_H_f_stress.o: ldau.o ldau_specs.o m_dipol.o m_energies.o m_forces.o732final_H_f_stress.o: ldau.o ldau_specs.o m_dipol.o m_energies.o m_forces.o
732final_H_f_stress.o: m_gamma.o m_hsx.o m_mpi_utils.o m_ncdf_siesta.o m_ntm.o733final_H_f_stress.o: m_gamma.o m_hsx.o m_mpi_utils.o m_ncdf_siesta.o m_ntm.o
733final_H_f_stress.o: m_spin.o m_steps.o m_stress.o m_ts_global_vars.o m_ts_io.o734final_H_f_stress.o: m_spin.o m_steps.o m_stress.o m_ts_global_vars.o m_ts_io.o
734final_H_f_stress.o: m_ts_kpoints.o m_ts_options.o metaforce.o735final_H_f_stress.o: m_ts_options.o metaforce.o molecularmechanics.o naefs.o
735final_H_f_stress.o: molecularmechanics.o naefs.o nlefsm.o overfsm.o parallel.o736final_H_f_stress.o: nlefsm.o overfsm.o parallel.o siesta_geom.o
736final_H_f_stress.o: siesta_geom.o siesta_options.o sparse_matrices.o737final_H_f_stress.o: siesta_options.o sparse_matrices.o spinorbit.o sys.o
737final_H_f_stress.o: spinorbit.o sys.o units.o738final_H_f_stress.o: ts_kpoint_scf.o units.o
738find_kgrid.o: alloc.o minvec.o parallel.o precision.o units.o739find_kgrid.o: alloc.o minvec.o parallel.o precision.o units.o
739fire_optim.o: alloc.o m_fire.o m_mpi_utils.o parallel.o precision.o740fire_optim.o: alloc.o m_fire.o m_mpi_utils.o parallel.o precision.o
740fire_optim.o: siesta_options.o units.o741fire_optim.o: siesta_options.o units.o
@@ -785,10 +786,10 @@
785kinefsm.o: alloc.o atmfuncs.o mneighb.o new_matel.o parallel.o parallelsubs.o786kinefsm.o: alloc.o atmfuncs.o mneighb.o new_matel.o parallel.o parallelsubs.o
786kinefsm.o: precision.o787kinefsm.o: precision.o
787kpoint_convert.o: precision.o sys.o units.o788kpoint_convert.o: precision.o sys.o units.o
788kpoint_grid.o: find_kgrid.o m_spin.o minvec.o parallel.o precision.o789kpoint_pdos.o: kpoint_t.o m_spin.o parallel.o precision.o siesta_options.o
789kpoint_grid.o: siesta_cml.o siesta_options.o sys.o units.o790kpoint_scf.o: kpoint_t.o m_spin.o parallel.o precision.o siesta_options.o
790kpoint_pdos.o: find_kgrid.o m_spin.o minvec.o parallel.o precision.o791kpoint_t.o: alloc.o files.o find_kgrid.o m_char.o m_io.o m_os.o minvec.o
791kpoint_pdos.o: siesta_options.o sys.o units.o792kpoint_t.o: parallel.o precision.o siesta_cml.o units.o
792ksv.o: alloc.o atmfuncs.o densematrix.o ksvinit.o parallel.o precision.o sys.o793ksv.o: alloc.o atmfuncs.o densematrix.o ksvinit.o parallel.o precision.o sys.o
793ksvinit.o: alloc.o parallel.o precision.o sys.o794ksvinit.o: alloc.o parallel.o precision.o sys.o
794ldau.o: alloc.o atm_types.o atmfuncs.o compute_max_diff.o ldau_specs.o795ldau.o: alloc.o atm_types.o atmfuncs.o compute_max_diff.o ldau_specs.o
@@ -798,7 +799,7 @@
798ldau_specs.o: basis_specs.o basis_types.o interpolation.o m_cite.o parallel.o799ldau_specs.o: basis_specs.o basis_types.o interpolation.o m_cite.o parallel.o
799ldau_specs.o: precision.o pseudopotential.o radial.o sys.o units.o800ldau_specs.o: precision.o pseudopotential.o radial.o sys.o units.o
800listsc.o: alloc.o801listsc.o: alloc.o
801local_DOS.o: atomlist.o dhscf.o diagon.o files.o kpoint_grid.o m_energies.o802local_DOS.o: atomlist.o dhscf.o diagon.o files.o kpoint_scf.o m_energies.o
802local_DOS.o: m_eo.o m_forces.o m_gamma.o m_ntm.o m_spin.o parallel.o803local_DOS.o: m_eo.o m_forces.o m_gamma.o m_ntm.o m_spin.o parallel.o
803local_DOS.o: siesta_geom.o siesta_options.o sparse_matrices.o sys.o804local_DOS.o: siesta_geom.o siesta_options.o sparse_matrices.o sys.o
804m_broyddj.o: alloc.o m_mpi_utils.o parallel.o precision.o sys.o805m_broyddj.o: alloc.o m_mpi_utils.o parallel.o precision.o sys.o
@@ -847,7 +848,7 @@
847m_hsx.o: atm_types.o atmfuncs.o atomlist.o files.o parallel.o parallelsubs.o848m_hsx.o: atm_types.o atmfuncs.o atomlist.o files.o parallel.o parallelsubs.o
848m_hsx.o: precision.o siesta_geom.o sys.o849m_hsx.o: precision.o siesta_geom.o sys.o
849m_initwf.o: alloc.o atomlist.o densematrix.o diag.o diag_option.o fermid.o850m_initwf.o: alloc.o atomlist.o densematrix.o diag.o diag_option.o fermid.o
850m_initwf.o: kpoint_grid.o m_eo.o m_gamma.o m_memory.o m_spin.o parallel.o851m_initwf.o: kpoint_scf.o m_eo.o m_gamma.o m_memory.o m_spin.o parallel.o
851m_initwf.o: parallelsubs.o precision.o sparse_matrices.o sys.o wavefunctions.o852m_initwf.o: parallelsubs.o precision.o sparse_matrices.o sys.o wavefunctions.o
852m_integrate.o: precision.o853m_integrate.o: precision.o
853m_inversemm.o: precision.o854m_inversemm.o: precision.o
@@ -879,10 +880,10 @@
879m_ncdf_io.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o880m_ncdf_io.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o
880m_ncdf_io.o: class_Sparsity.o m_io_s.o parallel.o precision.o881m_ncdf_io.o: class_Sparsity.o m_io_s.o parallel.o precision.o
881m_ncdf_siesta.o: atm_types.o atmparams.o atomlist.o class_Sparsity.o files.o882m_ncdf_siesta.o: atm_types.o atmparams.o atomlist.o class_Sparsity.o files.o
882m_ncdf_siesta.o: kpoint_grid.o m_energies.o m_forces.o m_gamma.o m_kinetic.o883m_ncdf_siesta.o: kpoint_scf.o m_energies.o m_forces.o m_gamma.o m_kinetic.o
883m_ncdf_siesta.o: m_ncdf_io.o m_ntm.o m_spin.o m_stress.o m_ts_electype.o884m_ncdf_siesta.o: m_ncdf_io.o m_ntm.o m_spin.o m_stress.o m_ts_electype.o
884m_ncdf_siesta.o: m_ts_kpoints.o m_ts_options.o parallel.o precision.o radial.o885m_ncdf_siesta.o: m_ts_options.o parallel.o precision.o radial.o siesta_geom.o
885m_ncdf_siesta.o: siesta_geom.o siesta_options.o sparse_matrices.o timestamp.o886m_ncdf_siesta.o: siesta_options.o sparse_matrices.o timestamp.o ts_kpoint_scf.o
886m_new_dm.o: alloc.o atomlist.o class_Data2D.o class_Fstack_Data1D.o887m_new_dm.o: alloc.o atomlist.o class_Data2D.o class_Fstack_Data1D.o
887m_new_dm.o: class_Fstack_Pair_Geometry_SpData2D.o class_Geometry.o888m_new_dm.o: class_Fstack_Pair_Geometry_SpData2D.o class_Geometry.o
888m_new_dm.o: class_OrbitalDistribution.o class_Pair_Geometry_SpData2D.o889m_new_dm.o: class_OrbitalDistribution.o class_Pair_Geometry_SpData2D.o
@@ -946,9 +947,9 @@
946m_transiesta.o: class_SpData2D.o class_Sparsity.o files.o m_interpolate.o947m_transiesta.o: class_SpData2D.o class_Sparsity.o files.o m_interpolate.o
947m_transiesta.o: m_ts_charge.o m_ts_contour_eq.o m_ts_contour_neq.o948m_transiesta.o: m_ts_charge.o m_ts_contour_eq.o m_ts_contour_neq.o
948m_transiesta.o: m_ts_electype.o m_ts_fullg.o m_ts_fullk.o m_ts_gf.o949m_transiesta.o: m_ts_electype.o m_ts_fullg.o m_ts_fullk.o m_ts_gf.o
949m_transiesta.o: m_ts_kpoints.o m_ts_method.o m_ts_mumpsg.o m_ts_mumpsk.o950m_transiesta.o: m_ts_method.o m_ts_mumpsg.o m_ts_mumpsk.o m_ts_options.o
950m_transiesta.o: m_ts_options.o m_ts_sparse.o m_ts_tri_common.o m_ts_tri_init.o951m_transiesta.o: m_ts_sparse.o m_ts_tri_common.o m_ts_tri_init.o m_ts_trig.o
951m_transiesta.o: m_ts_trig.o m_ts_trik.o parallel.o precision.o units.o952m_transiesta.o: m_ts_trik.o parallel.o precision.o ts_kpoint_scf.o units.o
952m_trialorbitalclass.o: precision.o units.o953m_trialorbitalclass.o: precision.o units.o
953m_trimat_invert.o: class_TriMat.o intrinsic_missing.o m_pivot_array.o954m_trimat_invert.o: class_TriMat.o intrinsic_missing.o m_pivot_array.o
954m_trimat_invert.o: precision.o955m_trimat_invert.o: precision.o
@@ -1001,9 +1002,9 @@
1001m_ts_fullk.o: class_SpData2D.o class_SpData2D.o class_Sparsity.o m_iterator.o1002m_ts_fullk.o: class_SpData2D.o class_SpData2D.o class_Sparsity.o m_iterator.o
1002m_ts_fullk.o: m_ts_cctype.o m_ts_contour_eq.o m_ts_contour_neq.o m_ts_debug.o1003m_ts_fullk.o: m_ts_cctype.o m_ts_contour_eq.o m_ts_contour_neq.o m_ts_debug.o
1003m_ts_fullk.o: m_ts_dm_update.o m_ts_elec_se.o m_ts_electype.o m_ts_full_scat.o1004m_ts_fullk.o: m_ts_dm_update.o m_ts_elec_se.o m_ts_electype.o m_ts_full_scat.o
1004m_ts_fullk.o: m_ts_gf.o m_ts_kpoints.o m_ts_method.o m_ts_options.o1005m_ts_fullk.o: m_ts_gf.o m_ts_method.o m_ts_options.o m_ts_sparse.o
1005m_ts_fullk.o: m_ts_sparse.o m_ts_sparse_helper.o m_ts_weight.o parallel.o1006m_ts_fullk.o: m_ts_sparse_helper.o m_ts_weight.o parallel.o precision.o
1006m_ts_fullk.o: precision.o units.o1007m_ts_fullk.o: ts_kpoint_scf.o units.o
1007m_ts_gf.o: m_os.o m_ts_cctype.o m_ts_contour_eq.o m_ts_contour_neq.o1008m_ts_gf.o: m_os.o m_ts_cctype.o m_ts_contour_eq.o m_ts_contour_neq.o
1008m_ts_gf.o: m_ts_electrode.o m_ts_electype.o parallel.o precision.o sys.o1009m_ts_gf.o: m_ts_electrode.o m_ts_electype.o parallel.o precision.o sys.o
1009m_ts_gf.o: units.o1010m_ts_gf.o: units.o
@@ -1017,9 +1018,6 @@
1017m_ts_io_ctype.o: m_io.o parallel.o precision.o units.o1018m_ts_io_ctype.o: m_io.o parallel.o precision.o units.o
1018m_ts_iodm.o: class_OrbitalDistribution.o class_SpData2D.o class_Sparsity.o1019m_ts_iodm.o: class_OrbitalDistribution.o class_SpData2D.o class_Sparsity.o
1019m_ts_iodm.o: m_io_s.o m_os.o parallel.o precision.o1020m_ts_iodm.o: m_io_s.o m_os.o parallel.o precision.o
1020m_ts_kpoints.o: files.o find_kgrid.o kpoint_grid.o m_ts_global_vars.o
1021m_ts_kpoints.o: m_ts_tdir.o minvec.o parallel.o precision.o siesta_cml.o
1022m_ts_kpoints.o: siesta_options.o sys.o
1023m_ts_method.o: alloc.o fdf_extra.o geom_helper.o m_region.o m_ts_electype.o1021m_ts_method.o: alloc.o fdf_extra.o geom_helper.o m_region.o m_ts_electype.o
1024m_ts_mumps_init.o: class_OrbitalDistribution.o class_Sparsity.o1022m_ts_mumps_init.o: class_OrbitalDistribution.o class_Sparsity.o
1025m_ts_mumps_init.o: create_Sparsity_Union.o m_ts_electype.o m_ts_method.o1023m_ts_mumps_init.o: create_Sparsity_Union.o m_ts_electype.o m_ts_method.o
@@ -1036,10 +1034,10 @@
1036m_ts_mumpsk.o: class_SpData2D.o class_SpData2D.o class_Sparsity.o1034m_ts_mumpsk.o: class_SpData2D.o class_SpData2D.o class_Sparsity.o
1037m_ts_mumpsk.o: intrinsic_missing.o m_iterator.o m_ts_cctype.o m_ts_contour_eq.o1035m_ts_mumpsk.o: intrinsic_missing.o m_iterator.o m_ts_cctype.o m_ts_contour_eq.o
1038m_ts_mumpsk.o: m_ts_contour_neq.o m_ts_debug.o m_ts_dm_update.o m_ts_elec_se.o1036m_ts_mumpsk.o: m_ts_contour_neq.o m_ts_debug.o m_ts_dm_update.o m_ts_elec_se.o
1039m_ts_mumpsk.o: m_ts_electype.o m_ts_gf.o m_ts_kpoints.o m_ts_method.o1037m_ts_mumpsk.o: m_ts_electype.o m_ts_gf.o m_ts_method.o m_ts_mumps_init.o
1040m_ts_mumpsk.o: m_ts_mumps_init.o m_ts_mumps_scat.o m_ts_options.o m_ts_sparse.o1038m_ts_mumpsk.o: m_ts_mumps_scat.o m_ts_options.o m_ts_sparse.o
1041m_ts_mumpsk.o: m_ts_sparse_helper.o m_ts_weight.o parallel.o precision.o1039m_ts_mumpsk.o: m_ts_sparse_helper.o m_ts_weight.o parallel.o precision.o
1042m_ts_mumpsk.o: units.o1040m_ts_mumpsk.o: ts_kpoint_scf.o units.o
1043m_ts_options.o: files.o intrinsic_missing.o m_mixing.o m_mixing_scf.o m_os.o1041m_ts_options.o: files.o intrinsic_missing.o m_mixing.o m_mixing_scf.o m_os.o
1044m_ts_options.o: m_ts_charge.o m_ts_chem_pot.o m_ts_contour.o m_ts_contour_eq.o1042m_ts_options.o: m_ts_charge.o m_ts_chem_pot.o m_ts_contour.o m_ts_contour_eq.o
1045m_ts_options.o: m_ts_contour_neq.o m_ts_electype.o m_ts_global_vars.o1043m_ts_options.o: m_ts_contour_neq.o m_ts_electype.o m_ts_global_vars.o
@@ -1084,10 +1082,10 @@
1084m_ts_trik.o: m_iterator.o m_mat_invert.o m_region.o m_trimat_invert.o1082m_ts_trik.o: m_iterator.o m_mat_invert.o m_region.o m_trimat_invert.o
1085m_ts_trik.o: m_ts_cctype.o m_ts_charge.o m_ts_contour_eq.o m_ts_contour_neq.o1083m_ts_trik.o: m_ts_cctype.o m_ts_charge.o m_ts_contour_eq.o m_ts_contour_neq.o
1086m_ts_trik.o: m_ts_debug.o m_ts_dm_update.o m_ts_elec_se.o m_ts_electype.o1084m_ts_trik.o: m_ts_debug.o m_ts_dm_update.o m_ts_elec_se.o m_ts_electype.o
1087m_ts_trik.o: m_ts_gf.o m_ts_kpoints.o m_ts_method.o m_ts_options.o1085m_ts_trik.o: m_ts_gf.o m_ts_method.o m_ts_options.o m_ts_sparse.o
1088m_ts_trik.o: m_ts_sparse.o m_ts_sparse_helper.o m_ts_tri_common.o1086m_ts_trik.o: m_ts_sparse_helper.o m_ts_tri_common.o m_ts_tri_init.o
1089m_ts_trik.o: m_ts_tri_init.o m_ts_tri_scat.o m_ts_trimat_invert.o m_ts_weight.o1087m_ts_trik.o: m_ts_tri_scat.o m_ts_trimat_invert.o m_ts_weight.o parallel.o
1090m_ts_trik.o: parallel.o precision.o units.o1088m_ts_trik.o: precision.o ts_kpoint_scf.o units.o
1091m_ts_trimat_invert.o: class_TriMat.o m_pivot_array.o m_region.o1089m_ts_trimat_invert.o: class_TriMat.o m_pivot_array.o m_region.o
1092m_ts_trimat_invert.o: m_trimat_invert.o m_ts_electype.o m_ts_method.o1090m_ts_trimat_invert.o: m_trimat_invert.o m_ts_electype.o m_ts_method.o
1093m_ts_trimat_invert.o: precision.o1091m_ts_trimat_invert.o: precision.o
@@ -1175,16 +1173,16 @@
1175poison.o: alloc.o cellsubs.o chkgmx.o fft.o parallel.o precision.o sys.o1173poison.o: alloc.o cellsubs.o chkgmx.o fft.o parallel.o precision.o sys.o
1176post_scf_work.o: atomlist.o class_Fstack_Pair_Geometry_SpData2D.o1174post_scf_work.o: atomlist.o class_Fstack_Pair_Geometry_SpData2D.o
1177post_scf_work.o: class_Geometry.o class_Pair_Geometry_SpData2D.o compute_dm.o1175post_scf_work.o: class_Geometry.o class_Pair_Geometry_SpData2D.o compute_dm.o
1178post_scf_work.o: diagon.o final_H_f_stress.o kpoint_grid.o m_dminim.o1176post_scf_work.o: diagon.o final_H_f_stress.o kpoint_scf.o m_dminim.o
1179post_scf_work.o: m_energies.o m_eo.o m_gamma.o m_spin.o m_steps.o m_zminim.o1177post_scf_work.o: m_energies.o m_eo.o m_gamma.o m_spin.o m_steps.o m_zminim.o
1180post_scf_work.o: mneighb.o parallel.o siesta_geom.o siesta_options.o1178post_scf_work.o: mneighb.o parallel.o siesta_geom.o siesta_options.o
1181post_scf_work.o: sparse_matrices.o1179post_scf_work.o: sparse_matrices.o
1182print_spin.o: atomlist.o m_mpi_utils.o m_spin.o parallel.o precision.o1180print_spin.o: atomlist.o m_mpi_utils.o m_spin.o parallel.o precision.o
1183print_spin.o: siesta_cml.o sparse_matrices.o1181print_spin.o: siesta_cml.o sparse_matrices.o
1184printmatrix.o: alloc.o1182printmatrix.o: alloc.o
1185projected_DOS.o: alloc.o atomlist.o kpoint_grid.o kpoint_pdos.o m_eo.o1183projected_DOS.o: alloc.o atomlist.o kpoint_pdos.o kpoint_scf.o m_eo.o m_gamma.o
1186projected_DOS.o: m_gamma.o m_spin.o parallel.o precision.o siesta_geom.o1184projected_DOS.o: m_spin.o parallel.o precision.o siesta_geom.o siesta_options.o
1187projected_DOS.o: siesta_options.o sparse_matrices.o sys.o units.o1185projected_DOS.o: sparse_matrices.o sys.o units.o
1188propor.o: precision.o sys.o1186propor.o: precision.o sys.o
1189proximity_check.o: chemical.o m_ts_global_vars.o mneighb.o parallel.o1187proximity_check.o: chemical.o m_ts_global_vars.o mneighb.o parallel.o
1190proximity_check.o: precision.o siesta_geom.o siesta_options.o units.o1188proximity_check.o: precision.o siesta_geom.o siesta_options.o units.o
@@ -1213,7 +1211,7 @@
1213rhoofd.o: meshdscf.o meshphi.o parallel.o parallelsubs.o precision.o sys.o1211rhoofd.o: meshdscf.o meshphi.o parallel.o parallelsubs.o precision.o sys.o
1214rhoofdsp.o: alloc.o atm_types.o atmfuncs.o atomlist.o listsc.o mesh.o1212rhoofdsp.o: alloc.o atm_types.o atmfuncs.o atomlist.o listsc.o mesh.o
1215rhoofdsp.o: meshdscf.o meshphi.o precision.o sys.o1213rhoofdsp.o: meshdscf.o meshphi.o precision.o sys.o
1216sankey_change_basis.o: alloc.o atomlist.o diag_option.o kpoint_grid.o m_gamma.o1214sankey_change_basis.o: alloc.o atomlist.o diag_option.o kpoint_scf.o m_gamma.o
1217sankey_change_basis.o: m_matdiag.o m_spin.o parallel.o parallelsubs.o1215sankey_change_basis.o: m_matdiag.o m_spin.o parallel.o parallelsubs.o
1218sankey_change_basis.o: precision.o sparse_matrices.o sys.o wavefunctions.o1216sankey_change_basis.o: precision.o sparse_matrices.o sys.o wavefunctions.o
1219save_density_matrix.o: atomlist.o files.o iodm_netcdf.o m_energies.o m_iodm.o1217save_density_matrix.o: atomlist.o files.o iodm_netcdf.o m_energies.o m_iodm.o
@@ -1249,7 +1247,7 @@
1249siesta2wannier90.o: files.o m_digest_nnkp.o m_spin.o m_trialorbitalclass.o1247siesta2wannier90.o: files.o m_digest_nnkp.o m_spin.o m_trialorbitalclass.o
1250siesta2wannier90.o: parallel.o precision.o siesta_options.o sys.o1248siesta2wannier90.o: parallel.o precision.o siesta_options.o sys.o
1251siesta_analysis.o: alloc.o atomlist.o bands.o basis_enthalpy.o dhscf.o files.o1249siesta_analysis.o: alloc.o atomlist.o bands.o basis_enthalpy.o dhscf.o files.o
1252siesta_analysis.o: flook_siesta.o kpoint_grid.o ksv.o ksvinit.o local_DOS.o1250siesta_analysis.o: flook_siesta.o kpoint_scf.o ksv.o ksvinit.o local_DOS.o
1253siesta_analysis.o: m_dipol.o m_energies.o m_eo.o m_forces.o m_gamma.o1251siesta_analysis.o: m_dipol.o m_energies.o m_eo.o m_forces.o m_gamma.o
1254siesta_analysis.o: m_iodm_old.o m_mpi_utils.o m_ntm.o m_partial_charges.o1252siesta_analysis.o: m_iodm_old.o m_mpi_utils.o m_ntm.o m_partial_charges.o
1255siesta_analysis.o: m_pexsi_dos.o m_pexsi_local_dos.o m_spin.o m_steps.o1253siesta_analysis.o: m_pexsi_dos.o m_pexsi_local_dos.o m_spin.o m_steps.o
@@ -1258,7 +1256,7 @@
1258siesta_analysis.o: write_subs.o writewave.o zmatrix.o1256siesta_analysis.o: write_subs.o writewave.o zmatrix.o
1259siesta_cmlsubs.o: files.o m_uuid.o parallel.o siesta_cml.o timestamp.o1257siesta_cmlsubs.o: files.o m_uuid.o parallel.o siesta_cml.o timestamp.o
1260siesta_cmlsubs.o: 1258siesta_cmlsubs.o:
1261siesta_dicts.o: atomlist.o files.o kpoint_grid.o m_energies.o m_forces.o1259siesta_dicts.o: atomlist.o files.o kpoint_scf.o m_energies.o m_forces.o
1262siesta_dicts.o: m_mixing_scf.o m_steps.o m_stress.o precision.o siesta_geom.o1260siesta_dicts.o: m_mixing_scf.o m_steps.o m_stress.o precision.o siesta_geom.o
1263siesta_dicts.o: siesta_options.o1261siesta_dicts.o: siesta_options.o
1264siesta_end.o: alloc.o bands.o densematrix.o diag.o extrae_eventllist.o1262siesta_end.o: alloc.o bands.o densematrix.o diag.o extrae_eventllist.o
@@ -1269,7 +1267,7 @@
1269siesta_forces.o: atomlist.o class_Fstack_Data1D.o class_SpData2D.o compute_dm.o1267siesta_forces.o: atomlist.o class_Fstack_Data1D.o class_SpData2D.o compute_dm.o
1270siesta_forces.o: compute_energies.o compute_max_diff.o densematrix.o1268siesta_forces.o: compute_energies.o compute_max_diff.o densematrix.o
1271siesta_forces.o: dm_charge.o files.o final_H_f_stress.o flook_siesta.o1269siesta_forces.o: dm_charge.o files.o final_H_f_stress.o flook_siesta.o
1272siesta_forces.o: kpoint_grid.o m_check_walltime.o m_convergence.o m_energies.o1270siesta_forces.o: kpoint_scf.o m_check_walltime.o m_convergence.o m_energies.o
1273siesta_forces.o: m_forces.o m_initwf.o m_iodm_old.o m_mixing.o m_mixing_scf.o1271siesta_forces.o: m_forces.o m_initwf.o m_iodm_old.o m_mixing.o m_mixing_scf.o
1274siesta_forces.o: m_mpi_utils.o m_ncdf_siesta.o m_pexsi.o m_pexsi_driver.o1272siesta_forces.o: m_mpi_utils.o m_ncdf_siesta.o m_pexsi.o m_pexsi_driver.o
1275siesta_forces.o: m_rhog.o m_spin.o m_steps.o m_stress.o m_transiesta.o1273siesta_forces.o: m_rhog.o m_spin.o m_steps.o m_stress.o m_transiesta.o
@@ -1283,8 +1281,8 @@
1283siesta_geom.o: precision.o1281siesta_geom.o: precision.o
1284siesta_init.o: alloc.o atomlist.o bands.o bsc_xcmod.o1282siesta_init.o: alloc.o atomlist.o bands.o bsc_xcmod.o
1285siesta_init.o: class_Fstack_Pair_Geometry_SpData2D.o densematrix.o1283siesta_init.o: class_Fstack_Pair_Geometry_SpData2D.o densematrix.o
1286siesta_init.o: diag_option.o files.o flook_siesta.o ioxv.o kpoint_grid.o1284siesta_init.o: diag_option.o files.o flook_siesta.o ioxv.o kpoint_pdos.o
1287siesta_init.o: kpoint_pdos.o ksvinit.o m_check_walltime.o m_cite.o m_energies.o1285siesta_init.o: kpoint_scf.o ksvinit.o m_check_walltime.o m_cite.o m_energies.o
1288siesta_init.o: m_eo.o m_fixed.o m_forces.o m_gamma.o m_iostruct.o m_mpi_utils.o1286siesta_init.o: m_eo.o m_fixed.o m_forces.o m_gamma.o m_iostruct.o m_mpi_utils.o
1289siesta_init.o: m_new_dm.o m_rmaxh.o m_spin.o m_steps.o m_supercell.o m_timer.o1287siesta_init.o: m_new_dm.o m_rmaxh.o m_spin.o m_steps.o m_supercell.o m_timer.o
1290siesta_init.o: m_wallclock.o metaforce.o molecularmechanics.o object_debug.o1288siesta_init.o: m_wallclock.o metaforce.o molecularmechanics.o object_debug.o
@@ -1301,7 +1299,7 @@
1301siesta_move.o: siesta_master.o siesta_options.o sys.o units.o write_subs.o1299siesta_move.o: siesta_master.o siesta_options.o sys.o units.o write_subs.o
1302siesta_move.o: zm_broyden_optim.o zm_fire_optim.o zmatrix.o1300siesta_move.o: zm_broyden_optim.o zm_fire_optim.o zmatrix.o
1303siesta_tddft.o: alloc.o atomlist.o compute_energies.o final_H_f_stress.o1301siesta_tddft.o: alloc.o atomlist.o compute_energies.o final_H_f_stress.o
1304siesta_tddft.o: kpoint_grid.o m_energies.o m_eo.o m_evolve.o m_gamma.o1302siesta_tddft.o: kpoint_scf.o m_energies.o m_eo.o m_evolve.o m_gamma.o
1305siesta_tddft.o: m_initwf.o m_iotddft.o m_mpi_utils.o m_spin.o m_steps.o1303siesta_tddft.o: m_initwf.o m_iotddft.o m_mpi_utils.o m_spin.o m_steps.o
1306siesta_tddft.o: overfsm.o parallel.o precision.o sankey_change_basis.o1304siesta_tddft.o: overfsm.o parallel.o precision.o sankey_change_basis.o
1307siesta_tddft.o: setup_H0.o setup_hamiltonian.o siesta_cml.o siesta_options.o1305siesta_tddft.o: setup_H0.o setup_hamiltonian.o siesta_cml.o siesta_options.o
@@ -1323,16 +1321,16 @@
1323state_init.o: alloc.o atomlist.o class_Data2D.o class_SpData1D.o1321state_init.o: alloc.o atomlist.o class_Data2D.o class_SpData1D.o
1324state_init.o: class_SpData2D.o class_SpData2D.o class_Sparsity.o1322state_init.o: class_SpData2D.o class_SpData2D.o class_Sparsity.o
1325state_init.o: create_Sparsity_SC.o domain_decom.o files.o hsparse.o1323state_init.o: create_Sparsity_SC.o domain_decom.o files.o hsparse.o
1326state_init.o: iodm_netcdf.o iodmhs_netcdf.o iotdxv.o ioxv.o kpoint_grid.o1324state_init.o: iodm_netcdf.o iodmhs_netcdf.o iotdxv.o ioxv.o kpoint_scf.o
1327state_init.o: ldau_specs.o m_chess.o m_energies.o m_eo.o m_gamma.o m_mixing.o1325state_init.o: kpoint_t.o ldau_specs.o m_chess.o m_energies.o m_eo.o m_gamma.o
1328state_init.o: m_mixing_scf.o m_mpi_utils.o m_new_dm.o m_os.o m_pivot_methods.o1326state_init.o: m_mixing.o m_mixing_scf.o m_mpi_utils.o m_new_dm.o m_os.o
1329state_init.o: m_rmaxh.o m_sparse.o m_sparsity_handling.o m_spin.o m_steps.o1327state_init.o: m_pivot_methods.o m_rmaxh.o m_sparse.o m_sparsity_handling.o
1330state_init.o: m_supercell.o m_test_io.o m_ts_charge.o m_ts_electype.o1328state_init.o: m_spin.o m_steps.o m_supercell.o m_test_io.o m_ts_charge.o
1331state_init.o: m_ts_global_vars.o m_ts_io.o m_ts_kpoints.o m_ts_options.o1329state_init.o: m_ts_electype.o m_ts_global_vars.o m_ts_io.o m_ts_options.o
1332state_init.o: m_ts_sparse.o m_ts_tri_init.o normalize_dm.o overlap.o parallel.o1330state_init.o: m_ts_sparse.o m_ts_tri_init.o normalize_dm.o overlap.o parallel.o
1333state_init.o: proximity_check.o siesta_cml.o siesta_dicts.o siesta_geom.o1331state_init.o: proximity_check.o siesta_cml.o siesta_dicts.o siesta_geom.o
1334state_init.o: siesta_options.o sparse_matrices.o sys.o units.o write_subs.o1332state_init.o: siesta_options.o sparse_matrices.o sys.o ts_kpoint_scf.o units.o
1335state_init.o: zmatrix.o1333state_init.o: write_subs.o zmatrix.o
1336struct_init.o: alloc.o atmfuncs.o atomlist.o files.o iotdxv.o ioxv.o1334struct_init.o: alloc.o atmfuncs.o atomlist.o files.o iotdxv.o ioxv.o
1337struct_init.o: m_exp_coord.o m_iostruct.o m_mpi_utils.o m_steps.o parallel.o1335struct_init.o: m_exp_coord.o m_iostruct.o m_mpi_utils.o m_steps.o parallel.o
1338struct_init.o: periodic_table.o siesta_cml.o siesta_geom.o siesta_master.o1336struct_init.o: periodic_table.o siesta_cml.o siesta_geom.o siesta_master.o
@@ -1342,9 +1340,12 @@
1342timer.o: timer_tree.o1340timer.o: timer_tree.o
1343timer_tree.o: m_walltime.o1341timer_tree.o: m_walltime.o
1344transition_rate.o: alloc.o fermid.o parallel.o parallelsubs.o precision.o sys.o1342transition_rate.o: alloc.o fermid.o parallel.o parallelsubs.o precision.o sys.o
1345ts_init.o: m_fixed.o m_os.o m_ts_cctype.o m_ts_charge.o m_ts_electrode.o1343ts_init.o: kpoint_scf.o m_fixed.o m_os.o m_ts_cctype.o m_ts_charge.o
1346ts_init.o: m_ts_electype.o m_ts_gf.o m_ts_global_vars.o m_ts_kpoints.o1344ts_init.o: m_ts_electrode.o m_ts_electype.o m_ts_gf.o m_ts_global_vars.o
1347ts_init.o: m_ts_method.o m_ts_options.o parallel.o siesta_options.o1345ts_init.o: m_ts_method.o m_ts_options.o parallel.o siesta_options.o
1346ts_init.o: ts_kpoint_scf.o
1347ts_kpoint_scf.o: kpoint_t.o m_spin.o m_ts_global_vars.o m_ts_tdir.o parallel.o
1348ts_kpoint_scf.o: precision.o siesta_options.o
1348ts_show_regions.o: m_region.o m_ts_electype.o m_ts_method.o parallel.o1349ts_show_regions.o: m_region.o m_ts_electype.o m_ts_method.o parallel.o
1349ts_show_regions.o: precision.o units.o1350ts_show_regions.o: precision.o units.o
1350typecell.o: precision.o1351typecell.o: precision.o
@@ -1356,7 +1357,7 @@
1356vmatsp.o: alloc.o atm_types.o atmfuncs.o atomlist.o listsc.o mesh.o meshdscf.o1357vmatsp.o: alloc.o atm_types.o atmfuncs.o atomlist.o listsc.o mesh.o meshdscf.o
1357vmatsp.o: meshphi.o precision.o1358vmatsp.o: meshphi.o precision.o
1358vmb.o: m_fixed.o parallel.o precision.o sys.o1359vmb.o: m_fixed.o parallel.o precision.o sys.o
1359wavefunctions.o: atomlist.o kpoint_grid.o m_gamma.o m_matswinvers.o m_spin.o1360wavefunctions.o: atomlist.o kpoint_scf.o m_gamma.o m_matswinvers.o m_spin.o
1360wavefunctions.o: parallel.o parallelsubs.o precision.o sparse_matrices.o1361wavefunctions.o: parallel.o parallelsubs.o precision.o sparse_matrices.o
1361write_inp_wannier.o: alloc.o atmfuncs.o atomlist.o m_ntm.o m_orderbands.o1362write_inp_wannier.o: alloc.o atmfuncs.o atomlist.o m_ntm.o m_orderbands.o
1362write_inp_wannier.o: mneighb.o parallel.o parallelsubs.o precision.o1363write_inp_wannier.o: mneighb.o parallel.o parallelsubs.o precision.o
@@ -1370,7 +1371,7 @@
1370write_subs.o: m_steps.o m_stress.o m_ts_global_vars.o parallel.o precision.o1371write_subs.o: m_steps.o m_stress.o m_ts_global_vars.o parallel.o precision.o
1371write_subs.o: siesta_cml.o siesta_geom.o siesta_options.o units.o zmatrix.o1372write_subs.o: siesta_cml.o siesta_geom.o siesta_options.o units.o zmatrix.o
1372writewave.o: alloc.o atmfuncs.o atomlist.o densematrix.o diag.o diag_option.o1373writewave.o: alloc.o atmfuncs.o atomlist.o densematrix.o diag.o diag_option.o
1373writewave.o: get_kpoints_scale.o kpoint_grid.o m_spin.o parallel.o1374writewave.o: get_kpoints_scale.o kpoint_scf.o m_spin.o parallel.o
1374writewave.o: parallelsubs.o precision.o siesta_geom.o sys.o units.o1375writewave.o: parallelsubs.o precision.o siesta_geom.o sys.o units.o
1375xc.o: alloc.o bsc_xcmod.o precision.o sys.o1376xc.o: alloc.o bsc_xcmod.o precision.o sys.o
1376xml.o: precision.o1377xml.o: precision.o
@@ -1432,6 +1433,9 @@
1432diagmemory.o: memoryinfo.o1433diagmemory.o: memoryinfo.o
1433f90sockets.o: fsockets.o1434f90sockets.o: fsockets.o
1434fsiesta.o: fsiesta_sockets.o1435fsiesta.o: fsiesta_sockets.o
1436kpoint_pdos_m.o: kpoint_pdos.o
1437kpoint_scf_m.o: kpoint_scf.o
1438kpoint_t_m.o: kpoint_t.o
1435listsc_module.o: listsc.o1439listsc_module.o: listsc.o
1436m_bessph.o: bessph.o1440m_bessph.o: bessph.o
1437m_born_charge.o: born_charge.o1441m_born_charge.o: born_charge.o
@@ -1535,6 +1539,7 @@
1535t_spin.o: m_spin.o1539t_spin.o: m_spin.o
1536timer_options.o: timer.o1540timer_options.o: timer.o
1537trialorbitalclass.o: m_trialorbitalclass.o1541trialorbitalclass.o: m_trialorbitalclass.o
1542ts_kpoint_scf_m.o: ts_kpoint_scf.o
1538version_info.o: version.o1543version_info.o: version.o
1539write_subs_energies.o: write_subs.o1544write_subs_energies.o: write_subs.o
1540write_subs_positions.o: write_subs.o1545write_subs_positions.o: write_subs.o
15411546
=== modified file 'Src/compute_dm.F'
--- Src/compute_dm.F 2018-04-19 10:08:47 +0000
+++ Src/compute_dm.F 2018-05-27 11:17:14 +0000
@@ -23,7 +23,7 @@
23 use atomlist, only: qa, lasto, iphorb, iaorb, no_u, no_s, indxuo, 23 use atomlist, only: qa, lasto, iphorb, iaorb, no_u, no_s, indxuo,
24 & qtot, Qtots, no_l24 & qtot, Qtots, no_l
25 use sys, only: die, bye25 use sys, only: die, bye
26 use Kpoint_grid26 use kpoint_scf_m, only: kpoints_scf
27 use m_energies, only: Ebs, Ecorrec, Entropy, DE_NEGF27 use m_energies, only: Ebs, Ecorrec, Entropy, DE_NEGF
28 use m_energies, only: Ef, Efs28 use m_energies, only: Ef, Efs
29 use m_rmaxh29 use m_rmaxh
@@ -177,7 +177,8 @@
177 & no_l, maxnh, maxnh, no_u,177 & no_l, maxnh, maxnh, no_u,
178 & numh, listhptr, listh, numh, listhptr, listh, 178 & numh, listhptr, listh, numh, listhptr, listh,
179 & H, S, qtot, fixspin, qtots, temp, e1, e2,179 & H, S, qtot, fixspin, qtots, temp, e1, e2,
180 & gamma, xijo, indxuo, nkpnt, kpoint, kweight,180 & gamma, xijo, indxuo,
181 & kpoints_scf%N, kpoints_scf%k, kpoints_scf%w,
181 & eo, qo, Dscf, Escf, ef, efs, Entropy, no_u,182 & eo, qo, Dscf, Escf, ef, efs, Entropy, no_u,
182 & occtol, iscf, neigwanted)183 & occtol, iscf, neigwanted)
183 Ecorrec = 0.0_dp184 Ecorrec = 0.0_dp
@@ -204,8 +205,9 @@
204 else205 else
205 call zminim(.false., PreviousCallDiagon, iscf, istp, no_l,206 call zminim(.false., PreviousCallDiagon, iscf, istp, no_l,
206 & spin%H, no_u, maxnh, numh, listhptr, listh, Dscf,207 & spin%H, no_u, maxnh, numh, listhptr, listh, Dscf,
207 & eta, qtots, no_s, xijo, indxuo, nkpnt, kpoint,208 & eta, qtots, no_s, xijo, indxuo,
208 & kweight, H, S, H_kin)209 & kpoints_scf%N, kpoints_scf%k, kpoints_scf%w,
210 & H, S, H_kin)
209 end if211 end if
210 Ecorrec = 0.0_dp212 Ecorrec = 0.0_dp
211 Entropy = 0.0_dp213 Entropy = 0.0_dp
@@ -229,7 +231,8 @@
229 & no_l, maxnh, maxnh, no_u,231 & no_l, maxnh, maxnh, no_u,
230 & numh, listhptr, listh, numh, listhptr, listh,232 & numh, listhptr, listh, numh, listhptr, listh,
231 & H, S, qtot, fixspin, qtots, temp, e1, e2,233 & H, S, qtot, fixspin, qtots, temp, e1, e2,
232 & gamma, xijo, indxuo, nkpnt, kpoint, kweight,234 & gamma, xijo, indxuo,
235 & kpoints_scf%N, kpoints_scf%k, kpoints_scf%w,
233 & eo, qo, Dscf, Escf, ef, efs, Entropy, no_u,236 & eo, qo, Dscf, Escf, ef, efs, Entropy, no_u,
234 & occtol, iscf, neigwanted)237 & occtol, iscf, neigwanted)
235238
236239
=== modified file 'Src/cranknic_evolk.F90'
--- Src/cranknic_evolk.F90 2017-10-05 16:44:37 +0000
+++ Src/cranknic_evolk.F90 2018-05-27 11:17:14 +0000
@@ -32,7 +32,7 @@
32 USE sparse_matrices, ONLY: H, S, numh, listh, listhptr, xijo, Dscf32 USE sparse_matrices, ONLY: H, S, numh, listh, listhptr, xijo, Dscf
33 USE atomlist, ONLY: no_u, no_l, indxuo33 USE atomlist, ONLY: no_u, no_l, indxuo
34 USE m_spin, ONLY: nspin34 USE m_spin, ONLY: nspin
35 USE Kpoint_grid, ONLY: kpoint, nkpnt35 USE kpoint_scf_m, ONLY: kpoints_scf
36 USE wavefunctions, ONLY: compute_tddm, wavef_ms, complx_0, complx_136 USE wavefunctions, ONLY: compute_tddm, wavef_ms, complx_0, complx_1
37 USE m_energies, ONLY: etot 37 USE m_energies, ONLY: etot
38 USE m_eo, ONLY: qo, eo38 USE m_eo, ONLY: qo, eo
@@ -64,7 +64,7 @@
64 call timer( 'cn_evolk', 1)64 call timer( 'cn_evolk', 1)
65 ! 65 !
66 !66 !
67 DO ik = 1,nkpnt67 DO ik = 1,kpoints_scf%N
68 DO ispin =1,nspin68 DO ispin =1,nspin
69 call m_allocate ( Hauxms, no_u, no_u, m_storage)69 call m_allocate ( Hauxms, no_u, no_u, m_storage)
70 call m_allocate ( Sauxms, no_u, no_u, m_storage)70 call m_allocate ( Sauxms, no_u, no_u, m_storage)
@@ -76,8 +76,8 @@
76 ind = listhptr(i) + j76 ind = listhptr(i) + j
77 juo = listh(ind)77 juo = listh(ind)
78 jo = indxuo (juo)78 jo = indxuo (juo)
79 kxij = kpoint(1,ik)*xijo(1,ind) + kpoint(2,ik)*xijo(2,ind) + & 79 kxij = kpoints_scf%k(1,ik)*xijo(1,ind) + kpoints_scf%k(2,ik)*xijo(2,ind) + &
80 kpoint(3,ik)*xijo(3,ind)80 kpoints_scf%k(3,ik)*xijo(3,ind)
81 ckxij = cos(kxij)81 ckxij = cos(kxij)
82 skxij = -sin(kxij)82 skxij = -sin(kxij)
83 cvar1 = cmplx(H(ind,ispin)*ckxij,H(ind,ispin)*skxij,dp)83 cvar1 = cmplx(H(ind,ispin)*ckxij,H(ind,ispin)*skxij,dp)
@@ -132,7 +132,7 @@
132132
133 USE wavefunctions133 USE wavefunctions
134 USE m_spin, ONLY: nspin134 USE m_spin, ONLY: nspin
135 USE Kpoint_grid, ONLY: nkpnt135 USE kpoint_scf_m, ONLY: kpoints_scf
136 USE cranknic_evolg, ONLY: Uphi136 USE cranknic_evolg, ONLY: Uphi
137 USE atomlist, ONLY: no_u137 USE atomlist, ONLY: no_u
138 USE MatrixSwitch138 USE MatrixSwitch
@@ -165,14 +165,14 @@
165 ENDIF165 ENDIF
166 166
167 IF(extrapol_H_tdks) THEN167 IF(extrapol_H_tdks) THEN
168 ALLOCATE(firstimeK(nkpnt, nspin))168 ALLOCATE(firstimeK(kpoints_scf%N, nspin))
169 ALLOCATE(Hsave(nkpnt, nspin))169 ALLOCATE(Hsave(kpoints_scf%N, nspin))
170 DO i=1,nkpnt170 DO i=1,kpoints_scf%N
171 DO j=1,nspin171 DO j=1,nspin
172 call m_allocate (Hsave(i,j),no_u, no_u, m_storage) 172 call m_allocate (Hsave(i,j),no_u, no_u, m_storage)
173 END DO173 END DO
174 END DO174 END DO
175 firstimeK(1:nkpnt,1:nspin) = .true.175 firstimeK(1:kpoints_scf%N,1:nspin) = .true.
176 END IF176 END IF
177 177
178 firsttime = .false.178 firsttime = .false.
179179
=== modified file 'Src/final_H_f_stress.F'
--- Src/final_H_f_stress.F 2018-04-23 11:09:01 +0000
+++ Src/final_H_f_stress.F 2018-05-27 11:17:14 +0000
@@ -71,7 +71,7 @@
71 use files, only : label_length71 use files, only : label_length
72 use m_ts_global_vars, only : TSrun72 use m_ts_global_vars, only : TSrun
73 use m_ts_options, only : TS_HS_save73 use m_ts_options, only : TS_HS_save
74 use m_ts_kpoints, only : ts_Gamma, ts_kscell, ts_kdispl74 use ts_kpoint_scf_m, only: ts_kpoints_scf, ts_gamma_scf
75 use m_ts_io, only : ts_write_TSHS,fname_TSHS, FC_index75 use m_ts_io, only : ts_write_TSHS,fname_TSHS, FC_index
7676
77#ifdef FINAL_CHECK_HS77#ifdef FINAL_CHECK_HS
@@ -340,9 +340,9 @@
340 ! This is "pure" MD and we only write consecutive numbers340 ! This is "pure" MD and we only write consecutive numbers
341 ! Together with this you cannot also save FC341 ! Together with this you cannot also save FC
342 fname = fname_TSHS(slabel, istep = istep )342 fname = fname_TSHS(slabel, istep = istep )
343 call ts_write_tshs(fname, .false., Gamma, ts_Gamma,343 call ts_write_tshs(fname, .false., Gamma, ts_Gamma_scf,
344 & ucell, nsc, isc_off, na_u, no_s, spin%H, 344 & ucell, nsc, isc_off, na_u, no_s, spin%H,
345 & ts_kscell, ts_kdispl, 345 & ts_kpoints_scf%k_cell, ts_kpoints_scf%k_displ,
346 & xa, lasto, 346 & xa, lasto,
347 & H_2D, S_1D, indxuo,347 & H_2D, S_1D, indxuo,
348 & Ef, Qtot, Temp, istep, 0)348 & Ef, Qtot, Temp, istep, 0)
@@ -359,17 +359,17 @@
359 ! 6 = +z359 ! 6 = +z
360 call FC_index(istep,ia1,io_istep,io_ia1)360 call FC_index(istep,ia1,io_istep,io_ia1)
361 fname = fname_TSHS(slabel,istep = io_istep, ia1 = io_ia1)361 fname = fname_TSHS(slabel,istep = io_istep, ia1 = io_ia1)
362 call ts_write_tshs(fname, .false., Gamma, ts_Gamma,362 call ts_write_tshs(fname, .false., Gamma, ts_Gamma_scf,
363 & ucell, nsc, isc_off, na_u, no_s, spin%H, 363 & ucell, nsc, isc_off, na_u, no_s, spin%H,
364 & ts_kscell, ts_kdispl, 364 & ts_kpoints_scf%k_cell, ts_kpoints_scf%k_displ,
365 & xa, lasto, 365 & xa, lasto,
366 & H_2D, S_1D, indxuo,366 & H_2D, S_1D, indxuo,
367 & Ef, Qtot, Temp, io_istep, io_ia1)367 & Ef, Qtot, Temp, io_istep, io_ia1)
368 else368 else
369 fname = fname_TSHS(slabel)369 fname = fname_TSHS(slabel)
370 call ts_write_tshs(fname, .false., Gamma, ts_Gamma,370 call ts_write_tshs(fname, .false., Gamma, ts_Gamma_scf,
371 & ucell, nsc, isc_off, na_u, no_s, spin%H,371 & ucell, nsc, isc_off, na_u, no_s, spin%H,
372 & ts_kscell, ts_kdispl, 372 & ts_kpoints_scf%k_cell, ts_kpoints_scf%k_displ,
373 & xa, lasto,373 & xa, lasto,
374 & H_2D, S_1D, indxuo,374 & H_2D, S_1D, indxuo,
375 & Ef, Qtot, Temp, 0, 0)375 & Ef, Qtot, Temp, 0, 0)
376376
=== removed file 'Src/kpoint_grid.F90'
--- Src/kpoint_grid.F90 2018-04-14 23:14:53 +0000
+++ Src/kpoint_grid.F90 1970-01-01 00:00:00 +0000
@@ -1,228 +0,0 @@
1! ---
2! Copyright (C) 1996-2016 The SIESTA group
3! This file is distributed under the terms of the
4! GNU General Public License: see COPYING in the top directory
5! or http://www.gnu.org/copyleft/gpl.txt .
6! See Docs/Contributors.txt for a list of contributors.
7! ---
8MODULE Kpoint_grid
9!
10! Contains data structures and routines to deal with the kpoint-grid
11! for the self-consistent calculation
12! Other uses (bands, optical, polarization) have their own structures.
13!
14 USE precision, only : dp
15
16 implicit none
17
18 public :: setup_kpoint_grid, scf_kgrid_first_time, gamma_scf, &
19 nkpnt, kweight, kpoint, kscell, kdispl
20 public :: eff_kgrid_cutoff
21
22 private
23
24 logical :: scf_kgrid_first_time = .true.
25 logical :: gamma_scf
26 integer :: nkpnt ! Total number of k-points
27 real(dp) :: eff_kgrid_cutoff ! Effective kgrid_cutoff
28
29 real(dp), pointer :: kweight(:) => null()
30 real(dp), pointer :: kpoint(:,:) => null()
31
32 integer, dimension(3,3) :: kscell = 0
33 real(dp), dimension(3) :: kdispl = 0.0_dp
34 logical :: user_requested_mp = .false.
35 logical :: user_requested_cutoff = .false.
36
37 logical, save :: time_reversal_symmetry = .true.
38 logical :: firm_displ = .false.
39
40 CONTAINS
41
42 subroutine setup_Kpoint_grid( ucell )
43 USE parallel, only : Node
44 USE fdf, only : fdf_defined, fdf_get
45 USE m_find_kgrid, only : find_kgrid
46 use m_spin, only: TrSym
47
48 implicit none
49 real(dp) :: ucell(3,3)
50 logical :: spiral
51
52 if (scf_kgrid_first_time) then
53 spiral = fdf_defined('SpinSpiral')
54 ! Allow the user to control the use of time-reversal-symmetry
55 ! By default, it is on, except for "spin-spiral" calculations
56 ! and/or non-collinear calculations
57 time_reversal_symmetry = fdf_get( &
58 "TimeReversalSymmetryForKpoints", &
59 (.not. spiral) .and. TrSym)
60 call setup_scf_kscell(ucell, firm_displ)
61
62 scf_kgrid_first_time = .false.
63
64 else
65 if ( user_requested_mp ) then
66 ! no need to set up the kscell again
67 else
68 ! This was wrong in the old code
69 call setup_scf_kscell(ucell, firm_displ)
70 endif
71 endif
72
73 call find_kgrid(ucell,kscell,kdispl,firm_displ, &
74 time_reversal_symmetry, &
75 nkpnt,kpoint,kweight, eff_kgrid_cutoff)
76
77 gamma_scf = (nkpnt == 1 .and. &
78 dot_product(kpoint(:,1),kpoint(:,1)) < 1.0e-20_dp)
79
80 if (Node .eq. 0) call siesta_write_k_points()
81
82 end subroutine setup_Kpoint_grid
83
84!--------------------------------------------------------------------
85 subroutine setup_scf_kscell( cell, firm_displ )
86
87! ***************** INPUT **********************************************
88! real*8 cell(3,3) : Unit cell vectors in real space cell(ixyz,ivec)
89! ***************** OUTPUT *********************************************
90! logical firm_displ : User-specified displacements (firm)?
91
92! The relevant fdf labels are kgrid_cutoff and kgrid_Monkhorst_Pack.
93! If both are present, kgrid_Monkhorst_Pack has priority. If none is
94! present, the cutoff default is zero, producing only the gamma point.
95! Examples of fdf data specifications:
96! kgrid_cutoff 50. Bohr
97! %block kgrid_Monkhorst_Pack # Defines kscell and kdispl
98! 4 0 0 0.50 # (kscell(i,1),i=1,3), kdispl(1)
99! 0 4 0 0.50 # (kscell(i,2),i=1,3), kdispl(2)
100! 0 0 4 0.50 # (kscell(i,3),i=1,3), kdispl(3)
101! %endblock kgrid_Monkhorst_Pack
102! **********************************************************************
103
104! Modules
105
106 use precision, only : dp
107 use parallel, only : Node
108 use m_minvec, only : minvec
109 use sys, only : die
110 use fdf
111
112 implicit none
113
114! Passed variables
115 real(dp), intent(in) :: cell(3,3)
116 logical, intent(out) :: firm_displ
117
118! Internal variables
119 integer i, j, factor(3,3), expansion_factor
120 real(dp) scmin(3,3), vmod, cutoff
121 real(dp) ctransf(3,3)
122 logical mp_input
123
124 real(dp), parameter :: defcut = 0.0_dp
125 integer, dimension(3,3), parameter :: unit_matrix = &
126 reshape ((/1,0,0,0,1,0,0,0,1/), (/3,3/))
127
128 type(block_fdf) :: bfdf
129 type(parsed_line), pointer :: pline
130
131
132 mp_input = fdf_block('kgrid_Monkhorst_Pack',bfdf)
133 if ( mp_input ) then
134 user_requested_mp = .true.
135 do i= 1, 3
136 if (.not. fdf_bline(bfdf,pline)) &
137 call die('setup_scf_kscell: ERROR in ' // &
138 'kgrid_Monkhorst_Pack block')
139 kscell(1,i) = fdf_bintegers(pline,1)
140 kscell(2,i) = fdf_bintegers(pline,2)
141 kscell(3,i) = fdf_bintegers(pline,3)
142 if ( fdf_bnvalues(pline) > 3 ) then
143 kdispl(i) = mod(fdf_bvalues(pline,4), 1._dp)
144 else
145 kdispl(i) = 0._dp
146 end if
147 enddo
148 firm_displ = .true.
149
150 else
151
152 cutoff = fdf_physical('kgrid_cutoff',defcut,'Bohr')
153 if (cutoff /= defcut) then
154 !! write(6,"(a,f10.5)") "Kgrid cutoff input: ", cutoff
155 user_requested_cutoff = .true.
156 endif
157
158 kdispl(1:3) = 0.0_dp ! Might be changed later
159 firm_displ = .false. ! In future we might add new options
160 ! for user-specified displacements
161
162 ! Find equivalent rounded unit-cell
163 call minvec( cell, scmin, ctransf )
164
165 expansion_factor = 1
166 do j = 1,3
167 factor(j,1:3) = 0
168 vmod = sqrt(dot_product(scmin(1:3,j),scmin(1:3,j)))
169 factor(j,j) = int(2.0_dp*cutoff/vmod) + 1
170 expansion_factor = expansion_factor * factor(j,j)
171 enddo
172 ! Generate actual supercell skeleton
173 kscell = matmul(ctransf, factor)
174 ! Avoid confusing permutations
175 if (expansion_factor == 1) then
176 kscell = unit_matrix
177 endif
178 endif
179
180 end subroutine setup_scf_kscell
181
182 subroutine siesta_write_k_points()
183 USE siesta_options, only: writek
184 USE units, only: Ang
185 USE siesta_cml
186
187 implicit none
188
189 integer :: ik, ix, i
190 external :: iokp
191
192 if ( writek ) then
193 write(6,'(/,a)') 'siesta: k-point coordinates (Bohr**-1) and weights:'
194 write(6,'(a,i4,3f12.6,3x,f12.6)') &
195 ('siesta: ', ik, (kpoint(ix,ik),ix=1,3), kweight(ik), &
196 ik=1,nkpnt)
197 endif
198 ! Always write KP file
199 call iokp( nkpnt, kpoint, kweight )
200 write(6,'(/a,i6)') 'siesta: k-grid: Number of k-points =', nkpnt
201 write(6,'(a,f10.3,a)') 'siesta: k-grid: Cutoff (effective) =', &
202 eff_kgrid_cutoff/Ang, ' Ang'
203 write(6,'(a)') 'siesta: k-grid: Supercell and displacements'
204 write(6,'(a,3i4,3x,f8.3)') 'siesta: k-grid: ', &
205 (kscell(i,1),i=1,3), kdispl(1)
206 write(6,'(a,3i4,3x,f8.3)') 'siesta: k-grid: ', &
207 (kscell(i,2),i=1,3), kdispl(2)
208 write(6,'(a,3i4,3x,f8.3)') 'siesta: k-grid: ', &
209 (kscell(i,3),i=1,3), kdispl(3)
210 if (cml_p) then
211 call cmlStartPropertyList(xf=mainXML, title="k-points", &
212 dictRef="siesta:kpoints")
213 call cmlAddProperty(xf=mainXML, value=nkpnt, dictref='siesta:nkpnt', &
214 units="cmlUnits:countable")
215 do ik=1, nkpnt
216 call cmlAddKPoint(xf=mainXML, coords=kpoint(:,ik), weight=kweight(ik))
217 enddo
218 call cmlAddProperty(xf=mainXML, value=eff_kgrid_cutoff/Ang, &
219 dictref='siesta:kcutof', units='siestaUnits:angstrom')
220 call cmlEndPropertyList(mainXML)
221 call cmlAddProperty(xf=mainXML, value=kscell, dictref='siesta:kscell', &
222 units="siestaUnits:Ang")
223 call cmlAddProperty(xf=mainXML, value=kdispl, dictref='siesta:kdispl', &
224 units="siestaUnits:Ang")
225 endif
226 end subroutine siesta_write_k_points
227
228END MODULE Kpoint_grid
2290
=== modified file 'Src/kpoint_pdos.F90'
--- Src/kpoint_pdos.F90 2018-04-14 23:14:53 +0000
+++ Src/kpoint_pdos.F90 2018-05-27 11:17:14 +0000
@@ -5,217 +5,59 @@
5! or http://www.gnu.org/copyleft/gpl.txt .5! or http://www.gnu.org/copyleft/gpl.txt .
6! See Docs/Contributors.txt for a list of contributors.6! See Docs/Contributors.txt for a list of contributors.
7! ---7! ---
8MODULE Kpoint_pdos8module kpoint_pdos_m
9!9 !
10! Contains data structures and routines to deal with the kpoint-grid10 ! Contains data structures and routines to deal with the kpoint-grid
11! for the projected density of states calculation. 11 ! for the self-consistent calculation
12! Modelled on the equivalent module for the SCF calculation.12 ! Other uses (bands, optical, polarization) have their own structures.
13!13 !
14 USE precision, only : dp14 use precision, only : dp
15
16 ! The k-point-type
17 use kpoint_t_m
1518
16 implicit none19 implicit none
1720
21 public :: setup_kpoint_pdos
22 public :: kpoints_pdos
23 public :: gamma_pdos
24
18 private25 private
26
27 logical, save :: gamma_pdos
28 type(kpoint_t), save :: kpoints_pdos
29
30contains
31
32 subroutine setup_kpoint_pdos( ucell )
33 use parallel, only: Node
34 use siesta_options, only: writek
35 use m_spin, only: TrSym
36
37 real(dp), intent(in) :: ucell(3,3)
38
39 ! First try and read the k-points
40 call kpoint_read(kpoints_pdos, 'PDOS', ucell, TrSym)
41
42 if ( kpoints_pdos%method == K_METHOD_NONE ) then
43
44 ! The user hasn't specified a specific PDOS k-point sampling.
45 call kpoint_delete(kpoints_pdos)
46 call kpoint_read(kpoints_pdos, '', ucell, TrSym)
47
48 end if
49
50 gamma_pdos = (kpoints_pdos%N == 1 .and. &
51 dot_product(kpoints_pdos%k(:,1),kpoints_pdos%k(:,1)) < 1.0e-20_dp)
52
53 ! Quick-return if non-IO
54 if ( Node /= 0 ) return
55
56 ! Write to XML file
57 call kpoint_write_stdout(kpoints_pdos, writek, 'PDOS')
58 call kpoint_write_xml(kpoints_pdos, 'PDOS')
59 call kpoint_write_file(kpoints_pdos, 'PDOS.KP')
60
61 end subroutine setup_kpoint_pdos
19 62
20 logical, public, save :: pdos_kgrid_first_time = .true.63end module kpoint_pdos_m
21 logical, public, save :: gamma_pdos
22 integer, public, save :: maxk_pdos !
23 integer, public, save :: nkpnt_pdos ! Total number of k-points
24 real(dp) :: eff_kgrid_cutoff ! Effective kgrid_cutoff
25
26 real(dp), pointer, public, save :: kweight_pdos(:)
27 real(dp), pointer, public, save :: kpoints_pdos(:,:)
28
29 integer, dimension(3,3), save :: kscell = 0
30 real(dp), dimension(3), save :: kdispl = 0.0_dp
31
32 logical, save :: user_requested_mp = .false.
33 logical, save :: user_requested_cutoff = .false.
34
35 logical, save :: time_reversal_symmetry = .true.
36 logical, save :: firm_displ = .false.
37
38 public :: setup_kpoint_pdos
39
40 CONTAINS
41
42 subroutine setup_Kpoint_pdos( ucell, different_pdos_grid )
43 USE parallel, only : Node
44 USE fdf, only : fdf_defined, fdf_get
45 USE m_find_kgrid, only : find_kgrid
46 use m_spin, only: TrSym
47
48 implicit none
49 real(dp), intent(in) :: ucell(3,3)
50 logical, intent(out) :: different_pdos_grid
51
52 logical :: spiral
53 if (pdos_kgrid_first_time) then
54 nullify(kweight_pdos,kpoints_pdos)
55 spiral = fdf_defined('SpinSpiral')
56 ! Allow the user to control the use of time-reversal-symmetry
57 ! By default, it is on, except for "spin-spiral" calculations
58 ! and/or non-collinear calculations
59 time_reversal_symmetry = fdf_get( &
60 "TimeReversalSymmetryForKpoints", &
61 (.not. spiral) .and. TrSym)
62
63 call setup_pdos_kscell(ucell, firm_displ)
64
65 pdos_kgrid_first_time = .false.
66
67 else
68 if ( user_requested_mp ) then
69 ! no need to set up the kscell again
70 else
71 ! This was wrong in the old code
72 call setup_pdos_kscell(ucell, firm_displ)
73 endif
74 endif
75
76 if (user_requested_mp.or.user_requested_cutoff) then
77 different_pdos_grid = .true.
78 else
79 different_pdos_grid = .false.
80 endif
81
82! If the grid hasn't been explicit specified then just set dummy values
83 if (different_pdos_grid) then
84 call find_kgrid(ucell,kscell,kdispl,firm_displ, &
85 time_reversal_symmetry, &
86 nkpnt_pdos,kpoints_pdos,kweight_pdos,eff_kgrid_cutoff)
87
88 maxk_pdos = nkpnt_pdos
89 gamma_pdos = (nkpnt_pdos == 1 .and. dot_product(kpoints_pdos(:,1),kpoints_pdos(:,1)) < 1.0e-20_dp)
90
91 if (Node .eq. 0) call siesta_write_k_points_pdos()
92 else
93 nkpnt_pdos = 0
94 maxk_pdos = nkpnt_pdos
95 gamma_pdos = .true.
96 endif
97
98 end subroutine setup_Kpoint_pdos
99
100!--------------------------------------------------------------------
101 subroutine setup_pdos_kscell( cell, firm_displ )
102
103! ***************** INPUT **********************************************
104! real*8 cell(3,3) : Unit cell vectors in real space cell(ixyz,ivec)
105! ***************** OUTPUT *********************************************
106! logical firm_displ : User-specified displacements (firm)?
107
108! The relevant fdf labels are PDOS.kgrid_cutoff and PDOS.kgrid_Monkhorst_Pack.
109! If both are present, PDOS.kgrid_Monkhorst_Pack has priority. If neither is
110! present, the cutoff default is zero, producing only the gamma point.
111! Examples of fdf data specifications:
112! PDOS.kgrid_cutoff 50. Bohr
113! %block PDOS.kgrid_Monkhorst_Pack # Defines kscell and kdispl
114! 4 0 0 0.50 # (kscell(i,1),i=1,3), kdispl(1)
115! 0 4 0 0.50 # (kscell(i,2),i=1,3), kdispl(2)
116! 0 0 4 0.50 # (kscell(i,3),i=1,3), kdispl(3)
117! %endblock PDOS.kgrid_Monkhorst_Pack
118! **********************************************************************
119
120! Modules
121
122 use precision, only : dp
123 use m_minvec, only : minvec
124 use sys, only : die
125 use fdf
126
127 implicit none
128
129! Passed variables
130 real(dp), intent(in) :: cell(3,3)
131 logical, intent(out) :: firm_displ
132
133! Internal variables
134 integer i, j, factor(3,3), expansion_factor
135
136 real(dp) scmin(3,3), vmod, cutoff
137 real(dp) ctransf(3,3)
138 logical mp_input
139
140 real(dp), parameter :: defcut = 0.0_dp
141 integer, dimension(3,3), parameter :: unit_matrix = &
142 reshape ((/1,0,0,0,1,0,0,0,1/), (/3,3/))
143
144 type(block_fdf) :: bfdf
145 type(parsed_line), pointer :: pline
146
147 mp_input = fdf_block('PDOS.kgrid_Monkhorst_Pack',bfdf)
148 if ( mp_input ) then
149 user_requested_mp = .true.
150 do i= 1, 3
151 if (.not. fdf_bline(bfdf,pline)) &
152 call die('setup_pdos_kscell: ERROR in ' // &
153 'PDOS.kgrid_Monkhorst_Pack block')
154 kscell(1,i) = fdf_bintegers(pline,1)
155 kscell(2,i) = fdf_bintegers(pline,2)
156 kscell(3,i) = fdf_bintegers(pline,3)
157 if ( fdf_bnvalues(pline) > 3 ) then
158 kdispl(i) = mod(fdf_bvalues(pline,4), 1._dp)
159 else
160 kdispl(i) = 0._dp
161 end if
162 enddo
163 firm_displ = .true.
164
165 else
166
167 cutoff = fdf_physical('PDOS.kgrid_cutoff',defcut,'Bohr')
168 if (cutoff /= defcut) then
169 !! write(6,"(a,f10.5)") "PDOS Kgrid cutoff input: ", cutoff
170 user_requested_cutoff = .true.
171 endif
172
173 kdispl(1:3) = 0.0_dp ! Might be changed later
174 firm_displ = .false. ! In future we might add new options
175 ! for user-specified displacements
176
177 ! Find equivalent rounded unit-cell
178 call minvec( cell, scmin, ctransf )
179
180 expansion_factor = 1
181 do j = 1,3
182 factor(j,1:3) = 0
183 vmod = sqrt(dot_product(scmin(1:3,j),scmin(1:3,j)))
184 factor(j,j) = int(2.0_dp*cutoff/vmod) + 1
185 expansion_factor = expansion_factor * factor(j,j)
186 enddo
187 ! Generate actual supercell skeleton
188 kscell = matmul(ctransf, factor)
189 ! Avoid confusing permutations
190 if (expansion_factor == 1) then
191 kscell = unit_matrix
192 endif
193 endif
194
195 end subroutine setup_pdos_kscell
196
197 subroutine siesta_write_k_points_pdos()
198
199 USE siesta_options, only: writek
200 USE units, only: Ang
201
202 implicit none
203
204 integer :: ik, ix, i
205
206 if ( writek ) then
207 write(6,'(/,a)') 'siesta: k-point coordinates (Bohr**-1) and weights for PDOS:'
208 write(6,'(a,i4,3f12.6,3x,f12.6)') &
209 ('siesta: ', ik, (kpoints_pdos(ix,ik),ix=1,3), kweight_pdos(ik), ik=1,nkpnt_pdos)
210 endif
211
212 write(6,'(/a,i6)') 'siesta: PDOS.k-grid: Number of k-points =', nkpnt_pdos
213 write(6,'(a,f10.3,a)') 'siesta: PDOS.k-grid: Cutoff (effective) =', eff_kgrid_cutoff/Ang, ' Ang'
214 write(6,'(a)') 'siesta: PDOS.k-grid: Supercell and displacements'
215 write(6,'(a,3i4,3x,f8.3)') 'siesta: PDOS.k-grid: ', (kscell(i,1),i=1,3), kdispl(1)
216 write(6,'(a,3i4,3x,f8.3)') 'siesta: PDOS.k-grid: ', (kscell(i,2),i=1,3), kdispl(2)
217 write(6,'(a,3i4,3x,f8.3)') 'siesta: PDOS.k-grid: ', (kscell(i,3),i=1,3), kdispl(3)
218
219 end subroutine siesta_write_k_points_pdos
220
221END MODULE Kpoint_pdos
22264
=== added file 'Src/kpoint_scf.F90'
--- Src/kpoint_scf.F90 1970-01-01 00:00:00 +0000
+++ Src/kpoint_scf.F90 2018-05-27 11:17:14 +0000
@@ -0,0 +1,53 @@
1! ---
2! Copyright (C) 1996-2016 The SIESTA group
3! This file is distributed under the terms of the
4! GNU General Public License: see COPYING in the top directory
5! or http://www.gnu.org/copyleft/gpl.txt .
6! See Docs/Contributors.txt for a list of contributors.
7! ---
8module kpoint_scf_m
9 !
10 ! Contains data structures and routines to deal with the kpoint-grid
11 ! for the self-consistent calculation
12 ! Other uses (bands, optical, polarization) have their own structures.
13 !
14 use precision, only : dp
15
16 ! The k-point-type
17 use kpoint_t_m
18
19 implicit none
20
21 public :: setup_kpoint_scf
22 public :: kpoints_scf
23 public :: gamma_scf
24
25 private
26
27 logical, save :: gamma_scf
28 type(kpoint_t), save :: kpoints_scf
29
30contains
31
32 subroutine setup_kpoint_scf( ucell )
33 use parallel, only: Node
34 use siesta_options, only: writek
35 use m_spin, only: TrSym
36
37 real(dp), intent(in) :: ucell(3,3)
38
39 call kpoint_read(kpoints_scf, '', ucell, TrSym)
40
41 gamma_scf = (kpoints_scf%N == 1 .and. &
42 dot_product(kpoints_scf%k(:,1),kpoints_scf%k(:,1)) < 1.0e-20_dp)
43
44 ! Quick-return if non-IO
45 if ( Node /= 0 ) return
46
47 call kpoint_write_stdout(kpoints_scf, all=writek)
48 call kpoint_write_xml(kpoints_scf)
49 call kpoint_write_file(kpoints_scf, 'KP')
50
51 end subroutine setup_kpoint_scf
52
53end module kpoint_scf_m
054
=== added file 'Src/kpoint_t.F90'
--- Src/kpoint_t.F90 1970-01-01 00:00:00 +0000
+++ Src/kpoint_t.F90 2018-05-27 11:17:14 +0000
@@ -0,0 +1,598 @@
1! ---
2! Copyright (C) 1996-2016 The SIESTA group
3! This file is distributed under the terms of the
4! GNU General Public License: see COPYING in the top directory
5! or http://www.gnu.org/copyleft/gpl.txt .
6! See Docs/Contributors.txt for a list of contributors.
7! ---
8module kpoint_t_m
9
10 use precision, only: dp
11
12 implicit none
13
14 public :: kpoint_t
15
16 !< Method specification for non-specified k-list
17 integer, parameter, public :: K_METHOD_NONE = 0
18 !< Method specification for Monkhorst-Pack grid
19 integer, parameter, public :: K_METHOD_MONKHORST_PACK = 1
20 !< Method specification for cutoff designation
21 integer, parameter, public :: K_METHOD_CUTOFF = 2
22 !< Method specification for user-defined list
23 integer, parameter, public :: K_METHOD_LIST = 3
24
25 type :: kpoint_t
26
27 !< Total number of k-points
28 integer :: N = 0
29 !< K-points
30 real(dp), pointer :: k(:,:) => null()
31 !< weights for k-points
32 real(dp), pointer :: w(:) => null()
33 !< whether these k-points are under time-reversal symmetry
34 logical :: trs = .true.
35
36 !< The method by which these k-points are generated
37 integer :: method = K_METHOD_MONKHORST_PACK
38
39 ! Specific elements for Monkhorst-Pack, cutoff grids
40 integer :: k_cell(3,3) = 0
41 real(dp) :: k_displ(3) = 0._dp
42
43 ! The cutoff requested
44 real(dp) :: cutoff = 0._dp
45
46 end type kpoint_t
47
48 public :: kpoint_associated
49 public :: kpoint_associate
50 public :: kpoint_nullify
51 public :: kpoint_delete
52 public :: kpoint_read
53
54 public :: kpoint_read_file
55 public :: kpoint_write_xml
56 public :: kpoint_write_stdout
57 public :: kpoint_write_file
58
59contains
60
61 !< Associate one k-point list with another (no copies made)
62 subroutine kpoint_associate(out, in)
63 type(kpoint_t), intent(inout) :: out
64 type(kpoint_t), intent(in) :: in
65
66 out%N = in%N
67 out%k => in%k
68 out%w => in%w
69 out%trs = in%trs
70 out%method = in%method
71 out%k_cell = in%k_cell
72 out%k_displ = in%k_displ
73
74 end subroutine kpoint_associate
75
76 !< Figure out if two types are associated with each other
77 function kpoint_associated(a, b) result(assoc)
78 type(kpoint_t), intent(in) :: a, b
79 logical :: assoc
80
81 assoc = associated(a%k, b%k) .and. &
82 associated(a%w, b%w)
83
84 end function kpoint_associated
85
86 !< Nullify k-point list
87 subroutine kpoint_nullify(this)
88 type(kpoint_t), intent(inout) :: this
89
90 nullify(this%k, this%w)
91 call kpoint_delete(this)
92
93 end subroutine kpoint_nullify
94
95 !< Delete the k-point list
96 subroutine kpoint_delete(this)
97 use alloc, only: de_alloc
98 type(kpoint_t), intent(inout) :: this
99
100 call de_alloc(this%k, name='kpoint_t%k')
101 call de_alloc(this%w, name='kpoint_t%w')
102 this%N = 0
103 this%trs = .true.
104 this%method = K_METHOD_NONE
105 this%k_cell = 0
106 this%k_displ = 0
107
108 end subroutine kpoint_delete
109
110 !< Read settings for this k-point grid
111 !!
112 !! The order of reading the k-points are as follows:
113 !!
114 !! 1. kgrid.MonkhorstPack has precedence
115 !! If this block is found the block will be read as this:
116 !! %block kgrid.MonkhorstPack # Defines k_cell and k_displ
117 !! 4 0 0 0.50 # (k_cell(i,1),i=1,3), k_displ(1)
118 !! 0 4 0 0.50 # (k_cell(i,2),i=1,3), k_displ(2)
119 !! 0 0 4 0.50 # (k_cell(i,3),i=1,3), k_displ(3)
120 !! %endblock kgrid.MonkhorstPack
121 !! Note that the displacement defaults to zero and is an optional value.
122 !! One may also write the block like this:
123 !! %block kgrid.MonkhorstPack # Defines k_cell and k_displ
124 !! 4 0.50 # k_cell(1,1), k_displ(1)
125 !! 4 0.50 # k_cell(2,2), k_displ(2)
126 !! 4 0.50 # k_cell(3,3), k_displ(3)
127 !! %endblock kgrid.MonkhorstPack
128 !! 2. kgrid.Cutoff
129 !! The k_cell is specified using a cutoff parameter and automatically
130 !! calculated.
131 !! 3. kgrid.file
132 !! The k-points are user-supplied. In this case the k-points *must*
133 !! be provided in units of the reciprocal lattice vectors (i.e. in ]-0.5 ; 0.5])
134 subroutine kpoint_read(this, prefix, cell, trs, process_k_cell)
135 use fdf
136
137 type(kpoint_t), intent(inout) :: this
138 character(len=*), intent(in) :: prefix
139 real(dp), intent(in) :: cell(3,3)
140 logical, intent(in) :: trs
141 abstract interface
142 subroutine my_sub(k_cell, k_displ)
143 use precision, only: dp
144 integer, intent(inout) :: k_cell(3,3)
145 real(dp), intent(inout) :: k_displ(3)
146 end subroutine
147 end interface
148 procedure(my_sub), optional :: process_k_cell
149
150 ! For reading the k-cell etc.
151 type(block_fdf) :: bfdf
152 type(parsed_line), pointer :: pline
153
154 character(len=256) :: name_fdf, file
155 real(dp) :: cutoff
156 integer :: i, nvals
157 logical :: spiral
158
159 ! If this already has k-points associated we continue
160 if ( this%N > 0 ) return
161
162 ! Be sure to delete everything
163 call kpoint_delete(this)
164 this%method = K_METHOD_NONE
165
166 spiral = fdf_get('Spin.Spiral', .false.)
167 ! Allow the user to control the use of time-reversal-symmetry
168 ! By default, it is on, except for "spin-spiral" calculations
169 ! and/or non-collinear calculations
170 this%trs = fdf_get("TimeReversalSymmetryForKpoints", (.not. spiral) .and. trs)
171
172
173 call kpoint_fdf_name(prefix, 'kgrid.MonkhorstPack', name_fdf)
174 if ( fdf_block(name_fdf, bfdf) ) then
175
176 ! The method is a k-point MP grid
177 this%method = K_METHOD_MONKHORST_PACK
178
179 ! Now read data
180 do i = 1, 3
181 if ( .not. fdf_bline(bfdf,pline) ) then
182 call die('kpoint_read: ERROR in ' // trim(name_fdf) // ' block')
183 end if
184
185 ! Read displacement
186 nvals = fdf_bnvalues(pline)
187 if ( nvals > 3 ) then
188 this%k_displ(i) = mod(fdf_bvalues(pline,4), 1._dp)
189 else
190 this%k_displ(i) = 0._dp
191 end if
192
193 if ( nvals == 1 ) then
194 this%k_cell(i,i) = fdf_bintegers(pline,1)
195
196 else if ( nvals == 2 ) then
197 this%k_cell(i,i) = fdf_bintegers(pline,1)
198 this%k_displ(i) = mod(fdf_bvalues(pline,2), 1._dp)
199
200 else
201 this%k_cell(1,i) = fdf_bintegers(pline,1)
202 this%k_cell(2,i) = fdf_bintegers(pline,2)
203 this%k_cell(3,i) = fdf_bintegers(pline,3)
204
205 end if
206
207 end do
208
209 call setup_mp()
210
211 end if
212
213 ! Quick return
214 if ( this%method /= K_METHOD_NONE ) return
215
216 call kpoint_fdf_name(prefix, 'kgrid.Cutoff', name_fdf)
217 if ( fdf_defined(name_fdf) ) then
218
219 ! The method is cutoff based
220 this%method = K_METHOD_CUTOFF
221 cutoff = fdf_get(name_fdf, -1._dp, 'Bohr')
222 if ( cutoff <= 0._dp ) then
223 this%method = K_METHOD_NONE
224 else
225 call setup_cutoff()
226 end if
227
228 end if
229
230 ! Quick return
231 if ( this%method /= K_METHOD_NONE ) return
232
233 call kpoint_fdf_name(prefix, 'kgrid.File', name_fdf)
234 if ( fdf_defined(name_fdf) ) then
235
236 ! A user-defined list of k-points
237 this%method = K_METHOD_LIST
238 file = fdf_get(name_fdf, '01234567890123456789')
239
240 call setup_file()
241
242 end if
243
244 ! Quick return
245 if ( this%method /= K_METHOD_NONE ) return
246
247 call setup_gamma()
248
249 contains
250
251 subroutine setup_mp()
252 use m_find_kgrid, only: find_kgrid
253
254 if ( present(process_k_cell) ) then
255 call process_k_cell(this%k_cell, this%k_displ)
256 end if
257
258 ! Find the grid
259 call find_kgrid(cell, this%k_cell, this%k_displ, .true., &
260 this%trs, &
261 this%N, this%k, this%w, this%cutoff)
262
263 end subroutine setup_mp
264
265 subroutine setup_cutoff()
266 use m_minvec, only : minvec
267 use m_find_kgrid, only: find_kgrid
268
269 real(dp) :: scmin(3,3), vmod
270 real(dp) :: ctransf(3,3)
271 integer :: factor, expansion_factor
272
273 ! Find equivalent rounded unit-cell
274 call minvec( cell, scmin, ctransf )
275
276 expansion_factor = 1
277 do i = 1 , 3
278
279 vmod = sqrt( dot_product(scmin(:,i),scmin(:,i)) )
280 factor = int(2.0_dp * cutoff / vmod) + 1
281 expansion_factor = expansion_factor * factor
282
283 ! Generate actual supercell skeleton
284 this%k_cell(:,i) = ctransf(:,i) * factor
285
286 end do
287
288 ! Avoid confusing permutations, revert to identity
289 if ( expansion_factor == 1 ) then
290
291 this%k_cell(:,:) = 0
292 do i = 1, 3
293 this%k_cell(i,i) = 1
294 end do
295
296 end if
297
298 if ( present(process_k_cell) ) then
299 call process_k_cell(this%k_cell, this%k_displ)
300 end if
301
302 ! Find the grid
303 call find_kgrid(cell,this%k_cell, this%k_displ, .false., &
304 this%trs, &
305 this%N, this%k, this%w, this%cutoff)
306
307 end subroutine setup_cutoff
308
309 subroutine setup_file()
310
311 call kpoint_read_file(file, cell, this)
312
313 end subroutine setup_file
314
315 subroutine setup_gamma()
316 use alloc, only: re_alloc
317
318 ! We have a Gamma-only calculation
319 this%method = K_METHOD_NONE
320 this%N = 1
321 call re_alloc(this%k, 1, 3, 1, 1, name='kpoint%k')
322 call re_alloc(this%w, 1, 1, name='kpoint%w')
323 this%k = 0._dp
324 this%w = 1._dp
325 this%k_cell = 0
326 do i = 1, 3
327 this%k_cell(i,i) = 1
328 end do
329
330 end subroutine setup_gamma
331
332 end subroutine kpoint_read
333
334 ! The user can specify their own k-points
335 subroutine kpoint_read_file(fname, cell, this)
336 use alloc, only: re_alloc
337 use parallel, only : Node
338 use m_os, only : file_exist
339#ifdef MPI
340 use mpi_siesta
341#endif
342 character(len=*), intent(in) :: fname
343 real(dp), intent(in) :: cell(3,3)
344 type(kpoint_t), intent(inout) :: this
345
346 real(dp) :: rcell(3,3), k(3), wsum
347
348#ifdef MPI
349 integer :: MPIerror
350#endif
351
352 ! The user has requested to read in
353 ! k-points from a specific file...
354 ! We will do that for him/her.
355 integer :: iu, ik, ix, stat
356
357 if ( Node == 0 ) then
358
359 if ( .not. file_exist(trim(fname)) ) then
360 call die('Could not locate file '//trim(fname)// &
361 ' please ensure that the file exists.')
362 end if
363
364 call io_assign( iu )
365 open( iu, file=trim(fname), form='formatted', status='old' )
366
367 ! Read number of k-points
368 read(iu,*,iostat=stat) this%N
369 call kill_iokp(stat,0)
370
371 end if
372
373#ifdef MPI
374 call MPI_Bcast(this%N,1,MPI_Integer,0,MPI_Comm_World,MPIerror)
375#endif
376
377 call re_alloc(this%k, 1, 3, 1, this%N, name='kpoint%k')
378 call re_alloc(this%w, 1, this%N, name='kpoint%w')
379
380 if ( Node == 0 ) then
381
382 call reclat(cell, rcell, 1)
383
384 ! Read in the k-points
385 wsum = 0._dp
386 do ik = 1 , this%N
387
388 ! read current k-point
389 read(iu,*,iostat=stat) ix, k(:), this%w(ik) ! (i6,3f12.6,3x,f12.6)
390 call kpoint_convert(rcell, k, this%k(:,ik), -2)
391 call kill_iokp(stat,ik)
392 wsum = wsum + this%w(ik)
393
394 end do
395
396 if ( abs(wsum - 1._dp) > 1.e-7_dp ) then
397 write(*,'(a)')'WARNING: Weights for user specified k-points does &
398 &not sum to 1.'
399 call die('User specified k-points does not sum to 1.')
400 end if
401
402 call io_close( iu )
403
404 end if
405
406#ifdef MPI
407 call MPI_Bcast(this%k(1,1),3*this%N,MPI_Double_Precision,0,MPI_Comm_World,MPIerror)
408 call MPI_Bcast(this%w(1),this%N,MPI_Double_Precision,0,MPI_Comm_World,MPIerror)
409#endif
410
411 contains
412
413 subroutine kill_iokp(stat, line)
414 integer, intent(in) :: stat, line
415
416 if ( stat == 0 ) return
417
418 write(*,*) 'Siesta kpoint_read could not read your input file'
419 write(*,*) 'The k-points MUST be in units of reciprocal vectors!'
420 write(*,*) 'Siesta will convert the unit to correct units.'
421 write(*,*) 'Also the sum of weights MUST equal 1.'
422 write(*,*) !
423 if ( line == 0 ) then
424 write(*,*) 'Error occured on reading number of k-points (first line)'
425 else
426 write(*,'(a,i0,a)') 'Error occured on reading the ',line,' kpoint.'
427 end if
428 write(*,*) 'Please format your file like this:'
429 write(*,*) ' $> cat '//trim(fname)
430 write(*,*) ' <nkpt>'
431 write(*,*) ' 1 <kpt-A1> <kpt-A2> <kpt-A3> <w-kpt>'
432 write(*,*) ' 2 <kpt-A1> <kpt-A2> <kpt-A3> <w-kpt>'
433 write(*,*) ' ....'
434 write(*,*) ' <nkpt> <kpt-A1> <kpt-A2> <kpt-A3> <w-kpt>'
435
436 call die('Siesta reading user specified k-points')
437
438 end subroutine kill_iokp
439
440 end subroutine kpoint_read_file
441
442
443 !< Write k-point list to the XML output file
444 !!
445 !! This will populate a property list with all information about the
446 !! k-point generation.
447 subroutine kpoint_write_xml(this, prefix)
448 use siesta_cml
449 use m_char, only: lcase
450 use units, only: Ang
451
452 type(kpoint_t), intent(inout) :: this
453 character(len=*), intent(in), optional :: prefix
454 character(len=64) :: lcase_prefix
455 integer :: ik
456
457 ! Quick return, if able
458 if ( .not. cml_p ) return
459
460 if ( present(prefix) ) then
461 lcase_prefix = lcase(prefix)
462
463 call cmlStartPropertyList(xf=mainXML, title=trim(prefix)//".k-points", &
464 dictRef="siesta:"//trim(lcase_prefix)//".kpoints")
465 call cmlAddProperty(xf=mainXML, value=this%N, &
466 dictref='siesta:'//trim(lcase_prefix)//'.nkpnt', &
467 units="cmlUnits:countable")
468 do ik = 1, this%N
469 call cmlAddKPoint(xf=mainXML, coords=this%k(:,ik), weight=this%w(ik))
470 end do
471
472 ! Add supplementary information for MP and Cutoff methods
473 select case ( this%method )
474 case ( K_METHOD_MONKHORST_PACK, K_METHOD_CUTOFF )
475 call cmlAddProperty(xf=mainXML, value=this%cutoff/Ang, &
476 dictref='siesta:'//trim(lcase_prefix)//'.kcutoff', units='siestaUnits:angstrom')
477 call cmlAddProperty(xf=mainXML, value=this%k_cell, &
478 dictref='siesta:'//trim(lcase_prefix)//'.kscell', units="cmlUnits:countable")
479 call cmlAddProperty(xf=mainXML, value=this%k_displ, &
480 dictref='siesta:'//trim(lcase_prefix)//'.kdispl')
481 end select
482
483 else
484 call cmlStartPropertyList(xf=mainXML, title="k-points", &
485 dictRef="siesta:kpoints")
486 call cmlAddProperty(xf=mainXML, value=this%N, dictref='siesta:nkpnt', &
487 units="cmlUnits:countable")
488 do ik = 1, this%N
489 call cmlAddKPoint(xf=mainXML, coords=this%k(:,ik), weight=this%w(ik))
490 end do
491
492 ! Add supplementary information for MP and Cutoff methods
493 select case ( this%method )
494 case ( K_METHOD_MONKHORST_PACK, K_METHOD_CUTOFF )
495 call cmlAddProperty(xf=mainXML, value=this%cutoff/Ang, &
496 dictref='siesta:kcutoff', units='siestaUnits:angstrom')
497 call cmlAddProperty(xf=mainXML, value=this%k_cell, &
498 dictref='siesta:kscell', units="cmlUnits:countable")
499 call cmlAddProperty(xf=mainXML, value=this%k_displ, &
500 dictref='siesta:kdispl')
501 end select
502
503 end if
504
505 call cmlEndPropertyList(mainXML)
506
507 end subroutine kpoint_write_xml
508
509 !< Write to std-out the k-points and some information regarding the generation of the k-list
510 !!
511 !! The k-points are only written if `all` is `.true.`.
512 !! Otherwise only information regarding the generation will be written.
513 subroutine kpoint_write_stdout(this, all, prefix)
514 use units, only: Ang
515 type(kpoint_t), intent(in) :: this
516 logical, intent(in) :: all
517 character(len=*), intent(in), optional :: prefix
518 character(len=64) :: name
519 integer :: ik
520
521 if ( present(prefix) ) then
522 name = trim(prefix) // ' k-'
523 else
524 name = 'k-'
525 end if
526
527 if ( all ) then
528 write(*,'(/,3a)') 'siesta: ',trim(name), 'point coordinates (Bohr**-1) and weights:'
529 do ik = 1, this%N
530 write(*,'(a,i10,3(tr1,e13.6),tr3,e12.6)') 'siesta: ', ik, this%k(:,ik), this%w(ik)
531 end do
532 end if
533 write(*,'(/3a,i10)') 'siesta: ', trim(name), 'grid: Number of k-points =', this%N
534
535 select case ( this%method )
536 case ( K_METHOD_NONE )
537 write(*,'(3a)') 'siesta: ', trim(name), 'point is Gamma-only'
538 case ( K_METHOD_MONKHORST_PACK )
539 write(*,'(3a)') 'siesta: ', trim(name), 'points from Monkhorst-Pack grid'
540 write(*,'(3a,f10.3,a)') 'siesta: ', trim(name), 'cutoff (effective) =', this%cutoff/Ang, ' Ang'
541 write(*,'(3a)') 'siesta: ', trim(name), 'point supercell and displacements'
542 do ik = 1, 3
543 write(*,'(a,3i4,3x,f8.3)') 'siesta: k-grid: ', this%k_cell(:,ik), this%k_displ(ik)
544 end do
545 case ( K_METHOD_CUTOFF )
546 write(*,'(3a)') 'siesta: ', trim(name), 'points from cutoff'
547 write(*,'(3a,f10.3,a)') 'siesta: ', trim(name), 'cutoff (effective) =', this%cutoff/Ang, ' Ang'
548 write(*,'(3a)') 'siesta: ', trim(name), 'point supercell and displacements'
549 do ik = 1, 3
550 write(*,'(a,3i4,3x,f8.3)') 'siesta: k-grid: ', this%k_cell(:,ik), this%k_displ(ik)
551 end do
552 case ( K_METHOD_LIST )
553 write(*,'(3a)') 'siesta: ', trim(name), 'points from user-defined list'
554 end select
555
556 end subroutine kpoint_write_stdout
557
558 !< Write to a file the k-point information
559 subroutine kpoint_write_file(this, suffix)
560 use files, only: slabel
561 use m_io, only: io_assign, io_close
562 type(kpoint_t), intent(in) :: this
563 character(len=*), intent(in) :: suffix
564 character(len=256) :: fname
565 integer :: iu, ik
566
567 fname = trim(slabel) // '.' // trim(suffix)
568
569 call io_assign( iu )
570 open( iu, file=fname, form='formatted', status='unknown' )
571
572 write(iu,'(i10)') this%N
573 do ik = 1, this%N
574 write(iu,'(i10,3(tr1,e13.6),tr3,e12.6)') ik, this%k(:,ik), this%w(ik)
575 end do
576
577 call io_close( iu )
578
579 end subroutine kpoint_write_file
580
581 subroutine kpoint_fdf_name(prefix, suffix, name)
582 character(len=*), intent(in) :: prefix, suffix
583 character(len=256), intent(out) :: name
584
585 if ( len_trim(prefix) > 0 ) then
586 name = trim(prefix) // '.' // trim(suffix)
587 else
588 name = trim(suffix)
589 end if
590
591 end subroutine kpoint_fdf_name
592
593end module kpoint_t_m
594
595
596
597
598
0599
=== modified file 'Src/local_DOS.F'
--- Src/local_DOS.F 2018-02-27 14:03:49 +0000
+++ Src/local_DOS.F 2018-05-27 11:17:14 +0000
@@ -26,7 +26,7 @@
26 use sys, only: die 26 use sys, only: die
27 use files, only: slabel ! system label27 use files, only: slabel ! system label
28 use files, only: filesOut_t ! derived type for output file names28 use files, only: filesOut_t ! derived type for output file names
29 use Kpoint_grid29 use kpoint_scf_m, only: kpoints_scf
30 use parallel, only: IOnode 30 use parallel, only: IOnode
31 use files, only : label_length 31 use files, only : label_length
32 use m_ntm32 use m_ntm
@@ -79,7 +79,8 @@
79 call diagon(no_s, spinor_dim, no_l, maxnh, maxnh, no_u,79 call diagon(no_s, spinor_dim, no_l, maxnh, maxnh, no_u,
80 . numh, listhptr, listh, numh, listhptr, listh, 80 . numh, listhptr, listh, numh, listhptr, listh,
81 . H, S, qtot, fixspin, qtots, temp, e1, e2,81 . H, S, qtot, fixspin, qtots, temp, e1, e2,
82 . gamma, xijo, indxuo, nkpnt, kpoint, kweight,82 . gamma, xijo, indxuo,
83 . kpoints_scf%N, kpoints_scf%k, kpoints_scf%w,
83 . eo, qo, Dscf, Escf, ef, efs, dummy_Entrop, no_u,84 . eo, qo, Dscf, Escf, ef, efs, dummy_Entrop, no_u,
84 . occtol, dummy_iscf, neigwanted)85 . occtol, dummy_iscf, neigwanted)
8586
8687
=== modified file 'Src/m_initwf.F90'
--- Src/m_initwf.F90 2017-11-10 16:16:08 +0000
+++ Src/m_initwf.F90 2018-05-27 11:17:14 +0000
@@ -77,7 +77,7 @@
77 use fdf77 use fdf
78 use densematrix, only : Haux, Saux, psi78 use densematrix, only : Haux, Saux, psi
79 use sparse_matrices, only : maxnh79 use sparse_matrices, only : maxnh
80 use Kpoint_grid, only : nkpnt, kpoint, kweight80 use kpoint_scf_m, only : kpoints_scf
81 use atomlist, only : no_s, no_l, no_u, qtot, indxuo81 use atomlist, only : no_s, no_l, no_u, qtot, indxuo
82 use m_spin, only : nspin82 use m_spin, only : nspin
83 use m_gamma, only : gamma83 use m_gamma, only : gamma
@@ -163,10 +163,10 @@
163 call re_alloc(psi,1,npsi,name='psi',routine='initwf')163 call re_alloc(psi,1,npsi,name='psi',routine='initwf')
164 allocate(muo(nuo),stat=mem_stat)164 allocate(muo(nuo),stat=mem_stat)
165 call memory('A','I',nuo,'initwf',stat=mem_stat)165 call memory('A','I',nuo,'initwf',stat=mem_stat)
166 allocate(nocck(nkpnt,nspin),stat=mem_stat)166 allocate(nocck(kpoints_scf%N,nspin),stat=mem_stat)
167 call memory('A','I',nkpnt*nspin,'initwf',stat=mem_stat)167 call memory('A','I',kpoints_scf%N*nspin,'initwf',stat=mem_stat)
168 allocate(occup(no_u,nspin,nkpnt),stat=mem_stat)168 allocate(occup(no_u,nspin,kpoints_scf%N),stat=mem_stat)
169 call memory('A','L',nuo*nkpnt*nspin,'initwf',stat=mem_stat)169 call memory('A','L',nuo*kpoints_scf%N*nspin,'initwf',stat=mem_stat)
170! Check indxuo .......................................................170! Check indxuo .......................................................
171 do iuo = 1,nuo171 do iuo = 1,nuo
172 muo(iuo) = 0172 muo(iuo) = 0
@@ -199,7 +199,7 @@
199! evolved by integrating TDKS equations. !199! evolved by integrating TDKS equations. !
200! ............................................................................!200! ............................................................................!
201 temp=1.0d-6201 temp=1.0d-6
202 call fermid( nspin, nspin, nkpnt, kweight, no_u, no_u, eo, &202 call fermid( nspin, nspin, kpoints_scf%N, kpoints_scf%w, no_u, no_u, eo, &
203 temp, qtot, qo, ef, entrp )203 temp, qtot, qo, ef, entrp )
204 nocc(1) = 0204 nocc(1) = 0
205 nocc(2) = 0205 nocc(2) = 0
@@ -207,26 +207,26 @@
207 degen= .false.207 degen= .false.
208 !208 !
209 !209 !
210 do ik=1,nkpnt210 do ik=1,kpoints_scf%N
211 do ispin=1,nspin211 do ispin=1,nspin
212 nocck(ik,ispin)=0212 nocck(ik,ispin)=0
213 do io=1,no_u213 do io=1,no_u
214 occup(io,ispin,ik)=.false.214 occup(io,ispin,ik)=.false.
215 if(dabs(qo(io,ispin,ik)-2.0d0*kweight(ik)/nspin).le. &215 if(dabs(qo(io,ispin,ik)-2.0d0*kpoints_scf%w(ik)/nspin).le. &
216 1.0d-2*dabs(2.0d0*kweight(ik)/nspin)) then216 1.0d-2*dabs(2.0d0**kpoints_scf%w(ik)/nspin)) then
217 nocc(ispin)=nocc(ispin)+1217 nocc(ispin)=nocc(ispin)+1
218 nocck(ik,ispin)=nocck(ik,ispin)+1218 nocck(ik,ispin)=nocck(ik,ispin)+1
219! Accounting the number of electrons corresponding the states being marked219! Accounting the number of electrons corresponding the states being marked
220! as occupied.220! as occupied.
221 nelect=nelect+dabs(2.0d0*kweight(ik)/nspin)221 nelect=nelect+dabs(2.0d0*kpoints_scf%w(ik)/nspin)
222 occup(io,ispin,ik)=.true.222 occup(io,ispin,ik)=.true.
223 else223 else
224 if ( dabs( qo(io,ispin,ik)) .gt.1.0d-2*dabs(2.0d0*kweight(ik)/nspin)) then224 if ( dabs( qo(io,ispin,ik)) .gt.1.0d-2*dabs(2.0d0*kpoints_scf%w(ik)/nspin)) then
225 IF (Node .eq. 0) THEN225 IF (Node .eq. 0) THEN
226 IF(.not. degen) write(6,fmt="(/,a,tr3,a,tr3,a,tr3,a)") "initwf:","ik", &226 IF(.not. degen) write(6,fmt="(/,a,tr3,a,tr3,a,tr3,a)") "initwf:","ik", &
227 "occupancy","maximum occupancy"227 "occupancy","maximum occupancy"
228 write(6,"(tr2,I10,tr3,f8.6,tr4,f8.6)") ik, qo(io,ispin,ik), &228 write(6,"(tr2,I10,tr3,f8.6,tr4,f8.6)") ik, qo(io,ispin,ik), &
229 2.0d0*kweight(ik)/nspin229 2.0d0*kpoints_scf%w(ik)/nspin
230 END IF230 END IF
231 degen = .true. 231 degen = .true.
232 end if232 end if
@@ -259,8 +259,8 @@
259#else259#else
260 m_storage='szden'260 m_storage='szden'
261#endif261#endif
262 allocate(wavef_ms(1:nkpnt,1:nspin)) ! allocate (nkpnt*npsin) matrices inside wavef_ms262 allocate(wavef_ms(1:kpoints_scf%N,1:nspin)) ! allocate (nkpnt*npsin) matrices inside wavef_ms
263 do i=1,nkpnt !for every value of nkpnt and nspin, allocate a matrix of size (no_u x nocck(i,j))263 do i=1,kpoints_scf%N !for every value of nkpnt and nspin, allocate a matrix of size (no_u x nocck(i,j))
264 do j=1,nspin264 do j=1,nspin
265 call m_allocate(wavef_ms(i,j),no_u,nocck(i,j),m_storage)265 call m_allocate(wavef_ms(i,j),no_u,nocck(i,j),m_storage)
266 end do266 end do
@@ -271,7 +271,7 @@
271 Haux, Saux, psi, no_u, occup)271 Haux, Saux, psi, no_u, occup)
272 else if (nspin.le.2 .and. .not.gamma) then272 else if (nspin.le.2 .and. .not.gamma) then
273 call diagkiwf( nspin, nuo, no_s, nspin, no_l, maxnh, &273 call diagkiwf( nspin, nuo, no_s, nspin, no_l, maxnh, &
274 no_u, indxuo, nkpnt, kpoint, Haux, Saux, &274 no_u, indxuo, kpoints_scf%N, kpoints_scf%k, Haux, Saux, &
275 psi, no_u, occup)275 psi, no_u, occup)
276 else 276 else
277 call die('initwf: ERROR: non-collinear spin options for TDDFT not yet implemented')277 call die('initwf: ERROR: non-collinear spin options for TDDFT not yet implemented')
@@ -279,7 +279,7 @@
279! Write/save wavefunction in .TDWF file to use for TDDFT calculation.279! Write/save wavefunction in .TDWF file to use for TDDFT calculation.
280 IF (Node .eq. 0) WRITE(6,'(a)') 'initwf: Saving wavefunctions & 280 IF (Node .eq. 0) WRITE(6,'(a)') 'initwf: Saving wavefunctions &
281 &in <systemlabel>.TDWF file.'281 &in <systemlabel>.TDWF file.'
282 call iowavef('write',wavef_ms,no_u,nkpnt,nspin)282 call iowavef('write',wavef_ms,no_u,kpoints_scf%N,nspin)
283! Free local arrays283! Free local arrays
284 call memory('D','I',size(muo),'initwf',stat=mem_stat)284 call memory('D','I',size(muo),'initwf',stat=mem_stat)
285 deallocate(muo,stat=mem_stat)285 deallocate(muo,stat=mem_stat)
286286
=== modified file 'Src/m_ncdf_siesta.F90'
--- Src/m_ncdf_siesta.F90 2018-02-27 14:03:49 +0000
+++ Src/m_ncdf_siesta.F90 2018-05-27 11:17:14 +0000
@@ -491,12 +491,12 @@
491491
492 subroutine cdf_save_settings(fname)492 subroutine cdf_save_settings(fname)
493493
494 use kpoint_grid, only: kscell, kdispl494 use kpoint_scf_m, only: kpoints_scf
495 use siesta_options, only: cdf_w_parallel495 use siesta_options, only: cdf_w_parallel
496 use siesta_options, only: dDtol, dHtol, charnet, wmix, temp, g2cut496 use siesta_options, only: dDtol, dHtol, charnet, wmix, temp, g2cut
497 use siesta_options, only: isolve497 use siesta_options, only: isolve
498 use siesta_options, only: SOLVE_DIAGON, SOLVE_ORDERN, SOLVE_TRANSI498 use siesta_options, only: SOLVE_DIAGON, SOLVE_ORDERN, SOLVE_TRANSI
499 use m_ts_kpoints, only: ts_kscell, ts_kdispl499 use ts_kpoint_scf_m, only: ts_kpoints_scf
500500
501 character(len=*), intent(in) :: fname501 character(len=*), intent(in) :: fname
502 502
@@ -509,8 +509,8 @@
509 call ncdf_open_grp(ncdf,'SETTINGS',grp)509 call ncdf_open_grp(ncdf,'SETTINGS',grp)
510510
511 ! Save settings511 ! Save settings
512 call ncdf_put_var(grp,'BZ',kscell)512 call ncdf_put_var(grp,'BZ',kpoints_scf%k_cell)
513 call ncdf_put_var(grp,'BZ_displ',kdispl)513 call ncdf_put_var(grp,'BZ_displ',kpoints_scf%k_displ)
514 call ncdf_put_var(grp,'DMTolerance',dDtol)514 call ncdf_put_var(grp,'DMTolerance',dDtol)
515 call ncdf_put_var(grp,'HTolerance',dHtol)515 call ncdf_put_var(grp,'HTolerance',dHtol)
516 call ncdf_put_var(grp,'NetCharge',charnet)516 call ncdf_put_var(grp,'NetCharge',charnet)
@@ -524,8 +524,8 @@
524 if ( isolve == SOLVE_TRANSI ) then524 if ( isolve == SOLVE_TRANSI ) then
525 call ncdf_open_grp(ncdf,'TRANSIESTA',grp)525 call ncdf_open_grp(ncdf,'TRANSIESTA',grp)
526526
527 call ncdf_put_var(grp,'BZ',ts_kscell)527 call ncdf_put_var(grp,'BZ',ts_kpoints_scf%k_cell)
528 call ncdf_put_var(grp,'BZ_displ',ts_kdispl)528 call ncdf_put_var(grp,'BZ_displ',ts_kpoints_scf%k_displ)
529529
530 end if530 end if
531531
532532
=== modified file 'Src/m_transiesta.F90'
--- Src/m_transiesta.F90 2018-04-04 13:22:33 +0000
+++ Src/m_transiesta.F90 2018-05-27 11:17:14 +0000
@@ -58,7 +58,7 @@
58 use class_OrbitalDistribution58 use class_OrbitalDistribution
59 use class_Sparsity59 use class_Sparsity
6060
61 use m_ts_kpoints, only : ts_nkpnt, ts_Gamma61 use ts_kpoint_scf_m, only : ts_kpoints_scf, ts_gamma_scf
6262
63 use m_ts_electype63 use m_ts_electype
6464
@@ -145,7 +145,7 @@
145 end if145 end if
146146
147 ! print out estimated memory usage...147 ! print out estimated memory usage...
148 call ts_print_memory(ts_Gamma)148 call ts_print_memory(ts_gamma_scf)
149149
150 call ts_print_charges(N_Elec,Elecs, Qtot, sp_dist, sparse_pattern, &150 call ts_print_charges(N_Elec,Elecs, Qtot, sp_dist, sparse_pattern, &
151 nspin, n_nzs, DM, S)151 nspin, n_nzs, DM, S)
@@ -247,7 +247,7 @@
247 call open_GF(N_Elec,Elecs,uGF,NEn,.false.)247 call open_GF(N_Elec,Elecs,uGF,NEn,.false.)
248248
249 if ( ts_method == TS_FULL ) then249 if ( ts_method == TS_FULL ) then
250 if ( ts_Gamma ) then250 if ( ts_gamma_scf ) then
251 call ts_fullg(N_Elec,Elecs, &251 call ts_fullg(N_Elec,Elecs, &
252 nq, uGF, nspin, na_u, lasto, &252 nq, uGF, nspin, na_u, lasto, &
253 sp_dist, sparse_pattern, &253 sp_dist, sparse_pattern, &
@@ -262,7 +262,7 @@
262 H, S, DM, EDM, Ef, DE_NEGF)262 H, S, DM, EDM, Ef, DE_NEGF)
263 end if263 end if
264 else if ( ts_method == TS_BTD ) then264 else if ( ts_method == TS_BTD ) then
265 if ( ts_Gamma ) then265 if ( ts_gamma_scf ) then
266 call ts_trig(N_Elec,Elecs, &266 call ts_trig(N_Elec,Elecs, &
267 nq, uGF, nspin, na_u, lasto, &267 nq, uGF, nspin, na_u, lasto, &
268 sp_dist, sparse_pattern, &268 sp_dist, sparse_pattern, &
@@ -278,7 +278,7 @@
278 end if278 end if
279#ifdef SIESTA__MUMPS279#ifdef SIESTA__MUMPS
280 else if ( ts_method == TS_MUMPS ) then280 else if ( ts_method == TS_MUMPS ) then
281 if ( ts_Gamma ) then281 if ( ts_gamma_scf ) then
282 call ts_mumpsg(N_Elec,Elecs, &282 call ts_mumpsg(N_Elec,Elecs, &
283 nq, uGF, nspin, na_u, lasto, &283 nq, uGF, nspin, na_u, lasto, &
284 sp_dist, sparse_pattern, &284 sp_dist, sparse_pattern, &
@@ -335,7 +335,7 @@
335 Ef = Ef + 0.01_dp * eV335 Ef = Ef + 0.01_dp * eV
336 end if336 end if
337 else if ( ts_method == TS_BTD ) then337 else if ( ts_method == TS_BTD ) then
338 if ( ts_Gamma ) then338 if ( ts_gamma_scf ) then
339 call ts_trig_Fermi(N_Elec,Elecs, &339 call ts_trig_Fermi(N_Elec,Elecs, &
340 nq, uGF, nspin, na_u, lasto, &340 nq, uGF, nspin, na_u, lasto, &
341 sp_dist, sparse_pattern, &341 sp_dist, sparse_pattern, &
@@ -588,7 +588,7 @@
588 end if588 end if
589589
590 if ( Elecs(iEl)%out_of_core ) then590 if ( Elecs(iEl)%out_of_core ) then
591 call read_Green(uGF(iEl),Elecs(iEl), ts_nkpnt, NEn )591 call read_Green(uGF(iEl),Elecs(iEl), ts_kpoints_scf%N, NEn )
592 end if592 end if
593 593
594 end do594 end do
595595
=== modified file 'Src/m_ts_fullk.F90'
--- Src/m_ts_fullk.F90 2017-12-12 09:13:49 +0000
+++ Src/m_ts_fullk.F90 2018-05-27 11:17:14 +0000
@@ -96,7 +96,7 @@
96 ! Self-energy expansion96 ! Self-energy expansion
97 use m_ts_elec_se97 use m_ts_elec_se
9898
99 use m_ts_kpoints, only : ts_nkpnt, ts_kpoint, ts_kweight99 use ts_kpoint_scf_m, only : ts_kpoints_scf
100100
101 use m_ts_options, only : Calc_Forces101 use m_ts_options, only : Calc_Forces
102 use m_ts_options, only : N_mu, mus102 use m_ts_options, only : N_mu, mus
@@ -282,7 +282,7 @@
282 end if282 end if
283283
284 ! start the itterators284 ! start the itterators
285 call itt_init (SpKp,end1=nspin,end2=ts_nkpnt)285 call itt_init (SpKp,end1=nspin,end2=ts_kpoints_scf%N)
286 ! point to the index iterators286 ! point to the index iterators
287 call itt_attach(SpKp,cur1=ispin,cur2=ikpt)287 call itt_attach(SpKp,cur1=ispin,cur2=ikpt)
288288
@@ -300,10 +300,10 @@
300 end if300 end if
301301
302 ! Include spin factor and 1/(2\pi)302 ! Include spin factor and 1/(2\pi)
303 kpt(:) = ts_kpoint(:,ikpt)303 kpt(:) = ts_kpoints_scf%k(:,ikpt)
304 ! create the k-point in reciprocal space304 ! create the k-point in reciprocal space
305 call kpoint_convert(ucell,kpt,bkpt,1)305 call kpoint_convert(ucell,kpt,bkpt,1)
306 kw = 0.5_dp / Pi * ts_kweight(ikpt)306 kw = 0.5_dp / Pi * ts_kpoints_scf%w(ikpt)
307 if ( nspin == 1 ) kw = kw * 2._dp307 if ( nspin == 1 ) kw = kw * 2._dp
308308
309#ifdef TRANSIESTA_TIMING309#ifdef TRANSIESTA_TIMING
310310
=== removed file 'Src/m_ts_kpoints.F90'
--- Src/m_ts_kpoints.F90 2017-11-23 14:17:27 +0000
+++ Src/m_ts_kpoints.F90 1970-01-01 00:00:00 +0000
@@ -1,323 +0,0 @@
1! ---
2! Copyright (C) 1996-2016 The SIESTA group
3! This file is distributed under the terms of the
4! GNU General Public License: see COPYING in the top directory
5! or http://www.gnu.org/copyleft/gpl.txt .
6! See Docs/Contributors.txt for a list of contributors.
7! ---
8module m_ts_kpoints
9!
10! Routines that are related to TS kpoint sampling
11!
12!==============================================================================
13! CONTAINS:
14! 1) setup_ts_scf_kscell
15! 2) setup_ts_kpoint_grid
16! 3) ts_write_k_points
17! 4) ts_iokp
18
19 use precision, only : dp
20
21 implicit none
22
23 private
24 save
25
26!===================== K-POINT RELATED VARIABLES ==============================
27!==============================================================================
28! Contains data structures and routines to deal with the kpoint-grid
29! for the self-consistent calculation with Green Functions.
30! Original verison modified so that the kpoint sampling is done for the
31! direction perpendicular to the transport directins
32! Version created to integrate TRANSIESTA in siesta2.3
33!==============================================================================
34! The kpoint mesh parameters that are public may be accessed in other
35! parts of the code. With respesct to the original names of the variables used
36! in the m_kpoint_grid module, a "ts_" was added. Also in the SIESTA module
37! kscell and kdispl are not public, but are made public (ts_kscell and
38! ts_kdispl) here.
39
40!==============================================================================
41! DETAILS: To obtain the kpoints for the GFs calculations it uses the same
42! scheme as for SIESTA but puts ts_kscell(3,3)=1 and ts_kdispl(3)=0.0
43!
44!==============================================================================
45
46 logical, public :: ts_scf_kgrid_first_time = .true.
47 logical, public :: ts_Gamma
48 integer, public :: ts_nkpnt ! Total number of k-points
49 real(dp), public :: ts_eff_kgrid_cutoff ! Effective kgrid_cutoff
50
51 real(dp), pointer, public :: ts_kweight(:)
52 real(dp), pointer, public :: ts_kpoint(:,:)
53
54 integer, public :: ts_kscell(3,3) = 0
55 real(dp), public :: ts_kdispl(3) = 0.0_dp
56
57 logical, public :: ts_firm_displ = .false.
58 logical, public :: ts_user_requested_mp = .false.
59 logical, public :: ts_user_requested_cutoff = .false.
60
61 public :: setup_ts_scf_kscell, setup_ts_kpoint_grid
62 public :: ts_write_k_points
63
64contains
65
66 subroutine setup_ts_scf_kscell( cell )
67
68! ***************** INPUT **********************************************
69! real*8 cell(3,3) : Unit cell vectors in real space cell(ixyz,ivec)
70! type(Elec) Elecs(:) : Electrodes
71
72! The relevant fdf labels are kgrid_cutoff and kgrid_Monkhorst_Pack.
73! If both are present, kgrid_Monkhorst_Pack has priority. If none is
74! present, the cutoff default is zero, producing only the gamma point.
75! Examples of fdf data specifications:
76! kgrid_cutoff 50. Bohr
77! %block kgrid_Monkhorst_Pack # Defines kscell and kdispl
78! 4 0 0 0.50 # (kscell(i,1),i=1,3), kdispl(1)
79! 0 4 0 0.50 # (kscell(i,2),i=1,3), kdispl(2)
80! 0 0 4 0.50 # (kscell(i,3),i=1,3), kdispl(3)
81! %endblock kgrid_Monkhorst_Pack
82! **********************************************************************
83
84! Modules
85
86 use parallel, only : IONode
87 use m_minvec, only : minvec
88 use fdf
89 use sys, only : die
90#ifdef MPI
91 use mpi_siesta
92#endif
93
94 use m_ts_tdir, only: ts_tidx
95 use m_ts_global_vars, only : TSmode
96
97 implicit none
98
99 ! Passed variables
100 real(dp), intent(in) :: cell(3,3)
101
102 ! Internal variables
103 integer :: i, j, factor(3,3), expansion_factor
104 real(dp) :: scmin(3,3), vmod, cutoff
105 real(dp) :: ctransf(3,3)
106
107 type(block_fdf) :: bfdf
108 type(parsed_line), pointer :: pline
109
110 logical :: bool
111 real(dp), parameter :: defcut = 0.0_dp
112
113 bool = fdf_block('TS.kgrid_Monkhorst_Pack',bfdf)
114 if ( .not. bool ) &
115 bool = fdf_block('kgrid_Monkhorst_Pack',bfdf)
116
117 if ( bool ) then
118 ts_user_requested_mp = .true.
119 do i = 1,3
120 if (fdf_bline(bfdf,pline)) then
121 ts_kscell(1,i) = fdf_bintegers(pline,1)
122 ts_kscell(2,i) = fdf_bintegers(pline,2)
123 ts_kscell(3,i) = fdf_bintegers(pline,3)
124 if ( fdf_bnvalues(pline) > 3 ) then
125 ts_kdispl(i) = mod(fdf_bvalues(pline,4), 1._dp)
126 else
127 ts_kdispl(i) = 0._dp
128 end if
129 else
130 call die( 'setup_ts_scf_kscell: ERROR no data in' // &
131 'kgrid_Monkhorst_Pack block' )
132 endif
133 enddo
134 ts_firm_displ = .true.
135
136 else
137
138 if ( IONode .and. TSmode ) then
139 write(*,*) 'WARNING !!!'
140 write(*,*) 'TS kgrid determined first with 3D cell !!!'
141 write(*,*) 'Specifying only cutoff in Electrode AND Scattering calculations might lead to problems !!'
142 end if
143
144 cutoff = fdf_get('kgrid_cutoff',defcut,'Bohr')
145 ts_user_requested_cutoff = (cutoff /= defcut)
146
147 ts_kdispl(1:3) = 0.0_dp ! Might be changed later
148 ts_firm_displ = .false.
149
150 ! Find equivalent rounded unit-cell
151 call minvec( cell, scmin, ctransf )
152
153 expansion_factor = 1
154 do j = 1,3
155 factor(j,1:3) = 0
156 vmod = sqrt(dot_product(scmin(1:3,j),scmin(1:3,j)))
157 factor(j,j) = int(2.0_dp*cutoff/vmod) + 1
158 expansion_factor = expansion_factor * factor(j,j)
159 enddo
160 ! Generate actual supercell skeleton
161 ts_kscell = matmul(ctransf, factor)
162
163 if ( expansion_factor == 1 ) then
164 ts_kscell = 0
165 ts_kscell(1,1) = 1
166 ts_kscell(2,2) = 1
167 ts_kscell(3,3) = 1
168 end if
169
170 end if
171
172 ! In case of TSmode we have a transiesta run.
173 ! This means that we truncate the k-points in the transport direction.
174 ! However, if we are dealing with an electrode calculation we simply allow it
175 ! to have the same cell (the check made will disregard the transport directions k-points)
176 if ( TSmode .and. ts_tidx > 0 ) then
177 i = ts_tidx
178 ts_kscell(:,i) = 0
179 ts_kscell(i,:) = 0
180 ts_kscell(i,i) = 1
181 ts_kdispl(i) = 0._dp
182 end if
183
184 end subroutine setup_ts_scf_kscell
185
186 subroutine setup_ts_kpoint_grid( ucell )
187
188 ! SIESTA Modules
189 USE precision, only : dp
190 USE fdf, only : fdf_get
191 USE m_find_kgrid, only : find_kgrid
192 USE parallel, only : IONode
193 use m_ts_global_vars, only : TSmode
194 use kpoint_grid
195
196 ! Local Variables
197 real(dp), intent(in) :: ucell(3,3)
198
199 if ( .not. TSMode ) then
200
201 ! Same as SIESTA (mainly to be able to write the TSHS files).
202 ts_Gamma = gamma_SCF
203 ts_nkpnt = nkpnt
204 ts_eff_kgrid_cutoff = eff_kgrid_cutoff
205 ts_kweight => kweight
206 ts_kpoint => kpoint
207 ts_kscell = kscell
208 ts_kdispl = kdispl
209
210 ! Since this is not transiesta we immediately return
211 ! and then we also skip printing out transiesta information.
212 return
213
214 end if
215
216 if ( ts_scf_kgrid_first_time ) then
217
218 nullify(ts_kweight,ts_kpoint)
219 if ( fdf_get('SpinSpiral', .false.) ) then
220 call die('transiesta: Does not work with spin-spiral')
221 end if
222
223 call setup_ts_scf_kscell(ucell)
224
225 ts_scf_kgrid_first_time = .false.
226
227 else
228 if ( ts_user_requested_mp ) then
229 ! no need to set up the kscell again
230 else
231 call setup_ts_scf_kscell(ucell)
232 endif
233 endif
234
235 call find_kgrid(ucell,ts_kscell,ts_kdispl,ts_firm_displ, &
236 .true., &
237 ts_nkpnt,ts_kpoint,ts_kweight, ts_eff_kgrid_cutoff)
238
239 ts_Gamma = ts_nkpnt == 1 .and. &
240 dot_product(ts_kpoint(:,1),ts_kpoint(:,1)) < 1.0e-20_dp
241
242 if (IONode) call ts_write_k_points()
243
244 end subroutine setup_ts_kpoint_grid
245
246 subroutine ts_write_k_points()
247 USE siesta_options, only: writek
248 USE siesta_cml
249
250 implicit none
251
252 integer :: ik, ix, i
253
254 if ( writek ) then
255 write(*,'(/,a)') 'transiesta: ts_k-point coordinates (Bohr**-1) and weights:'
256 write(*,'(a,i4,3f12.6,3x,f12.6)') &
257 ('transiesta: ', ik, (ts_kpoint(ix,ik),ix=1,3), ts_kweight(ik), &
258 ik=1,ts_nkpnt)
259 endif
260
261 ! Always write the TranSIESTA k-points
262 call ts_iokp( ts_nkpnt, ts_kpoint, ts_kweight )
263
264 write(*,'(/,a,i6)') 'transiesta: k-grid: Number of Green function k-points =', ts_nkpnt
265 write(*,'(a)') 'transiesta: k-grid: Supercell and displacements'
266 write(*,'(a,3i4,3x,f8.3)') 'transiesta: k-grid: ', &
267 (ts_kscell(i,1),i=1,3), ts_kdispl(1)
268 write(*,'(a,3i4,3x,f8.3)') 'transiesta: k-grid: ', &
269 (ts_kscell(i,2),i=1,3), ts_kdispl(2)
270 write(*,'(a,3i4,3x,f8.3)') 'transiesta: k-grid: ', &
271 (ts_kscell(i,3),i=1,3), ts_kdispl(3)
272 if (cml_p) then
273 call cmlStartPropertyList(xf=mainXML, title="Transiesta k-points", &
274 dictRef="siesta:ts_kpoints")
275 call cmlAddProperty(xf=mainXML, value=ts_nkpnt, dictref='siesta:ts_nkpnt', &
276 units="cmlUnits:countable")
277 do ik=1, ts_nkpnt
278 call cmlAddKPoint(xf=mainXML, coords=ts_kpoint(:,ik), weight=ts_kweight(ik))
279 enddo
280 call cmlEndPropertyList(mainXML)
281 call cmlAddProperty(xf=mainXML, value=ts_kscell, dictref='siesta:ts_kscell', &
282 units="siestaUnits:Ang")
283 call cmlAddProperty(xf=mainXML, value=ts_kdispl, dictref='siesta:ts_kdispl', &
284 units="siestaUnits:Ang")
285 endif
286 end subroutine ts_write_k_points
287
288 subroutine ts_iokp( nk, points, weight )
289! *******************************************************************
290! Saves TranSIESTA k-points (only writing) Bohr^-1
291! Emilio Artacho, Feb. 1999
292! Modified by Nick Papior Andersen to not overwrite the SIESTA k-points
293! ********** INPUT **************************************************
294! integer nk : Number of TS k-points
295! real*8 points(3,nk) : TS k-point coordinates
296! real*8 weight(3,nk) : TS k-point weight
297! *******************************************************************
298 use fdf
299 use files, only : slabel, label_length
300
301 integer :: nk
302 real(dp) :: points(3,nk), weight(nk)
303 external :: io_assign, io_close
304
305! Internal
306 character(len=label_length+5) :: fname
307 integer :: iu, ik, ix
308! -------------------------------------------------------------------
309
310 fname = trim( slabel ) // '.TSKP'
311
312 call io_assign( iu )
313 open( iu, file=fname, form='formatted', status='unknown' )
314
315 write(iu,'(i6)') nk
316 write(iu,'(i6,3f12.6,3x,f12.6)') &
317 (ik, (points(ix,ik),ix=1,3), weight(ik), ik=1,nk)
318
319 call io_close( iu )
320
321 end subroutine ts_iokp
322
323end module m_ts_kpoints
3240
=== modified file 'Src/m_ts_mumpsk.F90'
--- Src/m_ts_mumpsk.F90 2017-12-12 08:11:00 +0000
+++ Src/m_ts_mumpsk.F90 2018-05-27 11:17:14 +0000
@@ -66,7 +66,7 @@
66 ! Self-energy expansion66 ! Self-energy expansion
67 use m_ts_elec_se67 use m_ts_elec_se
6868
69 use m_ts_kpoints, only : ts_nkpnt, ts_kpoint, ts_kweight69 use ts_kpoint_scf_m, only : ts_kpoints_scf
7070
71 use m_ts_options, only : Calc_Forces71 use m_ts_options, only : Calc_Forces
72 use m_ts_options, only : N_mu, mus72 use m_ts_options, only : N_mu, mus
@@ -236,7 +236,7 @@
236 end if236 end if
237237
238 ! start the itterators238 ! start the itterators
239 call itt_init (SpKp,end1=nspin,end2=ts_nkpnt)239 call itt_init (SpKp,end1=nspin,end2=ts_kpoints_scf%N)
240 ! point to the index iterators240 ! point to the index iterators
241 call itt_attach(SpKp,cur1=ispin,cur2=ikpt)241 call itt_attach(SpKp,cur1=ispin,cur2=ikpt)
242242
@@ -252,10 +252,10 @@
252 end if252 end if
253253
254 ! Include spin factor and 1/(2\pi)254 ! Include spin factor and 1/(2\pi)
255 kpt(:) = ts_kpoint(:,ikpt)255 kpt(:) = ts_kpoints_scf%k(:,ikpt)
256 ! create the k-point in reciprocal space256 ! create the k-point in reciprocal space
257 call kpoint_convert(ucell,kpt,bkpt,1)257 call kpoint_convert(ucell,kpt,bkpt,1)
258 kw = 0.5_dp / Pi * ts_kweight(ikpt)258 kw = 0.5_dp / Pi * ts_kpoints_scf%w(ikpt)
259 if ( nspin == 1 ) kw = kw * 2._dp259 if ( nspin == 1 ) kw = kw * 2._dp
260260
261 write(mum%ICNTL(1),'(/,a,i0,a,3(tr1,g10.4),/)') &261 write(mum%ICNTL(1),'(/,a,i0,a,3(tr1,g10.4),/)') &
262262
=== modified file 'Src/m_ts_trik.F90'
--- Src/m_ts_trik.F90 2017-11-17 20:53:23 +0000
+++ Src/m_ts_trik.F90 2018-05-27 11:17:14 +0000
@@ -72,7 +72,7 @@
72 ! Self-energy expansion72 ! Self-energy expansion
73 use m_ts_elec_se73 use m_ts_elec_se
7474
75 use m_ts_kpoints, only : ts_nkpnt, ts_kpoint, ts_kweight75 use ts_kpoint_scf_m, only : ts_kpoints_scf
7676
77 use m_ts_options, only : Calc_Forces77 use m_ts_options, only : Calc_Forces
78 use m_ts_options, only : N_mu, mus78 use m_ts_options, only : N_mu, mus
@@ -298,7 +298,7 @@
298298
299 299
300 ! start the itterators300 ! start the itterators
301 call itt_init (SpKp,end1=nspin,end2=ts_nkpnt)301 call itt_init (SpKp,end1=nspin,end2=ts_kpoints_scf%N)
302 ! point to the index iterators302 ! point to the index iterators
303 call itt_attach(SpKp,cur1=ispin,cur2=ikpt)303 call itt_attach(SpKp,cur1=ispin,cur2=ikpt)
304 304
@@ -311,10 +311,10 @@
311 end if311 end if
312312
313 ! Include spin factor and 1/(2\pi)313 ! Include spin factor and 1/(2\pi)
314 kpt(:) = ts_kpoint(:,ikpt)314 kpt(:) = ts_kpoints_scf%k(:,ikpt)
315 ! create the k-point in reciprocal space315 ! create the k-point in reciprocal space
316 call kpoint_convert(ucell,kpt,bkpt,1)316 call kpoint_convert(ucell,kpt,bkpt,1)
317 kw = 0.5_dp / Pi * ts_kweight(ikpt)317 kw = 0.5_dp / Pi * ts_kpoints_scf%w(ikpt)
318 if ( nspin == 1 ) kw = kw * 2._dp318 if ( nspin == 1 ) kw = kw * 2._dp
319 319
320#ifdef TRANSIESTA_TIMING320#ifdef TRANSIESTA_TIMING
@@ -685,7 +685,7 @@
685 ! Self-energy expansion685 ! Self-energy expansion
686 use m_ts_elec_se686 use m_ts_elec_se
687687
688 use m_ts_kpoints, only : ts_nkpnt, ts_kpoint, ts_kweight688 use ts_kpoint_scf_m, only : ts_kpoints_scf
689689
690 use m_ts_sparse, only : ts_sp_uc, tsup_sp_uc690 use m_ts_sparse, only : ts_sp_uc, tsup_sp_uc
691 use m_ts_sparse, only : ltsup_sp_sc, sc_off691 use m_ts_sparse, only : ltsup_sp_sc, sc_off
@@ -811,15 +811,15 @@
811 zDM => val(spuDM)811 zDM => val(spuDM)
812 call newdSpData2D(ltsup_sp_sc,1, sp_dist,spDM ,name='TS spDM')812 call newdSpData2D(ltsup_sp_sc,1, sp_dist,spDM ,name='TS spDM')
813 813
814 call itt_init (SpKp,end1=nspin,end2=ts_nkpnt)814 call itt_init (SpKp,end1=nspin,end2=ts_kpoints_scf%N)
815 call itt_attach(SpKp,cur1=ispin,cur2=ikpt)815 call itt_attach(SpKp,cur1=ispin,cur2=ikpt)
816 816
817 call init_val(spDM)817 call init_val(spDM)
818 do while ( .not. itt_step(SpKp) )818 do while ( .not. itt_step(SpKp) )
819819
820 kpt(:) = ts_kpoint(:,ikpt)820 kpt(:) = ts_kpoints_scf%k(:,ikpt)
821 call kpoint_convert(ucell,kpt,bkpt,1)821 call kpoint_convert(ucell,kpt,bkpt,1)
822 kw = 0.5_dp / Pi * ts_kweight(ikpt)822 kw = 0.5_dp / Pi * ts_kpoints_scf%w(ikpt)
823 if ( nspin == 1 ) kw = kw * 2._dp823 if ( nspin == 1 ) kw = kw * 2._dp
824 824
825#ifdef TRANSIESTA_TIMING825#ifdef TRANSIESTA_TIMING
826826
=== modified file 'Src/post_scf_work.F'
--- Src/post_scf_work.F 2018-02-27 14:03:49 +0000
+++ Src/post_scf_work.F 2018-05-27 11:17:14 +0000
@@ -40,7 +40,7 @@
40 use m_steps, only : istp, inicoor40 use m_steps, only : istp, inicoor
41 use m_compute_dm, only : PreviousCallDiagon41 use m_compute_dm, only : PreviousCallDiagon
42 use m_eo42 use m_eo
43 use Kpoint_grid43 use kpoint_scf_m, only: kpoints_scf
44 use m_gamma44 use m_gamma
45 implicit none45 implicit none
4646
@@ -81,7 +81,8 @@
81 & no_l, maxnh, maxnh, no_u,81 & no_l, maxnh, maxnh, no_u,
82 & numh, listhptr, listh, numh, listhptr, listh, 82 & numh, listhptr, listh, numh, listhptr, listh,
83 & H, S, qtot, fixspin, qtots, temp, 1.0_dp, -1.0_dp,83 & H, S, qtot, fixspin, qtots, temp, 1.0_dp, -1.0_dp,
84 & gamma, xijo, indxuo, nkpnt, kpoint, kweight,84 & gamma, xijo, indxuo,
85 & kpoints_scf%N, kpoints_scf%k, kpoints_scf%w,
85 & eo, qo, Dscf, Escf, ef, efs, Entropy, no_u,86 & eo, qo, Dscf, Escf, ef, efs, Entropy, no_u,
86 & occtol, iscf, neigwanted)87 & occtol, iscf, neigwanted)
87 Ecorrec = 0.0_dp88 Ecorrec = 0.0_dp
@@ -92,7 +93,8 @@
92 else93 else
93 call zminim(.true., .false., iscf, istp, no_l, nspin, no_u,94 call zminim(.true., .false., iscf, istp, no_l, nspin, no_u,
94 & maxnh, numh, listhptr, listh, Escf, eta, qtots,95 & maxnh, numh, listhptr, listh, Escf, eta, qtots,
95 & no_s, xijo, indxuo, nkpnt, kpoint, kweight)96 & no_s, xijo, indxuo,
97 & kpoints_scf%N, kpoints_scf%k, kpoints_scf%w)
96 end if98 end if
97 endif99 endif
98 endif100 endif
99101
=== modified file 'Src/projected_DOS.F'
--- Src/projected_DOS.F 2018-01-04 18:48:03 +0000
+++ Src/projected_DOS.F 2018-05-27 11:17:14 +0000
@@ -15,15 +15,15 @@
1515
16 public :: init_projected_DOS, projected_DOS16 public :: init_projected_DOS, projected_DOS
1717
18 logical :: different_pdos_grid ! Indicates if the grid is the same as the SCF one or not
19
20 CONTAINS18 CONTAINS
21 19
22 subroutine init_projected_DOS()20 subroutine init_projected_DOS()
2321
24 USE siesta_options22 USE siesta_options
25 use fdf, only: fdf_block, block_fdf23 use fdf, only: fdf_block, block_fdf
26 use Kpoint_pdos24 ! This is to get the reference kpoints in case PDOS.kgrid* has not
25 ! been specified
26 use kpoint_pdos_m, only: setup_kpoint_pdos
27 use parallel, only: IOnode, Nodes27 use parallel, only: IOnode, Nodes
28 use siesta_geom, only: ucell28 use siesta_geom, only: ucell
29 use m_spin, only: spin29 use m_spin, only: spin
@@ -50,7 +50,7 @@
5050
51! Determine whether the projected density of states is to be computed51! Determine whether the projected density of states is to be computed
52! on a different grid to the SCF calculation52! on a different grid to the SCF calculation
53 call setup_Kpoint_pdos( ucell, different_pdos_grid )53 call setup_kpoint_pdos( ucell )
54 54
55!---------------------------------------------------------------------------END55!---------------------------------------------------------------------------END
56 56
@@ -64,8 +64,8 @@
64 use atomlist, only : indxuo, no_s, no_u, no_l64 use atomlist, only : indxuo, no_s, no_u, no_l
65 use fdf65 use fdf
66 use sys, only : die66 use sys, only : die
67 use Kpoint_grid67 use kpoint_scf_m, only: kpoints_scf
68 use Kpoint_pdos68 use Kpoint_pdos_m, only: kpoints_pdos, gamma_pdos
69 use parallel, only: IOnode69 use parallel, only: IOnode
70 use m_eo70 use m_eo
71 use m_spin, only: h_spin_dim, spinor_dim71 use m_spin, only: h_spin_dim, spinor_dim
@@ -108,32 +108,19 @@
108 write(6,'(a,3(f8.2,a),2x,i5)')108 write(6,'(a,3(f8.2,a),2x,i5)')
109 $ 'siesta: e1, e2, sigma, nhist: ',109 $ 'siesta: e1, e2, sigma, nhist: ',
110 $ e1/eV,' eV',e2/eV,' eV',sigma/eV,' eV', nhist110 $ e1/eV,' eV',e2/eV,' eV',sigma/eV,' eV', nhist
111 end if
112
113 ! If the k points have been set specifically for the PDOS then use this set
114 if ( kpoints_pdos%N > kpoints_scf%N ) then
115 call re_alloc(eo,1,no_u,1,spinor_dim,1,kpoints_pdos%N,name="eo",
116 . routine="projected_dos")
111 end if117 end if
112118
113! If the k points have been set specifically for the PDOS then use this set119 call pdos( no_s, h_spin_dim, spinor_dim, no_l,
114 if (different_pdos_grid) then120 . maxnh, no_u, numh, listhptr, listh, H, S,
115121 . e1, e2, sigma, nhist, gamma_pdos, xijo, indxuo,
116! If the number of k points has increased then reallocate eo and qo122 . kpoints_pdos%N, kpoints_pdos%k, kpoints_pdos%w, eo,
117 if (maxk_pdos.gt.nkpnt) then123 . no_u)
118 call re_alloc(eo,1,no_u,1,spinor_dim,1,maxk_pdos,name="eo",
119 . routine="projected_dos")
120 endif
121
122 call pdos( no_s, h_spin_dim, spinor_dim, no_l,
123 . maxnh,
124 . no_u, numh, listhptr, listh, H, S,
125 . e1, e2, sigma, nhist, gamma_pdos, xijo, indxuo,
126 . nkpnt_pdos, kpoints_pdos, kweight_pdos, eo,
127 . no_u)
128 else
129! otherwise use the SCF grid
130 call pdos( no_s, h_spin_dim, spinor_dim, no_l,
131 . maxnh,
132 . no_u, numh, listhptr, listh, H, S,
133 . e1, e2, sigma, nhist,
134 . gamma, xijo, indxuo, nkpnt, kpoint, kweight, eo,
135 . no_u)
136 endif
137124
138 end subroutine projected_DOS125 end subroutine projected_DOS
139126
140127
=== modified file 'Src/sankey_change_basis.F90'
--- Src/sankey_change_basis.F90 2017-08-30 14:09:10 +0000
+++ Src/sankey_change_basis.F90 2018-05-27 11:17:14 +0000
@@ -1,236 +1,236 @@
1!1!
2! Copyright (C) 1996-2016 The SIESTA group2! Copyright (C) 1996-2016 The SIESTA group
3! This file is distributed under the terms of the3! This file is distributed under the terms of the
4! GNU General Public License: see COPYING in the top directory4! GNU General Public License: see COPYING in the top directory
5! or http://www.gnu.org/copyleft/gpl.txt.5! or http://www.gnu.org/copyleft/gpl.txt.
6! See Docs/Contributors.txt for a list of contributors.6! See Docs/Contributors.txt for a list of contributors.
7!7!
8MODULE m_sankey_change_basis 8MODULE m_sankey_change_basis
99
10 IMPLICIT NONE10 IMPLICIT NONE
11 PRIVATE11 PRIVATE
1212
13 PUBLIC :: sankey_change_basis13 PUBLIC :: sankey_change_basis
1414
15 CONTAINS15 CONTAINS
16! *******************************************************************16! *******************************************************************
1717
18 SUBROUTINE sankey_change_basis ( istpmove )18 SUBROUTINE sankey_change_basis ( istpmove )
1919
20!******************************************************************************20!******************************************************************************
21! This subroutine transforms the TDKS wavefunctions into new-basis during21! This subroutine transforms the TDKS wavefunctions into new-basis during
22! Ehrenfest dynamics within TDDFT after atomic positions are changed. The 22! Ehrenfest dynamics within TDDFT after atomic positions are changed. The
23! TDKS are transformed according to the transformation proposed by Tomfohr and 23! TDKS are transformed according to the transformation proposed by Tomfohr and
24! Sankey in Ref. phys. stat. sol. (b) 226 No.1, 115-123 (2001). 24! Sankey in Ref. phys. stat. sol. (b) 226 No.1, 115-123 (2001).
25! 25!
26! After transforming TDKS states it calculates the density matrix in new basis set. 26! After transforming TDKS states it calculates the density matrix in new basis set.
27! We use MatrixSwitch to manipulate matrices.27! We use MatrixSwitch to manipulate matrices.
28!28!
29! This subroutine is roughly based on D. Sanchez-Portal's chgbasis subroutine from, 29! This subroutine is roughly based on D. Sanchez-Portal's chgbasis subroutine from,
30! now absolete, serial version of tddft-siesta.30! now absolete, serial version of tddft-siesta.
31!31!
32! Re-written for parallelization by Adiran Garaizar and Rafi Ullah, October 201532! Re-written for parallelization by Adiran Garaizar and Rafi Ullah, October 2015
33! Modified by Rafi Ullah, February 201733! Modified by Rafi Ullah, February 2017
34!********************************************************************************34!********************************************************************************
3535
36 use precision36 use precision
37 use parallel, only : Node, Nodes,BlockSize, IONode 37 use parallel, only : Node, Nodes,BlockSize, IONode
38 use parallelsubs, only : GlobalToLocalOrb, GetNodeOrbs, &38 use parallelsubs, only : GlobalToLocalOrb, GetNodeOrbs, &
39 LocalToGlobalOrb39 LocalToGlobalOrb
40 use m_diag_option, only : ParallelOverK40 use m_diag_option, only : ParallelOverK
41 use fdf41 use fdf
42 use alloc42 use alloc
43 use sys, only: die43 use sys, only: die
44#ifdef MPI44#ifdef MPI
45 use mpi_siesta, only : mpi_bcast, mpi_comm_world, mpi_logical45 use mpi_siesta, only : mpi_bcast, mpi_comm_world, mpi_logical
46#endif46#endif
47 use m_spin, only: nspin47 use m_spin, only: nspin
48 use m_gamma, only: gamma48 use m_gamma, only: gamma
49 use Kpoint_grid, only: nkpnt, kpoint, kweight49 use kpoint_scf_m, only: kpoints_scf
50 use atomlist, only: no_u, indxuo50 use atomlist, only: no_u, indxuo
51 use wavefunctions51 use wavefunctions
52 use sparse_matrices, only : numh, listhptr, listh, S, xijo, Dscf52 use sparse_matrices, only : numh, listhptr, listh, S, xijo, Dscf
53 use MatrixSwitch53 use MatrixSwitch
54 use matdiagon, only: geteigen 54 use matdiagon, only: geteigen
55 !55 !
56 implicit none56 implicit none
57 !57 !
58 integer, intent(in) :: istpmove58 integer, intent(in) :: istpmove
59 !59 !
60#ifdef MPI60#ifdef MPI
61 integer :: MPIerror,desch(9)61 integer :: MPIerror,desch(9)
62 external :: diagkp62 external :: diagkp
63#endif63#endif
64 !64 !
65 logical, save :: frstme = .true.65 logical, save :: frstme = .true.
66 integer :: io, iuo, juo, nuo, jo, ind, ispin66 integer :: io, iuo, juo, nuo, jo, ind, ispin
67 integer :: ik, j,ierror67 integer :: ik, j,ierror
68 real(dp) :: skxij,ckxij, kxij, qe 68 real(dp) :: skxij,ckxij, kxij, qe
69 complex(dp) :: cvar169 complex(dp) :: cvar1
7070
71 type(matrix) :: Maux,invsqS,phi71 type(matrix) :: Maux,invsqS,phi
72 type(matrix) :: Sauxms72 type(matrix) :: Sauxms
73 type(matrix),allocatable,save :: sqrtS(:)73 type(matrix),allocatable,save :: sqrtS(:)
74 character(3) :: m_operation74 character(3) :: m_operation
75 character(5) :: m_storage75 character(5) :: m_storage
76 !76 !
77#ifdef DEBUG77#ifdef DEBUG
78 call write_debug( ' PRE sankey_change_basis' )78 call write_debug( ' PRE sankey_change_basis' )
79#endif79#endif
80 !80 !
81#ifdef MPI81#ifdef MPI
82 call GetNodeOrbs(no_u,Node,Nodes,nuo)82 call GetNodeOrbs(no_u,Node,Nodes,nuo)
83 if (frstme) then83 if (frstme) then
84 if(ParallelOverK) then84 if(ParallelOverK) then
85 call die ( "chgbasis: tddft-siesta not parallelized over k-points." )85 call die ( "chgbasis: tddft-siesta not parallelized over k-points." )
86 endif86 endif
87 call ms_scalapack_setup(mpi_comm_world,1,'c',BlockSize)87 call ms_scalapack_setup(mpi_comm_world,1,'c',BlockSize)
88 endif88 endif
89#else89#else
90 Node = 090 Node = 0
91 Nodes = 191 Nodes = 1
92 nuo = no_u92 nuo = no_u
93#endif93#endif
94 call timer( 'sankey_change_basis', 1 )94 call timer( 'sankey_change_basis', 1 )
95 !95 !
96#ifdef MPI96#ifdef MPI
97 m_storage='pzdbc'97 m_storage='pzdbc'
98 m_operation='lap'98 m_operation='lap'
99#else99#else
100 m_storage='szden'100 m_storage='szden'
101 m_operation='lap'101 m_operation='lap'
102#endif102#endif
103 !103 !
104 IF (nspin .eq. 4) THEN104 IF (nspin .eq. 4) THEN
105 call die ('chgbasis: ERROR: EID not yet prepared for non-collinear spin')105 call die ('chgbasis: ERROR: EID not yet prepared for non-collinear spin')
106 END IF106 END IF
107 ! Allocate local arrays107 ! Allocate local arrays
108 if(frstme) then108 if(frstme) then
109 allocate(sqrtS(nkpnt))109 allocate(sqrtS(kpoints_scf%N))
110 do ik=1,nkpnt110 do ik=1,kpoints_scf%N
111 call m_allocate(sqrtS(ik),no_u,no_u,m_storage)111 call m_allocate(sqrtS(ik),no_u,no_u,m_storage)
112 end do112 end do
113 frstme=.false.113 frstme=.false.
114 endif114 endif
115 call m_allocate(Maux,no_u,no_u,m_storage)115 call m_allocate(Maux,no_u,no_u,m_storage)
116 call m_allocate(invsqS,no_u,no_u,m_storage)116 call m_allocate(invsqS,no_u,no_u,m_storage)
117 !117 !
118 do ik = 1,nkpnt118 do ik = 1,kpoints_scf%N
119 call m_allocate(Sauxms,no_u,no_u,m_storage)119 call m_allocate(Sauxms,no_u,no_u,m_storage)
120 do iuo = 1,nuo120 do iuo = 1,nuo
121 call LocalToGlobalOrb(iuo, Node, Nodes, io)121 call LocalToGlobalOrb(iuo, Node, Nodes, io)
122 do j = 1,numh(iuo)122 do j = 1,numh(iuo)
123 ind = listhptr(iuo) + j123 ind = listhptr(iuo) + j
124 juo = listh(ind)124 juo = listh(ind)
125 jo = indxuo (juo)125 jo = indxuo (juo)
126 if(.not.gamma) then 126 if(.not.gamma) then
127 kxij = kpoint(1,ik) * xijo(1,ind) +&127 kxij = kpoints_scf%k(1,ik) * xijo(1,ind) +&
128 kpoint(2,ik) * xijo(2,ind) +&128 kpoints_scf%k(2,ik) * xijo(2,ind) +&
129 kpoint(3,ik) * xijo(3,ind)129 kpoints_scf%k(3,ik) * xijo(3,ind)
130 ckxij = cos(kxij)130 ckxij = cos(kxij)
131 skxij = -sin(kxij)131 skxij = -sin(kxij)
132 else 132 else
133 ckxij=1.0_dp133 ckxij=1.0_dp
134 skxij=0.0_dp134 skxij=0.0_dp
135 endif135 endif
136 cvar1 = cmplx(S(ind)*ckxij,S(ind)*skxij,dp)136 cvar1 = cmplx(S(ind)*ckxij,S(ind)*skxij,dp)
137 call m_set_element(Sauxms, jo, io, cvar1, complx_1, m_operation)137 call m_set_element(Sauxms, jo, io, cvar1, complx_1, m_operation)
138 enddo138 enddo
139 enddo139 enddo
140 !140 !
141 if(istpmove.eq.1) then ! istpmove 141 if(istpmove.eq.1) then ! istpmove
142 ! If first step calculate S0^1/2 and save for next step. 142 ! If first step calculate S0^1/2 and save for next step.
143 call calculatesqrtS(Sauxms,invsqS,sqrtS(ik),nuo,m_storage,m_operation)143 call calculatesqrtS(Sauxms,invsqS,sqrtS(ik),nuo,m_storage,m_operation)
144 elseif(istpmove.gt.1) then 144 elseif(istpmove.gt.1) then
145 ! Calculate both Sn^1/2 and Sn^-1/2 where Sn^1/2 is used in n+1 step. 145 ! Calculate both Sn^1/2 and Sn^-1/2 where Sn^1/2 is used in n+1 step.
146 call calculatesqrtS(Sauxms,invsqS,Maux,nuo,m_storage,m_operation)146 call calculatesqrtS(Sauxms,invsqS,Maux,nuo,m_storage,m_operation)
147 !Saux= Sn-1^1/2*Sn^-1/2147 !Saux= Sn-1^1/2*Sn^-1/2
148 call mm_multiply(invsqS,'n',sqrtS(ik),'n',&148 call mm_multiply(invsqS,'n',sqrtS(ik),'n',&
149 Sauxms,cmplx(1.0_dp,0.0_dp,dp),cmplx(0.0_dp,0.0_dp,dp),m_operation)149 Sauxms,cmplx(1.0_dp,0.0_dp,dp),cmplx(0.0_dp,0.0_dp,dp),m_operation)
150 ! Passing Sn^1/2 from Maux to sqrtS for next step usage.150 ! Passing Sn^1/2 from Maux to sqrtS for next step usage.
151 call m_add ( Maux,'n',sqrtS(ik),cmplx(1.0_dp,0.0_dp,dp), &151 call m_add ( Maux,'n',sqrtS(ik),cmplx(1.0_dp,0.0_dp,dp), &
152 cmplx(0.0_dp,0.0_dp,dp),m_operation )152 cmplx(0.0_dp,0.0_dp,dp),m_operation )
153 ! C1=S0^1/2*S1^1/2*C0153 ! C1=S0^1/2*S1^1/2*C0
154 qe=2.0d0*kweight(ik)/dble(nspin)154 qe=2.0d0*kpoints_scf%w(ik)/dble(nspin)
155 do ispin=1,nspin155 do ispin=1,nspin
156 ! Cn = Saux*Cn-1 where Saux= Sn-1^1/2*Sn^-1/2156 ! Cn = Saux*Cn-1 where Saux= Sn-1^1/2*Sn^-1/2
157 call m_allocate ( phi,wavef_ms(ik,ispin)%dim1, &157 call m_allocate ( phi,wavef_ms(ik,ispin)%dim1, &
158 wavef_ms(ik,ispin)%dim2,m_storage )158 wavef_ms(ik,ispin)%dim2,m_storage )
159 call m_add( wavef_ms(ik,ispin),'n',phi,cmplx(1.0,0.0,dp), &159 call m_add( wavef_ms(ik,ispin),'n',phi,cmplx(1.0,0.0,dp), &
160 cmplx(0.0_dp,0.0_dp,dp),m_operation )160 cmplx(0.0_dp,0.0_dp,dp),m_operation )
161 call mm_multiply(Sauxms,'n',phi,'n', &161 call mm_multiply(Sauxms,'n',phi,'n', &
162 wavef_ms(ik,ispin),cmplx(1.0_dp,0.0_dp,dp), &162 wavef_ms(ik,ispin),cmplx(1.0_dp,0.0_dp,dp), &
163 cmplx(0.0_dp,0.0_dp,dp),m_operation)163 cmplx(0.0_dp,0.0_dp,dp),m_operation)
164 call m_deallocate(phi)164 call m_deallocate(phi)
165 enddo 165 enddo
166 endif !istpmove 166 endif !istpmove
167 call m_deallocate(Sauxms)167 call m_deallocate(Sauxms)
168 enddo ! ik 168 enddo ! ik
169 !169 !
170 IF(istpmove.gt.1) THEN ! istpmove 170 IF(istpmove.gt.1) THEN ! istpmove
171 IF (IONode) THEN171 IF (IONode) THEN
172 WRITE(*,'(a)') 'chgbasis: Computing DM in new basis'172 WRITE(*,'(a)') 'chgbasis: Computing DM in new basis'
173 END IF173 END IF
174 call compute_tddm (Dscf)174 call compute_tddm (Dscf)
175 END IF175 END IF
176 call m_deallocate(Maux)176 call m_deallocate(Maux)
177 call m_deallocate(invsqS)177 call m_deallocate(invsqS)
178178
179 call timer('sankey_change_basis',2)179 call timer('sankey_change_basis',2)
180#ifdef DEBUG180#ifdef DEBUG
181 call write_debug( ' POS sankey_change_basis' )181 call write_debug( ' POS sankey_change_basis' )
182#endif182#endif
183 END SUBROUTINE sankey_change_basis 183 END SUBROUTINE sankey_change_basis
184184
185 SUBROUTINE calculatesqrtS(S,invsqS,sqrtS,nu,m_storage,m_operation)185 SUBROUTINE calculatesqrtS(S,invsqS,sqrtS,nu,m_storage,m_operation)
186 186
187 use precision 187 use precision
188 use matdiagon188 use matdiagon
189 use MatrixSwitch189 use MatrixSwitch
190 use parallelsubs, only: LocalToGlobalOrb190 use parallelsubs, only: LocalToGlobalOrb
191 use parallel, only: Node, Nodes191 use parallel, only: Node, Nodes
192 use wavefunctions, only: complx_0192 use wavefunctions, only: complx_0
193 ! 193 !
194 implicit none194 implicit none
195 ! 195 !
196 character(5), intent(in) :: m_storage196 character(5), intent(in) :: m_storage
197 character(3), intent(in) :: m_operation197 character(3), intent(in) :: m_operation
198 type(matrix), intent(inout) :: S,invsqS,sqrtS198 type(matrix), intent(inout) :: S,invsqS,sqrtS
199 type(matrix) :: SD01, SD02199 type(matrix) :: SD01, SD02
200 complex(dp) :: varaux200 complex(dp) :: varaux
201 real(dp) :: eig01, eig02201 real(dp) :: eig01, eig02
202 real(dp), allocatable :: eigen(:)202 real(dp), allocatable :: eigen(:)
203 integer :: no,nu, info, i, j,jo203 integer :: no,nu, info, i, j,jo
204 real(dp) tiny204 real(dp) tiny
205 data tiny /1.0d-10/205 data tiny /1.0d-10/
206 ! 206 !
207 no=S%dim1 207 no=S%dim1
208 allocate(eigen(no))208 allocate(eigen(no))
209 call m_allocate(SD01,no,no,m_storage)209 call m_allocate(SD01,no,no,m_storage)
210 call m_allocate(SD02,no,no,m_storage)210 call m_allocate(SD02,no,no,m_storage)
211 ! Takes overlap matrix S in dense form and returns its eigenvalues211 ! Takes overlap matrix S in dense form and returns its eigenvalues
212 ! in eigen(*) and eigenvectors in S.212 ! in eigen(*) and eigenvectors in S.
213 call geteigen(S,eigen,m_operation)213 call geteigen(S,eigen,m_operation)
214 !214 !
215 do j=1,nu215 do j=1,nu
216 call LocalToGlobalOrb(j,Node,Nodes,jo)216 call LocalToGlobalOrb(j,Node,Nodes,jo)
217 eig01=dsqrt(dabs(eigen(jo)))217 eig01=dsqrt(dabs(eigen(jo)))
218 eig02=1.0d0/(eig01+tiny)218 eig02=1.0d0/(eig01+tiny)
219 do i=1,no219 do i=1,no
220 varaux = S%zval(i,j)220 varaux = S%zval(i,j)
221 call m_set_element(SD01,i,jo,eig01*varaux,complx_0,m_operation)221 call m_set_element(SD01,i,jo,eig01*varaux,complx_0,m_operation)
222 call m_set_element(SD02,i,jo,eig02*varaux,complx_0,m_operation)222 call m_set_element(SD02,i,jo,eig02*varaux,complx_0,m_operation)
223 enddo223 enddo
224 enddo 224 enddo
225 !225 !
226 deallocate(eigen)226 deallocate(eigen)
227 227
228 call mm_multiply(SD01,'n',S,'c',sqrtS,cmplx(1.0_dp,0.0_dp,dp),&228 call mm_multiply(SD01,'n',S,'c',sqrtS,cmplx(1.0_dp,0.0_dp,dp),&
229 cmplx(0.0_dp,0.0_dp,dp),m_operation)229 cmplx(0.0_dp,0.0_dp,dp),m_operation)
230 call mm_multiply(SD02,'n',S,'c',invsqS,cmplx(1.0_dp,0.0_dp,dp),&230 call mm_multiply(SD02,'n',S,'c',invsqS,cmplx(1.0_dp,0.0_dp,dp),&
231 cmplx(0.0_dp,0.0_dp,dp),m_operation)231 cmplx(0.0_dp,0.0_dp,dp),m_operation)
232 call m_deallocate(SD01)232 call m_deallocate(SD01)
233 call m_deallocate(SD02)233 call m_deallocate(SD02)
234 !234 !
235 END SUBROUTINE calculatesqrtS235 END SUBROUTINE calculatesqrtS
236END MODULE m_sankey_change_basis236END MODULE m_sankey_change_basis
237237
=== modified file 'Src/siesta_analysis.F'
--- Src/siesta_analysis.F 2018-04-15 21:36:51 +0000
+++ Src/siesta_analysis.F 2018-05-27 11:17:14 +0000
@@ -40,7 +40,7 @@
40 use files, only : slabel40 use files, only : slabel
41 use files, only : filesOut_t ! derived type for output file names41 use files, only : filesOut_t ! derived type for output file names
42 use zmatrix, only: lUseZmatrix, write_zmatrix42 use zmatrix, only: lUseZmatrix, write_zmatrix
43 use Kpoint_grid43 use kpoint_scf_m, only: kpoints_scf
44 use parallel, only: IOnode44 use parallel, only: IOnode
45 use parallel, only: SIESTA_worker45 use parallel, only: SIESTA_worker
46 use files, only : label_length46 use files, only : label_length
@@ -286,16 +286,17 @@
286 ! The user is responsible for using appropriate values.286 ! The user is responsible for using appropriate values.
287 wfs_band_min = fdf_get("WFS.BandMin",1)287 wfs_band_min = fdf_get("WFS.BandMin",1)
288 wfs_band_max = fdf_get("WFS.BandMax",no_u)288 wfs_band_max = fdf_get("WFS.BandMax",no_u)
289 call setup_wfs_list(nkpnt,no_u,wfs_band_min,wfs_band_max,289 call setup_wfs_list(kpoints_scf%N,no_u,
290 & wfs_band_min,wfs_band_max,
290 $ use_scf_weights=.true.,291 $ use_scf_weights=.true.,
291 $ use_energy_window=.true.)292 $ use_energy_window=.true.)
292 wfs_filename = trim(slabel)//".fullBZ.WFSX"293 wfs_filename = trim(slabel)//".fullBZ.WFSX"
293 if (IONode) print "(a)", "Writing WFSX for COOP/COHP in " 294 if (IONode) print "(a)", "Writing WFSX for COOP/COHP in "
294 $ // trim(wfs_filename)295 $ // trim(wfs_filename)
295 call wwave( no_s, h_spin_dim, spinor_dim, no_u, no_l, maxnh, 296 call wwave( no_s, h_spin_dim, spinor_dim, no_u, no_l, maxnh,
296 . nkpnt,297 . kpoints_scf%N,
297 . numh, listhptr, listh, H, S, Ef, xijo, indxuo,298 . numh, listhptr, listh, H, S, Ef, xijo, indxuo,
298 . nkpnt, kpoint, no_u, gamma, occtol)299 . kpoints_scf%N, kpoints_scf%k, no_u, gamma, occtol)
299 endif300 endif
300301
301! Compute bands302! Compute bands
@@ -353,7 +354,7 @@
353 if ( h_spin_dim <= 2 ) then354 if ( h_spin_dim <= 2 ) then
354 write(6,'(/,a,/,a4,a3,a7)')355 write(6,'(/,a,/,a4,a3,a7)')
355 & 'siesta: Eigenvalues (eV):', 'ik', 'is', 'eps'356 & 'siesta: Eigenvalues (eV):', 'ik', 'is', 'eps'
356 do ik = 1,nkpnt357 do ik = 1,kpoints_scf%N
357 do ispin = 1,spinor_dim358 do ispin = 1,spinor_dim
358 write(6,'(i4,i3,10f7.2)')359 write(6,'(i4,i3,10f7.2)')
359 & ik,ispin,(eo(io,ispin,ik)/eV,io=1,min(10,neigwanted))360 & ik,ispin,(eo(io,ispin,ik)/eV,io=1,min(10,neigwanted))
@@ -363,7 +364,7 @@
363 enddo364 enddo
364 else365 else
365 write(6,'(/,a)') 'siesta: Eigenvalues (eV):'366 write(6,'(/,a)') 'siesta: Eigenvalues (eV):'
366 do ik = 1,nkpnt367 do ik = 1,kpoints_scf%N
367 write(6,'(a,i6)') 'ik =', ik368 write(6,'(a,i6)') 'ik =', ik
368 write(6,'(10f7.2)')369 write(6,'(10f7.2)')
369 & ((eo(io,ispin,ik)/eV,io=1,neigwanted),ispin=1,2)370 & ((eo(io,ispin,ik)/eV,io=1,neigwanted),ispin=1,2)
@@ -376,8 +377,9 @@
376 if (((isolve.eq.SOLVE_DIAGON).or.377 if (((isolve.eq.SOLVE_DIAGON).or.
377 & ((isolve.eq.SOLVE_MINIM).and.minim_calc_eigenvalues))378 & ((isolve.eq.SOLVE_MINIM).and.minim_calc_eigenvalues))
378 & .and.IOnode)379 & .and.IOnode)
379 & call ioeig(eo,ef,neigwanted,nspin,nkpnt,no_u,spinor_dim,380 & call ioeig(eo,ef,neigwanted,nspin,kpoints_scf%N,
380 & nkpnt,kpoint, kweight)381 & no_u,spinor_dim,
382 & kpoints_scf%N, kpoints_scf%k, kpoints_scf%w)
381383
382384
383!** This uses H,S, and xa, as it diagonalizes them again385!** This uses H,S, and xa, as it diagonalizes them again
384386
=== modified file 'Src/siesta_dicts.F90'
--- Src/siesta_dicts.F90 2018-01-25 20:01:19 +0000
+++ Src/siesta_dicts.F90 2018-05-27 11:17:14 +0000
@@ -218,7 +218,7 @@
218 subroutine dict_populate_variables()218 subroutine dict_populate_variables()
219219
220 use siesta_geom220 use siesta_geom
221 use kpoint_grid, only: kscell, kdispl221 use kpoint_scf_m, only: kpoints_scf
222 use m_forces222 use m_forces
223 use m_energies223 use m_energies
224 use atomlist224 use atomlist
@@ -327,9 +327,9 @@
327327
328 ! Add the k-point sampling328 ! Add the k-point sampling
329 variables = variables // &329 variables = variables // &
330 ('BZ.k.Matrix'.kvp.kscell)330 ('BZ.k.Matrix'.kvp.kpoints_scf%k_cell)
331 variables = variables // &331 variables = variables // &
332 ('BZ.k.Displacement'.kvp.kdispl)332 ('BZ.k.Displacement'.kvp.kpoints_scf%k_displ)
333333
334 end subroutine dict_populate_variables334 end subroutine dict_populate_variables
335335
336336
=== modified file 'Src/siesta_forces.F90'
--- Src/siesta_forces.F90 2018-04-24 10:26:39 +0000
+++ Src/siesta_forces.F90 2018-05-27 11:17:14 +0000
@@ -99,7 +99,7 @@
99 use m_ts_charge, only: TS_RHOCORR_FERMI99 use m_ts_charge, only: TS_RHOCORR_FERMI
100 use m_ts_charge, only: TS_RHOCORR_FERMI_TOLERANCE100 use m_ts_charge, only: TS_RHOCORR_FERMI_TOLERANCE
101 use m_transiesta, only: transiesta101 use m_transiesta, only: transiesta
102 use kpoint_grid, only : gamma_scf102 use kpoint_scf_m, only : gamma_scf
103 use m_energies, only : Ef103 use m_energies, only : Ef
104104
105 use m_initwf, only: initwf105 use m_initwf, only: initwf
106106
=== modified file 'Src/siesta_init.F'
--- Src/siesta_init.F 2018-05-15 13:01:22 +0000
+++ Src/siesta_init.F 2018-05-27 11:17:14 +0000
@@ -12,8 +12,9 @@
12 CONTAINS12 CONTAINS
1313
14 subroutine siesta_init()14 subroutine siesta_init()
15 use Kpoint_grid, only: setup_Kpoint_grid, gamma_scf, nkpnt15 use kpoint_scf_m, only: setup_kpoint_scf, kpoints_scf
16 USE Kpoint_pdos, only: gamma_pdos16 use kpoint_scf_m, only: gamma_scf
17 use kpoint_pdos_m, only: gamma_pdos
17 use Band, only: gamma_bands, setup_bands18 use Band, only: gamma_bands, setup_bands
18 use m_ksvinit, only: gamma_polarization,19 use m_ksvinit, only: gamma_polarization,
19 & estimate_pol_kpoints20 & estimate_pol_kpoints
@@ -568,9 +569,16 @@
568! NOTE: We need to know whether gamma is .true. or569! NOTE: We need to know whether gamma is .true. or
569! not early, in order to decide whether to use an 570! not early, in order to decide whether to use an
570! auxiliary supercell for the calculation of matrix elements.571! auxiliary supercell for the calculation of matrix elements.
571 call setup_Kpoint_grid( ucell )572 call setup_kpoint_scf( ucell )
572 gamma = gamma_scf573 gamma = gamma_scf
573574
575! Call initialisation of PDOS here since we need to check if
576! the auxiliary supercell is needed for a non-gamma calculation
577 call init_projected_DOS( )
578 if ( do_pdos ) then
579 gamma = gamma .and. gamma_pdos
580 endif
581
574 ! Read in diagonalization routines582 ! Read in diagonalization routines
575 ! Note that only the sampled BZ is responsible for583 ! Note that only the sampled BZ is responsible for
576 ! ParallelOverK option, the remaning options are584 ! ParallelOverK option, the remaning options are
@@ -578,17 +586,10 @@
578 call read_diag(Gamma_scf, spin%H)586 call read_diag(Gamma_scf, spin%H)
579 call print_diag()587 call print_diag()
580588
581! Call initialisation of PDOS here since we need to check if
582! the auxiliary supercell is needed for a non-gamma calculation
583 call init_projected_DOS( )
584 if (do_pdos) then
585 gamma = gamma .and. gamma_pdos
586 endif
587
588 nullify(eo,qo)589 nullify(eo,qo)
589 call re_alloc(eo, 1, no_u, 1, spin%spinor, 1, nkpnt, 'eo', 590 call re_alloc(eo, 1, no_u, 1, spin%spinor, 1, kpoints_scf%N, 'eo',
590 & 'siesta_init')591 & 'siesta_init')
591 call re_alloc(qo, 1, no_u, 1, spin%spinor, 1, nkpnt, 'qo', 592 call re_alloc(qo, 1, no_u, 1, spin%spinor, 1, kpoints_scf%N, 'qo',
592 & 'siesta_init')593 & 'siesta_init')
593594
594 call setup_bands( )595 call setup_bands( )
595596
=== modified file 'Src/siesta_tddft.F90'
--- Src/siesta_tddft.F90 2017-08-29 14:04:45 +0000
+++ Src/siesta_tddft.F90 2018-05-27 11:17:14 +0000
@@ -35,7 +35,7 @@
35 use atomlist, only: no_s, no_l, no_u, indxuo35 use atomlist, only: no_s, no_l, no_u, indxuo
36 use m_spin, only: nspin36 use m_spin, only: nspin
37 use m_gamma37 use m_gamma
38 use Kpoint_grid, only: nkpnt, kpoint, kweight38 use kpoint_scf_m, only: kpoints_scf
3939
40 use m_compute_energies, only: compute_energies40 use m_compute_energies, only: compute_energies
41 use m_state_analysis, only: state_analysis41 use m_state_analysis, only: state_analysis
@@ -114,8 +114,8 @@
114 ! ms_scalapack_setup. Which is now implicit in changebasis. 114 ! ms_scalapack_setup. Which is now implicit in changebasis.
115115
116 if ( istep == 1 ) then116 if ( istep == 1 ) then
117 allocate(wavef_ms(nkpnt,nspin))117 allocate(wavef_ms(kpoints_scf%N,nspin))
118 call iowavef('read',wavef_ms,no_u,nkpnt,nspin)118 call iowavef('read',wavef_ms,no_u,kpoints_scf%N,nspin)
119 IF (IONode) THEN119 IF (IONode) THEN
120 write(6,'(a)') 'Computing DM from initial KS wavefunctions'120 write(6,'(a)') 'Computing DM from initial KS wavefunctions'
121 END IF121 END IF
@@ -127,7 +127,7 @@
127 ! The wavefunctions are saved after transforming into the current basis127 ! The wavefunctions are saved after transforming into the current basis
128 ! but before evolving them to future.This keeps the wavefunctions128 ! but before evolving them to future.This keeps the wavefunctions
129 ! concurrent with atomic position.129 ! concurrent with atomic position.
130 if(fincoor .gt. 1) call iowavef('write',wavef_ms,no_u,nkpnt,nspin)130 if(fincoor .gt. 1) call iowavef('write',wavef_ms,no_u,kpoints_scf%N,nspin)
131 end if131 end if
132132
133 do itded = 1 , ntded ! TDED loop133 do itded = 1 , ntded ! TDED loop
@@ -142,7 +142,7 @@
142142
143 if (tdsavewf) then143 if (tdsavewf) then
144 if (fincoor .eq. 1 .and. itded .eq. ntded) then144 if (fincoor .eq. 1 .and. itded .eq. ntded) then
145 call iowavef('write',wavef_ms,no_u,nkpnt,nspin)145 call iowavef('write',wavef_ms,no_u,kpoints_scf%N,nspin)
146 endif146 endif
147 end if147 end if
148148
@@ -155,7 +155,7 @@
155 155
156 call compute_energies (itded)156 call compute_energies (itded)
157 call write_tddft(totime, istep, itded, ntded, rstart_time, &157 call write_tddft(totime, istep, itded, ntded, rstart_time, &
158 etot, eo, no_u,nspin,nkpnt)158 etot, eo, no_u,nspin,kpoints_scf%N)
159 159
160 end do ! TDED loop160 end do ! TDED loop
161 call compute_tdEdm (Escf)161 call compute_tdEdm (Escf)
162162
=== modified file 'Src/state_init.F'
--- Src/state_init.F 2018-05-15 13:01:22 +0000
+++ Src/state_init.F 2018-05-27 11:17:14 +0000
@@ -13,7 +13,9 @@
13 CONTAINS13 CONTAINS
1414
15 subroutine state_init( istep )15 subroutine state_init( istep )
16 use Kpoint_grid, only: setup_Kpoint_grid, nkpnt16 use kpoint_scf_m, only: setup_kpoint_scf, kpoints_scf
17 use kpoint_t_m, only: kpoint_delete, kpoint_nullify
18
17 use m_os, only: file_exist19 use m_os, only: file_exist
18 use m_new_dm, only: new_dm20 use m_new_dm, only: new_dm
19 use m_proximity_check, only: proximity_check21 use m_proximity_check, only: proximity_check
@@ -78,7 +80,7 @@
78 use sys, only: message, die80 use sys, only: message, die
79 use m_sparse, only : xij_offset81 use m_sparse, only : xij_offset
8082
81 use m_ts_kpoints, only: setup_ts_kpoint_grid83 use ts_kpoint_scf_m, only: setup_ts_kpoint_scf, ts_kpoints_scf
82 use m_ts_charge, only : TS_RHOCORR_METHOD, TS_RHOCORR_FERMI84 use m_ts_charge, only : TS_RHOCORR_METHOD, TS_RHOCORR_FERMI
83 use m_ts_options, only : BTD_method85 use m_ts_options, only : BTD_method
84 use m_ts_options, only : TS_Analyze86 use m_ts_options, only : TS_Analyze
@@ -263,14 +265,20 @@
263 & (istep.ne.inicoor) .and. (.not.gamma) ) then265 & (istep.ne.inicoor) .and. (.not.gamma) ) then
264266
265! Will print k-points also267! Will print k-points also
266 call setup_Kpoint_grid( ucell )268 call kpoint_delete(kpoints_scf)
267269 call setup_kpoint_scf( ucell )
268 call setup_ts_kpoint_grid( ucell )270
269271 if ( TSmode ) then
270 call re_alloc( eo, 1, no_u, 1, spin%spinor, 1, nkpnt, 'eo',272 call kpoint_delete( ts_kpoints_scf )
271 & 'state_init')273 else
272 call re_alloc( qo, 1, no_u, 1, spin%spinor, 1, nkpnt, 'qo',274 call kpoint_nullify( ts_kpoints_scf )
273 & 'state_init' )275 end if
276 call setup_ts_kpoint_scf( ucell, kpoints_scf )
277
278 call re_alloc( eo, 1, no_u, 1, spin%spinor, 1, kpoints_scf%N,
279 & 'eo', 'state_init')
280 call re_alloc( qo, 1, no_u, 1, spin%spinor, 1, kpoints_scf%N,
281 & 'qo', 'state_init' )
274282
275! Find required supercell283! Find required supercell
276 if (gamma) then284 if (gamma) then
277285
=== modified file 'Src/ts_init.F90'
--- Src/ts_init.F90 2017-11-19 20:18:39 +0000
+++ Src/ts_init.F90 2018-05-27 11:17:14 +0000
@@ -36,9 +36,9 @@
36 use m_ts_gf, only : do_Green, do_Green_Fermi36 use m_ts_gf, only : do_Green, do_Green_Fermi
37 use m_ts_electrode, only : init_Electrode_HS37 use m_ts_electrode, only : init_Electrode_HS
38 38
39 use m_ts_kpoints, only : setup_ts_kpoint_grid39 use kpoint_scf_m, only : kpoints_scf
40 use m_ts_kpoints, only : ts_nkpnt, ts_kpoint, ts_kweight40 use ts_kpoint_scf_m, only : setup_ts_kpoint_scf
41 use m_ts_kpoints, only : ts_kscell, ts_kdispl, ts_gamma41 use ts_kpoint_scf_m, only : ts_kpoints_scf, ts_Gamma_scf
42 use m_ts_cctype42 use m_ts_cctype
43 use m_ts_electype43 use m_ts_electype
44 use m_ts_options ! Just everything (easier)44 use m_ts_options ! Just everything (easier)
@@ -91,17 +91,17 @@
91 call read_ts_elec( ucell, na_u, xa, lasto )91 call read_ts_elec( ucell, na_u, xa, lasto )
9292
93 ! Read in the k-points93 ! Read in the k-points
94 call setup_ts_kpoint_grid( ucell )94 call setup_ts_kpoint_scf( ucell, kpoints_scf )
9595
96 ! Read after electrode stuff96 ! Read after electrode stuff
97 call read_ts_after_Elec( ucell, nspin, na_u, xa, lasto, &97 call read_ts_after_Elec( ucell, nspin, na_u, xa, lasto, &
98 ts_kscell, ts_kdispl)98 ts_kpoints_scf%k_cell, ts_kpoints_scf%k_displ)
9999
100 ! Print the options100 ! Print the options
101 call print_ts_options( ucell )101 call print_ts_options( ucell )
102102
103 ! Print all warnings103 ! Print all warnings
104 call print_ts_warnings( ts_Gamma, ucell, na_u, xa, Nmove )104 call print_ts_warnings( ts_Gamma_scf, ucell, na_u, xa, Nmove )
105105
106 ! If we actually have a transiesta run we need to process accordingly!106 ! If we actually have a transiesta run we need to process accordingly!
107 if ( .not. TSmode ) return107 if ( .not. TSmode ) return
@@ -188,13 +188,13 @@
188 call init_Electrode_HS(Elecs(i))188 call init_Electrode_HS(Elecs(i))
189189
190 call do_Green(Elecs(i), &190 call do_Green(Elecs(i), &
191 ucell,ts_nkpnt,ts_kpoint,ts_kweight, &191 ucell,ts_kpoints_scf%N,ts_kpoints_scf%k,ts_kpoints_scf%w, &
192 Elecs_xa_Eps, .false. )192 Elecs_xa_Eps, .false. )
193193
194 if ( TS_RHOCORR_METHOD == TS_RHOCORR_FERMI ) then194 if ( TS_RHOCORR_METHOD == TS_RHOCORR_FERMI ) then
195 195
196 call do_Green_Fermi(mean_kT, Elecs(i), &196 call do_Green_Fermi(mean_kT, Elecs(i), &
197 ucell,ts_nkpnt,ts_kpoint,ts_kweight, &197 ucell,ts_kpoints_scf%N,ts_kpoints_scf%k,ts_kpoints_scf%w, &
198 Elecs_xa_Eps, .false. )198 Elecs_xa_Eps, .false. )
199199
200 end if200 end if
201201
=== added file 'Src/ts_kpoint_scf.F90'
--- Src/ts_kpoint_scf.F90 1970-01-01 00:00:00 +0000
+++ Src/ts_kpoint_scf.F90 2018-05-27 11:17:14 +0000
@@ -0,0 +1,89 @@
1! ---
2! Copyright (C) 1996-2016 The SIESTA group
3! This file is distributed under the terms of the
4! GNU General Public License: see COPYING in the top directory
5! or http://www.gnu.org/copyleft/gpl.txt .
6! See Docs/Contributors.txt for a list of contributors.
7! ---
8module ts_kpoint_scf_m
9 !
10 ! Contains data structures and routines to deal with the kpoint-grid
11 ! for the self-consistent calculation
12 ! Other uses (bands, optical, polarization) have their own structures.
13 !
14 use precision, only : dp
15
16 ! The k-point-type
17 use kpoint_t_m
18
19 implicit none
20
21 public :: setup_ts_kpoint_scf
22 public :: ts_kpoints_scf
23 public :: ts_gamma_scf
24
25 private
26
27 logical, save :: ts_gamma_scf
28 type(kpoint_t), save :: ts_kpoints_scf
29
30contains
31
32 subroutine setup_ts_kpoint_scf( ucell, kpoints_scf )
33 use parallel, only: Node
34 use siesta_options, only: writek
35 use m_spin, only: TrSym
36 use m_ts_global_vars, only : TSmode
37
38 real(dp), intent(in) :: ucell(3,3)
39 type(kpoint_t), intent(in) :: kpoints_scf
40
41 call kpoint_read(ts_kpoints_scf, 'TS', ucell, TrSym, process_k_cell=process_k_cell_displ)
42
43 if ( ts_kpoints_scf%method == K_METHOD_NONE ) then
44
45 call kpoint_delete(ts_kpoints_scf)
46
47 if ( TSmode ) then
48 ! The user hasn't specified anything.
49 ! This means that we will use the default setting from siesta
50 call kpoint_read(ts_kpoints_scf, '', ucell, TrSym, process_k_cell=process_k_cell_displ)
51 else
52 ! To limit memory usage for very high number of k-points
53 call kpoint_associate(ts_kpoints_scf, kpoints_scf)
54 end if
55
56 end if
57
58 ts_gamma_scf = (ts_kpoints_scf%N == 1 .and. &
59 dot_product(ts_kpoints_scf%k(:,1),ts_kpoints_scf%k(:,1)) < 1.0e-20_dp)
60
61 ! Quick-return if non-IO or not a transiesta run
62 if ( .not. TSmode ) return
63 if ( Node /= 0 ) return
64
65 call kpoint_write_stdout(ts_kpoints_scf, writek, 'transiesta')
66 call kpoint_write_xml(ts_kpoints_scf, 'TS')
67 call kpoint_write_file(ts_kpoints_scf, 'TS.KP')
68
69 end subroutine setup_ts_kpoint_scf
70
71 subroutine process_k_cell_displ(k_cell, k_displ)
72 use m_ts_global_vars, only : TSmode
73 use m_ts_tdir, only: ts_tidx
74
75 integer, intent(inout) :: k_cell(3,3)
76 real(dp), intent(inout) :: k_displ(3)
77 integer :: i
78
79 if ( TSmode .and. ts_tidx > 0 ) then
80 i = ts_tidx
81 k_cell(:,i) = 0
82 k_cell(i,:) = 0
83 k_cell(i,i) = 1
84 k_displ(i) = 0._dp
85 end if
86
87 end subroutine process_k_cell_displ
88
89end module ts_kpoint_scf_m
090
=== modified file 'Src/wavefunctions.F90'
--- Src/wavefunctions.F90 2017-06-29 12:15:14 +0000
+++ Src/wavefunctions.F90 2018-05-27 11:17:14 +0000
@@ -1,333 +1,333 @@
1MODULE wavefunctions1MODULE wavefunctions
2 USE precision2 USE precision
3 USE MatrixSwitch3 USE MatrixSwitch
4 !4 !
5 implicit none 5 implicit none
6 ! 6 !
7 PRIVATE7 PRIVATE
8 PUBLIC :: iowavef, compute_tddm, compute_tdEdm8 PUBLIC :: iowavef, compute_tddm, compute_tdEdm
9 type(matrix), allocatable, save, public :: wavef_ms(:,:)9 type(matrix), allocatable, save, public :: wavef_ms(:,:)
10 TYPE(matrix), ALLOCATABLE, SAVE, public :: Hsave(:,:)10 TYPE(matrix), ALLOCATABLE, SAVE, public :: Hsave(:,:)
11 ! 11 !
12 complex(kind=dp), parameter, public :: complx_1 = cmplx(1.0,0.0,dp)12 complex(kind=dp), parameter, public :: complx_1 = cmplx(1.0,0.0,dp)
13 complex(kind=dp), parameter, public :: complx_0 = cmplx(0.0,0.0,dp)13 complex(kind=dp), parameter, public :: complx_0 = cmplx(0.0,0.0,dp)
1414
15CONTAINS15CONTAINS
16 !16 !
17 subroutine iowavef(task,wavef_rw,nuotot,nk,nspin)17 subroutine iowavef(task,wavef_rw,nuotot,nk,nspin)
18 18
19 ! To read and write the TDKS orbitals19 ! To read and write the TDKS orbitals
20 ! 20 !
21 ! Written by Daniel Sanchez-Portal21 ! Written by Daniel Sanchez-Portal
22 ! Re-written by Rafi Ullah, CIC nanoGUNE, October 16, 2015 to work22 ! Re-written by Rafi Ullah, CIC nanoGUNE, October 16, 2015 to work
23 ! with parallel TDDFT flavor of siesta using MatrixSwtich.23 ! with parallel TDDFT flavor of siesta using MatrixSwtich.
24 !24 !
25 ! Although it is prepared to work with parallel TDDFT-siesta the25 ! Although it is prepared to work with parallel TDDFT-siesta the
26 ! reading/writing process itself is not parallel.26 ! reading/writing process itself is not parallel.
27 use precision27 use precision
28 use parallel28 use parallel
29 use fdf29 use fdf
30 use MatrixSwitch30 use MatrixSwitch
31#ifdef MPI31#ifdef MPI
32 use mpi_siesta32 use mpi_siesta
33#endif33#endif
34 !34 !
35 implicit none35 implicit none
36 !36 !
37 integer, intent(in) :: nuotot, nk, nspin37 integer, intent(in) :: nuotot, nk, nspin
38 character*(*), intent(in) :: task38 character*(*), intent(in) :: task
39 type(matrix), intent(inout) :: wavef_rw(nk,nspin)39 type(matrix), intent(inout) :: wavef_rw(nk,nspin)
40 ! Internal variables and arrays40 ! Internal variables and arrays
41 character :: fname*33, sname*30, m_storage*541 character :: fname*33, sname*30, m_storage*5
42 logical :: exist1, frstme42 logical :: exist1, frstme
43 integer :: unit1, ie,nuototread,nkread,nspinread,dim2read43 integer :: unit1, ie,nuototread,nkread,nspinread,dim2read
44 integer :: nwf, ik, ispin, mxnwf, io, ix,i,j44 integer :: nwf, ik, ispin, mxnwf, io, ix,i,j
45 external :: chkdim, io_assign, io_close, timer,memory45 external :: chkdim, io_assign, io_close, timer,memory
46 complex(kind=dp) :: varaux46 complex(kind=dp) :: varaux
47 save :: frstme, fname47 save :: frstme, fname
48 data frstme /.true./48 data frstme /.true./
49 !49 !
50#ifdef MPI50#ifdef MPI
51 INTEGER :: MPIerror51 INTEGER :: MPIerror
52#endif52#endif
53 !53 !
54#ifdef MPI54#ifdef MPI
55 call MPI_Comm_Rank(MPI_Comm_World,Node,MPIerror)55 call MPI_Comm_Rank(MPI_Comm_World,Node,MPIerror)
56 call MPI_Comm_Size(MPI_Comm_World,Nodes,MPIerror)56 call MPI_Comm_Size(MPI_Comm_World,Nodes,MPIerror)
57#else57#else
58 Node = 058 Node = 0
59 Nodes = 159 Nodes = 1
60#endif60#endif
61 !61 !
62#ifdef MPI62#ifdef MPI
63 m_storage='pzdbc'63 m_storage='pzdbc'
64#else64#else
65 m_storage='szden'65 m_storage='szden'
66#endif66#endif
67 ! Find file name67 ! Find file name
68 if (frstme) then68 if (frstme) then
69 if (Node.eq.0) then69 if (Node.eq.0) then
70 sname = fdf_string('SystemLabel','siesta')70 sname = fdf_string('SystemLabel','siesta')
71 endif71 endif
72#ifdef MPI72#ifdef MPI
73 call MPI_Bcast(sname,30,MPI_character,0,MPI_Comm_World,MPIerror)73 call MPI_Bcast(sname,30,MPI_character,0,MPI_Comm_World,MPIerror)
74#endif74#endif
75 fname = trim(sname)//'.TDWF'75 fname = trim(sname)//'.TDWF'
76 frstme = .false.76 frstme = .false.
77 endif77 endif
78 !78 !
79 if (task.eq.'read' .or. task.eq.'READ') then ! task read79 if (task.eq.'read' .or. task.eq.'READ') then ! task read
80 if (Node.eq.0) then80 if (Node.eq.0) then
81 inquire (file=fname, exist=exist1)81 inquire (file=fname, exist=exist1)
82 if(exist1) then82 if(exist1) then
83 write(6,'(/,a)') &83 write(6,'(/,a)') &
84 'iowavef: reading initial KS wavefunctions from file'84 'iowavef: reading initial KS wavefunctions from file'
85 else85 else
86 write(6,'(/,a)') &86 write(6,'(/,a)') &
87 'iowavef: file containing the KS orbitals not found'87 'iowavef: file containing the KS orbitals not found'
88 write(6,'(a)') &88 write(6,'(a)') &
89 'iowavef: simulation can not be started or restarted'89 'iowavef: simulation can not be started or restarted'
90 stop 90 stop
91 endif91 endif
92 call io_assign(unit1)92 call io_assign(unit1)
93 open( unit1, file=fname, form='unformatted', &93 open( unit1, file=fname, form='unformatted', &
94 status='old' )94 status='old' )
95 endif95 endif
96 if (Node.eq.0) then96 if (Node.eq.0) then
97 read(unit1) nuototread, nkread, nspinread97 read(unit1) nuototread, nkread, nspinread
98 if(nkread.ne.nk) stop 'iowavef: Nunber of K-points inconsistent '98 if(nkread.ne.nk) stop 'iowavef: Nunber of K-points inconsistent '
99 if(nuototread.ne.nuotot) stop 'iowavef: Number of KS orbitals inconsistent ' 99 if(nuototread.ne.nuotot) stop 'iowavef: Number of KS orbitals inconsistent '
100 if(nspinread.ne.nspin) stop 'iowavef: Spin inconsistent '100 if(nspinread.ne.nspin) stop 'iowavef: Spin inconsistent '
101 endif101 endif
102 ! 102 !
103 do ispin=1,nspin 103 do ispin=1,nspin
104 do ik=1,nk104 do ik=1,nk
105 if (Node.eq.0) read(unit1) dim2read105 if (Node.eq.0) read(unit1) dim2read
106#ifdef MPI106#ifdef MPI
107 call MPI_Bcast(dim2read,1,MPI_integer,0,MPI_Comm_World,MPIerror)107 call MPI_Bcast(dim2read,1,MPI_integer,0,MPI_Comm_World,MPIerror)
108#endif108#endif
109 call m_allocate(wavef_rw(ik,ispin),nuotot,dim2read,m_storage)109 call m_allocate(wavef_rw(ik,ispin),nuotot,dim2read,m_storage)
110 enddo110 enddo
111 enddo111 enddo
112 !112 !
113 do ispin=1,nspin113 do ispin=1,nspin
114 do ik=1,nk114 do ik=1,nk
115 do i=1,nuotot115 do i=1,nuotot
116 do j=1,wavef_rw(ik,ispin)%dim2116 do j=1,wavef_rw(ik,ispin)%dim2
117 if (Node==0) read(unit1) varaux117 if (Node==0) read(unit1) varaux
118#ifdef MPI 118#ifdef MPI
119 call MPI_Bcast(varaux,1,MPI_double_complex,0,MPI_Comm_World,MPIerror)119 call MPI_Bcast(varaux,1,MPI_double_complex,0,MPI_Comm_World,MPIerror)
120#endif120#endif
121 call m_set_element(wavef_rw(ik,ispin),i,j,varaux,complx_0,'lap')121 call m_set_element(wavef_rw(ik,ispin),i,j,varaux,complx_0,'lap')
122 end do122 end do
123 end do123 end do
124 enddo124 enddo
125 enddo125 enddo
126 if (Node.eq.0) call io_close(unit1)126 if (Node.eq.0) call io_close(unit1)
127 !...................................................................... 127 !......................................................................
128 elseif(task.eq.'write'.or.task.eq.'WRITE') then ! task write128 elseif(task.eq.'write'.or.task.eq.'WRITE') then ! task write
129 if (Node.eq.0) then129 if (Node.eq.0) then
130 call io_assign(unit1)130 call io_assign(unit1)
131 open( unit1, file=fname, form='unformatted',status='replace' )131 open( unit1, file=fname, form='unformatted',status='replace' )
132 rewind(unit1)132 rewind(unit1)
133 write(unit1) nuotot,nk,nspin133 write(unit1) nuotot,nk,nspin
134 !134 !
135 do ispin=1,nspin135 do ispin=1,nspin
136 do ik=1,nk136 do ik=1,nk
137 write(unit1) (wavef_rw(ik,ispin)%dim2)137 write(unit1) (wavef_rw(ik,ispin)%dim2)
138 enddo138 enddo
139 enddo139 enddo
140 !140 !
141 end if141 end if
142 !142 !
143 do ispin=1,nspin143 do ispin=1,nspin
144 do ik=1,nk144 do ik=1,nk
145 do i=1,nuotot145 do i=1,nuotot
146 do j=1,wavef_rw(ik,ispin)%dim2146 do j=1,wavef_rw(ik,ispin)%dim2
147 call m_get_element(wavef_rw(ik,ispin),i,j,varaux,'lap')147 call m_get_element(wavef_rw(ik,ispin),i,j,varaux,'lap')
148 if (Node==0) write(unit1) varaux148 if (Node==0) write(unit1) varaux
149 enddo149 enddo
150 enddo150 enddo
151 enddo 151 enddo
152 enddo 152 enddo
153 !153 !
154 if (Node .eq. 0) then154 if (Node .eq. 0) then
155 call io_close(unit1)155 call io_close(unit1)
156 endif156 endif
157 endif ! end task 157 endif ! end task
158 !158 !
159 end subroutine iowavef159 end subroutine iowavef
160 !160 !
161 subroutine compute_tddm (Dnew)161 subroutine compute_tddm (Dnew)
162 162
163 ! To calculate the time-dependent density matrix from time-dependent163 ! To calculate the time-dependent density matrix from time-dependent
164 ! wavefunctions. 164 ! wavefunctions.
165 ! Written by Rafi Ullah January 2017165 ! Written by Rafi Ullah January 2017
166 !***********************************166 !***********************************
167 use sparse_matrices, only: numh, maxnh, listh, listhptr, &167 use sparse_matrices, only: numh, maxnh, listh, listhptr, &
168 xijo 168 xijo
169 use Kpoint_grid, only: nkpnt, kpoint, gamma_scf, kweight169 use kpoint_scf_m, only: kpoints_scf, gamma_scf
170 use atomlist, only: no_l, no_u, indxuo170 use atomlist, only: no_l, no_u, indxuo
171 use m_spin, only: nspin171 use m_spin, only: nspin
172 integer :: ispin, nuo, nuotot172 integer :: ispin, nuo, nuotot
173 integer :: io,jo, juo, j, ind, ik173 integer :: io,jo, juo, j, ind, ik
174 real(dp) :: Dnew (maxnh, nspin), wk, kxij174 real(dp) :: Dnew (maxnh, nspin), wk, kxij
175 real(dp) :: ckxij, skxij175 real(dp) :: ckxij, skxij
176 complex(dp) :: varaux176 complex(dp) :: varaux
177 type(matrix) :: Daux 177 type(matrix) :: Daux
178 character :: m_storage*5, m_operation*3178 character :: m_storage*5, m_operation*3
179#ifdef MPI179#ifdef MPI
180 m_storage ='pzdbc'180 m_storage ='pzdbc'
181 m_operation = 'lap'181 m_operation = 'lap'
182#else182#else
183 m_storage='szden'183 m_storage='szden'
184 m_operation = 'lap'184 m_operation = 'lap'
185#endif185#endif
186 Dnew(1:maxnh,1:nspin) = 0.0_dp186 Dnew(1:maxnh,1:nspin) = 0.0_dp
187 call m_allocate(Daux,no_u,no_u,m_storage)187 call m_allocate(Daux,no_u,no_u,m_storage)
188 Do ik = 1, nkpnt188 Do ik = 1, kpoints_scf%N
189 Do ispin =1, nspin189 Do ispin =1, nspin
190 wk = 2.00_dp*kweight(ik)/dble(nspin)190 wk = 2.00_dp*kpoints_scf%w(ik)/dble(nspin)
191 ! Calculating density matrix using MatrixSwitch.191 ! Calculating density matrix using MatrixSwitch.
192 call mm_multiply(wavef_ms(ik,ispin),'n',wavef_ms(ik,ispin),'c',Daux, & 192 call mm_multiply(wavef_ms(ik,ispin),'n',wavef_ms(ik,ispin),'c',Daux, &
193 cmplx(wk,0.0_dp,dp),cmplx(0.0_dp,0.0_dp,dp),m_operation)193 cmplx(wk,0.0_dp,dp),cmplx(0.0_dp,0.0_dp,dp),m_operation)
194 ! Passing DM from dense to sparse form. 194 ! Passing DM from dense to sparse form.
195 DO io=1,no_l195 DO io=1,no_l
196 DO j=1,numh(io)196 DO j=1,numh(io)
197 ind=listhptr(io) + j197 ind=listhptr(io) + j
198 juo = listh(ind)198 juo = listh(ind)
199 jo = indxuo(juo)199 jo = indxuo(juo)
200 IF (.NOT. gamma_scf) THEN200 IF (.NOT. gamma_scf) THEN
201 kxij = kpoint(1,ik) * xijo(1,ind) + &201 kxij = kpoints_scf%k(1,ik) * xijo(1,ind) + &
202 kpoint(2,ik) * xijo(2,ind) + &202 kpoints_scf%k(2,ik) * xijo(2,ind) + &
203 kpoint(3,ik) * xijo(3,ind) 203 kpoints_scf%k(3,ik) * xijo(3,ind)
204 ckxij = cos(kxij)204 ckxij = cos(kxij)
205 skxij = -sin(kxij)205 skxij = -sin(kxij)
206 ELSE206 ELSE
207 ckxij = 1.0_dp207 ckxij = 1.0_dp
208 skxij = 0.0_dp208 skxij = 0.0_dp
209 END IF209 END IF
210 varaux = real(Daux%zval(jo,io))*ckxij + &210 varaux = real(Daux%zval(jo,io))*ckxij + &
211 aimag(Daux%zval(jo,io))*skxij211 aimag(Daux%zval(jo,io))*skxij
212 Dnew(ind,ispin) = Dnew(ind,ispin) + varaux212 Dnew(ind,ispin) = Dnew(ind,ispin) + varaux
213 END DO213 END DO
214 END DO214 END DO
215 END DO215 END DO
216 END DO216 END DO
217 call m_deallocate (Daux)217 call m_deallocate (Daux)
218 end subroutine compute_tddm218 end subroutine compute_tddm
219!----------------------------------------------------------------------------------!219!----------------------------------------------------------------------------------!
220220
221221
222!----------------------------------------------------------------------------------!222!----------------------------------------------------------------------------------!
223 subroutine compute_tdEdm(Enew)223 subroutine compute_tdEdm(Enew)
224!**********************************************************************************!224!**********************************************************************************!
225! Re-written by Rafi Ullah in June 2017. !225! Re-written by Rafi Ullah in June 2017. !
226! In this subroutine we calculate the energy density matrix in parallel using !226! In this subroutine we calculate the energy density matrix in parallel using !
227! MatrixSwitch. !227! MatrixSwitch. !
228!**********************************************************************************!228!**********************************************************************************!
229 use parallel229 use parallel
230 use precision230 use precision
231 use parallelsubs, only: LocalToGlobalOrb231 use parallelsubs, only: LocalToGlobalOrb
232 use sparse_matrices, only: numh, maxnh, listh, listhptr, xijo232 use sparse_matrices, only: numh, maxnh, listh, listhptr, xijo
233 use sparse_matrices, only: H, S233 use sparse_matrices, only: H, S
234 use Kpoint_grid, only: nkpnt, kpoint, kweight234 use kpoint_scf_m, only: kpoints_scf, gamma_scf
235 use m_gamma, only: gamma235 use m_gamma, only: gamma
236 use atomlist, only: no_l, no_u, indxuo236 use atomlist, only: no_l, no_u, indxuo
237 use m_spin, only: nspin237 use m_spin, only: nspin
238 use MatrixSwitch238 use MatrixSwitch
239 use matswinversion, only: getinverse239 use matswinversion, only: getinverse
240 !240 !
241 implicit none241 implicit none
242 !242 !
243 real(dp) :: Enew(maxnh, nspin)243 real(dp) :: Enew(maxnh, nspin)
244 real(dp) :: wk, kxij, ckxij, skxij244 real(dp) :: wk, kxij, ckxij, skxij
245 integer :: ik, ispin, i, j, io, jo, ind, juo, nocc245 integer :: ik, ispin, i, j, io, jo, ind, juo, nocc
246 logical, save :: frstime = .true.246 logical, save :: frstime = .true.
247 character :: m_storage*5, m_operation*3247 character :: m_storage*5, m_operation*3
248 complex(dp) :: cvar1, cvar2248 complex(dp) :: cvar1, cvar2
249 !249 !
250 type(matrix) :: Sauxms, Hauxms,psi,Eaux250 type(matrix) :: Sauxms, Hauxms,psi,Eaux
251 type(matrix) :: S_1251 type(matrix) :: S_1
252 !252 !
253#ifdef MPI253#ifdef MPI
254 m_storage='pzdbc'254 m_storage='pzdbc'
255 m_operation='lap'255 m_operation='lap'
256#else256#else
257 m_storage='szden'257 m_storage='szden'
258 m_operation='lap'258 m_operation='lap'
259#endif259#endif
260 Enew(1:maxnh,1:nspin) = 0.0_dp260 Enew(1:maxnh,1:nspin) = 0.0_dp
261 call m_allocate(S_1,no_u,no_u,m_storage)261 call m_allocate(S_1,no_u,no_u,m_storage)
262 call m_allocate(Eaux,no_u,no_u,m_storage)262 call m_allocate(Eaux,no_u,no_u,m_storage)
263 Do ik=1,nkpnt263 Do ik=1,kpoints_scf%N
264 Do ispin=1,nspin264 Do ispin=1,nspin
265 wk = 2.00_dp*kweight(ik)/dble(nspin)265 wk = 2.00_dp*kpoints_scf%w(ik)/dble(nspin)
266 nocc = wavef_ms(ik,ispin)%dim2266 nocc = wavef_ms(ik,ispin)%dim2
267 call m_allocate(psi,nocc,no_u,m_storage)267 call m_allocate(psi,nocc,no_u,m_storage)
268 call m_allocate (Hauxms,no_u, no_u, m_storage)268 call m_allocate (Hauxms,no_u, no_u, m_storage)
269 call m_allocate (Sauxms,no_u, no_u, m_storage)269 call m_allocate (Sauxms,no_u, no_u, m_storage)
270 Do i = 1, no_l270 Do i = 1, no_l
271 call LocalToGlobalOrb(i, Node, Nodes, io)271 call LocalToGlobalOrb(i, Node, Nodes, io)
272 Do j = 1, numh(i)272 Do j = 1, numh(i)
273 ind = listhptr(i) + j273 ind = listhptr(i) + j
274 juo = listh(ind)274 juo = listh(ind)
275 jo = indxuo(juo)275 jo = indxuo(juo)
276 if( .not. gamma ) then276 if( .not. gamma_scf ) then
277 kxij = kpoint(1,ik)*xijo(1,ind) + kpoint(2,ik)*xijo(2,ind) + &277 kxij = kpoints_scf%k(1,ik)*xijo(1,ind) + kpoints_scf%k(2,ik)*xijo(2,ind) + &
278 kpoint(3,ik)*xijo(3,ind)278 kpoints_scf%k(3,ik)*xijo(3,ind)
279 ckxij = cos(kxij)279 ckxij = cos(kxij)
280 skxij = -sin(kxij)280 skxij = -sin(kxij)
281 else281 else
282 ckxij = 1.0_dp282 ckxij = 1.0_dp
283 skxij = 0.0_dp283 skxij = 0.0_dp
284 end if284 end if
285 cvar1 = cmplx(H(ind,ispin)*ckxij,H(ind,ispin)*skxij,dp)285 cvar1 = cmplx(H(ind,ispin)*ckxij,H(ind,ispin)*skxij,dp)
286 cvar2 = cmplx(S(ind)*ckxij,S(ind)*skxij,dp)286 cvar2 = cmplx(S(ind)*ckxij,S(ind)*skxij,dp)
287 call m_set_element(Hauxms,jo,io,cvar1,complx_1,m_operation)287 call m_set_element(Hauxms,jo,io,cvar1,complx_1,m_operation)
288 call m_set_element(Sauxms,jo,io,cvar2,complx_1,m_operation)288 call m_set_element(Sauxms,jo,io,cvar2,complx_1,m_operation)
289 end do289 end do
290 end do290 end do
291 !291 !
292 if (ispin .eq. 1) then292 if (ispin .eq. 1) then
293 ! copy Sauxms to S_1293 ! copy Sauxms to S_1
294 call m_add (Sauxms,'n',S_1,complx_1,complx_0,m_operation)294 call m_add (Sauxms,'n',S_1,complx_1,complx_0,m_operation)
295 ! Invert the overlap matrix.295 ! Invert the overlap matrix.
296 call getinverse(S_1,m_operation)296 call getinverse(S_1,m_operation)
297 end if297 end if
298 call mm_multiply(Hauxms,'n',S_1,'n',Eaux,complx_1,complx_0,m_operation)298 call mm_multiply(Hauxms,'n',S_1,'n',Eaux,complx_1,complx_0,m_operation)
299 call mm_multiply(wavef_ms(ik,ispin),'c',Eaux,'n',psi,complx_1, &299 call mm_multiply(wavef_ms(ik,ispin),'c',Eaux,'n',psi,complx_1, &
300 complx_0,m_operation)300 complx_0,m_operation)
301 call mm_multiply(wavef_ms(ik,ispin),'n',psi,'n',Eaux,cmplx(wk,0.0,dp), &301 call mm_multiply(wavef_ms(ik,ispin),'n',psi,'n',Eaux,cmplx(wk,0.0,dp), &
302 complx_0,m_operation)302 complx_0,m_operation)
303 ! Passing Energy-DM from dense to sparse form. 303 ! Passing Energy-DM from dense to sparse form.
304 DO io=1,no_l304 DO io=1,no_l
305 DO j=1,numh(io)305 DO j=1,numh(io)
306 ind=listhptr(io) + j306 ind=listhptr(io) + j
307 juo = listh(ind)307 juo = listh(ind)
308 jo = indxuo(juo)308 jo = indxuo(juo)
309 IF (.NOT. gamma) THEN309 IF (.NOT. gamma_scf) THEN
310 kxij = kpoint(1,ik) * xijo(1,ind) + &310 kxij = kpoints_scf%k(1,ik) * xijo(1,ind) + &
311 kpoint(2,ik) * xijo(2,ind) + &311 kpoints_scf%k(2,ik) * xijo(2,ind) + &
312 kpoint(3,ik) * xijo(3,ind) 312 kpoints_scf%k(3,ik) * xijo(3,ind)
313 ckxij = cos(kxij)313 ckxij = cos(kxij)
314 skxij = -sin(kxij)314 skxij = -sin(kxij)
315 ELSE315 ELSE
316 ckxij = 1.0_dp316 ckxij = 1.0_dp
317 skxij = 0.0_dp317 skxij = 0.0_dp
318 END IF318 END IF
319 cvar1 = real(Eaux%zval(jo,io))*ckxij + &319 cvar1 = real(Eaux%zval(jo,io))*ckxij + &
320 aimag(Eaux%zval(jo,io))*skxij320 aimag(Eaux%zval(jo,io))*skxij
321 Enew(ind,ispin) = Enew(ind,ispin) + cvar1321 Enew(ind,ispin) = Enew(ind,ispin) + cvar1
322 END DO322 END DO
323 END DO323 END DO
324 call m_deallocate(Sauxms)324 call m_deallocate(Sauxms)
325 call m_deallocate(Hauxms)325 call m_deallocate(Hauxms)
326 call m_deallocate(psi)326 call m_deallocate(psi)
327 end do327 end do
328 end do328 end do
329 call m_deallocate(S_1)329 call m_deallocate(S_1)
330 call m_deallocate(Eaux)330 call m_deallocate(Eaux)
331 end subroutine compute_tdEdm 331 end subroutine compute_tdEdm
332 !332 !
333end module wavefunctions 333end module wavefunctions
334334
=== modified file 'Src/writewave.F'
--- Src/writewave.F 2017-10-10 19:27:53 +0000
+++ Src/writewave.F 2018-05-27 11:17:14 +0000
@@ -693,7 +693,7 @@
693 use parallel, only : Node, Nodes693 use parallel, only : Node, Nodes
694 use parallelsubs, only : GlobalToLocalOrb, WhichNodeOrb694 use parallelsubs, only : GlobalToLocalOrb, WhichNodeOrb
695 use units, only : eV695 use units, only : eV
696 use kpoint_grid, only : kweight696 use kpoint_scf_m, only: kpoints_scf
697697
698#ifdef MPI698#ifdef MPI
699 use mpi_siesta699 use mpi_siesta
@@ -788,7 +788,7 @@
788 $ // "wavefunction coefficients from WFSX file"788 $ // "wavefunction coefficients from WFSX file"
789 endif789 endif
790 if (scf_set) then790 if (scf_set) then
791 kpoint_weight = kweight(ik)791 kpoint_weight = kpoints_scf%w(ik)
792 else792 else
793 kpoint_weight = 1.0_dp793 kpoint_weight = 1.0_dp
794 endif794 endif
795795
=== added file 'Tests/Reference/si_coop_kp_file.out'
--- Tests/Reference/si_coop_kp_file.out 1970-01-01 00:00:00 +0000
+++ Tests/Reference/si_coop_kp_file.out 2018-05-27 11:17:14 +0000
@@ -0,0 +1,483 @@
1Siesta Version : trunk-697
2Architecture : x86_64-linux-gcc
3Compiler version: GNU Fortran (GCC) 7.3.0
4Compiler flags : mpifort -m64 -fPIC -O3 -ftree-vectorize -fexpensive-optimizations -funroll-loops -fprefetch-loop-arrays -fgraphite -fipa-icf -fipa-pure-const -march=native -fschedule-fusion -fselective-scheduling -fstack-arrays -fmax-stack-var-size=10000 -fipa-sra -fipa-cp -fno-second-underscore
5PP flags : -DSIESTA__FLOOK -DSIESTA__METIS -DSIESTA__FFTW -DSIESTA__MRRR -DMPI -DFC_HAVE_FLUSH -DFC_HAVE_ABORT -DCDF -DGRID_DP -DMPI_TIMING -DTRANSIESTA_TIMING -DTBTRANS_TIMING -DSIESTA__MUMPS -DNCDF_PARALLEL -DNCDF -DNCDF_4 -DSCALAPACK_DEBUG -D_DIAG_WORK -DSIESTA__ELPA
6Libraries : libncdf.a libfdict.a -lzmumps -lmumps_common -lpord -lparmetis -lmetis -lesmumps -lscotch -lscotcherr -L/opt/elpa/2017.05.003/gnu-7.3.0/lib -Wl,-rpath=/opt/elpa/2017.05.003/gnu-7.3.0/lib -lelpa -L/opt/scalapack/204/gnu-7.3.0/lib -Wl,-rpath=/opt/scalapack/204/gnu-7.3.0/lib -lscalapack -L/opt/openblas/0.2.20/gnu-7.3.0/lib -Wl,-rpath=/opt/openblas/0.2.20/gnu-7.3.0/lib -lopenblas -L/home/nicpa/codes/flook/obj -lflookall -ldl -lnetcdff -lnetcdf -lpnetcdf -lhdf5_hl -lhdf5 -lz -m64 -fPIC -O3 -ftree-vectorize -fexpensive-optimizations -funroll-loops -fprefetch-loop-arrays -fgraphite -fipa-icf -fipa-pure-const -march=native -fschedule-fusion -fselective-scheduling -fstack-arrays -fmax-stack-var-size=10000 -fipa-sra -fipa-cp -fno-second-underscore -L/opt/fftw/3.3.7/gnu-7.3.0/lib -Wl,-rpath=/opt/fftw/3.3.7/gnu-7.3.0/lib -lfftw3
7PARALLEL version
8NetCDF support
9NetCDF-4 support
10NetCDF-4 MPI-IO support
11METIS ordering support
12
13* Running on 2 nodes in parallel
14>> Start of run: 24-MAY-2018 21:57:34
15
16 ***********************
17 * WELCOME TO SIESTA *
18 ***********************
19
20reinit: Reading from ../si_coop_kp_file.fdf
21
22reinit: -----------------------------------------------------------------------
23reinit: System Name: Si chain for COOP curves calculation
24reinit: -----------------------------------------------------------------------
25reinit: System Label: si_coop_kp_file
26reinit: -----------------------------------------------------------------------
27
28initatom: Reading input for the pseudopotentials and atomic orbitals ----------
29Species number: 1 Atomic number: 14 Label: Si
30
31Ground state valence configuration: 3s02 3p02
32Reading pseudopotential information in formatted form from Si.psf
33
34Valence configuration for pseudopotential generation:
353s( 2.00) rc: 1.89
363p( 2.00) rc: 1.89
373d( 0.00) rc: 1.89
384f( 0.00) rc: 1.89
39For Si, standard SIESTA heuristics set lmxkb to 3
40 (one more than the basis l, including polarization orbitals).
41Use PS.lmax or PS.KBprojectors blocks to override.
42
43<basis_specs>
44===============================================================================
45Si Z= 14 Mass= 28.090 Charge= 0.17977+309
46Lmxo=1 Lmxkb= 3 BasisType=split Semic=F
47L=0 Nsemic=0 Cnfigmx=3
48 n=1 nzeta=1 polorb=0
49 splnorm: 0.15000
50 vcte: 0.0000
51 rinn: 0.0000
52 qcoe: 0.0000
53 qyuk: 0.0000
54 qwid: 0.10000E-01
55 rcs: 0.0000
56 lambdas: 1.0000
57L=1 Nsemic=0 Cnfigmx=3
58 n=1 nzeta=1 polorb=1
59 splnorm: 0.15000
60 vcte: 0.0000
61 rinn: 0.0000
62 qcoe: 0.0000
63 qyuk: 0.0000
64 qwid: 0.10000E-01
65 rcs: 0.0000
66 lambdas: 1.0000
67-------------------------------------------------------------------------------
68L=0 Nkbl=1 erefs: 0.17977+309
69L=1 Nkbl=1 erefs: 0.17977+309
70L=2 Nkbl=1 erefs: 0.17977+309
71L=3 Nkbl=1 erefs: 0.17977+309
72===============================================================================
73</basis_specs>
74
75atom: Called for Si (Z = 14)
76
77read_vps: Pseudopotential generation method:
78read_vps: ATM3 Troullier-Martins
79Total valence charge: 4.00000
80
81xc_check: Exchange-correlation functional:
82xc_check: Ceperley-Alder
83V l=0 = -2*Zval/r beyond r= 2.5494
84V l=1 = -2*Zval/r beyond r= 2.5494
85V l=2 = -2*Zval/r beyond r= 2.5494
86V l=3 = -2*Zval/r beyond r= 2.5494
87All V_l potentials equal beyond r= 1.8652
88This should be close to max(r_c) in ps generation
89All pots = -2*Zval/r beyond r= 2.5494
90Using large-core scheme for Vlocal
91
92atom: Estimated core radius 2.54944
93
94atom: Including non-local core corrections could be a good idea
95atom: Maximum radius for 4*pi*r*r*local-pseudopot. charge 2.85303
96atom: Maximum radius for r*vlocal+2*Zval: 2.58151
97
98KBgen: Kleinman-Bylander projectors:
99GHOST: No ghost state for L = 0
100 l= 0 rc= 1.936440 el= -0.796617 Ekb= 4.661340 kbcos= 0.299756
101GHOST: No ghost state for L = 1
102 l= 1 rc= 1.936440 el= -0.307040 Ekb= 1.494238 kbcos= 0.301471
103GHOST: No ghost state for L = 2
104 l= 2 rc= 1.936440 el= 0.002313 Ekb= -2.808672 kbcos= -0.054903
105GHOST: No ghost state for L = 3
106 l= 3 rc= 1.936440 el= 0.003402 Ekb= -0.959059 kbcos= -0.005513
107
108KBgen: Total number of Kleinman-Bylander projectors: 16
109atom: -------------------------------------------------------------------------
110
111atom: SANKEY-TYPE ORBITALS:
112
113SPLIT: Orbitals with angular momentum L= 0
114
115SPLIT: Basis orbitals for state 3s
116
117SPLIT: PAO cut-off radius determined from an
118SPLIT: energy shift= 0.007350 Ry
119
120 izeta = 1
121 lambda = 1.000000
122 rc = 5.674097
123 energy = -0.790139
124 kinetic = 0.533579
125 potential(screened) = -1.323718
126 potential(ionic) = -3.776962
127
128SPLIT: Orbitals with angular momentum L= 1
129
130SPLIT: Basis orbitals for state 3p
131
132SPLIT: PAO cut-off radius determined from an
133SPLIT: energy shift= 0.007350 Ry
134
135 izeta = 1
136 lambda = 1.000000
137 rc = 7.105845
138 energy = -0.299565
139 kinetic = 0.824289
140 potential(screened) = -1.123854
141 potential(ionic) = -3.348521
142
143POLgen: Perturbative polarization orbital with L= 2
144
145POLgen: Polarization orbital for state 3p
146
147 izeta = 1
148 rc = 7.105845
149 energy = 0.366373
150 kinetic = 1.162439
151 potential(screened) = -0.796066
152 potential(ionic) = -2.795335
153atom: Total number of Sankey-type orbitals: 9
154
155atm_pop: Valence configuration (for local Pseudopot. screening):
156 3s( 2.00)
157 3p( 2.00)
158Vna: chval, zval: 4.00000 4.00000
159
160Vna: Cut-off radius for the neutral-atom potential: 7.105845
161
162atom: _________________________________________________________________________
163
164prinput: Basis input ----------------------------------------------------------
165
166PAO.BasisType split
167
168%block ChemicalSpeciesLabel
169 1 14 Si # Species index, atomic number, species label
170%endblock ChemicalSpeciesLabel
171
172%block PAO.Basis # Define Basis set
173Si 2 # Species label, number of l-shells
174 n=3 0 1 # n, l, Nzeta
175 5.674
176 1.000
177 n=3 1 1 P 1 # n, l, Nzeta, Polarization, NzetaPol
178 7.106
179 1.000
180%endblock PAO.Basis
181
182prinput: ----------------------------------------------------------------------
183
184Dumping basis to NetCDF file Si.ion.nc
185coor: Atomic-coordinates input format = Cartesian coordinates
186coor: (in Angstroms)
187
188siesta: Atomic coordinates (Bohr) and species
189siesta: 0.00000 0.00000 0.00000 1 1
190siesta: 1.88973 0.00000 0.00000 1 2
191siesta: 3.77945 0.00000 0.00000 1 3
192siesta: 5.66918 0.00000 0.00000 1 4
193
194siesta: System type = chain
195
196initatomlists: Number of atoms, orbitals, and projectors: 4 36 64
197
198siesta: ******************** Simulation parameters ****************************
199siesta:
200siesta: The following are some of the parameters of the simulation.
201siesta: A complete list of the parameters used, including default values,
202siesta: can be found in file out.fdf
203siesta:
204redata: Spin configuration = none
205redata: Number of spin components = 1
206redata: Time-Reversal Symmetry = T
207redata: Spin-spiral = F
208redata: Long output = F
209redata: Number of Atomic Species = 1
210redata: Charge density info will appear in .RHO file
211redata: Write Mulliken Pop. = NO
212redata: Matel table size (NRTAB) = 1024
213redata: Mesh Cutoff = 150.0000 Ry
214redata: Net charge of the system = 0.0000 |e|
215redata: Min. number of SCF Iter = 0
216redata: Max. number of SCF Iter = 500
217redata: SCF convergence failure will abort job
218redata: SCF mix quantity = Hamiltonian
219redata: Mix DM or H after convergence = F
220redata: Recompute H after scf cycle = F
221redata: Mix DM in first SCF step = T
222redata: Write Pulay info on disk = F
223redata: New DM Mixing Weight = 0.1000
224redata: New DM Occupancy tolerance = 0.000000000001
225redata: No kicks to SCF
226redata: DM Mixing Weight for Kicks = 0.5000
227redata: Require Harris convergence for SCF = F
228redata: Harris energy tolerance for SCF = 0.000100 eV
229redata: Require DM convergence for SCF = T
230redata: DM tolerance for SCF = 0.000100
231redata: Require EDM convergence for SCF = F
232redata: EDM tolerance for SCF = 0.001000 eV
233redata: Require H convergence for SCF = T
234redata: Hamiltonian tolerance for SCF = 0.001000 eV
235redata: Require (free) Energy convergence for SCF = F
236redata: (free) Energy tolerance for SCF = 0.000100 eV
237redata: Using Saved Data (generic) = F
238redata: Use continuation files for DM = F
239redata: Neglect nonoverlap interactions = F
240redata: Method of Calculation = Diagonalization
241redata: Electronic Temperature = 290.1109 K
242redata: Fix the spin of the system = F
243redata: Max. number of TDED Iter = 1
244redata: Number of TDED substeps = 3
245redata: Dynamics option = Single-point calculation
246mix.SCF: Pulay mixing = Pulay
247mix.SCF: Variant = stable
248mix.SCF: History steps = 3
249mix.SCF: Linear mixing weight = 0.100000
250mix.SCF: Mixing weight = 0.100000
251mix.SCF: SVD condition = 0.1000E-07
252redata: Save all siesta data in one NC = F
253redata: ***********************************************************************
254
255%block SCF.Mixers
256 Pulay
257%endblock SCF.Mixers
258
259%block SCF.Mixer.Pulay
260 # Mixing method
261 method pulay
262 variant stable
263
264 # Mixing options
265 weight 0.1000
266 weight.linear 0.1000
267 history 3
268%endblock SCF.Mixer.Pulay
269
270DM_history_depth set to one: no extrapolation allowed by default for geometry relaxation
271Size of DM history Fstack: 1
272Total number of electrons: 16.000000
273Total ionic charge: 16.000000
274
275* ProcessorY, Blocksize: 1 19
276
277
278* Orbital distribution balance (max,min): 19 17
279
280
281siesta: k-grid: Number of k-points = 5
282siesta: k-points from user-defined list
283
284siesta: PDOS k-grid: Number of k-points = 5
285siesta: PDOS k-points from user-defined list
286
287diag: Algorithm = D&C
288diag: Parallel over k = F
289diag: Use parallel 2D distribution = F
290diag: Parallel block-size = 19
291diag: Parallel distribution = 1 x 2
292diag: Used triangular part = Lower
293diag: Absolute tolerance = 0.100E-15
294diag: Orthogonalization factor = 0.100E-05
295diag: Memory factor = 1.0000
296
297superc: Internal auxiliary supercell: 5 x 1 x 1 = 5
298superc: Number of atoms, orbitals, and projectors: 20 180 320
299
300
301ts: **************************************************************
302ts: Save H and S matrices = F
303ts: Save DM and EDM matrices = F
304ts: Fix Hartree potential = F
305ts: Only save the overlap matrix S = F
306ts: **************************************************************
307
308************************ Begin: TS CHECKS AND WARNINGS ************************
309************************ End: TS CHECKS AND WARNINGS **************************
310
311
312 ====================================
313 Single-point calculation
314 ====================================
315
316superc: Internal auxiliary supercell: 5 x 1 x 1 = 5
317superc: Number of atoms, orbitals, and projectors: 20 180 320
318
319outcell: Unit cell vectors (Ang):
320 4.000000 0.000000 0.000000
321 0.000000 10.000000 0.000000
322 0.000000 0.000000 10.000000
323
324outcell: Cell vector modules (Ang) : 4.000000 10.000000 10.000000
325outcell: Cell angles (23,13,12) (deg): 90.0000 90.0000 90.0000
326outcell: Cell volume (Ang**3) : 400.0000
327<dSpData1D:S at geom step 0
328 <sparsity:sparsity for geom step 0
329 nrows_g=36 nrows=19 sparsity=2.2431 nnzs=2907, refcount: 7>
330 <dData1D:(new from dSpData1D) n=2907, refcount: 1>
331refcount: 1>
332new_DM -- step: 1
333Initializing Density Matrix...
334DM filled with atomic data:
335<dSpData2D:DM initialized from atoms
336 <sparsity:sparsity for geom step 0
337 nrows_g=36 nrows=19 sparsity=2.2431 nnzs=2907, refcount: 8>
338 <dData2D:DM n=2907 m=1, refcount: 1>
339refcount: 1>
340No. of atoms with KB's overlaping orbs in proc 0. Max # of overlaps: 11 81
341New grid distribution: 1
342 1 1: 15 1: 40 1: 20
343 2 1: 15 1: 40 21: 40
344
345InitMesh: MESH = 30 x 80 x 80 = 192000
346InitMesh: (bp) = 15 x 40 x 40 = 24000
347InitMesh: Mesh cutoff (required, used) = 150.000 155.462 Ry
348ExtMesh (bp) on 0 = 75 x 104 x 84 = 655200
349New grid distribution: 2
350 1 1: 15 1: 40 1: 13
351 2 1: 15 1: 40 14: 40
352New grid distribution: 3
353 1 1: 15 1: 40 1: 15
354 2 1: 15 1: 40 16: 40
355Setting up quadratic distribution...
356ExtMesh (bp) on 0 = 75 x 104 x 77 = 600600
357PhiOnMesh: Number of (b)points on node 0 = 7800
358PhiOnMesh: nlist on node 0 = 242164
359cdiag-debug: jobz=V, algo= 1, Node= 1, work= 2090, rwork= 2161, iwork= 270
360cdiag-debug: jobz=V, algo= 1, Node= 0, work= 2090, rwork= 2377, iwork= 270
361
362stepf: Fermi-Dirac step function
363
364siesta: Program's energy decomposition (eV):
365siesta: Ebs = -226.878967
366siesta: Eions = 761.604247
367siesta: Ena = 338.976744
368siesta: Ekin = 265.845531
369siesta: Enl = 155.324530
370siesta: Eso = 0.000000
371siesta: Eldau = 0.000000
372siesta: DEna = -17.516845
373siesta: DUscf = 2.038399
374siesta: DUext = 0.000000
375siesta: Enegf = 0.000000
376siesta: Exc = -157.428404
377siesta: eta*DQ = 0.000000
378siesta: Emadel = 0.000000
379siesta: Emeta = 0.000000
380siesta: Emolmec = 0.000000
381siesta: Ekinion = 0.000000
382siesta: Eharris = -121.207230
383siesta: Etot = -174.364293
384siesta: FreeEng = -174.372957
385
386 iscf Eharris(eV) E_KS(eV) FreeEng(eV) dDmax Ef(eV) dHmax(eV)
387 scf: 1 -121.207230 -174.364293 -174.372957 6.055278 -7.994472 2.893698
388timer: Routine,Calls,Time,% = IterSCF 1 0.340 30.58
389 scf: 2 -174.475630 -174.420592 -174.429257 0.109988 -7.666230 2.507378
390 scf: 3 -174.625748 -174.566213 -174.581766 0.701077 -5.533050 0.190181
391 scf: 4 -174.159092 -174.391369 -174.405428 0.352909 -4.746563 1.785466
392 scf: 5 -174.678613 -174.581704 -174.592089 0.348919 -5.541164 0.027093
393 scf: 6 -174.582277 -174.581998 -174.592127 0.006400 -5.561870 0.001956
394 scf: 7 -174.581976 -174.581987 -174.592127 0.000454 -5.561077 0.000760
395 scf: 8 -174.582000 -174.581993 -174.592127 0.000420 -5.561103 0.000663
396 scf: 9 -174.582018 -174.582006 -174.592127 0.000331 -5.561216 0.000500
397 scf: 10 -174.582041 -174.582023 -174.592128 0.000337 -5.561401 0.000441
398 scf: 11 -174.582026 -174.582025 -174.592128 0.000019 -5.561412 0.000442
399
400SCF Convergence by DM+H criterion
401max |DM_out - DM_in| : 0.0000187439
402max |H_out - H_in| (eV) : 0.0004420538
403SCF cycle converged after 11 iterations
404
405Using DM_out to compute the final energy and forces
406No. of atoms with KB's overlaping orbs in proc 0. Max # of overlaps: 11 81
407
408siesta: E_KS(eV) = -174.5820
409
410siesta: E_KS - E_eggbox = -174.5820
411
412siesta: Atomic forces (eV/Ang):
413----------------------------------------
414 Tot 0.000000 -0.000000 0.000000
415----------------------------------------
416 Max 0.000000
417 Res 0.000000 sqrt( Sum f_i^2 / 3N )
418----------------------------------------
419 Max 0.000000 constrained
420
421Stress-tensor-Voigt (kbar): -3042.14 -0.01 -0.01 0.00 0.00 -0.00
422(Free)E + p*V (eV/cell) 78.5732
423Target enthalpy (eV/cell) -174.5921
424Writing WFSX for COOP/COHP in si_coop_kp_file.fullBZ.WFSX
425siesta: PDOS info:
426siesta: e1, e2, sigma, nhist: -25.00 eV 5.00 eV 0.20 eV 500
427
428siesta: Program's energy decomposition (eV):
429siesta: Ebs = -236.953982
430siesta: Eions = 761.604247
431siesta: Ena = 338.976744
432siesta: Ekin = 261.043605
433siesta: Enl = 149.913747
434siesta: Eso = 0.000000
435siesta: Eldau = 0.000000
436siesta: DEna = -8.184581
437siesta: DUscf = 1.510262
438siesta: DUext = 0.000000
439siesta: Enegf = 0.000000
440siesta: Exc = -156.237555
441siesta: eta*DQ = 0.000000
442siesta: Emadel = 0.000000
443siesta: Emeta = 0.000000
444siesta: Emolmec = 0.000000
445siesta: Ekinion = 0.000000
446siesta: Eharris = -174.582026
447siesta: Etot = -174.582025
448siesta: FreeEng = -174.592128
449
450siesta: Final energy (eV):
451siesta: Band Struct. = -236.953982
452siesta: Kinetic = 261.043605
453siesta: Hartree = 829.334283
454siesta: Eldau = 0.000000
455siesta: Eso = 0.000000
456siesta: Ext. field = 0.000000
457siesta: Enegf = 0.000000
458siesta: Exch.-corr. = -156.237555
459siesta: Ion-electron = -1952.658160
460siesta: Ion-ion = 843.935803
461siesta: Ekinion = 0.000000
462siesta: Total = -174.582025
463siesta: Fermi = -5.561412
464
465siesta: Stress tensor (static) (eV/Ang**3):
466siesta: -1.898732 0.000000 0.000000
467siesta: 0.000000 -0.000004 -0.000000
468siesta: -0.000000 0.000000 -0.000004
469
470siesta: Cell volume = 400.000000 Ang**3
471
472siesta: Pressure (static):
473siesta: Solid Molecule Units
474siesta: 0.00689323 0.00689323 Ry/Bohr**3
475siesta: 0.63291323 0.63291323 eV/Ang**3
476siesta: 1014.04975274 1014.04975274 kBar
477(Free)E+ p_basis*V_orbitals = -171.801899
478(Free)Eharris+ p_basis*V_orbitals = -171.801901
479
480siesta: Electric dipole (a.u.) = -0.000000 0.000000 0.000000
481siesta: Electric dipole (Debye) = -0.000000 0.000000 0.000000
482>> End of run: 24-MAY-2018 21:57:38
483Job completed
0484
=== added directory 'Tests/si_coop_kp_file'
=== added file 'Tests/si_coop_kp_file/makefile'
--- Tests/si_coop_kp_file/makefile 1970-01-01 00:00:00 +0000
+++ Tests/si_coop_kp_file/makefile 2018-05-27 11:17:14 +0000
@@ -0,0 +1,7 @@
1#
2# Single-test makefile
3#
4name=si_coop_kp_file
5EXTRAFILES=si_coop_kp_file.KP.input
6#
7include ../test.mk
08
=== added file 'Tests/si_coop_kp_file/si_coop_kp_file.KP.input'
--- Tests/si_coop_kp_file/si_coop_kp_file.KP.input 1970-01-01 00:00:00 +0000
+++ Tests/si_coop_kp_file/si_coop_kp_file.KP.input 2018-05-27 11:17:14 +0000
@@ -0,0 +1,6 @@
1 5
2 1 0.000000E+00 0.000000E+00 0.000000E+00 0.125000E+00
3 2 0.125000E+00 0.000000E+00 0.000000E+00 0.250000E+00
4 3 0.250000E+00 0.000000E+00 0.000000E+00 0.250000E+00
5 4 0.375000E+00 0.000000E+00 0.000000E+00 0.250000E+00
6 5 0.500000E+00 0.000000E+00 0.000000E+00 0.125000E+00
07
=== added file 'Tests/si_coop_kp_file/si_coop_kp_file.fdf'
--- Tests/si_coop_kp_file/si_coop_kp_file.fdf 1970-01-01 00:00:00 +0000
+++ Tests/si_coop_kp_file/si_coop_kp_file.fdf 2018-05-27 11:17:14 +0000
@@ -0,0 +1,41 @@
1SystemName Si chain for COOP curves calculation
2SystemLabel si_coop_kp_file
3NumberOfAtoms 4
4NumberOfSpecies 1
5%block ChemicalSpeciesLabel
6 1 14 Si
7%endblock ChemicalSpeciesLabel
8#------------6.3 BASIS DEFINITION---------------------------------------
9PAO.BasisSize SZP
10PAO.EnergyShift 100 meV
11#------------6.4 LATTICE, COORDINATES -----------------------------------
12LatticeConstant 1.0000 Ang
13%block LatticeVectors
14 4.000 0.000 0.000
15 0.000 10.0 0.000
16 0.000 0.000 10.0
17%endblock LatticeVectors
18AtomicCoordinatesFormat Ang
19%block AtomicCoordinatesAndAtomicSpecies
20 0.0000 0.0000 0.0000 1
21 1.0000 0.0000 0.0000 1
22 2.0000 0.0000 0.0000 1
23 3.0000 0.0000 0.0000 1
24%endblock AtomicCoordinatesAndAtomicSpecies
25
26# User-defined k-point
27kgrid.File si_coop_kp_file.KP.input
28
29MeshCutoff 150.0 Ry
30MaxSCFIterations 500
31DM.MixingWeight 0.1
32DM.NumberPulay 3
33DM.Tolerance 1.d-4
34
35SolutionMethod diagon
36ElectronicTemperature 25 meV
37
38COOP.write T
39%block ProjectedDensityOfStates
40 -25. 5. 0.2 500 eV
41%endblock ProjectedDensityOfStates
042
=== added file 'Tests/si_coop_kp_file/si_coop_kp_file.pseudos'
--- Tests/si_coop_kp_file/si_coop_kp_file.pseudos 1970-01-01 00:00:00 +0000
+++ Tests/si_coop_kp_file/si_coop_kp_file.pseudos 2018-05-27 11:17:14 +0000
@@ -0,0 +1,1 @@
1Si
02
=== modified file 'Util/COOP/Makefile'
--- Util/COOP/Makefile 2018-04-07 19:24:04 +0000
+++ Util/COOP/Makefile 2018-05-27 11:17:14 +0000
@@ -137,16 +137,17 @@
137class_Sparsity.o: alloc.o137class_Sparsity.o: alloc.o
138coceri.o: files.o periodic_table.o precision.o units.o138coceri.o: files.o periodic_table.o precision.o units.o
139compute_dm.o: atomlist.o class_SpData1D.o compute_ebs_shift.o diagon.o139compute_dm.o: atomlist.o class_SpData1D.o compute_ebs_shift.o diagon.o
140compute_dm.o: iodmhs_netcdf.o kpoint_grid.o local_sys.o m_chess.o m_dminim.o140compute_dm.o: iodmhs_netcdf.o kpoint_scf.o local_sys.o m_chess.o m_dminim.o
141compute_dm.o: m_energies.o m_eo.o m_gamma.o m_hsx.o m_pexsi_driver.o m_rmaxh.o141compute_dm.o: m_energies.o m_eo.o m_gamma.o m_hsx.o m_pexsi_driver.o m_rmaxh.o
142compute_dm.o: m_spin.o m_steps.o m_transiesta.o m_ts_global_vars.o m_zminim.o142compute_dm.o: m_spin.o m_steps.o m_transiesta.o m_ts_global_vars.o m_zminim.o
143compute_dm.o: normalize_dm.o ordern.o parallel.o precision.o siesta_geom.o143compute_dm.o: normalize_dm.o ordern.o parallel.o precision.o siesta_geom.o
144compute_dm.o: siesta_options.o sparse_matrices.o units.o144compute_dm.o: siesta_options.o sparse_matrices.o units.o
145compute_ebs_shift.o: m_mpi_utils.o parallel.o precision.o145compute_ebs_shift.o: m_mpi_utils.o parallel.o precision.o
146compute_energies.o: atomlist.o class_SpData1D.o class_SpData2D.o dhscf.o146compute_energies.o: atomlist.o class_SpData1D.o class_SpData2D.o
147compute_energies.o: files.o m_dipol.o m_energies.o m_mpi_utils.o m_ntm.o147compute_energies.o: class_SpData2D.o dhscf.o files.o m_dipol.o m_energies.o
148compute_energies.o: m_rhog.o m_spin.o precision.o siesta_geom.o148compute_energies.o: m_mpi_utils.o m_ntm.o m_rhog.o m_spin.o parallel.o
149compute_energies.o: siesta_options.o sparse_matrices.o149compute_energies.o: precision.o siesta_geom.o siesta_options.o
150compute_energies.o: sparse_matrices.o
150compute_max_diff.o: m_mpi_utils.o precision.o151compute_max_diff.o: m_mpi_utils.o precision.o
151compute_norm.o: m_mpi_utils.o m_spin.o precision.o sparse_matrices.o152compute_norm.o: m_mpi_utils.o m_spin.o precision.o sparse_matrices.o
152compute_pw_matrix.o: alloc.o m_planewavematrix.o m_planewavematrixvar.o153compute_pw_matrix.o: alloc.o m_planewavematrix.o m_planewavematrixvar.o
@@ -164,7 +165,7 @@
164cranknic_evolg.o: m_inversemm.o m_matswinvers.o m_spin.o m_steps.o parallel.o165cranknic_evolg.o: m_inversemm.o m_matswinvers.o m_spin.o m_steps.o parallel.o
165cranknic_evolg.o: parallelsubs.o precision.o siesta_options.o sparse_matrices.o166cranknic_evolg.o: parallelsubs.o precision.o siesta_options.o sparse_matrices.o
166cranknic_evolg.o: units.o wavefunctions.o167cranknic_evolg.o: units.o wavefunctions.o
167cranknic_evolk.o: atomlist.o cranknic_evolg.o kpoint_grid.o m_energies.o m_eo.o168cranknic_evolk.o: atomlist.o cranknic_evolg.o kpoint_scf.o m_energies.o m_eo.o
168cranknic_evolk.o: m_spin.o parallel.o parallelsubs.o precision.o169cranknic_evolk.o: m_spin.o parallel.o parallelsubs.o precision.o
169cranknic_evolk.o: siesta_options.o sparse_matrices.o units.o wavefunctions.o170cranknic_evolk.o: siesta_options.o sparse_matrices.o units.o wavefunctions.o
170create_Sparsity_SC.o: class_Sparsity.o geom_helper.o intrinsic_missing.o171create_Sparsity_SC.o: class_Sparsity.o geom_helper.o intrinsic_missing.o
@@ -178,9 +179,8 @@
178denmatlomem.o: alloc.o globalise.o onmod.o precision.o179denmatlomem.o: alloc.o globalise.o onmod.o precision.o
179densematrix.o: alloc.o precision.o180densematrix.o: alloc.o precision.o
180detover.o: alloc.o linpack.o parallel.o parallelsubs.o precision.o181detover.o: alloc.o linpack.o parallel.o parallelsubs.o precision.o
181dfscf.o: alloc.o atm_types.o atmfuncs.o atomlist.o listsc.o local_sys.o182dfscf.o: alloc.o atm_types.o atmfuncs.o atomlist.o listsc.o local_sys.o mesh.o
182dfscf.o: m_spin.o mesh.o meshdscf.o meshphi.o parallel.o parallelsubs.o183dfscf.o: meshdscf.o meshphi.o parallel.o parallelsubs.o precision.o
183dfscf.o: precision.o
184dhscf.o: alloc.o atmfuncs.o bsc_xcmod.o cellxc_mod.o delk.o dfscf.o184dhscf.o: alloc.o atmfuncs.o bsc_xcmod.o cellxc_mod.o delk.o dfscf.o
185dhscf.o: doping_uniform.o files.o forhar.o iogrid_netcdf.o local_sys.o185dhscf.o: doping_uniform.o files.o forhar.o iogrid_netcdf.o local_sys.o
186dhscf.o: m_charge_add.o m_efield.o m_hartree_add.o m_iorho.o m_iotddft.o186dhscf.o: m_charge_add.o m_efield.o m_hartree_add.o m_iorho.o m_iotddft.o
@@ -236,15 +236,15 @@
236fft.o: alloc.o fft1d.o local_sys.o m_timer.o mesh.o parallel.o parallelsubs.o236fft.o: alloc.o fft1d.o local_sys.o m_timer.o mesh.o parallel.o parallelsubs.o
237fft.o: precision.o237fft.o: precision.o
238fft1d.o: local_sys.o parallel.o precision.o238fft1d.o: local_sys.o parallel.o precision.o
239final_H_f_stress.o: alloc.o atomlist.o class_SpData2D.o compute_max_diff.o239final_H_f_stress.o: alloc.o atomlist.o class_SpData2D.o class_SpData2D.o
240final_H_f_stress.o: dnaefs.o files.o grdsam.o kinefsm.o ldau.o ldau_specs.o240final_H_f_stress.o: compute_max_diff.o dnaefs.o files.o grdsam.o kinefsm.o
241final_H_f_stress.o: local_sys.o m_dipol.o m_energies.o m_forces.o m_gamma.o241final_H_f_stress.o: ldau.o ldau_specs.o local_sys.o m_dipol.o m_energies.o
242final_H_f_stress.o: m_hsx.o m_mpi_utils.o m_ncdf_siesta.o m_ntm.o m_spin.o242final_H_f_stress.o: m_forces.o m_gamma.o m_hsx.o m_mpi_utils.o m_ncdf_siesta.o
243final_H_f_stress.o: m_steps.o m_stress.o m_ts_global_vars.o m_ts_io.o243final_H_f_stress.o: m_ntm.o m_spin.o m_steps.o m_stress.o m_ts_global_vars.o
244final_H_f_stress.o: m_ts_kpoints.o m_ts_options.o metaforce.o244final_H_f_stress.o: m_ts_io.o m_ts_options.o metaforce.o molecularmechanics.o
245final_H_f_stress.o: molecularmechanics.o naefs.o nlefsm.o overfsm.o parallel.o245final_H_f_stress.o: naefs.o nlefsm.o overfsm.o parallel.o siesta_geom.o
246final_H_f_stress.o: siesta_geom.o siesta_options.o sparse_matrices.o246final_H_f_stress.o: siesta_options.o sparse_matrices.o spinorbit.o
247final_H_f_stress.o: spinorbit.o units.o247final_H_f_stress.o: ts_kpoint_scf.o units.o
248find_kgrid.o: alloc.o minvec.o parallel.o precision.o units.o248find_kgrid.o: alloc.o minvec.o parallel.o precision.o units.o
249fire_optim.o: alloc.o m_fire.o m_mpi_utils.o parallel.o precision.o249fire_optim.o: alloc.o m_fire.o m_mpi_utils.o parallel.o precision.o
250fire_optim.o: siesta_options.o units.o250fire_optim.o: siesta_options.o units.o
@@ -263,8 +263,8 @@
263grdsam.o: m_spin.o parallel.o precision.o siesta_geom.o siesta_options.o263grdsam.o: m_spin.o parallel.o precision.o siesta_geom.o siesta_options.o
264grdsam.o: units.o264grdsam.o: units.o
265hsparse.o: alloc.o atm_types.o atmfuncs.o atomlist.o ldau_specs.o listsc.o265hsparse.o: alloc.o atm_types.o atmfuncs.o atomlist.o ldau_specs.o listsc.o
266hsparse.o: local_sys.o mneighb.o parallel.o parallelsubs.o precision.o radial.o266hsparse.o: mneighb.o parallel.o parallelsubs.o precision.o radial.o sorting.o
267hsparse.o: siesta_options.o sorting.o sparse_matrices.o267hsparse.o: sparse_matrices.o
268idiag.o: local_sys.o parallel.o268idiag.o: local_sys.o parallel.o
269init_output.o: files.o269init_output.o: files.o
270initatom.o: atm_types.o atmparams.o atom.o atom_options.o basis_io.o270initatom.o: atm_types.o atmparams.o atom.o atom_options.o basis_io.o
@@ -298,10 +298,10 @@
298kinefsm.o: alloc.o atmfuncs.o mneighb.o new_matel.o parallel.o parallelsubs.o298kinefsm.o: alloc.o atmfuncs.o mneighb.o new_matel.o parallel.o parallelsubs.o
299kinefsm.o: precision.o299kinefsm.o: precision.o
300kpoint_convert.o: local_sys.o precision.o units.o300kpoint_convert.o: local_sys.o precision.o units.o
301kpoint_grid.o: find_kgrid.o local_sys.o m_spin.o minvec.o parallel.o301kpoint_pdos.o: kpoint_t.o m_spin.o parallel.o precision.o siesta_options.o
302kpoint_grid.o: precision.o siesta_cml.o siesta_options.o units.o302kpoint_scf.o: kpoint_t.o m_spin.o parallel.o precision.o siesta_options.o
303kpoint_pdos.o: find_kgrid.o local_sys.o m_spin.o minvec.o parallel.o303kpoint_t.o: alloc.o files.o find_kgrid.o m_char.o m_io.o m_os.o minvec.o
304kpoint_pdos.o: precision.o siesta_options.o units.o304kpoint_t.o: parallel.o precision.o siesta_cml.o units.o
305ksv.o: alloc.o atmfuncs.o densematrix.o ksvinit.o local_sys.o parallel.o305ksv.o: alloc.o atmfuncs.o densematrix.o ksvinit.o local_sys.o parallel.o
306ksv.o: precision.o306ksv.o: precision.o
307ksvinit.o: alloc.o local_sys.o parallel.o precision.o307ksvinit.o: alloc.o local_sys.o parallel.o precision.o
@@ -312,7 +312,7 @@
312ldau_specs.o: basis_specs.o basis_types.o interpolation.o local_sys.o m_cite.o312ldau_specs.o: basis_specs.o basis_types.o interpolation.o local_sys.o m_cite.o
313ldau_specs.o: parallel.o precision.o pseudopotential.o radial.o units.o313ldau_specs.o: parallel.o precision.o pseudopotential.o radial.o units.o
314listsc.o: alloc.o314listsc.o: alloc.o
315local_DOS.o: atomlist.o dhscf.o diagon.o files.o kpoint_grid.o local_sys.o315local_DOS.o: atomlist.o dhscf.o diagon.o files.o kpoint_scf.o local_sys.o
316local_DOS.o: m_energies.o m_eo.o m_forces.o m_gamma.o m_ntm.o m_spin.o316local_DOS.o: m_energies.o m_eo.o m_forces.o m_gamma.o m_ntm.o m_spin.o
317local_DOS.o: parallel.o siesta_geom.o siesta_options.o sparse_matrices.o317local_DOS.o: parallel.o siesta_geom.o siesta_options.o sparse_matrices.o
318m_broyddj.o: alloc.o local_sys.o m_mpi_utils.o parallel.o precision.o318m_broyddj.o: alloc.o local_sys.o m_mpi_utils.o parallel.o precision.o
@@ -362,7 +362,7 @@
362m_hsx.o: atm_types.o atmfuncs.o atomlist.o files.o local_sys.o parallel.o362m_hsx.o: atm_types.o atmfuncs.o atomlist.o files.o local_sys.o parallel.o
363m_hsx.o: parallelsubs.o precision.o siesta_geom.o363m_hsx.o: parallelsubs.o precision.o siesta_geom.o
364m_initwf.o: alloc.o atomlist.o densematrix.o diag.o diag_option.o fermid.o364m_initwf.o: alloc.o atomlist.o densematrix.o diag.o diag_option.o fermid.o
365m_initwf.o: kpoint_grid.o local_sys.o m_eo.o m_gamma.o m_memory.o m_spin.o365m_initwf.o: kpoint_scf.o local_sys.o m_eo.o m_gamma.o m_memory.o m_spin.o
366m_initwf.o: parallel.o parallelsubs.o precision.o sparse_matrices.o366m_initwf.o: parallel.o parallelsubs.o precision.o sparse_matrices.o
367m_initwf.o: wavefunctions.o367m_initwf.o: wavefunctions.o
368m_integrate.o: precision.o368m_integrate.o: precision.o
@@ -395,19 +395,19 @@
395m_ncdf_io.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o395m_ncdf_io.o: class_OrbitalDistribution.o class_SpData1D.o class_SpData2D.o
396m_ncdf_io.o: class_Sparsity.o m_io_s.o parallel.o precision.o396m_ncdf_io.o: class_Sparsity.o m_io_s.o parallel.o precision.o
397m_ncdf_siesta.o: atm_types.o atmparams.o atomlist.o class_Sparsity.o files.o397m_ncdf_siesta.o: atm_types.o atmparams.o atomlist.o class_Sparsity.o files.o
398m_ncdf_siesta.o: kpoint_grid.o m_energies.o m_forces.o m_gamma.o m_kinetic.o398m_ncdf_siesta.o: kpoint_scf.o m_energies.o m_forces.o m_gamma.o m_kinetic.o
399m_ncdf_siesta.o: m_ncdf_io.o m_ntm.o m_spin.o m_stress.o m_ts_electype.o399m_ncdf_siesta.o: m_ncdf_io.o m_ntm.o m_spin.o m_stress.o m_ts_electype.o
400m_ncdf_siesta.o: m_ts_kpoints.o m_ts_options.o parallel.o precision.o radial.o400m_ncdf_siesta.o: m_ts_options.o parallel.o precision.o radial.o siesta_geom.o
401m_ncdf_siesta.o: siesta_geom.o siesta_options.o sparse_matrices.o timestamp.o401m_ncdf_siesta.o: siesta_options.o sparse_matrices.o timestamp.o ts_kpoint_scf.o
402m_new_dm.o: alloc.o atomlist.o class_Data2D.o class_Fstack_Data1D.o402m_new_dm.o: alloc.o atomlist.o class_Data2D.o class_Fstack_Data1D.o
403m_new_dm.o: class_Fstack_Pair_Geometry_SpData2D.o class_Geometry.o403m_new_dm.o: class_Fstack_Pair_Geometry_SpData2D.o class_Geometry.o
404m_new_dm.o: class_OrbitalDistribution.o class_Pair_Geometry_SpData2D.o404m_new_dm.o: class_OrbitalDistribution.o class_Pair_Geometry_SpData2D.o
405m_new_dm.o: class_SpData2D.o class_Sparsity.o files.o local_sys.o m_energies.o405m_new_dm.o: class_SpData2D.o class_Sparsity.o files.o local_sys.o m_energies.o
406m_new_dm.o: m_handle_sparse.o m_iodm.o m_mixing.o m_mixing_scf.o m_mpi_utils.o406m_new_dm.o: m_handle_sparse.o m_iodm.o m_mixing.o m_mixing_scf.o m_spin.o
407m_new_dm.o: m_spin.o m_spin.o m_steps.o m_svd.o m_ts_electype.o407m_new_dm.o: m_spin.o m_steps.o m_svd.o m_ts_electype.o m_ts_global_vars.o
408m_new_dm.o: m_ts_global_vars.o m_ts_iodm.o m_ts_method.o m_ts_options.o408m_new_dm.o: m_ts_iodm.o m_ts_method.o m_ts_options.o parallel.o parsing.o
409m_new_dm.o: parallel.o parsing.o precision.o restructSpData2D.o siesta_geom.o409m_new_dm.o: precision.o restructSpData2D.o siesta_geom.o siesta_options.o
410m_new_dm.o: siesta_options.o sparse_matrices.o units.o410m_new_dm.o: sparse_matrices.o units.o
411m_noccbands.o: alloc.o atmfuncs.o local_sys.o m_spin.o parallel.o precision.o411m_noccbands.o: alloc.o atmfuncs.o local_sys.o m_spin.o parallel.o precision.o
412m_noccbands.o: siesta_geom.o412m_noccbands.o: siesta_geom.o
413m_options.o: precision.o413m_options.o: precision.o
@@ -449,7 +449,7 @@
449m_sparsity_handling.o: class_SpData2D.o class_Sparsity.o geom_helper.o449m_sparsity_handling.o: class_SpData2D.o class_Sparsity.o geom_helper.o
450m_sparsity_handling.o: intrinsic_missing.o m_interpolate.o m_region.o450m_sparsity_handling.o: intrinsic_missing.o m_interpolate.o m_region.o
451m_sparsity_handling.o: precision.o451m_sparsity_handling.o: precision.o
452m_spin.o: alloc.o local_sys.o parallel.o precision.o units.o452m_spin.o: alloc.o files.o local_sys.o m_cite.o parallel.o precision.o units.o
453m_stress.o: precision.o453m_stress.o: precision.o
454m_supercell.o: atom_graph.o class_OrbitalDistribution.o class_SpData2D.o454m_supercell.o: atom_graph.o class_OrbitalDistribution.o class_SpData2D.o
455m_supercell.o: intrinsic_missing.o parallel.o parallelsubs.o precision.o455m_supercell.o: intrinsic_missing.o parallel.o parallelsubs.o precision.o
@@ -463,9 +463,9 @@
463m_transiesta.o: class_SpData2D.o class_Sparsity.o files.o m_interpolate.o463m_transiesta.o: class_SpData2D.o class_Sparsity.o files.o m_interpolate.o
464m_transiesta.o: m_ts_charge.o m_ts_contour_eq.o m_ts_contour_neq.o464m_transiesta.o: m_ts_charge.o m_ts_contour_eq.o m_ts_contour_neq.o
465m_transiesta.o: m_ts_electype.o m_ts_fullg.o m_ts_fullk.o m_ts_gf.o465m_transiesta.o: m_ts_electype.o m_ts_fullg.o m_ts_fullk.o m_ts_gf.o
466m_transiesta.o: m_ts_kpoints.o m_ts_method.o m_ts_mumpsg.o m_ts_mumpsk.o
467m_transiesta.o: m_ts_options.o m_ts_sparse.o m_ts_tri_common.o m_ts_tri_init.o
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches