Changeset 54


Ignore:
Timestamp:
08/30/11 10:25:18 (21 months ago)
Author:
pouillon
Message:

Refactored the handling of quantum numbers and states

Location:
trunk/src
Files:
3 added
8 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/pspio.h

    r47 r54  
    7575#define STRLEN_TITLE 80 
    7676 
    77 /**  
    78  * The quantum numbers 
    79  */ 
    80 typedef struct{ 
    81   int n;    /**< main quantum number */ 
    82   int l;    /**< angular momentum quantum number */ 
    83   double j; /**< total angular momentum quantum number */ 
    84 } pspio_qn_t; 
    85  
    86  
    8777/** 
    8878 * Potential structure 
     
    9383  gsl_spline *psp_spl; /**< spline type, for future interpolation before output to calling code */ 
    9484} pspio_potential_t; 
    95  
    96  
    97 /** 
    98  *General information about the state 
    99  */ 
    100 typedef struct{ 
    101   pspio_qn_t *qn; /**< quantum numbers n l j for this wavefunction */ 
    102   double *occ; /**< occupation of the electronic state */ 
    103   double *eigenval; /**< eigenvalue of electronic state*/ 
    104   char *label; /**< string describing the electronic state - eg 2s or 4d1.5  */ 
    105   double *rc; /**< cutoff radii used for pseudopotential generation */ 
    106   /// The wavefunctions  
    107   int np; /**< number of points */ 
    108   double *wf; /**< Wavefunction */ 
    109   double *wfp; /**<Derivative of the wavefunction */ 
    110 } pspio_state_t; 
    11185 
    11286 
  • trunk/src/pspio_state.h

    r49 r54  
    2929#include "pspio.h" 
    3030 
     31/********************************************************************** 
     32 * Data structures                                                    * 
     33 **********************************************************************/ 
     34 
    3135/** 
    32  * Sets the quantum numbers of a state. 
    33  * @param[inout] state: state structure to set 
    34  * @param[in] n: main quantum number 
    35  * @param[in] l: angular momentum 
    36  * @param[in] j: angular momentum 
    37  * @return error code 
     36 * General information about the state 
    3837 */ 
    39 int pspio_qn_set(pspio_qn_t numbers, const int n, const int l, const double j); 
     38typedef struct{ 
     39  pspio_qn_t *qn; /**< quantum numbers n l j for this wavefunction */ 
     40  double *occ; /**< occupation of the electronic state */ 
     41  double *eigenval; /**< eigenvalue of electronic state*/ 
     42  char *label; /**< string describing the electronic state - eg 2s or 4d1.5  */ 
     43  double *rc; /**< cutoff radii used for pseudopotential generation */ 
     44  /// The wavefunctions  
     45  int np; /**< number of points */ 
     46  double *wf; /**< Wavefunction */ 
     47  double *wfp; /**<Derivative of the wavefunction */ 
     48} pspio_state_t; 
     49 
     50 
     51/********************************************************************** 
     52 * Routines                                                           * 
     53 **********************************************************************/ 
    4054 
    4155/** 
     
    4761int pspio_state_eigenval_set(pspio_state_t state, const double *eigenval); 
    4862 
     63 
    4964/** 
    5065 * Sets the labels of a state. 
     
    5469 */ 
    5570int pspio_state_label_set(pspio_state_t state, const char *label); 
     71 
    5672 
    5773/** 
     
    6379int pspio_state_np_set(pspio_state_t state, const int np); 
    6480 
     81 
    6582/** 
    6683 * Sets the occupation numbers of a state. 
     
    7087 */ 
    7188int pspio_state_occ_set(pspio_state_t state, const double *occ); 
     89 
    7290 
    7391/** 
     
    7997int pspio_state_rc_set(pspio_state_t state, const double *rc); 
    8098 
     99 
    81100/** 
    82101 * Sets the wavefunction of a state. 
     
    86105 */ 
    87106int pspio_state_wf_set(pspio_state_t state, const double *wf); 
     107 
    88108 
    89109/** 
Note: See TracChangeset for help on using the changeset viewer.