questions related with DIIS



Dear CCLers,
 I am using Pulay's DIIS method to accelerate the SCF convergence in my
 Kohn-Sham codes, and I have several questions concerned with its
 implementations. How many previous vectors ( density in my case) should be used
 to get optimal efficiency? Is the DIIS equations always solvable,  which I
 means, is it possible that the set of linear equations become
 linear-dependent?   I also found in some cases some coefficients are negative
 especially when the number of vectors is small. Is that reasonable? I found
 if I use the output density as the next input density directly whenever there
 are negative coefficients, the total performance is better. I guess such
 problems have been investigated by some researchers, but I don't know where to
 find the relevant papers. The only paper about DIIS I have at hand is Pulay's
 (1982 CPL).  Would you give me some advices?
 I appreciate your help!
   Hong