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

cubeplugin.C File Reference

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include "molfile_plugin.h"
#include "unit_conversion.h"
#include "periodic_table.h"
#include "vmdconio.h"

Go to the source code of this file.


struct  cube_box
struct  cube_t


#define M_PI_2   1.57079632679489661922
#define THISPLUGIN   plugin


int cube_readbox (cube_box *box, float *x, float *y, float *z)
void cube_buildrotmat (cube_t *cube, float *o, float *a, float *b)
void close_cube_read (void *v)
void * open_cube_read (const char *filepath, const char *filetype, int *natoms)
int read_cube_structure (void *v, int *optflags, molfile_atom_t *atoms)
int read_cube_timestep (void *v, int natoms, molfile_timestep_t *ts)
int read_cube_metadata (void *v, int *nsets, molfile_volumetric_t **metadata)
int read_cube_data (void *v, int set, float *datablock, float *colorblock)
int VMDPLUGIN_init (void)
int VMDPLUGIN_register (void *v, vmdplugin_register_cb cb)
int VMDPLUGIN_fini (void)


const float bohr = BOHR_TO_ANGS

Define Documentation

#define M_PI_2   1.57079632679489661922

Definition at line 34 of file cubeplugin.C.

Referenced by cube_readbox.

#define THISPLUGIN   plugin

Definition at line 39 of file cubeplugin.C.

Function Documentation

void close_cube_read void *    v [static]

Definition at line 555 of file cubeplugin.C.

References cube_t::datacache, cube_t::fd, cube_t::file_name, VMDCON_INFO, and cube_t::vol.

Referenced by open_cube_read, and VMDPLUGIN_init.

void cube_buildrotmat cube_t   cube,
float *    o,
float *    a,
float *    b

Definition at line 102 of file cubeplugin.C.

References cube_t::origin, and cube_t::rotmat.

Referenced by open_cube_read.

int cube_readbox cube_box   box,
float *    x,
float *    y,
float *    z

Definition at line 66 of file cubeplugin.C.

References cube_box::A, cube_box::alpha, cube_box::B, cube_box::beta, cube_box::C, cube_box::gamma, and M_PI_2.

Referenced by open_cube_read.

void* open_cube_read const char *    filepath,
const char *    filetype,
int *    natoms

Definition at line 136 of file cubeplugin.C.

References bohr, cube_t::box, close_cube_read, cube_t::coord, cube_t::crdpos, cube_buildrotmat, cube_readbox, cube_t::datacache, molfile_volumetric_t::dataname, cube_t::datapos, cube_t::fd, cube_t::file_name, molfile_volumetric_t::has_color, cube_t::nsets, cube_t::numatoms, molfile_volumetric_t::origin, cube_t::origin, cube_t::rotmat, VMDCON_INFO, cube_t::vol, molfile_volumetric_t::xaxis, molfile_volumetric_t::xsize, molfile_volumetric_t::yaxis, molfile_volumetric_t::ysize, molfile_volumetric_t::zaxis, and molfile_volumetric_t::zsize.

Referenced by VMDPLUGIN_init.

int read_cube_data void *    v,
int    set,
float *    datablock,
float *    colorblock

Definition at line 480 of file cubeplugin.C.

References cube_t::datacache, cube_t::datapos, cube_t::fd, MOLFILE_ERROR, cube_t::nsets, VMDCON_INFO, cube_t::vol, molfile_volumetric_t::xsize, molfile_volumetric_t::ysize, and molfile_volumetric_t::zsize.

Referenced by VMDPLUGIN_init.

int read_cube_metadata void *    v,
int *    nsets,
molfile_volumetric_t **    metadata

Definition at line 471 of file cubeplugin.C.

References cube_t::nsets, and cube_t::vol.

Referenced by VMDPLUGIN_init.

int read_cube_structure void *    v,
int *    optflags,
molfile_atom_t   atoms

Definition at line 352 of file cubeplugin.C.

References molfile_atom_t::atomicnumber, molfile_atom_t::chain, molfile_atom_t::charge, cube_t::crdpos, cube_t::fd, cube_t::file_name, get_pte_mass, get_pte_vdw_radius, molfile_atom_t::mass, MOLFILE_ATOMICNUMBER, MOLFILE_CHARGE, MOLFILE_ERROR, MOLFILE_MASS, MOLFILE_RADIUS, molfile_atom_t::name, cube_t::numatoms, molfile_atom_t::radius, molfile_atom_t::resid, molfile_atom_t::resname, molfile_atom_t::segid, molfile_atom_t::type, and VMDCON_INFO.

Referenced by VMDPLUGIN_init.

int read_cube_timestep void *    v,
int    natoms,
molfile_timestep_t   ts

Definition at line 406 of file cubeplugin.C.

References cube_box::A, molfile_timestep_t::A, cube_box::alpha, molfile_timestep_t::alpha, cube_box::B, molfile_timestep_t::B, cube_box::beta, molfile_timestep_t::beta, bohr, cube_t::box, cube_box::C, molfile_timestep_t::C, cube_t::coord, molfile_timestep_t::coords, cube_t::crdpos, cube_t::fd, cube_t::file_name, cube_box::gamma, molfile_timestep_t::gamma, MOLFILE_EOF, MOLFILE_ERROR, cube_t::numatoms, cube_t::origin, and cube_t::rotmat.

Referenced by VMDPLUGIN_init.

int VMDPLUGIN_fini void   

Definition at line 600 of file cubeplugin.C.


int VMDPLUGIN_init void   

Definition at line 575 of file cubeplugin.C.

References close_cube_read, MOLFILE_PLUGIN_TYPE, open_cube_read, read_cube_data, read_cube_metadata, read_cube_structure, read_cube_timestep, vmdplugin_ABIVERSION, VMDPLUGIN_SUCCESS, and VMDPLUGIN_THREADSAFE.

int VMDPLUGIN_register void *    v,
vmdplugin_register_cb    cb

Definition at line 595 of file cubeplugin.C.

References vmdplugin_register_cb, and VMDPLUGIN_SUCCESS.

Variable Documentation

const float bohr = BOHR_TO_ANGS [static]

Definition at line 42 of file cubeplugin.C.

Referenced by open_cube_read, and read_cube_timestep.

Generated on Sat May 25 03:11:44 2024 for VMD Plugins (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002