#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <time.h>
#include <math.h>
#include "gaussianplugin.h"
#include "periodic_table.h"
#include "unit_conversion.h"
#include "vmdconio.h"
Go to the source code of this file.
Defines | |
#define | THISPLUGIN plugin |
#define | CPMDLOG_DEBUG 0 |
#define | CPMDLOG_BASIS_DEBUG 1 |
#define | PRINTERR (void)(0) |
#define | GET_LINE(x, y) if (!fgets(x, sizeof(x), y)) return FALSE |
#define | SAFE_FREE(ptr) free(ptr); ptr=NULL |
#define | SAFE_CALLOC(ptr, type, count) |
#define | UNK_SHELL -666 |
#define | SPD_D_SHELL -5 |
#define | SPD_P_SHELL -4 |
#define | SPD_S_SHELL -3 |
#define | SP_S_SHELL -2 |
#define | SP_P_SHELL -1 |
#define | S_SHELL 0 |
#define | P_SHELL 1 |
#define | D_SHELL 2 |
#define | F_SHELL 3 |
#define | G_SHELL 4 |
#define | H_SHELL 5 |
#define | I_SHELL 6 |
#define | SPIN_ALPHA 0 |
#define | SPIN_BETA 1 |
#define | STATUS_UNKNOWN -1 |
#define | STATUS_CONVERGED 0 |
#define | STATUS_SCF_NOT_CONV 1 |
#define | STATUS_TOO_MANY_STEPS 2 |
#define | STATUS_BROKEN_OFF 3 |
#define | ORBSPERBLOCK 8 |
Functions | |
int | parse_static_data (gaussiandata *, int *) |
int | have_cpmd (gaussiandata *) |
int | get_internal_basis (gaussiandata *) |
int | shellsymm_int (char *symm) |
int | fill_basis_arrays (gaussiandata *) |
int | read_first_frame (gaussiandata *) |
int | get_traj_frame (gaussiandata *) |
int | find_traj_end (gaussiandata *) |
int | get_wavefunction (gaussiandata *, qm_timestep_t *, qm_wavefunction_t *) |
int | get_population (gaussiandata *, qm_timestep_t *) |
void | fix_fortran_exp (char *string) |
void * | open_cpmdlog_read (const char *filename, const char *filetype, int *natoms) |
int | read_cpmdlog_structure (void *mydata, int *optflags, molfile_atom_t *atoms) |
int | read_cpmdlog_metadata (void *mydata, molfile_qm_metadata_t *gaussian_metadata) |
int | read_cpmdlog_rundata (void *mydata, molfile_qm_t *qm_data) |
void | close_cpmdlog_read (void *mydata) |
int | get_final_info (gaussiandata *data) |
VMDPLUGIN_API int | VMDPLUGIN_init (void) |
VMDPLUGIN_API int | VMDPLUGIN_register (void *v, vmdplugin_register_cb cb) |
VMDPLUGIN_API int | VMDPLUGIN_fini (void) |
Variables | |
const char * | runtypes [] |
const char * | scftypes [] |
|
Definition at line 39 of file cpmdlogplugin.c. |
|
Definition at line 37 of file cpmdlogplugin.c. |
|
Definition at line 78 of file cpmdlogplugin.c. Referenced by get_internal_basis, and shellsymm_int. |
|
Definition at line 79 of file cpmdlogplugin.c. Referenced by get_internal_basis, and shellsymm_int. |
|
Definition at line 80 of file cpmdlogplugin.c. Referenced by shellsymm_int. |
|
Definition at line 57 of file cpmdlogplugin.c. |
|
Definition at line 81 of file cpmdlogplugin.c. |
|
Definition at line 82 of file cpmdlogplugin.c. |
|
|
|
Definition at line 77 of file cpmdlogplugin.c. Referenced by get_internal_basis, and shellsymm_int. |
|
Definition at line 46 of file cpmdlogplugin.c. Referenced by get_population, get_wavefunction, and open_cpmdlog_read. |
|
Definition at line 76 of file cpmdlogplugin.c. Referenced by get_internal_basis, and shellsymm_int. |
|
Value: ptr = (type *)calloc(count,sizeof(type)); \ if (ptr == NULL) { \ PRINTERR; \ return MOLFILE_ERROR; \ } Definition at line 63 of file cpmdlogplugin.c. Referenced by fill_basis_arrays, get_basis, get_internal_basis, get_traj_frame, get_wavefunction, read_first_frame, read_hoomd_structure, and write_hoomd_bonds. |
|
Definition at line 61 of file cpmdlogplugin.c. Referenced by close_hoomd_read, get_basis, and open_hoomd_read. |
|
Definition at line 75 of file cpmdlogplugin.c. Referenced by get_internal_basis, and shellsymm_int. |
|
Definition at line 74 of file cpmdlogplugin.c. Referenced by get_internal_basis, and shellsymm_int. |
|
Definition at line 71 of file cpmdlogplugin.c. |
|
Definition at line 72 of file cpmdlogplugin.c. |
|
Definition at line 73 of file cpmdlogplugin.c. Referenced by get_internal_basis, and shellsymm_int. |
|
Definition at line 84 of file cpmdlogplugin.c. Referenced by get_wavefunction. |
|
Definition at line 85 of file cpmdlogplugin.c. |
|
Definition at line 91 of file cpmdlogplugin.c. |
|
Definition at line 88 of file cpmdlogplugin.c. |
|
Definition at line 89 of file cpmdlogplugin.c. |
|
Definition at line 90 of file cpmdlogplugin.c. |
|
Definition at line 87 of file cpmdlogplugin.c. Referenced by find_traj_end. |
|
Definition at line 30 of file cpmdlogplugin.c. |
|
Definition at line 70 of file cpmdlogplugin.c. Referenced by shellsymm_int. |
|
|
Populate the flat arrays containing the basis set data. Definition at line 1173 of file cpmdlogplugin.c. References gaussiandata::basis, gaussiandata::basis_set, prim_t::contraction_coeff, prim_t::exponent, gaussiandata::num_basis_funcs, gaussiandata::num_prim_per_shell, gaussiandata::num_shells, gaussiandata::num_shells_per_atom, gaussiandata::numatoms, shell_t::numprims, basis_atom_t::numshells, shell_t::prim, SAFE_CALLOC, basis_atom_t::shell, gaussiandata::shell_symmetry, and shell_t::symmetry. |
|
count number of QM dataset frames. Definition at line 570 of file cpmdlogplugin.c. References gaussiandata::file, gaussiandata::num_frames, gaussiandata::opt_status, and STATUS_UNKNOWN. |
|
Definition at line 144 of file cpmdlogplugin.c. |
|
the function get_initial_info provides the atom number, coordinates, and atom types and stores them temporarily. Definition at line 589 of file cpmdlogplugin.c. References gaussiandata::file, find_traj_end, get_esp_charges, gaussiandata::runtyp, RUNTYP_DYNAMICS, RUNTYP_OPTIMIZE, and VMDCON_INFO. |
|
|
read in mulliken charges Definition at line 1526 of file cpmdlogplugin.c. References gaussiandata::file, GET_LINE, gaussiandata::have_mulliken, qm_timestep_t::mulliken_charges, gaussiandata::numatoms, and PRINTERR. |
|
this function extracts the trajectory information from the output file Definition at line 1221 of file cpmdlogplugin.c. References qm_atom_t::atomicnum, BOHR_TO_ANGS, gaussiandata::end_of_trajectory, gaussiandata::file, GET_LINE, get_population, get_pte_idx, get_wavefunction, gaussiandata::have_wavefunction, gaussiandata::initatoms, MOLFILE_BUFSIZ, gaussiandata::num_frames_read, gaussiandata::numatoms, gaussiandata::qm_timestep, qm_atom_t::type, VMDCON_INFO, qm_atom_t::x, qm_atom_t::y, and qm_atom_t::z. |
|
Definition at line 1362 of file cpmdlogplugin.c. References gaussiandata::angular_momentum, gaussiandata::file, GET_LINE, MOLFILE_BUFSIZ, MOLFILE_WAVE_CANON, gaussiandata::occ_orbitals_A, gaussiandata::occ_orbitals_B, PRINTERR, SAFE_CALLOC, gaussiandata::scftyp, SCFTYP_UHF, qm_wavefunction_t::spin, SPIN_ALPHA, qm_wavefunction_t::type, VMDCON_INFO, and gaussiandata::wavef_size. |
|
Check if the current run is an actual CPMD run; returns true/false Definition at line 815 of file cpmdlogplugin.c. References gaussiandata::file, gaussiandata::file_name, GET_LINE, MOLFILE_BUFSIZ, gaussiandata::version, gaussiandata::version_string, and VMDCON_INFO. Referenced by open_cpmdlog_read. |
|
Definition at line 167 of file cpmdlogplugin.c. References gaussiandata::file, gaussiandata::file_name, have_cpmd, parse_static_data, PRINTERR, gaussiandata::runtyp, RUNTYP_UNKNOWN, gaussiandata::scftyp, SCFTYP_UNKNOWN, gaussiandata::version, and gaussiandata::version_string. Referenced by VMDPLUGIN_init. |
|
Top level CPMD log file parser. Responsible for static, i.e. non-trajectory information. Definition at line 619 of file cpmdlogplugin.c. References qm_atom_t::atomicnum, gaussiandata::basis_string, BOHR_TO_ANGS, gaussiandata::file, gaussiandata::gbasis, get_final_info, GET_LINE, get_pte_idx, gaussiandata::have_basis, gaussiandata::have_wavefunction, gaussiandata::initatoms, gaussiandata::initcell, MOLFILE_BUFSIZ, gaussiandata::multiplicity, gaussiandata::num_electrons, gaussiandata::num_frames, gaussiandata::num_frames_read, gaussiandata::num_frames_sent, gaussiandata::numatoms, gaussiandata::occ_orbitals_A, gaussiandata::occ_orbitals_B, read_first_frame, gaussiandata::runtyp, RUNTYP_DYNAMICS, RUNTYP_OPTIMIZE, RUNTYP_PROPERTIES, RUNTYP_UNKNOWN, runtypes, gaussiandata::scftyp, SCFTYP_RHF, SCFTYP_UHF, scftypes, gaussiandata::totalcharge, qm_atom_t::type, gaussiandata::version, VMDCON_INFO, qm_atom_t::x, qm_atom_t::y, and qm_atom_t::z. |
|
|
|
|
read coordinates for old-style population analysis Definition at line 866 of file cpmdlogplugin.c. References gaussiandata::angular_momentum, get_internal_basis, get_wavefunction, gaussiandata::num_frames, gaussiandata::num_frames_read, gaussiandata::qm_timestep, SAFE_CALLOC, gaussiandata::version, VMDCON_INFO, and gaussiandata::wavef_size. |
|
Definition at line 1126 of file cpmdlogplugin.c. References D_SHELL, F_SHELL, G_SHELL, P_SHELL, S_SHELL, SP_P_SHELL, SP_S_SHELL, SPD_S_SHELL, and UNK_SHELL. |
|
Definition at line 1597 of file cpmdlogplugin.c. References VMDPLUGIN_API, and VMDPLUGIN_SUCCESS. |
|
Definition at line 1563 of file cpmdlogplugin.c. References close_cpmdlog_read, MOLFILE_PLUGIN_TYPE, open_cpmdlog_read, read_cpmdlog_metadata, read_cpmdlog_rundata, read_cpmdlog_structure, vmdplugin_ABIVERSION, VMDPLUGIN_API, VMDPLUGIN_SUCCESS, and VMDPLUGIN_THREADUNSAFE. |
|
Definition at line 1592 of file cpmdlogplugin.c. References VMDPLUGIN_API, vmdplugin_register_cb, and VMDPLUGIN_SUCCESS. |
|
Initial value: { "(unknown)", "ENERGY", "OPTIMIZE", "SADPOINT", "HESSIAN", "SURFACE", "DYNAMICS", "PROPERTIES", NULL} Definition at line 93 of file cpmdlogplugin.c. Referenced by parse_static_data. |
|
Initial value: { "(unknown)", "RHF", "UHF", "ROHF", "GVB", "MCSCF", "FF", NULL } Definition at line 97 of file cpmdlogplugin.c. Referenced by parse_static_data. |