Main Page   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

xsfplugin.C File Reference

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

Go to the source code of this file.

Compounds

struct  xsf_box
struct  xsf_t

Defines

#define M_PI_2   1.57079632679489661922

Enumerations

enum  xsf_keyword_t {
  xsf_UNKNOWN = 0, xsf_COMMENT, xsf_BEGINFO, xsf_ENDINFO,
  xsf_BEG_2D_BLOCK, xsf_END_2D_BLOCK, xsf_BEG_2D_DATA, xsf_END_2D_DATA,
  xsf_BEG_3D_BLOCK, xsf_END_3D_BLOCK, xsf_BEG_3D_DATA, xsf_END_3D_DATA,
  xsf_BEG_3D_BAND, xsf_END_3D_BAND, xsf_ATOMS, xsf_ANIMSTEPS,
  xsf_BAND, xsf_MOLECULE, xsf_POLYMER, xsf_SLAB,
  xsf_CRYSTAL, xsf_PRIMVEC, xsf_CONVVEC, xsf_PRIMCOORD,
  xsf_CONVCOORD, xsf_NR_KEYWORDS
}

Functions

xsf_keyword_t lookup_keyword (const char *word)
int xsf_readbox (xsf_box *box, float *x, float *y, float *z)
void xsf_buildrotmat (xsf_t *xsf, float *a, float *b)
void xsf_buildinvmat (xsf_t *xsf, float *a, float *b, float *c)
void eatline (FILE *fd)
bool xsf_read_cell (FILE *fd, float *a, float *b, float *c)
void close_xsf_read (void *v)
void * open_xsf_read (const char *filepath, const char *filetype, int *natoms)
int read_xsf_structure (void *v, int *optflags, molfile_atom_t *atoms)
int read_xsf_timestep (void *v, int natoms, molfile_timestep_t *ts)
int read_xsf_metadata (void *v, int *nvolsets, molfile_volumetric_t **metadata)
int read_xsf_data (void *v, int set, float *datablock, float *colorblock)
VMDPLUGIN_API int VMDPLUGIN_init (void)
VMDPLUGIN_API int VMDPLUGIN_fini (void)
VMDPLUGIN_API int VMDPLUGIN_register (void *v, vmdplugin_register_cb cb)

Variables

