1 /*----------------------------------------------------------------------
2 ----------------------------------------------------------------------*/
3 #ifndef EXX_H_INCLUDED
4 #define EXX_H_INCLUDED
5 
6 
7 /* CONSTANTS */
8 #define EXX_SYSTEM_PERIODIC  1 /* periodic */
9 #define EXX_SYSTEM_CLUSTER   2 /* non-periodic */
10 
11 #define EXX_ROOT_RANK 0
12 #define EXX_PATHLEN 256
13 
14 #include "exx_def_openmx.h"
15 #include "exx_log.h"
16 
17 typedef struct EXX_Struct EXX_t;
18 
19 
20 #ifdef EXX_USE_MPI
21 #include <mpi.h>
22 extern MPI_Comm g_exx_mpicomm;
23 #else
24 extern int g_exx_mpicomm;
25 #endif
26 
27 
28 extern int g_exx_skip1;
29 extern int g_exx_skip2;
30 extern char g_exx_cachedir[EXX_PATHLEN];
31 extern int g_exx_liberi_lmax;
32 extern int g_exx_liberi_ngrid;
33 extern int g_exx_liberi_ngl;
34 extern double g_exx_rc_cut;
35 extern double g_exx_w_scr;
36 
37 EXX_t* EXX_New(
38   int           natom,
39   const double *atom_v,
40   const int    *atom_sp,
41   int           nspec,
42   const double *spec_rc,
43   const int    *spec_nb,
44   const double *pvec,
45   double        w_scr,
46   double        rc_cut,
47   int           mode,
48   const char   *cachedir
49 );
50 
51 void EXX_Free(EXX_t *);
52 
53 
54 
55 int EXX_natom(const EXX_t *self);
56 const double* EXX_atom_rc(const EXX_t *self);
57 const double* EXX_atom_v(const EXX_t *self);
58 const int* EXX_atom_nb(const EXX_t *self);
59 const double* EXX_pvec(const EXX_t *self);
60 double EXX_w_scr(const EXX_t *self);
61 double EXX_rc_cut(const EXX_t *self);
62 int EXX_nbmax(const EXX_t *self);
63 
64 int EXX_Number_of_OP_Shells(const EXX_t *self);
65 int EXX_Number_of_OP(const EXX_t *self);
66 const int* EXX_Array_OP_Atom1(const EXX_t *self);
67 const int* EXX_Array_OP_Atom2(const EXX_t *self);
68 const int* EXX_Array_OP_Cell(const EXX_t *self);
69 
70 int EXX_Number_of_EP_Shells(const EXX_t *self);
71 int EXX_Number_of_EP(const EXX_t *self);
72 const int* EXX_Array_EP_Atom1(const EXX_t *self);
73 const int* EXX_Array_EP_Atom2(const EXX_t *self);
74 const int* EXX_Array_EP_Cell(const EXX_t *self);
75 
76 const char* EXX_CacheDir(const EXX_t *self);
77 
78 
79 int EXX_Find_OP(
80   const EXX_t *self,
81   int          iatom1,
82   int          iatom2,
83   int          iR_x,
84   int          iR_y,
85   int          iR_z
86 );
87 
88 int EXX_Find_EP(
89   const EXX_t *self,
90   int          iatom1,
91   int          iatom2,
92   int          iR_x,
93   int          iR_y,
94   int          iR_z
95 );
96 
97 #if 0
98 int EXX_Make_Quartets(
99   const EXX_t *xfm,
100   int *q_op1, /* [nq] */
101   int *q_op2, /* [nq] */
102   int *q_opd, /* [nq] */
103   int *q_wf,  /* [nq] */
104   int *q_ep1, /* [nq*8] */
105   int *q_ep2, /* [nq*8] */
106   int *q_mul  /* [nq] */
107 );
108 #endif
109 
110 #endif /* EXX_H_INCLUDED */
111