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

edmplugin.C File Reference

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

Go to the source code of this file.

Compounds

struct  edm_t

Defines

#define TOLERANCE   1e-4

Functions

void eatline (FILE *fd)
void * open_edm_read (const char *filepath, const char *filetype, int *natoms)
int read_edm_metadata (void *v, int *nsets, molfile_volumetric_t **metadata)
int read_edm_data (void *v, int set, float *datablock, float *colorblock)
void close_edm_read (void *v)
void * open_edm_write (const char *filepath, const char *filetype, int natoms)
void close_edm_write (void *v)
float edm_voxel_value_safe (int x, int y, int z, const int xsize, const int ysize, const int zsize, const float *data)
 return voxel, after safely clamping index to valid range. More...

float edm_voxel_value_interpolate (float xv, float yv, float zv, const int xsize, const int ysize, const int zsize, const float *data)
 return interpolated value from 8 nearest neighbor voxels. More...

float edm_voxel_value_interpolate_from_coord (float xpos, float ypos, float zpos, const float *origin, const float *xdelta, const float *ydelta, const float *zdelta, const int xsize, const int ysize, const int zsize, float *data)
 return interpolated value of voxel, based on atomic coords. XXX need to account for non-orthog. cells. More...

int write_edm_data (void *v, molfile_volumetric_t *metadata, float *datablock, float *colorblock)
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 float NAN = sqrtf(-1.f)
molfile_plugin_t plugin


Define Documentation

#define TOLERANCE   1e-4
 

Definition at line 29 of file edmplugin.C.

Referenced by write_edm_data.


Function Documentation

void close_edm_read void *    v [static]
 

Definition at line 245 of file edmplugin.C.

References edm_t::fd, and edm_t::vol.

Referenced by VMDPLUGIN_init.

void close_edm_write void *    v [static]
 

Definition at line 263 of file edmplugin.C.

Referenced by VMDPLUGIN_init.

void eatline FILE *    fd [static]
 

Definition at line 37 of file edmplugin.C.

float edm_voxel_value_interpolate float    xv,
float    yv,
float    zv,
const int    xsize,
const int    ysize,
const int    zsize,
const float *    data
 

return interpolated value from 8 nearest neighbor voxels.

Definition at line 287 of file edmplugin.C.

References edm_voxel_value_safe.

Referenced by edm_voxel_value_interpolate_from_coord.

float edm_voxel_value_interpolate_from_coord float    xpos,
float    ypos,
float    zpos,
const float *    origin,
const float *    xdelta,
const float *    ydelta,
const float *    zdelta,
const int    xsize,
const int    ysize,
const int    zsize,
float *    data
 

return interpolated value of voxel, based on atomic coords. XXX need to account for non-orthog. cells.

Definition at line 319 of file edmplugin.C.

References edm_voxel_value_interpolate.

Referenced by write_edm_data.

float edm_voxel_value_safe int    x,
int    y,
int    z,
const int    xsize,
const int    ysize,
const int    zsize,
const float *    data
 

return voxel, after safely clamping index to valid range.

Definition at line 277 of file edmplugin.C.

Referenced by edm_voxel_value_interpolate.

void* open_edm_read const char *    filepath,
const char *    filetype,
int *    natoms
[static]
 

Definition at line 42 of file edmplugin.C.

References molfile_volumetric_t::dataname, eatline, edm_t::fd, molfile_volumetric_t::has_color, MOLFILE_NUMATOMS_NONE, edm_t::nsets, molfile_volumetric_t::origin, edm_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.

void* open_edm_write const char *    filepath,
const char *    filetype,
int    natoms
[static]
 

Definition at line 253 of file edmplugin.C.

Referenced by VMDPLUGIN_init.

int read_edm_data void *    v,
int    set,
float *    datablock,
float *    colorblock
[static]
 

Definition at line 198 of file edmplugin.C.

References eatline, edm_t::fd, MOLFILE_ERROR, edm_t::vol, molfile_volumetric_t::xsize, molfile_volumetric_t::ysize, and molfile_volumetric_t::zsize.

Referenced by VMDPLUGIN_init.

int read_edm_metadata void *    v,
int *    nsets,
molfile_volumetric_t **    metadata
[static]
 

Definition at line 189 of file edmplugin.C.

References edm_t::nsets, and edm_t::vol.

Referenced by VMDPLUGIN_init.

VMDPLUGIN_API int VMDPLUGIN_fini void   
 

Definition at line 504 of file edmplugin.C.

References VMDPLUGIN_API, and VMDPLUGIN_SUCCESS.

VMDPLUGIN_API int VMDPLUGIN_init void   
 

Definition at line 476 of file edmplugin.C.

References close_edm_read, close_edm_write, molfile_plugin_t::close_file_read, molfile_plugin_t::close_file_write, molfile_plugin_t::filename_extension, MOLFILE_PLUGIN_TYPE, open_edm_read, open_edm_write, molfile_plugin_t::open_file_read, molfile_plugin_t::open_file_write, read_edm_data, read_edm_metadata, molfile_plugin_t::read_volumetric_data, molfile_plugin_t::read_volumetric_metadata, vmdplugin_ABIVERSION, VMDPLUGIN_API, VMDPLUGIN_SUCCESS, VMDPLUGIN_THREADSAFE, write_edm_data, and molfile_plugin_t::write_volumetric_data.

VMDPLUGIN_API int VMDPLUGIN_register void *    v,
vmdplugin_register_cb    cb
 

Definition at line 499 of file edmplugin.C.

References VMDPLUGIN_API, vmdplugin_register_cb, and VMDPLUGIN_SUCCESS.

int write_edm_data void *    v,
molfile_volumetric_t   metadata,
float *    datablock,
float *    colorblock
[static]
 

Definition at line 340 of file edmplugin.C.

References edm_voxel_value_interpolate_from_coord, MOLFILE_ERROR, molfile_volumetric_t::origin, TOLERANCE, 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.


Variable Documentation

const float NAN = sqrtf(-1.f)
 

Definition at line 26 of file edmplugin.C.

molfile_plugin_t plugin [static]
 

Definition at line 474 of file edmplugin.C.


Generated on Fri Jan 24 02:56:32 2020 for VMD Plugins (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002