ergo
ergo_scripted.h
Go to the documentation of this file.
1/* Ergo, version 3.8.2, a program for linear scaling electronic structure
2 * calculations.
3 * Copyright (C) 2023 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
41#ifdef __cplusplus
42#define EXTERN_C extern "C"
43#else
44#define EXTERN_C
45#endif
46
47extern int ergo_scanner_lineno;
49
52
54struct 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;
64 struct variable *next;
65};
66
70
71EXTERN_C void es_assign_num(struct variable *var, double val);
72EXTERN_C void es_assign_str(struct variable *var, const char*str);
73EXTERN_C int es_assign_range(enum MolType mt, int rangeNo,
74 int start, int cnt, const char *name);
75EXTERN_C struct variable *es_find_var(struct variable *root, const char *name);
76
77EXTERN_C void es_mol_begin(enum MolType moleculeClass);
78EXTERN_C void es_add_atom(const char *name, double x, double y, double z);
79EXTERN_C void es_mol_commit(void);
81
82EXTERN_C int es_mol_read_molecule(const char *fname,
83 enum MolType moleculeClass);
84
86EXTERN_C void es_print_help_var(const struct variable *root);
90EXTERN_C int es_run(const char *mode, int save_pot);
91EXTERN_C void es_warranty(void);
92EXTERN_C int es_getexc(const char *mode, int modes);
93EXTERN_C int es_get_polarisability(const char *mode, const char *opname,
94 double freq);
95
96EXTERN_C int es_set_nthreads(int nThreads);
97EXTERN_C int es_set_nthreads_string(const char *str);
98extern int es_quit;
99
100#endif /* ERGO_SCRIPTED_HEADER */
#define EXTERN_C
Definition dft.h:45
int ergo_scanner_reading_stdin
Definition ergo_input_processor.c:519
int ergo_scanner_lineno
Definition ergo_input_processor.c:518
EXTERN_C int es_getexc(const char *mode, int modes)
Computes the specified number of excited states.
Definition ergo_scripted.cc:1291
int es_quit
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 int es_set_nthreads(int nThreads)
Definition ergo_scripted.cc:510
EXTERN_C int es_set_nthreads_string(const char *str)
Definition ergo_scripted.cc:535
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
VarType
VarType defines recognized variable types.
Definition ergo_scripted.h:51
@ VAR_LIST
Definition ergo_scripted.h:51
@ VAR_STRING
Definition ergo_scripted.h:51
@ VAR_FLOAT
Definition ergo_scripted.h:51
@ VAR_INT
Definition ergo_scripted.h:51
EXTERN_C void es_mol_begin(enum MolType moleculeClass)
starts processing the inline molecule input.
Definition ergo_scripted.cc:410
EXTERN_C void es_print_help_var(const struct variable *root)
Definition ergo_scripted.cc:615
EXTERN_C void es_print_precision()
Print precision that was selected for building the program.
Definition ergo_scripted.cc:640
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:1425
EXTERN_C void es_warranty(void)
Definition ergo_scripted.cc:1776
EXTERN_C struct variable * es_find_var(struct variable *root, const char *name)
finds the variable struct by
Definition ergo_scripted.cc:303
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_run(const char *mode, int save_pot)
called when an actual calculation is to be commenced.
Definition ergo_scripted.cc:685
EXTERN_C void es_print_list_dft_funcs()
Definition ergo_scripted.cc:621
EXTERN_C void es_print_is_cht_used()
Definition ergo_scripted.cc:628
EXTERN_C void es_mol_commit(void)
Finish the inline definition of the molecule.
Definition ergo_scripted.cc:451
EXTERN_C void es_print_help()
Definition ergo_scripted.cc:590
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
MolType
MolType decides whether molecule data access routines modify the main or the ghost molecule.
Definition ergo_scripted.h:69
@ MOL_GHOST
Definition ergo_scripted.h:69
@ MOL_MAIN
Definition ergo_scripted.h:69
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
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
describes a variable recognized by the scripting system.
Definition ergo_scripted.h:54
int vint
Definition ergo_scripted.h:60
const char * name
Definition ergo_scripted.h:55
union variable::@205051044317362141204053242254325335366057275147 v
struct variable * next
Definition ergo_scripted.h:64
const char * description
Definition ergo_scripted.h:56
struct variable * list
Definition ergo_scripted.h:61
enum VarType type
Definition ergo_scripted.h:63
double num
Definition ergo_scripted.h:59
char * str
Definition ergo_scripted.h:58