Subject: Re: double degenerate

From: Jochen Kuepper <[email-masked]>
Date: Thu, 29 Jul 1999 17:41:14 +0200

I wrote:
> >So how do you know what "are" the correct eigenvalues ?

By correct I went back to your original question. This sounded like you
weren't satisfied with the linear combinations you got ouf of NR-Jacobi.
So I asked how you decide wether they are good in your sense. They are
"correct" in a mathematical sense (if the implementation is correct,
anyhow :-), aren't they ?

On Don, 29 Jul 1999 Gavin Tsai wrote:
> It is a good questions. I can not guarantee they are exactly correct.
> But when compared with other calculations, the eigenvalues are very =
> similar.

> In my calculation, I just call the subroutine 'Jacobn' in the book =
> "Numerical Recipes".
> Do I need special routine to treat the double degenerate problem?

I would say NO. But any two algorithms or even two different
implementations of the same algorithm might give you different linear
combinations of the eigenvectors. And they are all correct.

Btw., Jacobi is a good algorithm for small matrices, but there are better
algorithms for medium sized or large matrices. (Some people say Jacobi is
good up to dim=10, probably dim=50 is usually ok, I would say.)
And as someone stated before, NR routines are not the best in a sense of
speed and robustness. They are simple though, as a pro.

Probably you look at LAPACK to get a lot of good black-box matrix
routines, check it out at netlib.org.

-- Jochen
 Heinrich-Heine-Universität Düsseldorf          [email-masked]
 Institut für Physikalische Chemie I               phone ++49-211-8113681
 Universitätsstr. 26.43.02.29                      fax   ++49-211-8115195
 40225 Düsseldorf, Germany       www-public.rz.uni-duesseldorf.de/~jochen

---

From: Tom Sundius <[email-masked]>
Date: Thu, 29 Jul 1999 20:04:44 +0300 (EET DST)

On Thu, 29 Jul 1999, Jochen Kuepper wrote:
...
> speed and robustness. They are simple though, as a pro.
...

I once wrote a Jacobi routine in Fortran using the threshold method that 
worked quite well for even larger matrices. The good thing with the
Jacobi method is that it always preserves orthogonality, but it is not
a very fast method, especially for large matrices. If you want a faster
method, you have to use the Householder method in combination with
some other methods (look in NETLIB, e.g.).

Of course Jacobi did not have access to a computer when he devised his
method more than 100 years ago, he did his calculations by hand ;-)

           Regards,
           
              TS
              
Tom Sundius
University of Helsinki, Department of Physics    phone +358-9-191 8339
P.O.Box 9, FIN-00014 Helsinki, Finland           fax   +358-9-191 8680

---

From: Iraj Daizadeh <[email-masked]>
Date: Thu, 29 Jul 1999 14:57:17 -0400 (EDT)

For my phd dissertation, we spent quite some time diagonalizing SPARSE
matrices of the order of 1000x1000 or so...The diagonalization process was
performed by a routine called cboris (fortran code):

cboris_(&n,&n,a,b,c,d,e,f,&ifail);

It is included in the QCPE 
(255 I think) package for extended huckel calculations (i think it was
written by someone in the hoffman group (theoretical group at cornell)
This routine is not faster than the diagonalization packages that come
with blas or something or that sort...

Iraj.

      subroutine cboris(n,nd,a,b,c,d,e,f,ifail)
      implicit double precision(a-h,o-z)
c
      dimension a(nd,nd),b(nd,nd),c(nd,nd),d(nd),e(nd),f(nd)
c
c ----------------------------------------------------------------------
c subroutine cboris solves the complex eigenvalue
c problem
c      a*x=b*x*lambda
c
c where
c a     --- given matrix of order n
c b     --- given positive definite matrix of order n
c x     --- eigenvectors, column by column,
c           normalized to (bx,x)=i
c lambda --- eigenvalues in increasing order
c
c matrices a and b should be given in
c arrays a and b respectively in the following way
c
c diagonal elements in the diagonal
c real parts of the lower triangle in the lower
c triangle
c imag parts of the lower triangle in the upper
c triangle
c
c real parts of eigenvectors are stored in a,
c imag parts in array c.  array b is destroyed during
c computation.  it holds the lower triangle of the
c choleski decomposition of matrix b (see
c subroutine cchol).
c
c all matrices are of order n, declared in the
c calling program with dimension nd which need
c not to be equal to n.
c
c eigenvalues are stored in array d.  arrays e
c and f are used for intermediate results.
c
c ifail gets the following values
c  0 --- computation finished succesfully
c  1 --- b not positive definite
c  2 --- qr algorithm does not converge

Iraj Daizadeh, Ph.D.
Harvard University
Department of Cellular and Molecular Biology
The Biological Laboratories
16 Divinity Avenue
Cambridge, MA 02138
Phone:   (617) 495-0783
         (617) 495-0560
Fax:     (617) 496-4313
Email:   [email-masked]
WebPage: http://mcb.harvard.edu/gilbert/daizadeh

On Thu, 29 Jul 1999, Tom Sundius wrote:

> -= This is automatically added to each message by mailing script =-
> [email-masked] -- To Everybody    |   [email-masked] -- To Admins
> [email-masked] -- HELP CHEMISTRY or HELP SEARCH
> [email-masked] -- archive search    |    Gopher: gopher.ccl.net 70
> Ftp: ftp.ccl.net  |  WWW: http://www.ccl.net/chemistry/   | Jan: [email-masked]
> 
> 
> 
> 
> 
>