Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

qcschemaplugin.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#include <sys/stat.h>
#include "qcschema_json.c"
#include "molfile_plugin.h"
#include "unit_conversion.h"
#include "periodic_table.h"
#include "qmplugin.h"

Go to the source code of this file.

Compounds

struct  jsondata_t

Defines

#define ALLOCATE(array, type, size)
#define GET_LINE(x, y)   if (!fgets(x, sizeof(x), y)) return FALSE

Functions

int get_basis (qmdata_t *)
int shelltype_int (char *type)
int fill_basis_arrays (qmdata_t *data)
int read_molecular_orbitals (qmdata_t *data)
int read_wave_coeffs (FILE *file, qm_wavefunction_t *wave)
int count_orbitals (qmdata_t *data)
void * open_qcschema_read (const char *filename, const char *filetype, int *natoms)
int read_qcschema_structure (void *mydata, int *optflags, molfile_atom_t *atoms)
int read_timestep_metadata (void *mydata, molfile_timestep_metadata_t *meta)
int read_qm_timestep_metadata (void *mydata, molfile_qm_timestep_metadata_t *meta)
int read_timestep (void *mydata, int natoms, molfile_timestep_t *ts, molfile_qm_metadata_t *qm_metadata, molfile_qm_timestep_t *qm_ts)
int read_qcschema_metadata (void *mydata, molfile_qm_metadata_t *metadata)
int read_qcschema_rundata (void *mydata, molfile_qm_t *qm_data)
void close_qcschema_read (void *mydata)
VMDPLUGIN_API int VMDPLUGIN_init ()
VMDPLUGIN_API int VMDPLUGIN_register (void *v, vmdplugin_register_cb cb)
VMDPLUGIN_API int VMDPLUGIN_fini ()

Variables

molfile_plugin_t plugin


Define Documentation

#define ALLOCATE array,
type,
size   
 

Value:

