[Pw_forum] Re: Pw_forum digest, Vol 1 #1399 - 12 msgs

Eyvaz Isaev eyvaz_isaev at yahoo.com
Fri Mar 30 19:00:20 CEST 2007


Hi Saman,

Please find bands_3.f and a Gnuplot script sent to the forum approximately 1.5 months ago. 
Any questions, let me know.

Bests,
Eyvaz.


----- Original Message ----
From: saman ghaderyan <ghaderyan at gmail.com>
To: pw_forum at pwscf.org
Sent: Wednesday, March 28, 2007 1:27:21 AM
Subject: [Pw_forum] Re: Pw_forum digest, Vol 1 #1399 - 12 msgs

hi
how i can plot phonon frequency for deferent q-victor (example 6).
thanks



On 3/27/07, pw_forum-request at pwscf.org <pw_forum-request at pwscf.org> wrote:
> Send Pw_forum mailing list submissions to
>     pw_forum at pwscf.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>     http://www.democritos.it/mailman/listinfo/pw_forum
> or, via email, send a message with subject or body 'help' to
>     pw_forum-request at pwscf.org
>
> You can reach the person managing the list at
>     pw_forum-admin at pwscf.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Pw_forum digest..."
>
>
> Today's Topics:
>
>    1. Re: Does anyone have RRKJ uspp for Cr? (degironc)
>    2. Re: Does anyone have RRKJ uspp for Cr? (Nicola Marzari)
>    3. Re: Problem with pp.x (Paolo Giannozzi)
>    4. Re: masses and dt in vc-relax (Paolo Giannozzi)
>    5. Re: Aluminium EPC at X (Paolo Giannozzi)
>    6. Re: spilling parameter in Lowdin - how to assign the charge that went
> into Nirvana ? (Paolo Giannozzi)
>    7. grid without symmtrical problem (Ezad Shojaee)
>    8. (no subject) (hyello25 Qgrui)
>    9. Re: grid without symmtrical problem (degironc)
>   10. Re: Inconsistent pp.x and projwfc.x results? (Paolo Giannozzi)
>   11. Re: calculation crash (Paolo Giannozzi)
>   12. Re: Is the CG diagonalization suitable for the general matrix? (Paolo
> Giannozzi)
>
> --__--__--
>
> Message: 1
> Date: Tue, 27 Mar 2007 08:29:27 +0200
> From: degironc <degironc at sissa.it>
> To: pw_forum at pwscf.org
> Subject: Re: [Pw_forum] Does anyone have RRKJ uspp for Cr?
> Reply-To: pw_forum at pwscf.org
>
> I don't have any..
> I hope this info from the adomic_doc/INPUT_LD1 file might be useful:
>        rho0 = charge at the origin: when the Rabe-Rappe-Kaxiras-Joannopoulos
>              method with 3 Bessel functions fails, specifying rho0 > 0
>              may allow to override the problem (using 4 Bessel functions)
>              Typical values are in the order of 0.01-0.02       (default
> 0.0)
>
> best, stefano
>
> Chao Cao wrote:
>
> > As title. I have tried to generate the pseudopotential myself, but it
> > seems to be way too complicated. It kept complaining about stuff like:
> >
> >
> >             integrated core pseudo-charge :   5.66
> >     from compute phi : info #        -1
> >     negative determinant
> >
> >         1 ld=   0.518427 f2ae  0.606247 faenor  0.141808
> >
> >
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> >
> >     from gener_pseudo : error #         1
> >     too many nodes
> >
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> >
> >
> >     stopping ...
> >
> >
> > Thanks a lot.
> >
> > Chao Cao
> > _______________________________________________
> > Pw_forum mailing list
> > Pw_forum at pwscf.org
> > http://www.democritos.it/mailman/listinfo/pw_forum
>
>
>
> --__--__--
>
> Message: 2
> Date: Tue, 27 Mar 2007 03:32:12 -0400
> From: Nicola Marzari <marzari at MIT.EDU>
> Organization: Massachusetts Institute of Technology
> To: pw_forum at pwscf.org
> Subject: Re: [Pw_forum] Does anyone have RRKJ uspp for Cr?
> Reply-To: pw_forum at pwscf.org
>
>
>
> Another possibility is to generate a Cr using David Vanderbilt
> code: http://www.physics.rutgers.edu/~dhv/uspp/ , and then convert it
> to UPF format.
>
> There is an input file there for a PW91 Cr that looks good.
>
>                 nicola
>
>
> ---------------------------------------------------------------------
> Prof Nicola Marzari   Department of Materials Science and Engineering
> 13-5066   MIT   77 Massachusetts Avenue   Cambridge MA 02139-4307 USA
> tel 617.4522758 fax 2586534 marzari at mit.edu http://quasiamore.mit.edu
>
> --__--__--
>
> Message: 3
> From: Paolo Giannozzi <giannozz at nest.sns.it>
> Subject: Re: [Pw_forum] Problem with pp.x
> Date: Tue, 27 Mar 2007 09:43:18 +0200
> To: pw_forum at pwscf.org
> Reply-To: pw_forum at pwscf.org
>
>
> On Mar 26, 2007, at 15:11 , Francesco.Stellato at roma2.infn.it wrote:
>
> >     outdir='/nfs_home/home0/molcp/velia/density_test/tmp_scf/'
>
> do not write to nfs-mounted file system: it is a recipe for disaster
>
> > p6_17713:  p4_error: net_recv read:  probable EOF on socket: 1
> > rm_l_1_9870: (6.535927) net_send: could not write to fd=5, errno = 32
>
> it looks like an error while writing to unit 5. Errors like this,
> occurring in system library calls, are impossible to pinpoint
> unless one finds under which exact circumstances it occurs,
> whether it is reproducible or not, and so on and so forth.
> They are more often a sign of problems with mpi or the
> filesystem or both rather than in the code itself
>
> Paolo
> ---
> Paolo Giannozzi, Democritos and University of Udine, Italy
>
>
>
> --__--__--
>
> Message: 4
> From: Paolo Giannozzi <giannozz at nest.sns.it>
> Subject: Re: [Pw_forum] masses and dt in vc-relax
> Date: Tue, 27 Mar 2007 10:03:04 +0200
> To: pw_forum at pwscf.org
> Reply-To: pw_forum at pwscf.org
>
>
> On Mar 25, 2007, at 20:05 , Jess Kondor wrote:
>
> > Does it mean that I cannot use the settings from the small system
> > and apply them for bigger system?
>
> larger systems typically have more convergence problems than
> small systems, so they might need a smaller time step
>
> Paolo
> ---
> Paolo Giannozzi, Democritos and University of Udine, Italy
>
>
>
> --__--__--
>
> Message: 5
> From: Paolo Giannozzi <giannozz at nest.sns.it>
> Subject: Re: [Pw_forum] Aluminium EPC at X
> Date: Tue, 27 Mar 2007 10:07:24 +0200
> To: pw_forum at pwscf.org
> Reply-To: pw_forum at pwscf.org
>
>
> On Mar 25, 2007, at 19:58 , Amit Kumar wrote:
>
> > I'm very much confused with the results of the electron-phonon
> > coupling
> > of Aluminium  at X-point.  You can see a large discrepancy in the
> > results
> > of Example  No. 7.
>
> >    Old version ::::
> >       Gaussian Broadening:   0.010 Ry, ngauss=   1
> > [...]
> >     Newer  Version  :::::::::
> >       Gaussian Broadening:   0.010 Ry, ngauss=   0
>
> would you mind reading the answer that you get before
> asking new questions, or more exactly, the same question?
> ---
> Paolo Giannozzi, Democritos and University of Udine, Italy
>
>
>
> --__--__--
>
> Message: 6
> From: Paolo Giannozzi <giannozz at nest.sns.it>
> Subject: Re: [Pw_forum] spilling parameter in Lowdin - how to assign the
> charge that went into Nirvana ?
> Date: Tue, 27 Mar 2007 10:10:10 +0200
> To: pw_forum at pwscf.org
> Reply-To: pw_forum at pwscf.org
>
>
> On Mar 24, 2007, at 15:54 , Andrea Ferretti wrote:
>
> > Lowding orbitals in Quantum-Espresso (at least as far as I know) are
> > computed from the atomic reference states from pseudopotential data
> > according to:
> >
> > S_ij = < i | j >      are the overlaps of atomic orbitals i and j
> >
> > lowding orbitals are then obtained as
> > | low_i > =  R_ij  | j >
> >
> > where  R = S^{-1/2}
> >
> > so I think there is no optimization (in the sense of the paper above)
> > but maybe I am missing something
>
> no, you aren't missing anything: the atomic basis is not optimized
>
> Paolo
> ---
> Paolo Giannozzi, Democritos and University of Udine, Italy
>
>
>
> --__--__--
>
> Message: 7
> From: "Ezad Shojaee" <ezadshojaee at hotmail.com>
> To: Pw_forum at pwscf.org
> Date: Tue, 27 Mar 2007 10:25:49 +0000
> Subject: [Pw_forum] grid without symmtrical problem
> Reply-To: pw_forum at pwscf.org
>
> hi
> is it possible to define a grid with non-equal numbers for ph.x not to have
> problem with q2r.x ? because i tried sample 221 and q2r.x  gave symmetrical
> error;  while there was no error with 222 sample.
> is there a way what is it?
> thanx
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
>
> --__--__--
>
> Message: 8
> Date: Tue, 27 Mar 2007 19:39:36 +0800
> From: "hyello25 Qgrui" <hyello25 at gmail.com>
> To: pw_forum at pwscf.org
> Subject: [Pw_forum] (no subject)
> Reply-To: pw_forum at pwscf.org
>
> ------=_Part_4479_6415940.1174995576279
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
>
> hyello25 at gmail.com
>
> ------=_Part_4479_6415940.1174995576279
> Content-Type: text/html; charset=ISO-8859-1
> Content-Transfer-Encoding: 7bit
> Content-Disposition: inline
>
> <a href="mailto:hyello25 at gmail.com">hyello25 at gmail.com</a>
>
> ------=_Part_4479_6415940.1174995576279--
>
> --__--__--
>
> Message: 9
> Date: Tue, 27 Mar 2007 15:14:28 +0200
> From: degironc <degironc at sissa.it>
> To: pw_forum at pwscf.org
> Subject: Re: [Pw_forum] grid without symmtrical problem
> Reply-To: pw_forum at pwscf.org
>
> The grid should have the symmetry of your system.
> Therefore it depends on the system.
> stefano
>
> Ezad Shojaee wrote:
>
> > hi
> > is it possible to define a grid with non-equal numbers for ph.x not to
> > have problem with q2r.x ? because i tried sample 221 and q2r.x  gave
> > symmetrical error;  while there was no error with 222 sample.
> > is there a way what is it?
> > thanx
> >
> > _________________________________________________________________
> > Express yourself instantly with MSN Messenger! Download today it's
> > FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
> >
> > _______________________________________________
> > Pw_forum mailing list
> > Pw_forum at pwscf.org
> > http://www.democritos.it/mailman/listinfo/pw_forum
>
>
>
> --__--__--
>
> Message: 10
> From: Paolo Giannozzi <giannozz at nest.sns.it>
> Subject: Re: [Pw_forum] Inconsistent pp.x and projwfc.x results?
> Date: Tue, 27 Mar 2007 15:21:53 +0200
> To: pw_forum at pwscf.org
> Reply-To: pw_forum at pwscf.org
>
>
> On Mar 23, 2007, at 19:14 , Conor Hogan wrote:
>
> > Basically the character of the states produced by projwfc.x (atomic
> > projection) and pp.x (plotting the state directly) differ in the
> > case I'm
> > studying
>
> one thing to try is to re-do the calculation using k=(0,0,0)
> instead of 'Gamma tricks'. It should work in both cases,
> but who knows. If this is the problem, it should show up
> even in much smaller calculations
>
> Paolo
> ---
> Paolo Giannozzi, Democritos and University of Udine, Italy
>
>
>
> --__--__--
>
> Message: 11
> From: Paolo Giannozzi <giannozz at nest.sns.it>
> Subject: Re: [Pw_forum] calculation crash
> Date: Tue, 27 Mar 2007 15:39:26 +0200
> To: pw_forum at pwscf.org
> Reply-To: pw_forum at pwscf.org
>
>
> On Mar 22, 2007, at 13:53 , lan haiping wrote:
>
> >      from  fft_dlay_set  : error #         7
> >       inconsistent number of sticks
>
> very strange. Try to run the job in serial execution and see
> what happens
>
> Paolo
> ---
> Paolo Giannozzi, Democritos and University of Udine, Italy
>
>
>
> --__--__--
>
> Message: 12
> From: Paolo Giannozzi <giannozz at nest.sns.it>
> Subject: Re: [Pw_forum] Is the CG diagonalization suitable for the general
> matrix?
> Date: Tue, 27 Mar 2007 16:19:50 +0200
> To: pw_forum at pwscf.org
> Reply-To: pw_forum at pwscf.org
>
>
> --Apple-Mail-1--870504716
> Content-Transfer-Encoding: 7bit
> Content-Type: text/plain;
>     charset=US-ASCII;
>     format=flowed
>
>
> On Mar 20, 2007, at 16:39 , xqhu at duke.edu wrote:
>
> > I'm trying to implement PZ-SIC in PWSCF.
>
> good luck!
>
> > In PZ-SIC, the Fock matrix is not symmetric any more.
> > I can not use DIIS or Davidson since both of them are
> > for the hermitian matrix. I checked CG codes. It seems
> > that CG can be used in the general matrix. If you are familiar
> > with the CG diagonalization, please tell me some details.
>
> all I know is written here
>
> Paolo
>
>
> --Apple-Mail-1--870504716
> Content-Transfer-Encoding: 7bit
> Content-Type: application/octet-stream;
>     x-unix-mode=0644;
>     name=diago.tex
> Content-Disposition: attachment;
>     filename=diago.tex
>
> \documentstyle[11pt]{report}
> \pagestyle{empty}
> \textwidth = 16 cm
> \textheight = 24 cm
> \topmargin =  0.0 cm
> \oddsidemargin = 0.0 cm
> \begin{document}
>
> {\bf Poor-man conjugate-gradient single-band diagonalisation}.
>
> \par\noindent
> The problem: minimize
> \begin{equation}
> f_j={1\over 2} <\psi_j|H|\psi_j>
> \end{equation}
> under the constraints that
> \begin{equation}
> <\psi_j|\psi_j>=1, \qquad <\psi_j|\psi_k>=0,\quad k<j
> \end{equation}
> This is equivalent to solve the Euler-Lagrange problem of minimising
> \begin{equation}
> \widetilde f_j={1\over 2} <\psi_j|H|\psi_j> -
>   \epsilon_j (<\psi_j|\psi_j>-1) -
>   \sum_{k<j} \lambda_{jk} <\psi_j|\psi_k>
> \end{equation}
> {\bf First step.}
> For any given index $j$ we assume a starting trial eigenvector
> $|\psi^0_j>$ such that
> \begin{equation}
> <\psi^0_j|\psi^0_j>=1,\qquad <\psi^0_j|\psi_k>=0, \quad k<j
> \end{equation}
> The gradient $|g^0_j>$ is
> \begin{equation}
> |g^0_j>=H|\psi^0_j> - \epsilon^0_j |\psi^0_j> -
>        \sum_{k<j} \lambda^0_{jk}|\psi_k>
> \end{equation}
> where
> \begin{equation}
> \lambda^0_{jk} = <\psi_k|(H-\epsilon^0_j)|\psi^0_j>
> \end{equation}
> ensures that $<g^0_j|\psi_k>=0$, while
> \begin{equation}
> \epsilon^0_j = <\psi^0_j|H|\psi^0_j>
> \end{equation}
> ensures that $<g^0_j|\psi^0_j>=0$.
> Let us consider the conjugate direction $|h^0_j>=|g^0_j>$ and the
> normalized direction $|\widetilde h^0_j>$:
> \begin{equation}
> |\widetilde h^0_j> = {|h^0_j>\over <h^0_j|h^0_j>^{1/2}}
> \end{equation}
> By construction
> \begin{equation}
> <\widetilde h^0_j|\widetilde h^0_j>=1,  \quad
> <\widetilde h^0_j|\psi^0_j>=0,  \quad
> <\widetilde h^0_j|\psi_k>=0  \quad
> \end{equation}
> Consider the vector
> \begin{equation}
> |\psi^1_j(\theta)>= \cos\theta |\psi^0_j> + \sin\theta|\widetilde h^0_j>
> \end{equation}
> By construction,
> \begin{equation}
> <\psi^1_j(\theta)|\psi^1_j(\theta)>=1, \qquad
> <\psi^1_j(\theta)|\psi_k>=0,\quad k<j
> \end{equation}
> We look for the value of $\theta$ that minimises
> \begin{equation}
> \epsilon^1_j(\theta) = <\psi^1_j(\theta)|H|\psi^1_j(\theta)>
> \end{equation}
> The solution is
> \begin{equation}
> \theta^0_j={1\over 2}
> \mbox{arctag}\left({a^0_j\over\epsilon^0_j-b^0_j}\right)
> \end{equation}
> where
> \begin{equation}
> a^0_j=< \psi^0_j|H|\widetilde h^0_j> + c.c., \quad
> b^0_j=< \widetilde h^0_j|H|\widetilde h^0_j>
> \end{equation}
> and
> \begin{equation}
> \epsilon^1_j = {\epsilon^0_j+b^0_j - \sqrt{(\epsilon^0_j-b^0_j)^2
>                                      +(a^0_j)^2}\over 2}
> \end{equation}
>
> {\bf Following steps.} We construct the new gradient
> $|g^n_j>$ as above and the new conjugate direction
> $|h^n_j>$ as in the conjugate gradient method. We define
> \begin{equation}
> |u^n_j>=|g^n_j>+\gamma^{n-1}|h^{n-1}_j>
> \end{equation}
> \begin{equation}
> \gamma^{n-1}={<g^n_j|g^n_j>\over<g^{n-1}_j|g^{n-1}_j>}
> \quad\mbox{or}\quad
> \gamma^{n-1}={<g^n_j-g^{n-1}|g^n_j>\over<g^{n-1}_j|g^{n-1}_j>}
> \end{equation}
> (left: Fletcher-Reeves, right: Polak-Ribi\`ere). By construction,
> \begin{equation}
> <g^n_j|\psi_k>=0 \longrightarrow <u^n_j|\psi_k>=0
> \end{equation}
> but
> \begin{equation}
> \beta^n_j= <u^n_j|\psi^n_j>=\gamma^{n-1}_j<h^{n-1}_j|\psi^n_j>
>                 =\gamma^{n-1}_j\sin\theta^{n-1}_j
>                      <h^{n-1}_j|\widetilde h^{n-1}_j> \neq 0
> \end{equation}
> so that explicit orthogonalization of $|\psi^n_j>$ to $|u^n_j>$ is
> needed (it is a consequence of the constraint of unitary norm):
> \begin{equation}
> |h^n_j>=|u^n_j> - \beta^n_j |\psi^n_j>
> \end{equation}
> Then one proceeds as above.
>
> \par\bigskip
> {\bf Preconditioning.} We define a (diagonal) preconditioning matrix
> $P$ and auxiliary functions $|y>$ :
> \begin{equation}
> |y_j>=P^{-1}|\psi_j>
> \end{equation}
> One has to solve the equivalent problem of minimizing
> \begin{equation}
> f_j={1\over 2} <y_j|(PHP)|y_j>
> \end{equation}
> under the constraints that
> \begin{equation}
> <y_j|P^2|y_j>=1, \qquad <y_j|P|\psi_k>=0,\quad k<j
> \end{equation}
> Let us consider only the first constraint. The problem is equivalent
> to the minimisation of
> \begin{equation}
> \widetilde f_j={1\over 2} <y_j|(PHP)|y_j> -
>                \widetilde\epsilon_j (<y_j|P^2|y_j>-1)
> \end{equation}
> The gradient $|g_j>$ is now given by
> \begin{equation}
> |g_j>=(PHP)|y_j> - \widetilde\epsilon_j P^2|y_j>
> \end{equation}
> where
> \begin{equation}
> \widetilde\epsilon_j = {<y_j| P^2 (PHP)|y_j> \over <y_j| P^2 P^2| y_j>}
> \end{equation}
> ensures that
> \begin{equation}
> <g_j|P^2|y_j> = 0
> \end{equation}
> The second set of constraints is accounted for in a different way. We
> want that
> \begin{equation}
> <g_j|P|\psi_k> = 0
> \end{equation}
> This is obtained by orthogonalizing $|Pg_j>$ to $|\psi_k>$:
> \begin{equation}
> |Pg_j>=P(PHP)|y_j> - \widetilde\epsilon_j P^3|y_j>
>      - \sum_{k<j}\lambda_{jk}|\psi_k>
> \end{equation}
> where
> \begin{equation}
> \lambda_{jk} = <\psi_k|P(PHP)-P\widetilde\epsilon_j P^3|y_j>
> \end{equation}
> The reason for the different treatment of the second set of
> constraints is that $<\psi_k|P^2|\psi_l>\neq 0$.
>
> {\bf Modified preconditioned algorithm}. Starting from an initial
> guess $|\psi^0_j>$ (where $<\psi_k|\psi^0_j>=0$,
> $<\psi^0_j|\psi^0_j>=1$), one searches for new vector as:
> \begin{equation}
> |\psi^n_j(\theta)>= \cos\theta |\psi^{n-1}_j> +
>                     \sin\theta |P\widetilde h^{n-1}_j>
> \end{equation}
> where
> \begin{equation}
> |P\widetilde h^n_j> = {|Ph^n_j>\over <Ph^n_j|Ph^n_j>^{1/2}}
> \end{equation}
> and $|Ph^n_j>$ is the conjugate gradient. We define
> \begin{equation}
> |Pu^n_j>=|Pg^n_j>+\gamma^{n-1}|Ph^{n-1}_j>,
> \end{equation}
> \begin{equation}
> \gamma^{n-1}={<Pg^n_j|P^{-2}|Pg^n_j>\over<Pg^{n-1}_j|P^{-2}|Pg^{n-1}_j>}
> \quad\mbox{or}\quad
> \gamma^{n-1}={<Pg^n_j-Pg^{n-1}|P^{-2}|Pg^n_j> \over
>               <Pg^{n-1}_j|P^{-2}|Pg^{n-1}_j>}
> \end{equation}
> with $\gamma^{-1}=0$.
> The gradient $|Pg^n_j>$ is given by
> \begin{equation}
> |Pg_j>=P^2H|\psi_j> - \widetilde\epsilon_j P^2|\psi_j>-
>        \sum_{k<j}\lambda_{jk}|\psi_k>
> \end{equation}
> where
> \begin{equation}
> \lambda_{jk} = <\psi^n_k|P^2H-\widetilde\epsilon^n_j P^2|\psi^n_j>,\qquad
> \widetilde\epsilon_j = {<\psi^n_j| P^2 H|\psi^n_j> \over <\psi^n_j|
> P^2| \psi^n_j>}
> \end{equation}
> $|Pg^n_j>$ is by construction orthogonal to both
> $|\psi_k>$ and $|\psi^n_j>$, but $|Pu^n_j>$ is not
> orthogonal to $|\psi^n_j>$ for $n>0$:
> \begin{equation}
> \beta^n_j= <Pu^n_j|\psi^n_j>=\gamma^{n-1}_j<Ph^{n-1}_j|\psi^n_j>
>                             =\gamma^{n-1}_j\sin\theta^{n-1}_j
>                             <Ph^{n-1}_j|\widetilde Ph^{n-1}_j> \neq 0
> \end{equation}
> The conjugate direction $|Ph^n_j>$ is obtained from orthogonalization
> of $|Pu^n_j>$ to $|\psi^n_j>$:
> \begin{equation}
> |Ph^n_j>=|Pu^n_j> - \beta^n_j |\psi^n_j>
> \end{equation}
>
> {\bf Remarks}.
>
> -- Only $P^2$ (or $P^{-2}$) is actually used. A simple choice for
> $P^2$ is
> \begin{equation}
> P^2({\bf G},{\bf G}') = {2m \over
>                          \hbar^2({\bf k+G})^2}\delta_{\bf GG}'
> \end{equation}
>
> -- $\widetilde\epsilon^n_j$ will eventually converge to the real
> eigenvalue $\epsilon_j$ but in the preconditioned case they are not
> the same
>
> -- The algorithm is quite the same for hermitian Hamiltonians.
> $\theta$ and $\gamma$ are still real quantities, $beta$ and $\lambda$
> are no longer real.
>
> \newpage
>
> {\bf Conjugate-Gradient solution of linear systems}
>
> First problem: minimise the functional
> \begin{equation}
> f={1\over 2} <\delta\psi|A|\delta\psi> - {1\over 2}(<b|\delta\psi>+h.c.)
> \end{equation}
> under the constraint
> \begin{equation}
> <\psi|\delta\psi> = 0
> \end{equation}
> that is
> \begin{equation}
> \widetilde f = {1\over 2} <\delta\psi|A|\delta\psi>
>              - <b|\delta\psi>
>              - \lambda <\psi|\delta\psi>
> \end{equation}
> The gradient $|g>$ is
> \begin{equation}
> |g> = A|\delta\psi> - |b> -\lambda |\psi>
> \end{equation}
> By imposing that $<g|\psi>=0$ one gets
> \begin{equation}
> \lambda = <\psi|A|\delta\psi>-<\psi|b>
> \end{equation}
>
>
>
> \end{document}
>
> --Apple-Mail-1--870504716
> Content-Transfer-Encoding: 7bit
> Content-Type: application/octet-stream;
>     x-unix-mode=0644;
>     name=diago_us.tex
> Content-Disposition: attachment;
>     filename=diago_us.tex
>
> \documentstyle[11pt]{report}
> \pagestyle{empty}
> \textwidth = 16 cm
> \textheight = 25 cm
> \topmargin =  -1.0 cm
> \oddsidemargin = 0.0 cm
> \begin{document}
> {\bf Generalized problem}.
>
> \par\noindent
> The problem: minimize
> \begin{equation}
> f_j={1\over 2} <\psi_j|H|\psi_j>
> \end{equation}
> under the constraints:
> \begin{equation}
> <\psi_j|S|\psi_j>=1, \qquad <\psi_j|S|\psi_k>=0,\quad k<j
> \end{equation}
> %The alghoritm used to solve the problem is exactly the same as the one
> %used for "normal" constrains, apart from
> %the insertion of the S matrix in the right places.
> %
> % l'algoritmo e` lo stesso perche` appunto era gia` implementato con il
> % precondizionamento che tiene conto degli accorgimenti particolari da
> % fare sull'ortogonalizzazione, pero` la scrittura di questa prima parte
> % non e` vero che e` la stessa del caso senza overlap
> %
> %
> {\bf bisogna fare come per il problema con il precondizionamento perche`
> $<\psi^0_j|{\bf S^2}|\psi_k> \ne 0$ }
> ...This is equivalent to solve the Euler-Lagrange problem of minimising
> \begin{equation}
> \widetilde f_j={1\over 2} <\psi_j|H|\psi_j> -
>   \epsilon_j (<\psi_j|S|\psi_j>-1) -
>   \sum_{k<j} \lambda_{jk} <\psi_j|S|\psi_k>
> \end{equation}
> If we consider the gradient of the expression above we have:
> \begin{equation}\label{prima}
> |g_j>=H|\psi_j> - \epsilon_j S|\psi_j> -
>        \sum_{k<j} \lambda_{jk} S|\psi_k>
> \end{equation}
> but we are not able to find a simple expression for $\epsilon_j$ and
> $\lambda_{jk}$ in order to have $<g_j|S|\psi_k>=0$ because
> $<\psi_j|S^2|\psi_k> \ne 0$.  \\
> So we use a slightly different approach:
> we firstly consider only the first constraint. The problem is
> equivalent to the minimization of
>
> \begin{equation}
> \widetilde f_j={1\over 2} <\psi_j|H|\psi_j> -
>   \epsilon_j (<\psi_j|S|\psi_j>-1)
> \end{equation}
> {\bf First step.}
> For any given index $j$ we assume a starting vector
> $|\psi^0_j>$ such that
> \begin{equation}
> <\psi^0_j|S|\psi^0_j>=1,\qquad <\psi^0_j|S|\psi_k>=0, \quad k<j
> \end{equation}
> The gradient $|g^0_j>$ is
> \begin{equation}
> |g^0_j>=H|\psi^0_j> - \epsilon^{0^*}_j S|\psi^0_j>
> \end{equation}
> where
> \begin{equation}
> \epsilon^{0^*}_j = { <\psi^0_j|SH|\psi^0_j> \over <\psi^0_j|S^2|\psi^0_j>}
> \end{equation}
> ensures that $<g^0_j|S|\psi^0_j>=0$. We also define:
> \begin{equation}
> \epsilon^{0}_j = <\psi^0_j|H|\psi^0_j>
> \end{equation}
> which is an approximation for the true eigenvalue $\epsilon_j$ of H.
> The second set of constraints is accounted requiring that
> \begin{equation}
> <g^0_j|S|\psi_k>=0
> \end{equation}
> This is obtained by an explicit Gram-Shmidt orthogonalization, with the
> overlap matrix S, of $|g^0_j>$
> to $|\psi_k>, k<j $
> \begin{equation} \label{seconda}
> |g^0_j> = H|\psi^0_j> - \epsilon^{0^*}_j S|\psi^0_j> -
> \sum_{k<j}\lambda^0_{kj} |\psi_k>
> \end{equation}
> where
> \begin{equation}
> \lambda^0_{kj}=<g^0_j|S|\psi_k>
> \end{equation}
> Note that equation \ref{seconda} is very much different from equation
> \ref{prima}, the last term of the right hand side is
> $ \sum_{k<j}\lambda^0_{kj} |\psi_k> $ instead of
> $\sum_{k<j}\lambda^0_{kj} S|\psi_k>$.\\
> Now: let us consider the conjugate direction $|h^0_j>=|g^0_j>$ and the
> normalized direction $|\widetilde h^0_j>$:
> \begin{equation}
> |\widetilde h^0_j> = {|h^0_j>\over <h^0_j|S|h^0_j>^{1/2}}
> \end{equation}
> By construction
> \begin{equation}
> <\widetilde h^0_j|S|\widetilde h^0_j>=1,  \quad
> <\widetilde h^0_j|S|\psi^0_j>=0,  \quad
> <\widetilde h^0_j|S|\psi_k>=0  \quad
> \end{equation}
> Consider the vector
> \begin{equation}
> |\psi^1_j(\theta)>= \cos\theta |\psi^0_j> + \sin\theta|\widetilde h^0_j>
> \end{equation}
> By construction,
> \begin{equation}
> <\psi^1_j(\theta)|S|\psi^1_j(\theta)>=1, \qquad
> <\psi^1_j(\theta)|S|\psi_k>=0,\quad k<j
> \end{equation}
> We look for the value of $\theta$ that minimizes
> \begin{equation}
> \epsilon^1_j(\theta) = <\psi^1_j(\theta)|H|\psi^1_j(\theta)>
> \end{equation}
> The solution is
> \begin{equation}
> \theta^0_j={1\over 2}
> \mbox{arctag}\left({a^0_j\over\epsilon^0_j-b^0_j}\right)
> \end{equation}
> where
> \begin{equation}
> a^0_j=< \psi^0_j|H|\widetilde h^0_j> + c.c., \quad
> b^0_j=< \widetilde h^0_j|H|\widetilde h^0_j>
> \end{equation}
> and
> \begin{equation}
> \epsilon^1_j = {\epsilon^0_j+b^0_j - \sqrt{(\epsilon^0_j-b^0_j)^2
>                                      +(a^0_j)^2}\over 2}
> \end{equation}
> which is a new approximation for $\epsilon_j$.\\
> {\bf Following steps.} We construct the new gradient
> $|g^n_j>$ as above and the new conjugate direction
> $|h^n_j>$ as in the conjugate gradient method. We define
> \begin{equation}
> |u^n_j>=|g^n_j>+\gamma^{n-1}_j|h^{n-1}_j>
> \end{equation}
> \begin{equation}
> \gamma^{n-1}_j={<g^n_j|S|g^n_j>\over<g^{n-1}_j|S|g^{n-1}_j>}
> \simeq{<g^n_j-g^{n-1}_j|S|g^n_j>\over<g^{n-1}_j|S|g^{n-1}_j>}
> \end{equation}
> By construction,
> \begin{equation}
> <g^n_j|S|\psi_k>=0 \longrightarrow <u^n_j|S|\psi_k>=0
> \end{equation}
> but
> \begin{equation}
> \beta^n_j= <u^n_j|S|\psi^n_j>=\gamma^{n-1}_j<h^{n-1}_j|S|\psi^n_j>
>                 =\gamma^{n-1}_j\sin\theta^{n-1}_j
>                      <h^{n-1}_j|S|\widetilde h^{n-1}_j> \neq 0
> \end{equation}
> so that explicit orthogonalization of $|\psi^n_j>$ to $|u^n_j>$ is
> needed (it is a consequence of the constraint of unitary norm):
> \begin{equation}
> |h^n_j>=|u^n_j> - \beta^n_j |\psi^n_j>
> \end{equation}
> Then one proceeds as above, finds $\epsilon^n_j$ and check if
> $\epsilon^n_j - \epsilon^{n-1}_j < tol$, where $tol$ is a small number
> which defines the precision of $\epsilon_j$.
> \par\bigskip
> {\bf Preconditioning.} We define a (diagonal) preconditioning matrix
> $P$ and auxiliary functions $|y>$ :
> \begin{equation}
> |y_j>=P^{-1}|\psi_j>
> \end{equation}
> One has to solve the equivalent problem of minimizing
> \begin{equation}
> f_j={1\over 2} <y_j|(PHP)|y_j>
> \end{equation}
> under the constraints that
> \begin{equation}
> <y_j|(PSP)|y_j>=1, \qquad <y_j|PS|\psi_k>=0,\quad k<j
> \end{equation}
> Again we firstly consider only the first constraint. The problem is
> equivalent
> to the minimization of
> \begin{equation}
> \widetilde f_j={1\over 2} <y_j|(PHP)|y_j> -
>                \widetilde\epsilon_j (<y_j|(PSP)|y_j>-1)
> \end{equation}
> The gradient $|g_j>$ is now given by
> \begin{equation}
> |g_j>=(PHP)|y_j> - \widetilde\epsilon_j(PSP)|y_j>
> \end{equation}
> where
> \begin{equation}
> \widetilde\epsilon_j = {<y_j|(PSP)(PHP)|y_j> \over <y_j|(PSP)^2| y_j>}
> \end{equation}
> ensures that
> \begin{equation}
> <g_j|(PSP)|y_j> = 0
> \end{equation}
> Now we have to care about the second set of constraints. We want that
> \begin{equation}
> <g_j|PS|\psi_k> = 0
> \end{equation}
> And again this is obtained by orthogonalizing, with the overlap matrix $S$,
> $|Pg_j>$ to $|\psi_k> ,k<j$:
> \begin{equation}
> |Pg^0_j> = |Pg^0_j> - \sum_{k<j} <g^0_j|PS|\psi_k>|\psi_k>
> \end{equation}
>
> {\bf Modified preconditioned algorithm}. Starting from an initial
> guess $|\psi^0_j>$ (where $<\psi_k|S|\psi^0_j>=0$,
> $<\psi^0_j|S|\psi^0_j>=1$), one searches for new vector as:
> \begin{equation}
> |\psi^n_j(\theta)>= \cos\theta |\psi^{n-1}_j> +
>                     \sin\theta |P\widetilde h^{n-1}_j>
> \end{equation}
> where
> \begin{equation}
> |P\widetilde h^n_j> = {|Ph^n_j>\over <Ph^n_j|S|Ph^n_j>^{1/2}}
> \end{equation}
> and $|Ph^n_j>$ is the conjugate gradient. We define
> \begin{equation}
> |Pu^n_j>=|Pg^n_j>+\gamma^{n-1}_j|Ph^{n-1}_j>,
> \end{equation}
> \begin{equation}
> \gamma^{n-1}_j={<Pg^n_j|P^{-2}S|Pg^n_j>
> \over<Pg^{n-1}_j|P^{-2}S|Pg^{n-1}_j>}
> \simeq{<Pg^n_j-Pg^{n-1}_j|P^{-2}S|Pg^n_j>
> \over<Pg^{n-1}_j|P^{-2}S|Pg^{n-1}_j>}
> \end{equation}
> with $\gamma^{-1}_j=0$.
> The gradient $|Pg^n_j>$ is given by
> \begin{equation}
> |Pg^n_j>=P^2H|\psi^n_j> - \widetilde\epsilon^n_j SP^2|\psi^n_j>-
>        \sum_{k<j}\lambda_{jk}^n|\psi_k>
> \end{equation}
> where
> \begin{equation}
> \lambda_{jk}^n = <\psi_k|S(P^2H-\widetilde\epsilon^n_j SP^2)|\psi^n_j>,
> \qquad
> \widetilde\epsilon_j^n = {<\psi^n_j| SP^2 H|\psi^n_j> \over <\psi^n_j|
> S^2P^2| \psi^n_j>}
> \end{equation}
> $|Pu^n_j>$ is by construction orthogonal to
> $|\psi_k>$ but not to  $|\psi^n_j>$:
> \begin{equation}
> \beta^n_j= <Pu^n_j|S|\psi^n_j>=
> \gamma^{n-1}_j<Ph^{n-1}_j|S|\psi^n_j>
>                             =\gamma^{n-1}_j\sin\theta^{n-1}_j
>                             <Ph^{n-1}_j|S|Ph^{n-1}_j> \neq 0
> \end{equation}
> One gets the conjugate direction $|Ph^n_j>$ from
> \begin{equation}
> |Ph^n_j>=|Pu^n_j> - \beta^n_j |\psi^n_j>
> \end{equation}
> Note that only $P^2$ (or $P^{-2}$) is actually used.
>
> \end{document}
>
>
> --Apple-Mail-1--870504716
> Content-Transfer-Encoding: 7bit
> Content-Type: text/plain;
>     charset=US-ASCII;
>     format=flowed
>
> ---
> Paolo Giannozzi, Democritos and University of Udine, Italy
>
>
>
> --Apple-Mail-1--870504716--
>
>
> --__--__--
>
> _______________________________________________
> Pw_forum mailing list
> Pw_forum at pwscf.org
> http://www.democritos.it/mailman/listinfo/pw_forum
>
>
> End of Pw_forum Digest
>
_______________________________________________
Pw_forum mailing list
Pw_forum at pwscf.org
http://www.democritos.it/mailman/listinfo/pw_forum





 
____________________________________________________________________________________
Don't get soaked.  Take a quick peek at the forecast
with the Yahoo! Search weather shortcut.
http://tools.search.yahoo.com/shortcuts/#loc_weather



More information about the users mailing list