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 #ifndef ERGO_SCRIPTED_HEADER
00029 #define ERGO_SCRIPTED_HEADER
00030
00039 #ifdef __cplusplus
00040 #define EXTERN_C extern "C"
00041 #else
00042 #define EXTERN_C
00043 #endif
00044
00045 extern int ergo_scanner_lineno;
00046 extern int ergo_scanner_reading_stdin;
00047
00049 enum VarType { VAR_STRING, VAR_FLOAT, VAR_INT, VAR_LIST };
00050
00052 struct variable {
00053 const char *name;
00054 const char *description;
00055 union {
00056 char *str;
00057 double num;
00058 int vint;
00059 struct variable *list;
00060 } v;
00061 enum VarType type;
00062 struct variable *next;
00063 };
00064
00067 enum MolType { MOL_MAIN, MOL_GHOST };
00068
00069 EXTERN_C void es_assign_num(struct variable *var, double val);
00070 EXTERN_C void es_assign_str(struct variable *var, const char*str);
00071 EXTERN_C int es_assign_range(enum MolType mt, int rangeNo,
00072 int start, int cnt, const char *name);
00073 EXTERN_C struct variable *es_find_var(struct variable *root, const char *name);
00074
00075 EXTERN_C void es_mol_begin(enum MolType moleculeClass);
00076 EXTERN_C void es_add_atom(const char *name, double x, double y, double z);
00077 EXTERN_C void es_mol_commit(void);
00078 EXTERN_C void es_mol_unit_angstrom(void);
00079
00080 EXTERN_C int es_mol_read_molecule(const char *fname,
00081 enum MolType moleculeClass);
00082
00083 EXTERN_C void es_print_help();
00084 EXTERN_C void es_print_help_var(const struct variable *root);
00085 EXTERN_C void es_print_precision();
00086 EXTERN_C int es_run(const char *mode, int save_pot);
00087 EXTERN_C void es_warranty(void);
00088 EXTERN_C int es_getexc(const char *mode, int modes);
00089 EXTERN_C int es_get_polarisability(const char *mode, const char *opname,
00090 double freq);
00091
00092 EXTERN_C int es_set_nthreads(int nThreads);
00093 EXTERN_C int es_set_nthreads_string(const char *str);
00094 extern int es_quit;
00095
00096 #endif