00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030 #ifndef ERGO_SCRIPTED_HEADER
00031 #define ERGO_SCRIPTED_HEADER
00032
00041 #ifdef __cplusplus
00042 #define EXTERN_C extern "C"
00043 #else
00044 #define EXTERN_C
00045 #endif
00046
00047 extern int ergo_scanner_lineno;
00048 extern int ergo_scanner_reading_stdin;
00049
00051 enum VarType { VAR_STRING, VAR_FLOAT, VAR_INT, VAR_LIST };
00052
00054 struct variable {
00055 const char *name;
00056 const char *description;
00057 union {
00058 char *str;
00059 double num;
00060 int vint;
00061 struct variable *list;
00062 } v;
00063 enum VarType type;
00064 struct variable *next;
00065 };
00066
00069 enum MolType { MOL_MAIN, MOL_GHOST };
00070
00071 EXTERN_C void es_assign_num(struct variable *var, double val);
00072 EXTERN_C void es_assign_str(struct variable *var, const char*str);
00073 EXTERN_C int es_assign_range(enum MolType mt, int rangeNo,
00074 int start, int cnt, const char *name);
00075 EXTERN_C struct variable *es_find_var(struct variable *root, const char *name);
00076
00077 EXTERN_C void es_mol_begin(enum MolType moleculeClass);
00078 EXTERN_C void es_add_atom(const char *name, double x, double y, double z);
00079 EXTERN_C void es_mol_commit(void);
00080 EXTERN_C void es_mol_unit_angstrom(void);
00081
00082 EXTERN_C int es_mol_read_molecule(const char *fname,
00083 enum MolType moleculeClass);
00084
00085 EXTERN_C void es_print_help();
00086 EXTERN_C void es_print_help_var(const struct variable *root);
00087 EXTERN_C void es_print_list_dft_funcs();
00088 EXTERN_C void es_print_is_cht_used();
00089 EXTERN_C void es_print_precision();
00090 EXTERN_C int es_run(const char *mode, int save_pot);
00091 EXTERN_C void es_warranty(void);
00092 EXTERN_C int es_getexc(const char *mode, int modes);
00093 EXTERN_C int es_get_polarisability(const char *mode, const char *opname,
00094 double freq);
00095
00096 EXTERN_C int es_set_nthreads(int nThreads);
00097 EXTERN_C int es_set_nthreads_string(const char *str);
00098 extern int es_quit;
00099
00100 #endif