Merge lp:~nickpapior/siesta/merge-OSSO-fixes into lp:~albertog/siesta/merge-OSSO
- merge-OSSO-fixes
- Merge into merge-OSSO
Proposed by
Nick Papior
Status: | Merged |
---|---|
Merged at revision: | 695 |
Proposed branch: | lp:~nickpapior/siesta/merge-OSSO-fixes |
Merge into: | lp:~albertog/siesta/merge-OSSO |
Diff against target: |
476 lines (+99/-138) 7 files modified
Docs/siesta.tex (+63/-85) Src/bands.F (+0/-1) Src/dfscf.f (+3/-9) Src/m_spin.F90 (+30/-27) Src/rhoofd.F90 (+0/-13) Src/state_analysis.F (+2/-2) version.info (+1/-1) |
To merge this branch: | bzr merge lp:~nickpapior/siesta/merge-OSSO-fixes |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alberto Garcia | Approve | ||
Review via email: mp+343692@code.launchpad.net |
Commit message
Description of the change
Fixed minor issues and comments from me.
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'Docs/siesta.tex' | |||
2 | --- Docs/siesta.tex 2018-04-20 08:00:21 +0000 | |||
3 | +++ Docs/siesta.tex 2018-04-20 13:37:02 +0000 | |||
4 | @@ -2242,7 +2242,7 @@ | |||
5 | 2242 | The default is \emph{one} KB projector from each angular momentum, | 2242 | The default is \emph{one} KB projector from each angular momentum, |
6 | 2243 | constructed from the nodeless eigenfunction. | 2243 | constructed from the nodeless eigenfunction. |
7 | 2244 | 2244 | ||
9 | 2245 | For full spin--orbit calculations, the program generates $lj$ | 2245 | For full spin-orbit calculations, the program generates $lj$ |
10 | 2246 | projectors using the $l+1/2$ and $l-1/2$ components of the | 2246 | projectors using the $l+1/2$ and $l-1/2$ components of the |
11 | 2247 | (relativistic) pseudopotentials. In this case the specification of the | 2247 | (relativistic) pseudopotentials. In this case the specification of the |
12 | 2248 | reference energies for projectors is not changed: only $l$ is | 2248 | reference energies for projectors is not changed: only $l$ is |
13 | @@ -3258,7 +3258,7 @@ | |||
14 | 3258 | coordinates rigidly to have them positive, by using | 3258 | coordinates rigidly to have them positive, by using |
15 | 3259 | \fdf{AtomicCoordinatesOrigin}. See the | 3259 | \fdf{AtomicCoordinatesOrigin}. See the |
16 | 3260 | \program{Sies2arc}\index{Sies2arc@\textsc{Sies2arc}} utility in the | 3260 | \program{Sies2arc}\index{Sies2arc@\textsc{Sies2arc}} utility in the |
18 | 3261 | \program{Util/} directory for generating \sysfile*{.arc} files for CERIUS animation. | 3261 | \program{Util/} directory for generating \sysfile*{arc} files for CERIUS animation. |
19 | 3262 | 3262 | ||
20 | 3263 | \end{fdflogicalF} | 3263 | \end{fdflogicalF} |
21 | 3264 | 3264 | ||
22 | @@ -3728,12 +3728,12 @@ | |||
23 | 3728 | 3728 | ||
24 | 3729 | \option[spin-orbit]% | 3729 | \option[spin-orbit]% |
25 | 3730 | \fdfindex*{Spin:spin-orbit}% | 3730 | \fdfindex*{Spin:spin-orbit}% |
29 | 3731 | Performs calculations including the spin--orbit coupling. By default the | 3731 | Performs calculations including the spin-orbit coupling. By default the |
30 | 3732 | off--site SO option is set to \fdftrue. To perform an on--site SO calculations | 3732 | off-site SO option is set to \fdftrue. To perform an on-site SO calculations |
31 | 3733 | this option has to be {\bf spin-orbit+onsite}. This requires the | 3733 | this option has to be \fdf*{spin-orbit+onsite}. This requires the |
32 | 3734 | pseudopotentials to be relativistic. | 3734 | pseudopotentials to be relativistic. |
33 | 3735 | 3735 | ||
35 | 3736 | See Sect.~\ref{sec:spin-orbit} for further specific spin--orbit options. | 3736 | See Sect.~\ref{sec:spin-orbit} for further specific spin-orbit options. |
36 | 3737 | 3737 | ||
37 | 3738 | \end{fdfoptions} | 3738 | \end{fdfoptions} |
38 | 3739 | 3739 | ||
39 | @@ -3778,48 +3778,49 @@ | |||
40 | 3778 | \end{fdflogicalF} | 3778 | \end{fdflogicalF} |
41 | 3779 | 3779 | ||
42 | 3780 | 3780 | ||
44 | 3781 | \subsection{Spin--Orbit coupling} | 3781 | \subsection{Spin-Orbit coupling} |
45 | 3782 | \label{sec:spin-orbit} | 3782 | \label{sec:spin-orbit} |
46 | 3783 | 3783 | ||
47 | 3784 | \siesta\ includes the posibility to perform fully relativistic | 3784 | \siesta\ includes the posibility to perform fully relativistic |
48 | 3785 | calculations by means of the inclusion in the total Hamiltonian not | 3785 | calculations by means of the inclusion in the total Hamiltonian not |
49 | 3786 | only the Darwin and velocity correction terms~(Scalar--Relativistic | 3786 | only the Darwin and velocity correction terms~(Scalar--Relativistic |
58 | 3787 | calculations), but also the spin--orbit~(SO) contribution. There are | 3787 | calculations), but also the spin-orbit~(SO) contribution. There are |
59 | 3788 | two approaches regarding the SO formalism: on--site and off--site. | 3788 | two approaches regarding the SO formalism: on-site and off-site. |
60 | 3789 | Within the on--site approximation only the intra--atomic SO contribution is taken | 3789 | Within the on-site approximation only the intra-atomic SO |
61 | 3790 | into account. In the off--site scheme additional neighboring | 3790 | contribution is taken into account. In the off-site scheme additional |
62 | 3791 | interactions are also included in the SO term. By default, the off--site SO | 3791 | neighboring interactions are also included in the SO term. By default, |
63 | 3792 | formalism is switched on, being necessary to change the \fdf{Spin} flag | 3792 | the off-site SO formalism is switched on, being necessary to change |
64 | 3793 | in the input file if the on--site approximation wants to be used. See | 3793 | the \fdf{Spin} flag in the input file if the on-site approximation |
65 | 3794 | \fdf{Spin} on how to handle the spin--orbit coupling. | 3794 | wants to be used. See \fdf{Spin} on how to handle the spin-orbit |
66 | 3795 | coupling. | ||
67 | 3795 | 3796 | ||
70 | 3796 | The on--site spin-orbit scheme in this version of \siesta\ has been implemented by | 3797 | The on-site spin-orbit scheme in this version of \siesta\ has been implemented by |
71 | 3797 | Dr. Ram\'on Cuadrado based on the original on--site SO formalism and | 3798 | Dr. Ram\'on Cuadrado based on the original on-site SO formalism and |
72 | 3798 | implementation developed by Prof. Jaime Ferrer and his collaborators \textit{et al}~(L | 3799 | implementation developed by Prof. Jaime Ferrer and his collaborators \textit{et al}~(L |
73 | 3799 | Fern\'andez--Seivane, M Oliveira, S Sanvito, and J Ferrer, Journal of | 3800 | Fern\'andez--Seivane, M Oliveira, S Sanvito, and J Ferrer, Journal of |
76 | 3800 | Physics: Condensed Matter, {\bf 18}, 7999 (2006); L Fern\'andez--Seivane | 3801 | Physics: Condensed Matter, \textbf{18}, 7999 (2006); L Fern\'andez--Seivane |
77 | 3801 | and Jaime Ferrer, Phys. Rev. Lett. {\bf 99}, 183401 (2007)). | 3802 | and Jaime Ferrer, Phys. Rev. Lett. \textbf{99}, 183401 (2007)). |
78 | 3802 | 3803 | ||
80 | 3803 | The off--site scheme has been implemented by | 3804 | The off-site scheme has been implemented by |
81 | 3804 | Dr. Ram\'on Cuadrado and Dr. Jorge I. Cerd\'a based on their initial | 3805 | Dr. Ram\'on Cuadrado and Dr. Jorge I. Cerd\'a based on their initial |
82 | 3805 | work~(R. Cuadrado and J. I. Cerd\'a ``Fully relativistic pseudopotential | 3806 | work~(R. Cuadrado and J. I. Cerd\'a ``Fully relativistic pseudopotential |
83 | 3806 | formalism under an atomic orbital basis: spin-orbit splittings and | 3807 | formalism under an atomic orbital basis: spin-orbit splittings and |
85 | 3807 | magnetic anisotropies'', J. Phys.: Condens. Matter {\bf 24}, 086005 (2012); | 3808 | magnetic anisotropies'', J. Phys.: Condens. Matter \textbf{24}, 086005 (2012); |
86 | 3808 | ``In-plane/out-of-plane disorder influence on the magnetic anisotropy of | 3809 | ``In-plane/out-of-plane disorder influence on the magnetic anisotropy of |
87 | 3809 | Fe$_{1-y}$Mn$_y$Pt-L1(0) bulk alloy'', R. Cuadrado, Kai Liu, Timothy | 3810 | Fe$_{1-y}$Mn$_y$Pt-L1(0) bulk alloy'', R. Cuadrado, Kai Liu, Timothy |
89 | 3810 | J. Klemmer and R. W. Chantrell, Applied Physics Letters, {\bf 108}, | 3811 | J. Klemmer and R. W. Chantrell, Applied Physics Letters, \textbf{108}, |
90 | 3811 | 123102 (2016)). | 3812 | 123102 (2016)). |
91 | 3812 | 3813 | ||
92 | 3813 | The inclusion of the SO term in the Hamiltonian (and in the Density | 3814 | The inclusion of the SO term in the Hamiltonian (and in the Density |
97 | 3814 | Matrix) causes an increase in the number of non--zero elements in their | 3815 | Matrix) causes an increase in the number of non-zero elements in their |
98 | 3815 | off--diagonal parts, i.e., for some $(\mu,\nu)$ pair of basis | 3816 | off-diagonal parts, i.e., for some $(\mu,\nu)$ pair of basis |
99 | 3816 | orbitals, H$^{\sigma\sigma'}_{\mu\nu}$~(DM$^{\sigma\sigma'}_{\mu\nu}$) | 3817 | orbitals, $\mathbf H^{\sigma\sigma'}_{\mu\nu}$ ($\mathbf{DM}^{\sigma\sigma'}_{\mu\nu}$) |
100 | 3817 | [$\sigma,\sigma'$=$\uparrow,\downarrow$] will be $\neq$0. This is | 3818 | [$\sigma,\sigma'=\uparrow,\downarrow$] will be $\neq0$. This is |
101 | 3818 | mainly due to the fact that the $\mathbf L\cdot\mathbf S$ operator | 3819 | mainly due to the fact that the $\mathbf L\cdot\mathbf S$ operator |
106 | 3819 | will promote the mixing between different spin--up/down components. | 3820 | will promote the mixing between different spin-up/down components. |
107 | 3820 | In addition, these H$^{\sigma\sigma'}_{\mu\nu}$~(and | 3821 | In addition, these $\mathbf H^{\sigma\sigma'}_{\mu\nu}$ (and |
108 | 3821 | DM$^{\sigma\sigma'}_{\mu\nu}$) elements will be complex, in contrast | 3822 | $\mathbf{DM}^{\sigma\sigma'}_{\mu\nu}$) elements will be complex, in contrast |
109 | 3822 | with typical polarized/non--polarized calculations where these | 3823 | with typical polarized/non-polarized calculations where these |
110 | 3823 | matrices are purely real. Since the spin-up and spin-down manifolds | 3824 | matrices are purely real. Since the spin-up and spin-down manifolds |
111 | 3824 | are essentially mixed, the solver has to deal with matrices whose | 3825 | are essentially mixed, the solver has to deal with matrices whose |
112 | 3825 | dimensions are twice as large as for the collinear (unmixed) spin | 3826 | dimensions are twice as large as for the collinear (unmixed) spin |
113 | @@ -3828,13 +3829,13 @@ | |||
114 | 3828 | 3829 | ||
115 | 3829 | 3830 | ||
116 | 3830 | Unless explicitly advised the following type of calculation can be carried out | 3831 | Unless explicitly advised the following type of calculation can be carried out |
118 | 3831 | regardless of whether on--site or off--site approximation is employed: | 3832 | regardless of whether on-site or off-site approximation is employed: |
119 | 3832 | \begin{itemize} | 3833 | \begin{itemize} |
120 | 3833 | % | 3834 | % |
121 | 3834 | \item Selfconsistent calculations for gamma point as well as for | 3835 | \item Selfconsistent calculations for gamma point as well as for |
122 | 3835 | bulks. | 3836 | bulks. |
123 | 3836 | % | 3837 | % |
125 | 3837 | \item Structure optimizations %% only supported by the off--site SO | 3838 | \item Structure optimizations %% only supported by the off-site SO |
126 | 3838 | %% formalism *** Why ? | 3839 | %% formalism *** Why ? |
127 | 3839 | % | 3840 | % |
128 | 3840 | %%% *** Incompatible... \item LDA+U calculations~(See Sect.\ref{sec:lda+u} for further info). | 3841 | %%% *** Incompatible... \item LDA+U calculations~(See Sect.\ref{sec:lda+u} for further info). |
129 | @@ -3855,35 +3856,35 @@ | |||
130 | 3855 | % | 3856 | % |
131 | 3856 | \end{itemize} | 3857 | \end{itemize} |
132 | 3857 | 3858 | ||
155 | 3858 | Note: Due to the small SO contribution to the total | 3859 | Note: Due to the small SO contribution to the total energy, the level |
156 | 3859 | energy, the level of precision required to perform a proper fully | 3860 | of precision required to perform a proper fully relativistic |
157 | 3860 | relativistic calculation during the selfconsistent process is quite | 3861 | calculation during the selfconsistent process is quite demanding. The |
158 | 3861 | demanding. The following values must be carefully converged and | 3862 | following values must be carefully converged and checked for each |
159 | 3862 | checked for each specific system to assure that the results are | 3863 | specific system to assure that the results are accurate enough: |
160 | 3863 | accurate enough: \fdf{SCF.H!Tolerance} during the | 3864 | \fdf{SCF.H!Tolerance} during the selfconsistency (typically between |
161 | 3864 | selfconsistency~(typically between 10$^{-3}$eV -- 10$^{-4}$eV), | 3865 | $10^{-3}\,\mathrm{eV}$ -- $10^{-4}\,\mathrm{eV}$), |
162 | 3865 | \fdf{ElectronicTemperature}, | 3866 | \fdf{ElectronicTemperature}, \textbf{k}--point sampling and high |
163 | 3866 | \textbf{k}--point sampling and high values of | 3867 | values of \fdf{MeshCutoff}~(specifically for extended solids). In |
164 | 3867 | \fdf{MeshCutoff}~(specifically for extended solids). In general, one | 3868 | general, one can say that a good calculation will have high number of |
165 | 3868 | can say that a good calculation will have high number of \textbf{k}--points, | 3869 | \textbf{k}--points, low \fdf{ElectronicTemperature}, extremely small |
166 | 3869 | low \fdf{ElectronicTemperature}, extremely small \fdf{SCF.H!Tolerance} | 3870 | \fdf{SCF.H!Tolerance} and high values of \fdf{MeshCutoff}. We |
167 | 3870 | and high values of \fdf{MeshCutoff}. We encourage the user to test | 3871 | encourage the user to test carefully these options for each system. An |
168 | 3871 | carefully these options for each system. An additional point to take | 3872 | additional point to take into account is the mixing scheme |
169 | 3872 | into account is the mixing scheme employed. You are encouraged to use | 3873 | employed. You are encouraged to use \fdf{SCF.Mix:hamiltonian} |
170 | 3873 | \fdf{SCF.Mix} \fdf*{hamiltonian} (currently is set up by default) | 3874 | (currently is set up by default) instead of density matrix mixing, |
171 | 3874 | instead of density matrix mixing, since it speeds up the convergence. | 3875 | since it speeds up the convergence. The pseudopotentials have to be |
172 | 3875 | The pseudopotentials have to be properly generated and tested for each | 3876 | properly generated and tested for each specific system and they have |
173 | 3876 | specific system and they have to be in their fully relativistic form, | 3877 | to be in their fully relativistic form, together with the non-linear |
174 | 3877 | together with the non--linear core corrections. Finally it is worth to | 3878 | core corrections. Finally it is worth to mention that the |
175 | 3878 | mention that the selfconsistent convergence for some non--highly symmetric | 3879 | selfconsistent convergence for some non-highly symmetric |
176 | 3879 | magnetizations directions with respect to the physical symmetry axis | 3880 | magnetizations directions with respect to the physical symmetry axis |
177 | 3880 | could still be difficult. | 3881 | could still be difficult. |
178 | 3881 | 3882 | ||
179 | 3882 | \begin{fdfentry}{Spin!OrbitStrength}[real]<1.0> | 3883 | \begin{fdfentry}{Spin!OrbitStrength}[real]<1.0> |
180 | 3883 | 3884 | ||
181 | 3884 | It allows to vary the strength of the | 3885 | It allows to vary the strength of the |
184 | 3885 | spin--orbit interaction from zero to any positive value. It can be | 3886 | spin-orbit interaction from zero to any positive value. It can be |
185 | 3886 | used for both the on--site and off-site SOC flavors, but only for | 3887 | used for both the on-site and off-site SOC flavors, but only for |
186 | 3887 | debugging and testing purposes, as the only physical value is 1.0. | 3888 | debugging and testing purposes, as the only physical value is 1.0. |
187 | 3888 | 3889 | ||
188 | 3889 | \end{fdfentry} | 3890 | \end{fdfentry} |
189 | @@ -3902,29 +3903,6 @@ | |||
190 | 3902 | 3903 | ||
191 | 3903 | \end{fdflogicalF} | 3904 | \end{fdflogicalF} |
192 | 3904 | 3905 | ||
193 | 3905 | % *** The following items should not be relevant. | ||
194 | 3906 | |||
195 | 3907 | %%For the off--site SO approximation some mandatory flags have to set | ||
196 | 3908 | %%up to \fdffalse\ in the fdf file: | ||
197 | 3909 | |||
198 | 3910 | %%\begin{fdflogicalT}{PAO!OldStylePolOrbs} | ||
199 | 3911 | |||
200 | 3912 | %% By default is set up to \fdftrue, however it has to set up to \fdffalse. | ||
201 | 3913 | |||
202 | 3914 | %%\end{fdflogicalT} | ||
203 | 3915 | |||
204 | 3916 | %%\begin{fdflogicalT}{DM.MixSCF1} | ||
205 | 3917 | |||
206 | 3918 | %% By default is set up to \fdftrue, however it has to set up to \fdffalse. | ||
207 | 3919 | |||
208 | 3920 | %%\end{fdflogicalT} | ||
209 | 3921 | |||
210 | 3922 | %%\begin{fdflogicalT}{Restricted.Radial.Grid} | ||
211 | 3923 | |||
212 | 3924 | %% By default is set up to \fdftrue, however it has to set up to \fdffalse. | ||
213 | 3925 | |||
214 | 3926 | %%\end{fdflogicalT} | ||
215 | 3927 | |||
216 | 3928 | 3906 | ||
217 | 3929 | 3907 | ||
218 | 3930 | \subsection{The self-consistent-field loop} | 3908 | \subsection{The self-consistent-field loop} |
219 | @@ -5049,7 +5027,7 @@ | |||
220 | 5049 | \index{reading saved data!density matrix} | 5027 | \index{reading saved data!density matrix} |
221 | 5050 | 5028 | ||
222 | 5051 | Instructs to read the density matrix stored in file | 5029 | Instructs to read the density matrix stored in file |
224 | 5052 | \sysfile{.DM} by a previous run. | 5030 | \sysfile{DM} by a previous run. |
225 | 5053 | 5031 | ||
226 | 5054 | \siesta\ will continue even if \sysfile*{DM} is not found. | 5032 | \siesta\ will continue even if \sysfile*{DM} is not found. |
227 | 5055 | 5033 | ||
228 | @@ -9067,8 +9045,8 @@ | |||
229 | 9067 | Enable an experimental timer which is based on wall time on the master | 9045 | Enable an experimental timer which is based on wall time on the master |
230 | 9068 | node and is aware of the tree-structure of the timed sections. At the | 9046 | node and is aware of the tree-structure of the timed sections. At the |
231 | 9069 | end of the program, a report is generated in the output file, and a | 9047 | end of the program, a report is generated in the output file, and a |
234 | 9070 | {\tt time.json} file in JSON format is also written. \index{JSON | 9048 | \file{time.json} file in JSON format is also written. \index{JSON |
235 | 9071 | timing report@{\bf JSON timing report}} This file can be used by | 9049 | timing report@\textbf{JSON timing report}} This file can be used by |
236 | 9072 | third-party scripts to process timing data. | 9050 | third-party scripts to process timing data. |
237 | 9073 | 9051 | ||
238 | 9074 | \note, if used with the PEXSI solver (see Sec.~\ref{SolverPEXSI}) | 9052 | \note, if used with the PEXSI solver (see Sec.~\ref{SolverPEXSI}) |
239 | @@ -10620,9 +10598,9 @@ | |||
240 | 10620 | 10598 | ||
241 | 10621 | \begin{fdflogicalF}{TDED.Saverho} | 10599 | \begin{fdflogicalF}{TDED.Saverho} |
242 | 10622 | 10600 | ||
246 | 10623 | If \fdftrue\ the instantaneous time-dependent density is saved to | 10601 | If \fdftrue\ the instantaneous time-dependent density is saved to |
247 | 10624 | \texttt{ <istep>}.\texttt{TDRho}\index{TDRho@{\bf TDRho}} after every | 10602 | \file{<istep>.TDRho} after every \fdf{TDED.Nsaverho} number of |
248 | 10625 | \fdf{TDED.Nsaverho} number of steps. | 10603 | steps. |
249 | 10626 | 10604 | ||
250 | 10627 | \end{fdflogicalF} | 10605 | \end{fdflogicalF} |
251 | 10628 | 10606 | ||
252 | 10629 | 10607 | ||
253 | === modified file 'Src/bands.F' | |||
254 | --- Src/bands.F 2017-10-19 09:19:20 +0000 | |||
255 | +++ Src/bands.F 2018-04-20 13:37:02 +0000 | |||
256 | @@ -366,7 +366,6 @@ | |||
257 | 366 | use atmfuncs, only : symfio, cnfigfio, labelfis, nofis | 366 | use atmfuncs, only : symfio, cnfigfio, labelfis, nofis |
258 | 367 | use writewave, only : wfs_filename | 367 | use writewave, only : wfs_filename |
259 | 368 | 368 | ||
260 | 369 | ! use m_spin, only: NoMagn, SPpol, NonCol, SpOrb | ||
261 | 370 | use m_spin, only: spin | 369 | use m_spin, only: spin |
262 | 371 | 370 | ||
263 | 372 | use m_diag_option, only: ParallelOverK, Serial | 371 | use m_diag_option, only: ParallelOverK, Serial |
264 | 373 | 372 | ||
265 | === modified file 'Src/dfscf.f' | |||
266 | --- Src/dfscf.f 2018-02-21 12:52:06 +0000 | |||
267 | +++ Src/dfscf.f 2018-04-20 13:37:02 +0000 | |||
268 | @@ -71,12 +71,8 @@ | |||
269 | 71 | use parallel, only: Nodes, Node | 71 | use parallel, only: Nodes, Node |
270 | 72 | use sys, only: die | 72 | use sys, only: die |
271 | 73 | use parallelsubs, only: GlobalToLocalOrb | 73 | use parallelsubs, only: GlobalToLocalOrb |
272 | 74 | ! use m_spin, only: NonCol, SpOrb | ||
273 | 75 | ! use m_spin, only: h_spin_dim, spinor_dim | ||
274 | 76 | 74 | ||
275 | 77 | ! CC RC Added for the offSpOrb | ||
276 | 78 | use m_spin, only: spin | 75 | use m_spin, only: spin |
277 | 79 | ! CC RC Added for the offSpOrb | ||
278 | 80 | 76 | ||
279 | 81 | implicit none | 77 | implicit none |
280 | 82 | 78 | ||
281 | @@ -354,14 +350,12 @@ | |||
282 | 354 | ! done with nspin=4 (grid_nspin)? | 350 | ! done with nspin=4 (grid_nspin)? |
283 | 355 | V(1:nsp,1:nspin) = Vscf(1:nsp,ip,1:nspin) | 351 | V(1:nsp,1:nspin) = Vscf(1:nsp,ip,1:nspin) |
284 | 356 | 352 | ||
285 | 357 | !! CC RC Added for the offSpOrb | ||
286 | 358 | C Factor two for nondiagonal elements for non-collinear spin | 353 | C Factor two for nondiagonal elements for non-collinear spin |
288 | 359 | if( spin%SO ) then | 354 | if ( spin%SO ) then |
289 | 360 | V(1:nsp,7:8) = V(1:nsp,3:4) | 355 | V(1:nsp,7:8) = V(1:nsp,3:4) |
291 | 361 | elseif( spin%NCol ) then | 356 | else if ( spin%NCol ) then |
292 | 362 | V(1:nsp,3:4) = 2.0_dp * V(1:nsp,3:4) | 357 | V(1:nsp,3:4) = 2.0_dp * V(1:nsp,3:4) |
295 | 363 | endif | 358 | end if |
294 | 364 | !! CC RC Added for the offSpOrb | ||
296 | 365 | 359 | ||
297 | 366 | C Loop on first orbital of mesh point | 360 | C Loop on first orbital of mesh point |
298 | 367 | do ic = 1,nc | 361 | do ic = 1,nc |
299 | 368 | 362 | ||
300 | === modified file 'Src/m_spin.F90' | |||
301 | --- Src/m_spin.F90 2018-04-19 12:47:26 +0000 | |||
302 | +++ Src/m_spin.F90 2018-04-20 13:37:02 +0000 | |||
303 | @@ -184,18 +184,14 @@ | |||
304 | 184 | spin%NCol = .true. | 184 | spin%NCol = .true. |
305 | 185 | 185 | ||
306 | 186 | else if ( leqi(opt, 'spin-orbit') .or. leqi(opt, 'S-O') .or. & | 186 | else if ( leqi(opt, 'spin-orbit') .or. leqi(opt, 'S-O') .or. & |
308 | 187 | leqi(opt, 'SOC') .or. leqi(opt, 'SO') ) then | 187 | leqi(opt, 'SOC') .or. leqi(opt, 'SO') .or. & |
309 | 188 | leqi(opt, 'spin-orbit+offsite') .or. leqi(opt, 'S-O+offsite') .or. & | ||
310 | 189 | leqi(opt, 'SOC+offsite') .or. leqi(opt, 'SO+offsite') ) then | ||
311 | 188 | ! Spin-orbit defaults to the off-site implementation | 190 | ! Spin-orbit defaults to the off-site implementation |
312 | 189 | 191 | ||
313 | 190 | spin%SO = .true. | 192 | spin%SO = .true. |
314 | 191 | spin%SO_offsite = .true. | 193 | spin%SO_offsite = .true. |
315 | 192 | 194 | ||
316 | 193 | else if ( leqi(opt, 'spin-orbit+offsite') .or. leqi(opt, 'S-O+offsite') .or. & | ||
317 | 194 | leqi(opt, 'SOC+offsite') .or. leqi(opt, 'SO+offsite') ) then | ||
318 | 195 | |||
319 | 196 | spin%SO = .true. | ||
320 | 197 | spin%SO_offsite = .true. | ||
321 | 198 | |||
322 | 199 | else if ( leqi(opt, 'spin-orbit+onsite') .or. leqi(opt, 'S-O+onsite') .or. & | 195 | else if ( leqi(opt, 'spin-orbit+onsite') .or. leqi(opt, 'S-O+onsite') .or. & |
323 | 200 | leqi(opt, 'SOC+onsite') .or. leqi(opt, 'SO+onsite') ) then | 196 | leqi(opt, 'SOC+onsite') .or. leqi(opt, 'SO+onsite') ) then |
324 | 201 | 197 | ||
325 | @@ -207,12 +203,12 @@ | |||
326 | 207 | call die('Spin: unknown flag, please assert the correct input.') | 203 | call die('Spin: unknown flag, please assert the correct input.') |
327 | 208 | end if | 204 | end if |
328 | 209 | 205 | ||
330 | 210 | if (spin%SO_offsite) then | 206 | if ( spin%SO_offsite ) then |
331 | 211 | call add_citation("10.1088/0953-8984/24/8/086005") | 207 | call add_citation("10.1088/0953-8984/24/8/086005") |
334 | 212 | endif | 208 | end if |
335 | 213 | if (spin%SO_onsite) then | 209 | if ( spin%SO_onsite ) then |
336 | 214 | call add_citation("10.1088/0953-8984/18/34/012") | 210 | call add_citation("10.1088/0953-8984/18/34/012") |
338 | 215 | endif | 211 | end if |
339 | 216 | 212 | ||
340 | 217 | ! Note that, in what follows, | 213 | ! Note that, in what follows, |
341 | 218 | ! spinor_dim = min(h_spin_dim,2) | 214 | ! spinor_dim = min(h_spin_dim,2) |
342 | @@ -242,9 +238,10 @@ | |||
343 | 242 | spin%Col = .false. | 238 | spin%Col = .false. |
344 | 243 | spin%NCol = .false. | 239 | spin%NCol = .false. |
345 | 244 | spin%SO = .true. | 240 | spin%SO = .true. |
346 | 241 | ! off/on MUST already be set! | ||
347 | 245 | 242 | ||
348 | 246 | ! should be moved... | 243 | ! should be moved... |
350 | 247 | TRSym = .false. | 244 | TRSym = .false. |
351 | 248 | 245 | ||
352 | 249 | else if ( spin%NCol ) then | 246 | else if ( spin%NCol ) then |
353 | 250 | ! Non-collinear case | 247 | ! Non-collinear case |
354 | @@ -257,13 +254,15 @@ | |||
355 | 257 | spin%spinor = 2 | 254 | spin%spinor = 2 |
356 | 258 | 255 | ||
357 | 259 | ! Flags | 256 | ! Flags |
362 | 260 | spin%none = .false. | 257 | spin%none = .false. |
363 | 261 | spin%Col = .false. | 258 | spin%Col = .false. |
364 | 262 | spin%NCol = .true. | 259 | spin%NCol = .true. |
365 | 263 | spin%SO = .false. | 260 | spin%SO = .false. |
366 | 261 | spin%SO_onsite = .false. | ||
367 | 262 | spin%SO_offsite = .false. | ||
368 | 264 | 263 | ||
369 | 265 | ! should be moved... | 264 | ! should be moved... |
371 | 266 | TRSym = .false. | 265 | TRSym = .false. |
372 | 267 | 266 | ||
373 | 268 | else if ( spin%Col ) then | 267 | else if ( spin%Col ) then |
374 | 269 | ! Collinear case | 268 | ! Collinear case |
375 | @@ -276,13 +275,15 @@ | |||
376 | 276 | spin%spinor = 2 | 275 | spin%spinor = 2 |
377 | 277 | 276 | ||
378 | 278 | ! Flags | 277 | ! Flags |
383 | 279 | spin%none = .false. | 278 | spin%none = .false. |
384 | 280 | spin%Col = .true. | 279 | spin%Col = .true. |
385 | 281 | spin%NCol = .false. | 280 | spin%NCol = .false. |
386 | 282 | spin%SO = .false. | 281 | spin%SO = .false. |
387 | 282 | spin%SO_onsite = .false. | ||
388 | 283 | spin%SO_offsite = .false. | ||
389 | 283 | 284 | ||
390 | 284 | ! should be moved... | 285 | ! should be moved... |
392 | 285 | TRSym = .true. | 286 | TRSym = .true. |
393 | 286 | 287 | ||
394 | 287 | else if ( spin%none ) then | 288 | else if ( spin%none ) then |
395 | 288 | ! No spin configuration... | 289 | ! No spin configuration... |
396 | @@ -295,13 +296,15 @@ | |||
397 | 295 | spin%spinor = 1 | 296 | spin%spinor = 1 |
398 | 296 | 297 | ||
399 | 297 | ! Flags | 298 | ! Flags |
404 | 298 | spin%none = .true. | 299 | spin%none = .true. |
405 | 299 | spin%Col = .false. | 300 | spin%Col = .false. |
406 | 300 | spin%NCol = .false. | 301 | spin%NCol = .false. |
407 | 301 | spin%SO = .false. | 302 | spin%SO = .false. |
408 | 303 | spin%SO_onsite = .false. | ||
409 | 304 | spin%SO_offsite = .false. | ||
410 | 302 | 305 | ||
411 | 303 | ! should be moved... | 306 | ! should be moved... |
413 | 304 | TRSym = .true. | 307 | TRSym = .true. |
414 | 305 | 308 | ||
415 | 306 | end if | 309 | end if |
416 | 307 | 310 | ||
417 | 308 | 311 | ||
418 | === modified file 'Src/rhoofd.F90' | |||
419 | --- Src/rhoofd.F90 2018-04-15 22:13:08 +0000 | |||
420 | +++ Src/rhoofd.F90 2018-04-20 13:37:02 +0000 | |||
421 | @@ -331,12 +331,6 @@ | |||
422 | 331 | ! Retrieve phi values | 331 | ! Retrieve phi values |
423 | 332 | if ( spin%SO_offsite ) then | 332 | if ( spin%SO_offsite ) then |
424 | 333 | Clocal(:,ic) = phia(iphi,:) | 333 | Clocal(:,ic) = phia(iphi,:) |
425 | 334 | ! if(ip.lt.10) then | ||
426 | 335 | ! write(6,*) ' ip/nc/Clocal(1,:) = ', ip, nc, Clocal(1,:) | ||
427 | 336 | ! else | ||
428 | 337 | ! stop 'Stopping in rhoofd...' | ||
429 | 338 | ! endif | ||
430 | 339 | |||
431 | 340 | else | 334 | else |
432 | 341 | Clocal(:,ic) = dsqrt(2._dp) * phia(iphi,:) | 335 | Clocal(:,ic) = dsqrt(2._dp) * phia(iphi,:) |
433 | 342 | end if | 336 | end if |
434 | @@ -389,13 +383,6 @@ | |||
435 | 389 | ! Retrieve phi values | 383 | ! Retrieve phi values |
436 | 390 | if ( spin%SO_offsite ) then | 384 | if ( spin%SO_offsite ) then |
437 | 391 | Clocal(:,ic) = phi(:,imp) | 385 | Clocal(:,ic) = phi(:,imp) |
438 | 392 | ! if(ip.lt.5) then | ||
439 | 393 | ! write(6,*) ' ip/nc/Clocal(1,:) = ', ip, nc, Clocal(1,:) | ||
440 | 394 | ! else | ||
441 | 395 | ! stop 'Stopping in rhoofd...' | ||
442 | 396 | ! endif | ||
443 | 397 | |||
444 | 398 | |||
445 | 399 | else | 386 | else |
446 | 400 | Clocal(:,ic) = dsqrt(2._dp) * phi(:,imp) | 387 | Clocal(:,ic) = dsqrt(2._dp) * phi(:,imp) |
447 | 401 | end if | 388 | end if |
448 | 402 | 389 | ||
449 | === modified file 'Src/state_analysis.F' | |||
450 | --- Src/state_analysis.F 2018-04-19 09:00:15 +0000 | |||
451 | +++ Src/state_analysis.F 2018-04-20 13:37:02 +0000 | |||
452 | @@ -22,7 +22,7 @@ | |||
453 | 22 | & CartesianForce_to_ZmatForce | 22 | & CartesianForce_to_ZmatForce |
454 | 23 | use atomlist, only : iaorb, iphorb, amass, no_u, lasto | 23 | use atomlist, only : iaorb, iphorb, amass, no_u, lasto |
455 | 24 | use atomlist, only : indxuo | 24 | use atomlist, only : indxuo |
457 | 25 | use m_spin, only : SpOrb | 25 | use m_spin, only : spin |
458 | 26 | use m_fixed, only : fixed | 26 | use m_fixed, only : fixed |
459 | 27 | use sparse_matrices | 27 | use sparse_matrices |
460 | 28 | use siesta_geom | 28 | use siesta_geom |
461 | @@ -167,7 +167,7 @@ | |||
462 | 167 | endif | 167 | endif |
463 | 168 | 168 | ||
464 | 169 | ! Population and moment analysis | 169 | ! Population and moment analysis |
466 | 170 | if ( SpOrb .and. orbmoms) then | 170 | if ( spin%SO .and. orbmoms) then |
467 | 171 | call moments( 1, na_u, no_u, maxnh, numh, listhptr, | 171 | call moments( 1, na_u, no_u, maxnh, numh, listhptr, |
468 | 172 | . listh, S, Dscf, isa, lasto, iaorb, iphorb, | 172 | . listh, S, Dscf, isa, lasto, iaorb, iphorb, |
469 | 173 | . indxuo ) | 173 | . indxuo ) |
470 | 174 | 174 | ||
471 | === modified file 'version.info' | |||
472 | --- version.info 2018-04-20 09:41:55 +0000 | |||
473 | +++ version.info 2018-04-20 13:37:02 +0000 | |||
474 | @@ -1,1 +1,1 @@ | |||
476 | 1 | trunk-687--merge-OSSO-694 | 1 | trunk-687--merge-OSSO-694--fixes-1 |
Good. Thanks!