ergo
|
The main program for the ergo project. More...
#include <dirent.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <memory>
#include <string>
#include <list>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/times.h>
#include <errno.h>
#include "atom_labels.h"
#include "density_description_file_2.h"
#include "ergo_scripted.h"
#include "grid_reader.h"
#include "dft_common.h"
#include "lin_trans.h"
#include "integrals_2el.h"
#include "integrals_2el_explicit.h"
#include "integrals_2el_boxed.h"
#include "integrals_2el_exchange.h"
#include "integrals_2el_coulomb.h"
#include "integrals_general.h"
#include "operator_matrix.h"
#include "memorymanag.h"
#include "molecule.h"
#include "output.h"
#include "scf.h"
#include "scf_utils.h"
#include "slr.h"
#include "matrix_utilities.h"
#include "SCF_restricted.h"
#include "SCF_unrestricted.h"
#include "units.h"
#include "ci.h"
#include "license.h"
#include "xyz_file_parser.h"
Classes | |
class | Ergo |
An object representing the state of the input processor. More... | |
class | ErgoE2Evaluator |
ErgoE2Evaluator implements the linear tranformation of the trial vector/transition density matrix by the E[2] operator. More... | |
class | ErgoOperator |
Defines | |
#define | KW(kl, vname, type, defval, desc) kl = variable_new_ ##type(kl, (#vname), (desc), (type), (defval)) |
Macro for compact expression of recognized keywords. | |
#define | variable_new_VAR_STRING variable_new |
#define | variable_new_VAR_FLOAT(kl, n, h, t, v) variable_new(kl,n,h,t,double(v)) |
#define | variable_new_VAR_INT variable_new |
#define | variable_new_VAR_LIST variable_new |
#define | var_get_int(n) var_get_int_template(NULL, (n)) |
#define | var_get_intJK(n) var_get_int_template(ergo.J_K_params, (n)) |
#define | var_get_intLR(n) var_get_int_template(ergo.lr_params, (n)) |
#define | var_get_intMA(n) var_get_int_template(ergo.mat_params, (n)) |
#define | var_get_intOU(n) var_get_int_template(ergo.output_params, (n)) |
#define | var_get_intSCF(n) var_get_int_template(ergo.scf_params, (n)) |
#define | var_get_intXC(n) var_get_int_template(ergo.XC_params, (n)) |
#define | var_get_real(n) var_get_real_template(NULL, (n)) |
#define | var_get_realJK(n) var_get_real_template(ergo.J_K_params, (n)) |
#define | var_get_realLR(n) var_get_real_template(ergo.lr_params, (n)) |
#define | var_get_realMA(n) var_get_real_template(ergo.mat_params, (n)) |
#define | var_get_realOU(n) var_get_real_template(ergo.output_params, (n)) |
#define | var_get_realSCF(n) var_get_real_template(ergo.scf_params, (n)) |
#define | var_get_realXC(n) var_get_real_template(ergo.XC_params, (n)) |
#define | var_get_stringLR(n) var_get_string(ergo.lr_params, (n)) |
#define | var_get_stringSCF(n) var_get_string(ergo.scf_params, (n)) |
#define | var_get_stringOU(n) var_get_string(ergo.output_params, (n)) |
#define | var_get_stringXC(n) var_get_string(ergo.XC_params, (n)) |
#define | KL ergo.J_K_params |
#define | KWJK(n, type, d) KW(ergo.J_K_params,n,type,jkOptions.n,(d)) |
#define | KL ergo.XC_params |
#define | KL ergo.output_params |
#define | KL ergo.mat_params |
#define | KWMAT(n, type, d) KW(ergo.mat_params,n,type,matOptions.n,d) |
#define | KL ergo.lr_params |
#define | KL ergo.scf_params |
#define | KWSCF(n, type, d) KW(ergo.scf_params,n,type,scfOptions.n,d) |
#define | KL ergo.var_list |
Functions | |
static void | variable_free (struct variable *v) |
release variable data structure and its children. | |
static struct variable * | variable_new (struct variable *tail, const char *name, const char *description, enum VarType type,...) |
creates new variable item. | |
void | es_assign_num (struct variable *v, double val) |
es_assign_num assigns given numerical value to the variable. | |
void | es_assign_str (struct variable *v, const char *str) |
es_assign_str assigns given string to the variable. | |
int | es_assign_range (MolType mt, int rangeNo, int start, int cnt, const char *name) |
Defines a range of atoms that will be assigned a specific basis set. | |
struct variable * | es_find_var (struct variable *root, const char *name) |
finds the variable struct by | |
static int | var_get_int_template (struct variable *root, const char *name) |
static double | var_get_real_template (struct variable *root, const char *name) |
static const char * | var_get_string (struct variable *root, const char *name) |
static void | var_print_tree (struct variable *tree, FILE *f, int indent) |
void | es_mol_begin (enum MolType moleculeClass) |
starts processing the inline molecule input. | |
void | es_add_atom (const char *name, double x, double y, double z) |
adds single atom at given coordinates and given name. | |
void | es_mol_commit (void) |
Finish the inline definition of the molecule. | |
void | es_mol_unit_angstrom (void) |
Selects the units for the inline molecule format to be Angtroms, as opposed to default atomic units. | |
int | es_mol_read_molecule (const char *fname, enum MolType moleculeClass) |
reads molecule data in the MOLECULE.INP (Dalton) or XYZ format. | |
int | es_set_nthreads (int nThreads) |
int | es_set_nthreads_string (const char *str) |
static void | jkparams_set_from_vars (JK::Params &jkp) |
void | es_print_help () |
void | es_print_help_var (const struct variable *var) |
void | es_print_precision () |
Print precision that was selected for building the program. | |
static int | es_rmdir_with_content (const char *dirname) |
int | es_run (const char *mode, int save_pot) |
called when an actual calculation is to be commenced. | |
int | es_getexc (const char *mode, int no_exc) |
Computes the specified number of excited states. | |
static const int * | getOperatorParams (int opname) |
static void | solveForRHS (LR::SetOfEqSolver &solver, ErgoE2Evaluator &e2, int opName, const char *tmpdir, ergo_real freq) |
int | es_get_polarisability (const char *mode, const char *opName, double freq) |
Computes a dynamical polarizability for an operator specified by the. | |
static void | benchmark_mm () |
int | yyparse (void) |
void * | yy_scan_string (const char *str) |
void * | yy_create_buffer (FILE *f, int sz) |
void | yy_switch_to_buffer (void *) |
void | yy_delete_buffer (void *) |
static void | ergo_parse_file (FILE *inputFile) |
static void | ergo_parse_string (const char *str) |
void | es_warranty (void) |
int | main (int argc, char *argv[]) |
Variables | |
static Ergo | ergo |
static IntegralInfo * | ergoIntegralInfo = NULL |
Molecule stores geometry of the current molecule. | |
static BasisInfoStruct * | Basis_info = NULL |
FILE * | yyin |
file used by the lex-generated parser. |
The main program for the ergo project.
It enables scripting and more complex input forms.
#define KL ergo.J_K_params |
Referenced by Ergo::registerInputVariables().
#define KL ergo.XC_params |
#define KL ergo.output_params |
#define KL ergo.mat_params |
#define KL ergo.lr_params |
#define KL ergo.scf_params |
#define KL ergo.var_list |
#define KW | ( | kl, | |
vname, | |||
type, | |||
defval, | |||
desc | |||
) | kl = variable_new_ ##type(kl, (#vname), (desc), (type), (defval)) |
Macro for compact expression of recognized keywords.
We make some effort to convert all the floating-point default values to double type so that they can be passed through the stack without problem. The only potential problem is a potential loss of precision if sizeof(ergo_real) > sizeof(double) but this we can hopefully live with for input variables, can we?
Referenced by Ergo::registerInputVariables().
#define KWJK | ( | n, | |
type, | |||
d | |||
) | KW(ergo.J_K_params,n,type,jkOptions.n,(d)) |
Referenced by Ergo::registerInputVariables().
#define KWMAT | ( | n, | |
type, | |||
d | |||
) | KW(ergo.mat_params,n,type,matOptions.n,d) |
Referenced by Ergo::registerInputVariables().
#define KWSCF | ( | n, | |
type, | |||
d | |||
) | KW(ergo.scf_params,n,type,scfOptions.n,d) |
Referenced by Ergo::registerInputVariables().
#define var_get_int | ( | n | ) | var_get_int_template(NULL, (n)) |
Referenced by es_run().
#define var_get_intJK | ( | n | ) | var_get_int_template(ergo.J_K_params, (n)) |
Referenced by jkparams_set_from_vars().
#define var_get_intLR | ( | n | ) | var_get_int_template(ergo.lr_params, (n)) |
Referenced by es_getexc(), and es_get_polarisability().
#define var_get_intMA | ( | n | ) | var_get_int_template(ergo.mat_params, (n)) |
Referenced by es_run().
#define var_get_intOU | ( | n | ) | var_get_int_template(ergo.output_params, (n)) |
#define var_get_intSCF | ( | n | ) | var_get_int_template(ergo.scf_params, (n)) |
Referenced by es_run().
#define var_get_intXC | ( | n | ) | var_get_int_template(ergo.XC_params, (n)) |
Referenced by es_run(), and ErgoE2Evaluator::transform().
#define var_get_real | ( | n | ) | var_get_real_template(NULL, (n)) |
Referenced by es_run().
#define var_get_realJK | ( | n | ) | var_get_real_template(ergo.J_K_params, (n)) |
Referenced by jkparams_set_from_vars(), and es_run().
#define var_get_realLR | ( | n | ) | var_get_real_template(ergo.lr_params, (n)) |
Referenced by es_getexc(), and es_get_polarisability().
#define var_get_realMA | ( | n | ) | var_get_real_template(ergo.mat_params, (n)) |
Referenced by es_run().
#define var_get_realOU | ( | n | ) | var_get_real_template(ergo.output_params, (n)) |
#define var_get_realSCF | ( | n | ) | var_get_real_template(ergo.scf_params, (n)) |
Referenced by es_run().
#define var_get_realXC | ( | n | ) | var_get_real_template(ergo.XC_params, (n)) |
Referenced by es_run(), and ErgoE2Evaluator::transform().
#define var_get_stringLR | ( | n | ) | var_get_string(ergo.lr_params, (n)) |
#define var_get_stringOU | ( | n | ) | var_get_string(ergo.output_params, (n)) |
#define var_get_stringSCF | ( | n | ) | var_get_string(ergo.scf_params, (n)) |
Referenced by es_run().
#define var_get_stringXC | ( | n | ) | var_get_string(ergo.XC_params, (n)) |
Referenced by es_run().
#define variable_new_VAR_FLOAT | ( | kl, | |
n, | |||
h, | |||
t, | |||
v | |||
) | variable_new(kl,n,h,t,double(v)) |
#define variable_new_VAR_INT variable_new |
#define variable_new_VAR_LIST variable_new |
#define variable_new_VAR_STRING variable_new |
static void benchmark_mm | ( | ) | [static] |
References BETA, and mat::gemm().
Referenced by main().
static void ergo_parse_file | ( | FILE * | inputFile | ) | [static] |
References yy_create_buffer(), yy_switch_to_buffer(), ergo_scanner_reading_stdin, fileno(), yyparse(), and yy_delete_buffer().
Referenced by main().
static void ergo_parse_string | ( | const char * | str | ) | [static] |
References yy_scan_string(), yy_switch_to_buffer(), yyparse(), and yy_delete_buffer().
Referenced by main().
void es_add_atom | ( | const char * | name, |
double | x, | ||
double | y, | ||
double | z | ||
) |
adds single atom at given coordinates and given name.
The charge is specified currently by the name of the element.
References Ergo::readingMoleculeClass, MOL_MAIN, Ergo::molecule, MOL_GHOST, Ergo::ghostMolecule, Molecule::noOfAtoms, Molecule::MAX_NO_OF_ATOMS, do_output(), LOG_CAT_ERROR, LOG_AREA_MAIN, Molecule::atoms, Atom::charge, get_charge_int_from_atom_label(), Atom::coords, Ergo::moleculeUnit, and LOG_CAT_INFO.
Referenced by yyparse().
void es_assign_num | ( | struct variable * | v, |
double | val | ||
) |
es_assign_num assigns given numerical value to the variable.
References do_output(), LOG_CAT_INFO, LOG_AREA_MAIN, variable::name, variable::type, VAR_FLOAT, variable::v, variable::num, VAR_INT, variable::vint, and LOG_CAT_ERROR.
Referenced by yyparse(), and es_set_nthreads().
int es_assign_range | ( | MolType | mt, |
int | rangeNo, | ||
int | start, | ||
int | cnt, | ||
const char * | name | ||
) |
Defines a range of atoms that will be assigned a specific basis set.
The range can be reset by specifying a empty count.
mt | chooses main or the ghost molecule. |
rangeNo | choose the range to be assigned (1 to 3). |
start | the start index. |
cnt | the count of atoms in the range. |
name | the name of the basis set file. |
References Ergo::NO_OF_BASIS_SET_RANGES, MOL_MAIN, Ergo::basissetRangeList, MOL_GHOST, Ergo::basissetRangeListGhost, BasissetNameRange::startAtomIndex, BasissetNameRange::count, and BasissetNameRange::basisSetFileName.
Referenced by yyparse().
void es_assign_str | ( | struct variable * | v, |
const char * | str | ||
) |
es_assign_str assigns given string to the variable.
It additionally clears some local variables if a value is assigned to one of the "special" variables like "output_basis or "basis".
References do_output(), LOG_CAT_INFO, LOG_AREA_MAIN, variable::name, variable::v, variable::str, Basis_info, Ergo::Basis, and Ergo::GhostBasis.
Referenced by yyparse().
finds the variable struct by
name | starting in the specified root. |
root | must be of type VAR_LIST. |
References variable::type, VAR_LIST, variable::v, variable::list, Ergo::var_list, variable::name, variable::next, do_output(), LOG_CAT_ERROR, LOG_AREA_MAIN, and es_find_var().
Referenced by yyparse(), es_find_var(), var_get_int_template(), var_get_real_template(), var_get_string(), es_set_nthreads(), and main().
int es_get_polarisability | ( | const char * | mode, |
const char * | opName, | ||
double | freq | ||
) |
Computes a dynamical polarizability for an operator specified by the.
opName | and frequency |
freq | - please check what does the literature say about computing multiple operators and/or frequencies at the same time. Consider using enumerated constants for operators instead of arbitrary strings to enforce parameter checking. It can be too early in this place for that - the operator names should be checked down the execution pipeline. |
mode | is the type of Hamiltonian (HF, or the xc functional). |
freq | tells the frequency. |
References Ergo::molecule, Molecule::getNumberOfElectrons(), do_output(), LOG_CAT_ERROR, LOG_AREA_MAIN, getOperatorParams(), es_run(), LOG_CAT_INFO, BasisInfoStruct::noOfBasisFuncs, ddf_load_density(), compute_overlap_matrix(), ergo_free(), var_get_string(), LR::LRSolver::convThreshold, var_get_realLR, LR::SetOfEqSolver::increaseSubspaceLimit(), var_get_intLR, and solveForRHS().
Referenced by yyparse().
int es_getexc | ( | const char * | mode, |
int | no_exc | ||
) |
Computes the specified number of excited states.
no_exc | specifies number of the excited states to be computed, |
mode | specifies the calculation type (HF, LDA, etc). |
FIXME: consider passing callback functions instead of entire matrices. The callback functions fill in specified blocks of data with overlap matrix and the Fock matrix. Current solution keeps these two potentially huge data blocks allocated all the time in memory.
References do_output(), LOG_CAT_ERROR, LOG_AREA_MAIN, es_run(), Ergo::molecule, Molecule::getNumberOfElectrons(), BasisInfoStruct::noOfBasisFuncs, ddf_load_density(), compute_overlap_matrix(), ergo_free(), var_get_string(), LR::LRSolver::convThreshold, var_get_realLR, LR::EigenSolver::increaseSubspaceLimit(), var_get_intLR, LR::LRSolver::solve(), LR::EigenSolver::computeMoments(), LR::EigenSolver::getFreq(), LR::EigenSolver::getTransitionMoment2(), and grid_free_files().
Referenced by yyparse().
void es_mol_begin | ( | enum MolType | moleculeClass | ) |
starts processing the inline molecule input.
Call to this routine should be followed by calls to es_add_atom and es_mol_commit.
moleculeClass | selects the main molecule (MOL_MAIN) or the ghost molecule (MOL_GHOST). |
References Ergo::moleculeUnit, Ergo::readingMoleculeClass, MOL_MAIN, Ergo::molecule, Molecule::noOfAtoms, MOL_GHOST, Ergo::ghostMolecule, and Basis_info.
void es_mol_commit | ( | void | ) |
Finish the inline definition of the molecule.
References Ergo::readingMoleculeClass, MOL_GHOST, Ergo::ghostMolecule, Molecule::noOfAtoms, and Ergo::molecule.
Referenced by yyparse().
int es_mol_read_molecule | ( | const char * | fname, |
enum MolType | moleculeClass | ||
) |
reads molecule data in the MOLECULE.INP (Dalton) or XYZ format.
fname | contains the file name to be opened and read. |
moleculeClass | determines whether it is the main molecule (MOL_MAIN) or the ghost molecule (MOL_GHOST) to be read. |
References MOL_MAIN, Ergo::molecule, Ergo::Basis, MOL_GHOST, Ergo::ghostMolecule, Ergo::GhostBasis, Molecule::setFromMoleculeFile(), do_output(), LOG_CAT_INFO, LOG_AREA_MAIN, ergo_free(), and Basis_info.
void es_mol_unit_angstrom | ( | void | ) |
Selects the units for the inline molecule format to be Angtroms, as opposed to default atomic units.
References Ergo::moleculeUnit, and UNIT_one_Angstrom.
void es_print_help | ( | ) |
References var_print_tree(), and Ergo::var_list.
void es_print_help_var | ( | const struct variable * | var | ) |
References variable::name, and variable::description.
void es_print_precision | ( | ) |
Print precision that was selected for building the program.
Referenced by yyparse().
static int es_rmdir_with_content | ( | const char * | dirname | ) | [static] |
Referenced by es_run().
int es_run | ( | const char * | mode, |
int | save_pot | ||
) |
called when an actual calculation is to be commenced.
mode | is the first specified keyword. Some calculation types - like response ones - require the Fock matrix. |
save_pot | tells whether saving it is required: The save_final_potential configuration parameter will be overriden if save_pot is true. |
References do_output(), LOG_CAT_INFO, LOG_AREA_MAIN, var_get_int, enable_memory_usage_output(), Ergo::molecule, Molecule::getNumberOfElectrons(), LOG_CAT_ERROR, Molecule::noOfAtoms, BasisInfoStruct::addBasisfuncsForMolecule(), Ergo::Basis, Ergo::NO_OF_BASIS_SET_RANGES, Ergo::basissetRangeList, Ergo::ghostMolecule, Ergo::GhostBasis, Ergo::basissetRangeListGhost, BasisInfoStruct::noOfBasisFuncs, Ergo::scfOptions, SCF::Options::calculation_identifier, var_get_stringSCF, SCF::Options::method_and_basis_set, SCF::Options::electric_field, Vector3D::v, var_get_realSCF, SCF::Options::sparse_threshold_for_S, SCF::Options::sparse_threshold_for_Z, SCF::Options::convergence_threshold, SCF::Options::step_length_start, SCF::Options::step_length_giveup, SCF::Options::error_maxabs_for_diis, SCF::Options::starting_guess_disturbance, SCF::Options::purification_subspace_err_limit, SCF::Options::purification_eigvalue_err_limit, SCF::Options::puri_eig_acc_factor_for_guess, SCF::Options::gap_expected_lower_bound, SCF::Options::shift_using_prev_density_matrix, SCF::Options::electronic_temperature, SCF::Options::purification_truncation_norm, mat::getNormType(), SCF::Options::break_on_energy_increase, var_get_intSCF, SCF::Options::create_basis_func_coord_file, SCF::Options::output_homo_and_lumo_eigenvectors, SCF::Options::create_mtx_file_S, SCF::Options::create_mtx_files_F, SCF::Options::create_mtx_files_D, SCF::Options::create_mtx_files_dipole, SCF::Options::force_restricted, SCF::Options::force_unrestricted, SCF::Options::max_no_of_diis_matrices, SCF::Options::max_restart_count, SCF::Options::min_number_of_iterations, SCF::Options::max_number_of_iterations, SCF::Options::do_electron_dynamics, SCF::Options::no_of_careful_first_scf_steps, SCF::Options::do_report_density_diff, SCF::Options::no_of_impr_req_for_diis, SCF::Options::no_of_threads_for_V, SCF::Options::output_density_at_every_step, SCF::Options::save_final_potential, SCF::Options::use_diagonalization, SCF::Options::use_diag_on_error, SCF::Options::use_diag_on_error_guess, SCF::Options::output_mulliken_pop, SCF::Options::write_overlap_matrix, SCF::Options::use_simple_dense_H_core, SCF::Options::use_diis_always, SCF::Options::use_simple_starting_guess, SCF::Options::use_dft, var_get_intXC, jkparams_set_from_vars(), Ergo::jkOptions, Molecule::netCharge, Ergo::matOptions, SCF::MatOptions::threshold_inch, var_get_realMA, SCF::MatOptions::sparse_threshold, SCF::MatOptions::sparse_matrix_block_size, var_get_intMA, SCF::MatOptions::sparse_matrix_block_factor_1, SCF::MatOptions::sparse_matrix_block_factor_2, SCF::MatOptions::sparse_matrix_block_factor_3, SCF::MatOptions::threads, SCF::MatOptions::parallelLevel, SCF::MatOptions::prepare(), var_get_string(), mat::FileWritable::setPath(), mat::FileWritable::activate(), dft_setfunc(), dftreport_(), grid_set_tmpdir(), var_get_realXC, var_get_stringXC, Dft::GridParams::gridType, Dft::GridParams::radialGridScheme, var_get_realJK, var_get_real, Ergo::extraChargesMolecule, Molecule::atoms, Atom::charge, SCF_general::do_SCF_iterations(), SCF_general::get_overlap_matrix(), SCF_general::get_H_core_matrix(), SCF_unrestricted::get_Fock_matrices(), SCF_unrestricted::get_no_of_electrons(), SCF_general::get_energy(), mat::MatrixSymmetric::fullMatrix(), SCF::MatOptions::inversePermutationHML, do_CI(), LOG_AREA_SCF, LOG_CAT_RESULTS, do_output_time(), grid_free_files(), and es_rmdir_with_content().
Referenced by yyparse(), es_getexc(), and es_get_polarisability().
int es_set_nthreads | ( | int | nThreads | ) |
References es_find_var(), es_assign_num(), and dft_set_num_threads().
Referenced by yyparse(), and es_set_nthreads_string().
int es_set_nthreads_string | ( | const char * | str | ) |
References es_set_nthreads().
void es_warranty | ( | void | ) |
References ERGO_LICENSE_TEXT_LONG.
Referenced by yyparse().
static const int* getOperatorParams | ( | int | opname | ) | [static] |
References do_output(), LOG_CAT_ERROR, and LOG_AREA_MAIN.
Referenced by solveForRHS(), and es_get_polarisability().
static void jkparams_set_from_vars | ( | JK::Params & | jkp | ) | [static] |
References JK::Params::threshold_J, var_get_realJK, JK::Params::threshold_K, JK::Params::multipole_threshold_factor, JK::Params::use_fmm, var_get_intJK, JK::Params::fmm_box_size, JK::Params::fmm_no_of_branches, JK::Params::fmm_branch_splitter_extent_1, JK::Params::fmm_branch_splitter_extent_2, JK::Params::fmm_branch_splitter_extent_3, JK::Params::fmm_branch_splitter_extent_4, JK::Params::fmm_branch_splitter_extent_5, JK::Params::exchange_box_size, JK::Params::noOfThreads_J, and JK::Params::noOfThreads_K.
Referenced by es_run(), and ErgoE2Evaluator::transform().
int main | ( | int | argc, |
char * | argv[] | ||
) |
References do_output(), LOG_CAT_INFO, LOG_AREA_MAIN, ERGO_LICENSE_TEXT_LONG, Ergo::registerInputVariables(), es_set_nthreads_string(), dft_init(), VERSION, ergo_parse_string(), es_mol_read_molecule(), MOL_MAIN, LOG_CAT_ERROR, readMoleculeFileInXyzFormat(), Ergo::extraChargesMolecule, es_print_help(), variable::v, es_find_var(), es_print_help_var(), benchmark_mm(), ergo_parse_file(), fileno(), ERGO_LICENSE_TEXT_BRIEF, ergoIntegralInfo, Basis_info, mat::Failure::what(), and do_output_time().
static void solveForRHS | ( | LR::SetOfEqSolver & | solver, |
ErgoE2Evaluator & | e2, | ||
int | opName, | ||
const char * | tmpdir, | ||
ergo_real | freq | ||
) | [static] |
static int var_get_int_template | ( | struct variable * | root, |
const char * | name | ||
) | [inline, static] |
References variable::v, es_find_var(), variable::type, VAR_INT, variable::vint, do_output(), LOG_CAT_ERROR, and LOG_AREA_MAIN.
static double var_get_real_template | ( | struct variable * | root, |
const char * | name | ||
) | [inline, static] |
References variable::v, es_find_var(), variable::type, VAR_FLOAT, variable::num, do_output(), LOG_CAT_ERROR, and LOG_AREA_MAIN.
static const char* var_get_string | ( | struct variable * | root, |
const char * | name | ||
) | [inline, static] |
References variable::v, es_find_var(), variable::type, VAR_STRING, and variable::str.
Referenced by es_run(), es_getexc(), and es_get_polarisability().
static void var_print_tree | ( | struct variable * | tree, |
FILE * | f, | ||
int | indent | ||
) | [static] |
References variable::next, variable::type, VAR_STRING, variable::name, variable::v, variable::str, VAR_FLOAT, variable::num, VAR_INT, variable::vint, VAR_LIST, and variable::list.
Referenced by es_print_help().
static void variable_free | ( | struct variable * | v | ) | [static] |
release variable data structure and its children.
References variable::type, VAR_STRING, variable::v, variable::str, VAR_FLOAT, VAR_INT, VAR_LIST, variable::list, do_output(), LOG_CAT_ERROR, LOG_AREA_MAIN, variable::next, and ergo_free().
Referenced by Ergo::~Ergo().
static struct variable* variable_new | ( | struct variable * | tail, |
const char * | name, | ||
const char * | description, | ||
enum VarType | type, | ||
... | |||
) | [static, read] |
creates new variable item.
Such variable can be later assigned values etc.
tail | is a tail of the variable list, allowing easy variable list creation. |
name | is the variable name. |
description | is a string with a few sentences describing what the variable is for. |
type | is the variable type (string, int, or float). |
References variable::v, ergo_new, variable::next, variable::name, variable::description, variable::type, VAR_STRING, variable::str, VAR_FLOAT, variable::num, VAR_INT, variable::vint, VAR_LIST, variable::list, do_output(), LOG_CAT_ERROR, and LOG_AREA_MAIN.
void* yy_create_buffer | ( | FILE * | f, |
int | sz | ||
) |
void yy_delete_buffer | ( | void * | ) |
void* yy_scan_string | ( | const char * | str | ) |
void yy_switch_to_buffer | ( | void * | ) |
int yyparse | ( | void | ) |
References YYINITDEPTH, YYSIZE_T, YYDPRINTF, YYEMPTY, YY_, YYMAXDEPTH, YYSTACK_ALLOC, YYSTACK_BYTES, YYSTACK_RELOCATE, yyalloc::yyss_alloc, yyalloc::yyvs_alloc, YYSTACK_FREE, YYABORT, YYFINAL, YYACCEPT, yypact_value_is_default, YYLEX, YYEOF, YYTRANSLATE, YY_SYMBOL_PRINT, YYLAST, yytable_value_is_error, yylval, YY_REDUCE_PRINT, ergo_scanner_reading_stdin, yyerror(), es_assign_num(), es_assign_str(), YYSTYPE::var, es_find_var(), last_token, YYSTYPE::str, YYERROR, es_mol_commit(), es_print_help(), es_print_help_var(), es_print_precision(), es_mol_read_molecule(), MOL_MAIN, MOL_GHOST, es_run(), es_set_nthreads(), es_set_nthreads_string(), es_warranty(), es_getexc(), es_get_polarisability(), es_assign_range(), es_add_atom(), YYSTYPE::num, YYPOPSTACK, YY_STACK_PRINT, YYNTOKENS, yynerrs, YYSYNTAX_ERROR, yydestruct(), YYTERROR, and YYID.
Referenced by ergo_parse_file(), and ergo_parse_string().
BasisInfoStruct* Basis_info = NULL [static] |
Referenced by es_assign_str(), es_mol_begin(), es_mol_read_molecule(), and main().
IntegralInfo* ergoIntegralInfo = NULL [static] |
FILE* yyin |
file used by the lex-generated parser.