Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   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_register (void *v, vmdplugin_register_cb cb)
VMDPLUGIN_API int VMDPLUGIN_fini (void)

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 29 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 48 of file xsfplugin.C.

Referenced by lookup_keyword, and open_xsf_read.


Function Documentation

void close_xsf_read void *    v [static]
 

Definition at line 888 of file xsfplugin.C.

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

Referenced by VMDPLUGIN_init.

void eatline FILE *    fd [static]
 

Definition at line 231 of file xsfplugin.C.

Referenced by analyze_traj, count_orbitals, get_basis, get_basis_options, get_cart_hessian, get_contrl, get_contrl_firefly, get_esp_charges, get_gradient, get_guess_options, get_input_structure, get_int_coords, get_int_hessian, get_job_info, get_normal_modes, get_population, get_proc_mem, get_scfdata, get_traj_frame, get_wavefunction, open_edm_read, open_molden_read, open_xsf_read, read_edm_data, read_geom_block, read_molden_structure, read_wave_coeffs, read_xsf_data, read_xsf_structure, and read_xsf_timestep.

xsf_keyword_t lookup_keyword const char *    word [static]
 

Definition at line 79 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 247 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.

Referenced by VMDPLUGIN_init.

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

Definition at line 842 of file xsfplugin.C.

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

Referenced by VMDPLUGIN_init.

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

Definition at line 833 of file xsfplugin.C.

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

Referenced by VMDPLUGIN_init.

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

Definition at line 531 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_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.

Referenced by VMDPLUGIN_init.

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

Definition at line 661 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, 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.

Referenced by VMDPLUGIN_init.

VMDPLUGIN_API int VMDPLUGIN_fini void   
 

Definition at line 929 of file xsfplugin.C.

References VMDPLUGIN_API, and VMDPLUGIN_SUCCESS.

VMDPLUGIN_API int VMDPLUGIN_init void   
 

Definition at line 904 of file xsfplugin.C.

References molfile_plugin_t::close_file_read, close_xsf_read, molfile_plugin_t::filename_extension, MOLFILE_PLUGIN_TYPE, molfile_plugin_t::open_file_read, open_xsf_read, molfile_plugin_t::read_next_timestep, molfile_plugin_t::read_structure, molfile_plugin_t::read_volumetric_data, molfile_plugin_t::read_volumetric_metadata, read_xsf_data, read_xsf_metadata, read_xsf_structure, read_xsf_timestep, vmdplugin_ABIVERSION, VMDPLUGIN_API, VMDPLUGIN_SUCCESS, and VMDPLUGIN_THREADSAFE.

VMDPLUGIN_API int VMDPLUGIN_register void *    v,
vmdplugin_register_cb    cb
 

Definition at line 924 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 211 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 181 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 237 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 136 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 67 of file xsfplugin.C.

Referenced by open_xsf_read.

const char* name
 

Definition at line 66 of file xsfplugin.C.

Referenced by append_prop_rule, atom_name_remove_underscores, atom_name_replace, babel16type_from_name, GEO_open_file_read, get_atom_radius, get_basis, get_bgf_fields, get_element_setup_ply, ReadPARM::get_parm_atom, get_pdb_fields, get_pqr_fields, Get_Property_Values, get_psf_atom, get_xbgf_fields, lookup_keyword, matches_rule_name, open_for_writing_ply, open_parm7_file, ReadPARM::open_parm_file, openbabel11type_from_name, ply_open_for_reading, read_car_structure_line, read_js_structure, read_mmtk_cdf_structure, read_tpr_structure, H5File::write_ds, write_js_structure, write_psf_structure, and writeAtomSite.

molfile_plugin_t plugin [static]
 

Definition at line 902 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 34 of file xsfplugin.C.

Referenced by lookup_keyword.


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