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

moldenplugin.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#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  moldendata_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_geom_block (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_molden_read (const char *filename, const char *filetype, int *natoms)
int read_molden_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_molden_metadata (void *mydata, molfile_qm_metadata_t *metadata)
int read_molden_rundata (void *mydata, molfile_qm_t *qm_data)
void close_molden_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, "moldenplugin) Memory allocation for %s failed!\n", #array); \
    return FALSE; \
  }

Definition at line 47 of file moldenplugin.c.

Referenced by fill_basis_arrays, get_basis, read_molden_structure, read_molecular_orbitals, and read_qcschema_structure.

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

Definition at line 54 of file moldenplugin.c.


Function Documentation

void close_molden_read void *    mydata [static]
 

Definition at line 649 of file moldenplugin.c.

References qmdata_t::angular_momentum, qmdata_t::atomicnum_per_basisatom, qmdata_t::atoms, qmdata_t::basis, qmdata_t::basis_set, qmdata_t::file, 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 1105 of file moldenplugin.c.

References add_wavefunction, eatline, qm_wavefunction_t::exci, qmdata_t::file, moldendata_t::filepos_mo, qmdata_t::format_specific_data, goto_keyline, MOLFILE_WAVE_UNKNOWN, qm_wavefunction_t::mult, qm_wavefunction_t::num_coeffs, qm_wavefunction_t::num_orbitals, qmdata_t::qm_timestep, qm_wavefunction_t::spin, strtoupper, qm_wavefunction_t::type, and qmdata_t::wavef_size.

int fill_basis_arrays qmdata_t   data [static]
 

Definition at line 1000 of file moldenplugin.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.

int get_basis qmdata_t   [static]
 

Definition at line 756 of file moldenplugin.c.

References ALLOCATE, qmdata_t::angular_momentum, angular_momentum_expon, qmdata_t::basis_set, qmdata_t::basis_string, prim_t::contraction_coeff, prim_t::exponent, qmdata_t::file, moldendata_t::filepos_gto, fill_basis_arrays, qmdata_t::format_specific_data, fpexpftoc, qmdata_t::num_basis_atoms, qmdata_t::num_basis_funcs, qmdata_t::num_shells, qmdata_t::numatoms, shell_t::numprims, basis_atom_t::numshells, shell_t::prim, basis_atom_t::shell, qmdata_t::shell_types, shelltype_int, trimleft, shell_t::type, and qmdata_t::wavef_size.

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

Definition at line 104 of file moldenplugin.c.

References moldendata_t::coordsonly, eatline, eatwhitelines, qmdata_t::file, qmdata_t::filepos_array, moldendata_t::filepos_atoms, moldendata_t::filepos_geomxyz, moldendata_t::filepos_gto, moldendata_t::filepos_mo, qmdata_t::format_specific_data, init_qmdata, iswhiteline, qmdata_t::num_frames, qmdata_t::numatoms, strtoupper, trimleft, trimright, and moldendata_t::units.

Referenced by VMDPLUGIN_init.

int read_geom_block qmdata_t   data [static]
 

Definition at line 371 of file moldenplugin.c.

References qmdata_t::atoms, eatline, qmdata_t::file, qmdata_t::numatoms, qm_atom_t::x, qm_atom_t::y, and qm_atom_t::z.

Referenced by read_timestep.

int read_molden_metadata void *    mydata,
molfile_qm_metadata_t   metadata
[static]
 

Definition at line 542 of file moldenplugin.c.

References moldendata_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_molden_rundata void *    mydata,
molfile_qm_t   qm_data
[static]
 

Definition at line 587 of file moldenplugin.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::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_molden_structure void *    mydata,
int *    optflags,
molfile_atom_t   atoms
[static]
 

Definition at line 269 of file moldenplugin.c.

References ALLOCATE, qm_atom_t::atomicnum, molfile_atom_t::atomicnumber, qmdata_t::atoms, BOHR_TO_ANGS, molfile_atom_t::chain, eatline, qmdata_t::file, moldendata_t::filepos_atoms, moldendata_t::filepos_geomxyz, qmdata_t::format_specific_data, get_pte_idx_from_string, MOLFILE_ATOMICNUMBER, MOLFILE_ERROR, molfile_atom_t::name, qmdata_t::num_frames_read, qmdata_t::numatoms, molfile_atom_t::resid, molfile_atom_t::resname, molfile_atom_t::segid, qm_atom_t::type, molfile_atom_t::type, moldendata_t::units, qm_atom_t::x, qm_atom_t::y, and qm_atom_t::z.

Referenced by VMDPLUGIN_init.

int read_molecular_orbitals qmdata_t   data [static]
 

Definition at line 1217 of file moldenplugin.c.

References ALLOCATE, moldendata_t::coordsonly, qmdata_t::file, moldendata_t::filepos_mo, qmdata_t::format_specific_data, qm_wavefunction_t::num_coeffs, qm_wavefunction_t::num_orbitals, qm_timestep_t::numwave, qmdata_t::qm_timestep, read_wave_coeffs, qm_timestep_t::wave, and qm_wavefunction_t::wave_coeffs.

int read_qm_timestep_metadata void *    mydata,
molfile_qm_timestep_metadata_t   meta
[static]
 

Definition at line 412 of file moldenplugin.c.

References moldendata_t::coordsonly, 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 458 of file moldenplugin.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, qmdata_t::file, qmdata_t::filepos_array, 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_geom_block, 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.

Referenced by VMDPLUGIN_init.

int read_timestep_metadata void *    mydata,
molfile_timestep_metadata_t   meta
[static]
 

Definition at line 397 of file moldenplugin.c.

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

Referenced by VMDPLUGIN_init.

int read_wave_coeffs FILE *    file,
qm_wavefunction_t   wave
[static]
 

Definition at line 1250 of file moldenplugin.c.

References eatline, qm_wavefunction_t::num_coeffs, qm_wavefunction_t::num_orbitals, and qm_wavefunction_t::wave_coeffs.

int shelltype_int char *    type [static]
 

Definition at line 1075 of file moldenplugin.c.

References SP_SHELL.

VMDPLUGIN_API int VMDPLUGIN_fini void   
 

Definition at line 1329 of file moldenplugin.c.

References VMDPLUGIN_API, and VMDPLUGIN_SUCCESS.

VMDPLUGIN_API int VMDPLUGIN_init void   
 

Definition at line 1299 of file moldenplugin.c.

References molfile_plugin_t::close_file_read, close_molden_read, molfile_plugin_t::filename_extension, MOLFILE_PLUGIN_TYPE, molfile_plugin_t::open_file_read, open_molden_read, read_molden_metadata, read_molden_rundata, read_molden_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 1324 of file moldenplugin.c.

References VMDPLUGIN_API, vmdplugin_register_cb, and VMDPLUGIN_SUCCESS.


Variable Documentation

molfile_plugin_t plugin [static]
 

Definition at line 1297 of file moldenplugin.c.


Generated on Fri Nov 8 03:09:47 2024 for VMD Plugins (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002