ergo
ergo_scripted.h
Go to the documentation of this file.
1 /* Ergo, version 3.3, a program for linear scaling electronic structure
2  * calculations.
3  * Copyright (C) 2013 Elias Rudberg, Emanuel H. Rubensson, and Pawel Salek.
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * Primary academic reference:
19  * Kohn−Sham Density Functional Theory Electronic Structure Calculations
20  * with Linearly Scaling Computational Time and Memory Usage,
21  * Elias Rudberg, Emanuel H. Rubensson, and Pawel Salek,
22  * J. Chem. Theory Comput. 7, 340 (2011),
23  * <http://dx.doi.org/10.1021/ct100611z>
24  *
25  * For further information about Ergo, see <http://www.ergoscf.org>.
26  */
27 
28 #ifndef ERGO_SCRIPTED_HEADER
29 #define ERGO_SCRIPTED_HEADER
30 
39 #ifdef __cplusplus
40 #define EXTERN_C extern "C"
41 #else
42 #define EXTERN_C
43 #endif
44 
45 extern int ergo_scanner_lineno;
47 
50 
52 struct variable {
53  const char *name;
54  const char *description;
55  union {
56  char *str;
57  double num;
58  int vint;
59  struct variable *list;
60  } v;
61  enum VarType type;
62  struct variable *next;
63 };
64 
68 
69 EXTERN_C void es_assign_num(struct variable *var, double val);
70 EXTERN_C void es_assign_str(struct variable *var, const char*str);
71 EXTERN_C int es_assign_range(enum MolType mt, int rangeNo,
72  int start, int cnt, const char *name);
73 EXTERN_C struct variable *es_find_var(struct variable *root, const char *name);
74 
75 EXTERN_C void es_mol_begin(enum MolType moleculeClass);
76 EXTERN_C void es_add_atom(const char *name, double x, double y, double z);
77 EXTERN_C void es_mol_commit(void);
79 
80 EXTERN_C int es_mol_read_molecule(const char *fname,
81  enum MolType moleculeClass);
82 
83 EXTERN_C void es_print_help();
84 EXTERN_C void es_print_help_var(const struct variable *root);
86 EXTERN_C int es_run(const char *mode, int save_pot);
87 EXTERN_C void es_warranty(void);
88 EXTERN_C int es_getexc(const char *mode, int modes);
89 EXTERN_C int es_get_polarisability(const char *mode, const char *opname,
90  double freq);
91 
92 EXTERN_C int es_set_nthreads(int nThreads);
93 EXTERN_C int es_set_nthreads_string(const char *str);
94 extern int es_quit;
95 
96 #endif /* ERGO_SCRIPTED_HEADER */
Definition: ergo_scripted.h:67
EXTERN_C int es_getexc(const char *mode, int modes)
Computes the specified number of excited states.
Definition: ergo_scripted.cc:1222
const char * description
Definition: ergo_scripted.h:54
struct variable * list
Definition: ergo_scripted.h:59
EXTERN_C void es_mol_commit(void)
Finish the inline definition of the molecule.
Definition: ergo_scripted.cc:436
int vint
Definition: ergo_scripted.h:58
char * str
Definition: ergo_scripted.h:56
double num
Definition: ergo_scripted.h:57
EXTERN_C int es_run(const char *mode, int save_pot)
called when an actual calculation is to be commenced.
Definition: ergo_scripted.cc:644
MolType
MolType decides whether molecule data access routines modify the main or the ghost molecule...
Definition: ergo_scripted.h:67
const char * name
Definition: ergo_scripted.h:53
#define EXTERN_C
Definition: ergo_scripted.h:42
EXTERN_C void es_print_help_var(const struct variable *root)
Definition: ergo_scripted.cc:594
EXTERN_C void es_warranty(void)
Definition: ergo_scripted.cc:1677
union variable::@4 v
struct variable * next
Definition: ergo_scripted.h:62
EXTERN_C void es_mol_begin(enum MolType moleculeClass)
starts processing the inline molecule input.
Definition: ergo_scripted.cc:395
EXTERN_C int es_set_nthreads_string(const char *str)
Definition: ergo_scripted.cc:520
Definition: ergo_scripted.h:49
Definition: ergo_scripted.h:67
EXTERN_C void es_print_precision()
Print precision that was selected for building the program.
Definition: ergo_scripted.cc:601
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:413
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:259
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:460
enum VarType type
Definition: ergo_scripted.h:61
Definition: ergo_scripted.h:49
VarType
VarType defines recognized variable types.
Definition: ergo_scripted.h:49
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:1356
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:224
int ergo_scanner_lineno
Definition: ergo_input_processor.c:360
EXTERN_C void es_print_help()
Definition: ergo_scripted.cc:572
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:447
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:207
int ergo_scanner_reading_stdin
Definition: ergo_input_processor.c:361
Definition: ergo_scripted.h:49
EXTERN_C struct variable * es_find_var(struct variable *root, const char *name)
finds the variable struct by
Definition: ergo_scripted.cc:288
Definition: ergo_scripted.h:49
describes a variable recognized by the scripting system.
Definition: ergo_scripted.h:52
EXTERN_C int es_set_nthreads(int nThreads)
Definition: ergo_scripted.cc:495