ergo
ergo_scripted.h
Go to the documentation of this file.
1 /* Ergo, version 3.7, a program for linear scaling electronic structure
2  * calculations.
3  * Copyright (C) 2018 Elias Rudberg, Emanuel H. Rubensson, Pawel Salek,
4  * and Anastasia Kruchinina.
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  *
19  * Primary academic reference:
20  * Ergo: An open-source program for linear-scaling electronic structure
21  * calculations,
22  * Elias Rudberg, Emanuel H. Rubensson, Pawel Salek, and Anastasia
23  * Kruchinina,
24  * SoftwareX 7, 107 (2018),
25  * <http://dx.doi.org/10.1016/j.softx.2018.03.005>
26  *
27  * For further information about Ergo, see <http://www.ergoscf.org>.
28  */
29 
30 #ifndef ERGO_SCRIPTED_HEADER
31 #define ERGO_SCRIPTED_HEADER
32 
41 #ifdef __cplusplus
42 #define EXTERN_C extern "C"
43 #else
44 #define EXTERN_C
45 #endif
46 
47 extern int ergo_scanner_lineno;
49 
52 
54 struct variable {
55  const char *name;
56  const char *description;
57  union {
58  char *str;
59  double num;
60  int vint;
61  struct variable *list;
62  } v;
63  enum VarType type;
64  struct variable *next;
65 };
66 
70 
71 EXTERN_C void es_assign_num(struct variable *var, double val);
72 EXTERN_C void es_assign_str(struct variable *var, const char*str);
73 EXTERN_C int es_assign_range(enum MolType mt, int rangeNo,
74  int start, int cnt, const char *name);
75 EXTERN_C struct variable *es_find_var(struct variable *root, const char *name);
76 
77 EXTERN_C void es_mol_begin(enum MolType moleculeClass);
78 EXTERN_C void es_add_atom(const char *name, double x, double y, double z);
79 EXTERN_C void es_mol_commit(void);
81 
82 EXTERN_C int es_mol_read_molecule(const char *fname,
83  enum MolType moleculeClass);
84 
85 EXTERN_C void es_print_help();
86 EXTERN_C void es_print_help_var(const struct variable *root);
90 EXTERN_C int es_run(const char *mode, int save_pot);
91 EXTERN_C void es_warranty(void);
92 EXTERN_C int es_getexc(const char *mode, int modes);
93 EXTERN_C int es_get_polarisability(const char *mode, const char *opname,
94  double freq);
95 
96 EXTERN_C int es_set_nthreads(int nThreads);
97 EXTERN_C int es_set_nthreads_string(const char *str);
98 extern int es_quit;
99 
100 #endif /* ERGO_SCRIPTED_HEADER */
Definition: ergo_scripted.h:69
EXTERN_C int es_getexc(const char *mode, int modes)
Computes the specified number of excited states.
Definition: ergo_scripted.cc:1283
const char * description
Definition: ergo_scripted.h:56
struct variable * list
Definition: ergo_scripted.h:61
EXTERN_C void es_mol_commit(void)
Finish the inline definition of the molecule.
Definition: ergo_scripted.cc:451
EXTERN_C void es_print_is_cht_used()
Definition: ergo_scripted.cc:628
int vint
Definition: ergo_scripted.h:60
char * str
Definition: ergo_scripted.h:58
double num
Definition: ergo_scripted.h:59
EXTERN_C int es_run(const char *mode, int save_pot)
called when an actual calculation is to be commenced.
Definition: ergo_scripted.cc:685
MolType
MolType decides whether molecule data access routines modify the main or the ghost molecule...
Definition: ergo_scripted.h:69
const char * name
Definition: ergo_scripted.h:55
#define EXTERN_C
Definition: ergo_scripted.h:44
EXTERN_C void es_print_help_var(const struct variable *root)
Definition: ergo_scripted.cc:615
EXTERN_C void es_warranty(void)
Definition: ergo_scripted.cc:1764
union variable::@4 v
struct variable * next
Definition: ergo_scripted.h:64
EXTERN_C void es_mol_begin(enum MolType moleculeClass)
starts processing the inline molecule input.
Definition: ergo_scripted.cc:410
EXTERN_C int es_set_nthreads_string(const char *str)
Definition: ergo_scripted.cc:535
Definition: ergo_scripted.h:51
Definition: ergo_scripted.h:69
EXTERN_C void es_print_precision()
Print precision that was selected for building the program.
Definition: ergo_scripted.cc:640
EXTERN_C void es_add_atom(const char *name, double x, double y, double z)
adds single atom at given coordinates and given name.
Definition: ergo_scripted.cc:428
EXTERN_C int es_assign_range(enum MolType mt, int rangeNo, int start, int cnt, const char *name)
Defines a range of atoms that will be assigned a specific basis set.
Definition: ergo_scripted.cc:274
EXTERN_C void es_print_list_dft_funcs()
Definition: ergo_scripted.cc:621
EXTERN_C int es_mol_read_molecule(const char *fname, enum MolType moleculeClass)
reads molecule data in the MOLECULE.INP (Dalton) or XYZ format.
Definition: ergo_scripted.cc:475
enum VarType type
Definition: ergo_scripted.h:63
Definition: ergo_scripted.h:51
VarType
VarType defines recognized variable types.
Definition: ergo_scripted.h:51
int es_quit
EXTERN_C int es_get_polarisability(const char *mode, const char *opname, double freq)
Computes a dynamical polarizability for an operator specified by the.
Definition: ergo_scripted.cc:1417
EXTERN_C void es_assign_str(struct variable *var, const char *str)
es_assign_str assigns given string to the variable.
Definition: ergo_scripted.cc:239
int ergo_scanner_lineno
Definition: ergo_input_processor.c:1817
EXTERN_C void es_print_help()
Definition: ergo_scripted.cc:590
EXTERN_C void es_mol_unit_angstrom(void)
Selects the units for the inline molecule format to be Angtroms, as opposed to default atomic units...
Definition: ergo_scripted.cc:462
EXTERN_C void es_assign_num(struct variable *var, double val)
es_assign_num assigns given numerical value to the variable.
Definition: ergo_scripted.cc:222
int ergo_scanner_reading_stdin
Definition: ergo_input_processor.c:1818
Definition: ergo_scripted.h:51
EXTERN_C struct variable * es_find_var(struct variable *root, const char *name)
finds the variable struct by
Definition: ergo_scripted.cc:303
Definition: ergo_scripted.h:51
describes a variable recognized by the scripting system.
Definition: ergo_scripted.h:54
EXTERN_C int es_set_nthreads(int nThreads)
Definition: ergo_scripted.cc:510