const char * xsf_symtab []
struct {
   const char *   name
   xsf_keyword_t   kw
xsf_aliases []
molfile_plugin_t plugin


Define Documentation

#define M_PI_2   1.57079632679489661922
 

Definition at line 28 of file xsfplugin.C.

Referenced by xsf_readbox.


Enumeration Type Documentation

enum xsf_keyword_t
 

Enumeration values:
xsf_UNKNOWN 
xsf_COMMENT 
xsf_BEGINFO 
xsf_ENDINFO 
xsf_BEG_2D_BLOCK 
xsf_END_2D_BLOCK 
xsf_BEG_2D_DATA 
xsf_END_2D_DATA 
xsf_BEG_3D_BLOCK 
xsf_END_3D_BLOCK 
xsf_BEG_3D_DATA 
xsf_END_3D_DATA 
xsf_BEG_3D_BAND 
xsf_END_3D_BAND 
xsf_ATOMS 
xsf_ANIMSTEPS 
xsf_BAND 
xsf_MOLECULE 
xsf_POLYMER 
xsf_SLAB 
xsf_CRYSTAL 
xsf_PRIMVEC 
xsf_CONVVEC 
xsf_PRIMCOORD 
xsf_CONVCOORD 
xsf_NR_KEYWORDS 

Definition at line 46 of file xsfplugin.C.

Referenced by lookup_keyword, and open_xsf_read.


Function Documentation

void close_xsf_read void *    v [static]
 

Definition at line 883 of file xsfplugin.C.

References xsf_t::fd, xsf_t::file_name, and xsf_t::vol.

void eatline FILE *    fd [static]
 

Definition at line 226 of file xsfplugin.C.

Referenced by atomic_basis, check_contrl, get_basis, get_cart_hessian, get_gbasis, get_guess, get_initial_info, get_int_coords, get_normal_modes, get_proc_mem, get_runtitle, get_trajectory, get_wavefunction, open_cube_read, open_edm_read, open_molden_read, open_xsf_read, read_edm_data, read_molden_structure, read_next_timestep, read_xsf_data, read_xsf_structure, and read_xsf_timestep.

xsf_keyword_t lookup_keyword const char *    word [static]
 

Definition at line 75 of file xsfplugin.C.

References name, xsf_aliases, xsf_keyword_t, xsf_NR_KEYWORDS, xsf_symtab, and xsf_UNKNOWN.

Referenced by open_xsf_read, read_xsf_structure, and read_xsf_timestep.

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

Definition at line 241 of file xsfplugin.C.

References xsf_t::coord, molfile_volumetric_t::dataname, eatline, xsf_t::fd, xsf_t::file_name, molfile_volumetric_t::has_color, kw, lookup_keyword, xsf_t::numatoms, xsf_t::numsteps, xsf_t::numvolmeta, xsf_t::nvolsets, molfile_volumetric_t::origin, xsf_t::origin, xsf_t::pbctype, xsf_t::rotmat, xsf_t::vol, molfile_volumetric_t::xaxis, xsf_ANIMSTEPS, xsf_ATOMS, xsf_BEG_2D_BLOCK, xsf_BEG_3D_BLOCK, xsf_BEG_3D_DATA, xsf_buildrotmat, xsf_COMMENT, xsf_CONVCOORD, xsf_CONVVEC, xsf_CRYSTAL, xsf_END_2D_BLOCK, xsf_END_3D_BLOCK, xsf_END_3D_DATA, xsf_keyword_t, xsf_MOLECULE, xsf_POLYMER, xsf_PRIMCOORD, xsf_PRIMVEC, xsf_read_cell, xsf_SLAB, xsf_UNKNOWN, molfile_volumetric_t::xsize, molfile_volumetric_t::yaxis, molfile_volumetric_t::ysize, molfile_volumetric_t::zaxis, and molfile_volumetric_t::zsize.

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

Definition at line 837 of file xsfplugin.C.

References molfile_volumetric_t::dataname, eatline, xsf_t::fd, MOLFILE_ERROR, MOLFILE_SUCCESS, xsf_t::vol, molfile_volumetric_t::xsize, molfile_volumetric_t::ysize, and molfile_volumetric_t::zsize.

int read_xsf_metadata void *    v,
int *    nvolsets,
molfile_volumetric_t **    metadata
[static]
 

Definition at line 828 of file xsfplugin.C.

References MOLFILE_SUCCESS, xsf_t::nvolsets, and xsf_t::vol.

int read_xsf_structure void *    v,
int *    optflags,
molfile_atom_t   atoms
[static]
 

Definition at line 526 of file xsfplugin.C.

References xsf_box::A, xsf_box::alpha, molfile_atom_t::atomicnumber, xsf_box::B, xsf_box::beta, xsf_t::box, xsf_box::C, molfile_atom_t::chain, eatline, xsf_t::fd, xsf_t::file_name, xsf_box::gamma, get_pte_idx, get_pte_mass, get_pte_vdw_radius, xsf_t::invmat, lookup_keyword, molfile_atom_t::mass, MOLFILE_ATOMICNUMBER, MOLFILE_ERROR, MOLFILE_MASS, MOLFILE_RADIUS, MOLFILE_SUCCESS, molfile_atom_t::name, xsf_t::numatoms, molfile_atom_t::radius, molfile_atom_t::resid, molfile_atom_t::resname, xsf_t::rotmat, molfile_atom_t::segid, molfile_atom_t::type, xsf_ATOMS, xsf_buildinvmat, xsf_buildrotmat, xsf_PRIMCOORD, xsf_PRIMVEC, xsf_read_cell, and xsf_readbox.

int read_xsf_timestep void *    v,
int    natoms,
molfile_timestep_t   ts
[static]
 

Definition at line 656 of file xsfplugin.C.

References xsf_box::A, molfile_timestep_t::A, xsf_box::alpha, molfile_timestep_t::alpha, xsf_box::B, molfile_timestep_t::B, xsf_box::beta, molfile_timestep_t::beta, xsf_t::box, xsf_box::C, molfile_timestep_t::C, xsf_box::cell, molfile_timestep_t::coords, eatline, xsf_t::fd, xsf_t::file_name, xsf_box::gamma, molfile_timestep_t::gamma, xsf_t::invmat, lookup_keyword, MOLFILE_ERROR, MOLFILE_SUCCESS, xsf_t::origin, xsf_t::pbctype, xsf_t::rotmat, xsf_ATOMS, xsf_buildinvmat, xsf_buildrotmat, xsf_CRYSTAL, xsf_MOLECULE, xsf_POLYMER, xsf_PRIMCOORD, xsf_PRIMVEC, xsf_read_cell, xsf_readbox, and xsf_SLAB.

VMDPLUGIN_API int VMDPLUGIN_fini void   
 

Definition at line 922 of file xsfplugin.C.

References VMDPLUGIN_API, and VMDPLUGIN_SUCCESS.

VMDPLUGIN_API int VMDPLUGIN_init void   
 

Definition at line 921 of file xsfplugin.C.

References VMDPLUGIN_API, and VMDPLUGIN_SUCCESS.

VMDPLUGIN_API int VMDPLUGIN_register void *    v,
vmdplugin_register_cb    cb
 

Definition at line 923 of file xsfplugin.C.

References VMDPLUGIN_API, vmdplugin_register_cb, and VMDPLUGIN_SUCCESS.

void xsf_buildinvmat xsf_t   xsf,
float *    a,
float *    b,
float *    c
[static]
 

Definition at line 205 of file xsfplugin.C.

References xsf_t::invmat.

Referenced by read_xsf_structure, and read_xsf_timestep.

void xsf_buildrotmat xsf_t   xsf,
float *    a,
float *    b
[static]
 

Definition at line 175 of file xsfplugin.C.

References xsf_t::rotmat.

Referenced by open_xsf_read, read_xsf_structure, and read_xsf_timestep.

bool xsf_read_cell FILE *    fd,
float *    a,
float *    b,
float *    c
[static]
 

Definition at line 231 of file xsfplugin.C.

Referenced by open_xsf_read, read_xsf_structure, and read_xsf_timestep.

int xsf_readbox xsf_box   box,
float *    x,
float *    y,
float *    z
[static]
 

Definition at line 131 of file xsfplugin.C.

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

Referenced by read_xsf_structure, and read_xsf_timestep.


Variable Documentation

xsf_keyword_t kw
 

Definition at line 64 of file xsfplugin.C.

Referenced by open_xsf_read.

const char* name
 

Definition at line 63 of file xsfplugin.C.

Referenced by atom_name_remove_underscores, atom_name_replace, babel16type_from_name, get_atom_radius, get_bgf_fields, ReadPARM::get_parm_atom, get_pdb_fields, get_pqr_fields, get_psf_atom, lookup_keyword, open_parm7_file, ReadPARM::open_parm_file, openbabel11type_from_name, read_car_structure_line, and read_mmtk_cdf_structure.

molfile_plugin_t plugin [static]
 

Initial value:

