/****************************************************************************
 *
 * DFT++:  density functional package developed by
 *         the research group of Prof. Tomas Arias, MIT.
 *
 * Principal author: Sohrab Ismail-Beigi
 *
 * Modifications for MPI version: Kenneth P Esler,
 *                                Sohrab Ismail-Beigi, and
 *                                Tairan Wang.
 *
 * Modifications for LSD version: Jason A Cline,
 *                                Gabor Csanyi,
 *                                Tairan Wang, and
 *                                Evan Reed
 *
 * Modifications for lattice/Pulay forces: Gabor Csanyi and
 *                                         Sohrab Ismail-Beigi
 *
 * K-point symmetries:  Nicolaj Moll
 *
 * Ionic dynamics and relaxation:  Tairan Wang and
 *                                 Evan Reed
 * 
 * Copyright (C) 1996-2000 Sohrab Ismail-Beigi
 *
 * Permission granted to the academic community to 
 * freely distribute and use this software provided that this notice is
 * maintained intact, and all publications resulting from its use
 * cite the following reference:
 *
 * Sohrab Ismail-Beigi and T. A. Arias, "New Algebraic Formulation of
 * Density Functional Calculation", Computer Physics Communications,
 * volume 128, issue 1-2, pages 1-45, June 2000.
 *
 ****************************************************************************/

/*------------------------  Elecinfo  -----------------------------------*
 *                                                                       *
 * Structure containing the information describing the electronic states *
 *                                                                       *
 *-----------------------------------------------------------------------*/
#ifndef DFT_ELECINFO_H
#define DFT_ELECINFO_H



class Elecinfo
{
public:
  int nstates, nbands;/* Number of bands and number of states */
  SpinType spintype;  /* tells us what sort of spins we are using if any */
  real nelectrons;    /* the number of electrons; normally the total sum
		       * of all the fillings*weights */
  int calc_fillings;  /* 1 or 0 flag: whether fillings must be calculated */
  real kT;            /* Temperature for Fermi distribution of fillings */
  real mu;            /* Chemical potential for Fermi fillings */
  int niter_recalc_fillings; /* we recalc. fillings every so many iterations */

  /* The below are for the subspace rotation variables */
  int subspace_rotation;    /* flag for subspace rotations. */
  real pcond_for_Bgrad;  /* preconditioning number for Bgrad if 
			    subspace_rotation is enabled.
			    Default is 30.0 */
  int exc_opt;  /* This switch is to select 
		  exchange-correlation functionals.
	          DFT_EXCORR_LDA for LDA,  DFT_EXCORR_GGA_PW91  for GGA,
		  DFT_EXCORR_LSD_TETER for LSD*/

  /* The two below specify how initial fillings of bands are calculated */
  int initial_fillings_flag; /* 0 = calculate fillings automatically */
                             /* 1 = read initial fillings from file */
  char initial_fillings_filename[DFT_FILENAME_LEN];

  vector3 *input_kvec;   // k points from the input file
  real *input_weight;    // k point weights from the input file

  /* how the wave function should be initialized */
  int read_Y_flag;  // 0 = random wavefuncs, 1 = read from file
  char init_Y_filename[DFT_FILENAME_LEN],  // file to read from
       old_Y_filename[DFT_FILENAME_LEN];   // for ion dynamics only

  /* specify the filename for charge densities read from file at setup */
  int read_n_flag; // whether to read
  char init_n_filename[DFT_FILENAME_LEN];

  int read_vscloc_flag; // whether to read
  char vscloc_filename[DFT_FILENAME_LEN];


  Elecinfo();
  void setup(Everything &e);
  void setup_initial_fillings();
  void print_fillings(Output *out);
  void print_status();
};

#endif // DFT_ELECINFO_H