array = (type *)calloc(size, sizeof(type)); \
  if (array == NULL) { \
    fprintf(stderr, "qcschemaplugin) Memory allocation for %s failed!\n", #array); \
    return FALSE; \
  }

Definition at line 36 of file qcschemaplugin.c.

#define GET_LINE x,
     if (!fgets(x, sizeof(x), y)) return FALSE
 

Definition at line 43 of file qcschemaplugin.c.


Function Documentation

void close_qcschema_read void *    mydata [static]
 

Definition at line 531 of file qcschemaplugin.c.

References qmdata_t::angular_momentum, qmdata_t::atomicnum_per_basisatom, qmdata_t::atoms, qmdata_t::basis, qmdata_t::basis_set, qmdata_t::filepos_array, qmdata_t::format_specific_data, qmdata_t::num_basis_atoms, qmdata_t::num_prim_per_shell, qmdata_t::num_shells_per_atom, basis_atom_t::numshells, qm_timestep_t::numwave, qm_wavefunction_t::orb_energies, qm_wavefunction_t::orb_occupancies, shell_t::prim, qmdata_t::qm_timestep, basis_atom_t::shell, qmdata_t::shell_types, qm_timestep_t::wave, and qm_wavefunction_t::wave_coeffs.

Referenced by VMDPLUGIN_init.

int count_orbitals qmdata_t   data [static]
 

Definition at line 678 of file qcschemaplugin.c.

References qmdata_t::format_specific_data, and qmdata_t::qm_timestep.

Referenced by read_qm_timestep_metadata.

int fill_basis_arrays qmdata_t   data [static]
 

Definition at line 591 of file qcschemaplugin.c.

References ALLOCATE, qm_atom_t::atomicnum, basis_atom_t::atomicnum, qmdata_t::atomicnum_per_basisatom, qmdata_t::atoms, qmdata_t::basis, qmdata_t::basis_set, prim_t::contraction_coeff, prim_t::exponent, qmdata_t::num_basis_atoms, qmdata_t::num_basis_funcs, qmdata_t::num_prim_per_shell, qmdata_t::num_shells, qmdata_t::num_shells_per_atom, shell_t::numprims, basis_atom_t::numshells, shell_t::prim, basis_atom_t::shell, qmdata_t::shell_types, and shell_t::type.

Referenced by get_basis, and get_internal_basis.

int get_basis qmdata_t   [static]
 

Definition at line 579 of file qcschemaplugin.c.

Referenced by get_traj_frame, open_basis_read, parse_static_data, read_molden_metadata, and read_qcschema_metadata.

void* open_qcschema_read const char *    filename,
const char *    filetype,
int *    natoms
[static]
 

Definition at line 73 of file qcschemaplugin.c.

References jsondata_t::extras, qmdata_t::file, qmdata_t::format_specific_data, jsondata_t::geom_array, init_qmdata, json_char, json_parse, jsondata_t::model, MOLFILE_RUNTYPE_ENERGY, MOLFILE_RUNTYPE_GRADIENT, MOLFILE_RUNTYPE_HESSIAN, qmdata_t::multiplicity, qmdata_t::num_frames, qmdata_t::numatoms, jsondata_t::properties, jsondata_t::return_result, qmdata_t::runtype, jsondata_t::symbol_array, qmdata_t::totalcharge, and _json_value::u.

Referenced by VMDPLUGIN_init.

int read_molecular_orbitals qmdata_t   data [static]
 

Definition at line 694 of file qcschemaplugin.c.

References jsondata_t::coordsonly, qmdata_t::format_specific_data, and qmdata_t::qm_timestep.

Referenced by read_timestep.

int read_qcschema_metadata void *    mydata,
molfile_qm_metadata_t   metadata
[static]
 

Definition at line 422 of file qcschemaplugin.c.

References jsondata_t::coordsonly, qmdata_t::format_specific_data, get_basis, molfile_qm_metadata_t::have_carthessian, molfile_qm_metadata_t::have_inthessian, molfile_qm_metadata_t::have_normalmodes, molfile_qm_metadata_t::have_sysinfo, MOLFILE_ERROR, molfile_qm_metadata_t::ncart, molfile_qm_metadata_t::nimag, molfile_qm_metadata_t::nintcoords, qmdata_t::num_basis_atoms, molfile_qm_metadata_t::num_basis_atoms, qmdata_t::num_basis_funcs, molfile_qm_metadata_t::num_basis_funcs, qmdata_t::num_shells, molfile_qm_metadata_t::num_shells, qmdata_t::wavef_size, and molfile_qm_metadata_t::wavef_size.

Referenced by VMDPLUGIN_init.

int read_qcschema_rundata void *    mydata,
molfile_qm_t   qm_data
[static]
 

Definition at line 467 of file qcschemaplugin.c.

References molfile_qm_basis_t::angular_momentum, qmdata_t::angular_momentum, molfile_qm_basis_t::atomic_number, qmdata_t::atomicnum_per_basisatom, qmdata_t::basis, molfile_qm_basis_t::basis, molfile_qm_t::basis, molfile_qm_t::hess, MOLFILE_ERROR, qmdata_t::num_basis_atoms, qmdata_t::num_basis_funcs, qmdata_t::num_electrons, molfile_qm_sysinfo_t::num_electrons, qmdata_t::num_prim_per_shell, molfile_qm_basis_t::num_prim_per_shell, qmdata_t::num_shells, qmdata_t::num_shells_per_atom, molfile_qm_basis_t::num_shells_per_atom, molfile_qm_t::run, qmdata_t::runtype, molfile_qm_sysinfo_t::runtype, qmdata_t::shell_types, molfile_qm_basis_t::shell_types, qmdata_t::totalcharge, molfile_qm_sysinfo_t::totalcharge, and qmdata_t::wavef_size.

Referenced by VMDPLUGIN_init.

int read_qcschema_structure void *    mydata,
int *    optflags,
molfile_atom_t   atoms
[static]
 

Definition at line 226 of file qcschemaplugin.c.

References ALLOCATE, qm_atom_t::atomicnum, molfile_atom_t::atomicnumber, qmdata_t::atoms, molfile_atom_t::chain, qmdata_t::format_specific_data, jsondata_t::geom_array, get_pte_idx_from_string, MOLFILE_ATOMICNUMBER, molfile_atom_t::name, qmdata_t::num_frames_read, qmdata_t::numatoms, molfile_atom_t::resid, molfile_atom_t::resname, molfile_atom_t::segid, jsondata_t::symbol_array, qm_atom_t::type, molfile_atom_t::type, _json_value::u, qm_atom_t::x, qm_atom_t::y, and qm_atom_t::z.

Referenced by VMDPLUGIN_init.

int read_qm_timestep_metadata void *    mydata,
molfile_qm_timestep_metadata_t   meta
[static]
 

Definition at line 296 of file qcschemaplugin.c.

References count_orbitals, qmdata_t::format_specific_data, molfile_qm_timestep_metadata::has_gradient, qm_wavefunction_t::has_occup, molfile_qm_timestep_metadata::has_occup_per_wavef, qm_wavefunction_t::has_orben, molfile_qm_timestep_metadata::has_orben_per_wavef, MOLFILE_ERROR, MOLFILE_MAXWAVEPERTS, molfile_qm_timestep_metadata::num_charge_sets, qmdata_t::num_frames, qmdata_t::num_frames_sent, qm_wavefunction_t::num_orbitals, molfile_qm_timestep_metadata::num_orbitals_per_wavef, qm_timestep_t::num_scfiter, molfile_qm_timestep_metadata::num_scfiter, molfile_qm_timestep_metadata::num_wavef, qm_timestep_t::numwave, qmdata_t::qm_timestep, qm_timestep_t::wave, qmdata_t::wavef_size, and molfile_qm_timestep_metadata::wavef_size.

Referenced by VMDPLUGIN_init.

int read_timestep void *    mydata,
int    natoms,
molfile_timestep_t   ts,
molfile_qm_metadata_t   qm_metadata,
molfile_qm_timestep_t   qm_ts
[static]
 

Definition at line 338 of file qcschemaplugin.c.

References qmdata_t::atoms, molfile_timestep_t::coords, qm_wavefunction_t::energy, molfile_qm_wavefunction_t::energy, qm_wavefunction_t::exci, molfile_qm_wavefunction_t::excitation, qm_wavefunction_t::has_occup, qm_wavefunction_t::info, molfile_qm_wavefunction_t::info, MOLFILE_BUFSIZ, MOLFILE_ERROR, qm_wavefunction_t::mult, molfile_qm_wavefunction_t::multiplicity, qmdata_t::num_frames, qmdata_t::num_frames_read, qmdata_t::num_frames_sent, qm_wavefunction_t::num_orbitals, qm_timestep_t::numwave, molfile_qm_wavefunction_t::occupancies, qm_wavefunction_t::orb_energies, qm_wavefunction_t::orb_occupancies, molfile_qm_wavefunction_t::orbital_energies, qmdata_t::qm_timestep, read_molecular_orbitals, qm_wavefunction_t::spin, molfile_qm_wavefunction_t::spin, qm_wavefunction_t::type, molfile_qm_wavefunction_t::type, molfile_qm_timestep_t::wave, qm_timestep_t::wave, molfile_qm_wavefunction_t::wave_coeffs, qm_wavefunction_t::wave_coeffs, qmdata_t::wavef_size, qm_atom_t::x, qm_atom_t::y, and qm_atom_t::z.

int read_timestep_metadata void *    mydata,
molfile_timestep_metadata_t   meta
[static]
 

Definition at line 280 of file qcschemaplugin.c.

References molfile_timestep_metadata::count, and molfile_timestep_metadata::has_velocities.

int read_wave_coeffs FILE *    file,
qm_wavefunction_t   wave
[static]
 

Definition at line 701 of file qcschemaplugin.c.

Referenced by read_molecular_orbitals.

int shelltype_int char *    type [static]
 

Definition at line 665 of file qcschemaplugin.c.

References SP_SHELL.

Referenced by get_basis.

VMDPLUGIN_API int VMDPLUGIN_fini void   
 

Definition at line 742 of file qcschemaplugin.c.

References VMDPLUGIN_API, and VMDPLUGIN_SUCCESS.

VMDPLUGIN_API int VMDPLUGIN_init void   
 

Definition at line 712 of file qcschemaplugin.c.

References molfile_plugin_t::close_file_read, close_qcschema_read, molfile_plugin_t::filename_extension, MOLFILE_PLUGIN_TYPE, molfile_plugin_t::open_file_read, open_qcschema_read, read_qcschema_metadata, read_qcschema_rundata, read_qcschema_structure, molfile_plugin_t::read_qm_metadata, molfile_plugin_t::read_qm_rundata, read_qm_timestep_metadata, molfile_plugin_t::read_qm_timestep_metadata, molfile_plugin_t::read_structure, read_timestep, molfile_plugin_t::read_timestep, read_timestep_metadata, molfile_plugin_t::read_timestep_metadata, vmdplugin_ABIVERSION, VMDPLUGIN_API, VMDPLUGIN_SUCCESS, and VMDPLUGIN_THREADSAFE.

VMDPLUGIN_API int VMDPLUGIN_register void *    v,
vmdplugin_register_cb    cb
 

Definition at line 737 of file qcschemaplugin.c.

References VMDPLUGIN_API, vmdplugin_register_cb, and VMDPLUGIN_SUCCESS.


Variable Documentation

molfile_plugin_t plugin [static]
 

Definition at line 710 of file qcschemaplugin.c.


Generated on Sat Dec 14 03:10:42 2024 for VMD Plugins (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002