 {
  vmdplugin_ABIVERSION,   
  MOLFILE_PLUGIN_TYPE,    
  "xsf",                  
  "XSF",                  
  "Axel Kohlmeyer, John E. Stone", 
  0,                      
  5,                      
  VMDPLUGIN_THREADSAFE,   
  "xsf",                  
  open_xsf_read,               
  read_xsf_structure,
  0,                      
  read_xsf_timestep,
  close_xsf_read,
  0,                      
  0,                      
  0,                      
  0,                      
  read_xsf_metadata,
  read_xsf_data,
  0                       
}

Definition at line 897 of file xsfplugin.C.

const { ... } xsf_aliases[] [static]
 

Referenced by lookup_keyword.

const char* xsf_symtab[] [static]
 

Initial value:

 {
  "(unknown keyword)", "#",
  "BEGIN_INFO", "END_INFO",
  "BEGIN_BLOCK_DATAGRID_2D", "END_BLOCK_DATAGRID_2D",
  "BEGIN_DATAGRID_2D", "END_DATAGRID_2D",
  "BEGIN_BLOCK_DATAGRID_3D", "END_BLOCK_DATAGRID_3D",
  "BEGIN_DATAGRID_3D", "END_DATAGRID_3D",
  "BEGIN_BLOCK_BANDGRID_3D", "END_BLOCK_BANDGRID_3D",
  "ATOMS", "ANIMSTEPS", "BAND",
  "MOLECULE", "POLYMER", "SLAB", "CRYSTAL",
  "PRIMVEC", "CONVVEC", "PRIMCOORD", "CONVCOORD"
}

Definition at line 33 of file xsfplugin.C.

Referenced by lookup_keyword.


Generated on Wed Mar 22 13:15:35 2006 for VMD Plugins (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002