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

cdfplugin.c File Reference

#include <netcdf.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "molfile_plugin.h"

Go to the source code of this file.

Compounds

struct  amberdata
struct  cdfdata
struct  mmtkdata

Defines

#define CDF_TYPE_UNKNOWN   0
#define CDF_TYPE_AMBER   1
#define CDF_TYPE_MMTK   2

Functions

void close_cdf_read (void *mydata)
int open_amber_cdf_read (cdfdata *cdf)
int open_mmtk_cdf_read (cdfdata *cdf)
void * open_cdf_read (const char *filename, const char *filetype, int *natoms)
char * find_closing_bracket (char *s)
void atom_name_replace (char *name, char *substring, char letter)
void atom_name_remove_underscores (char *name)
void set_atom_attributes (molfile_atom_t *atoms, int natoms, char **atom_pointers, char chain_id, char *resname, int resnum, char *start, char *end, int name_correction_type)
int read_mmtk_cdf_structure (void *mydata, int *optflags, molfile_atom_t *atoms)
int read_cdf_structure (void *mydata, int *optflags, molfile_atom_t *atoms)
int read_amber_cdf_timestep (void *mydata, int natoms, molfile_timestep_t *ts)
int read_mmtk_cdf_timestep (void *mydata, int natoms, molfile_timestep_t *ts)
int read_cdf_timestep (void *mydata, int natoms, molfile_timestep_t *ts)
VMDPLUGIN_API int VMDPLUGIN_init (void)
VMDPLUGIN_API int VMDPLUGIN_fini (void)
VMDPLUGIN_API int VMDPLUGIN_register (void *v, vmdplugin_register_cb cb)

Variables

molfile_plugin_t cdfplugin


Define Documentation

#define CDF_TYPE_AMBER   1
 

Definition at line 30 of file cdfplugin.c.

Referenced by open_amber_cdf_read, read_cdf_structure, and read_cdf_timestep.

#define CDF_TYPE_MMTK   2
 

Definition at line 31 of file cdfplugin.c.

Referenced by open_mmtk_cdf_read, read_cdf_structure, and read_cdf_timestep.

#define CDF_TYPE_UNKNOWN   0
 

Definition at line 29 of file cdfplugin.c.

Referenced by open_cdf_read.


Function Documentation

void atom_name_remove_underscores char *    name [static]
 

Definition at line 454 of file cdfplugin.c.

References name.

Referenced by set_atom_attributes.

void atom_name_replace char *    name,
char *    substring,
char    letter
[static]
 

Definition at line 446 of file cdfplugin.c.

References name.

Referenced by set_atom_attributes.

void close_cdf_read void *    mydata [static]
 

Definition at line 95 of file cdfplugin.c.

References cdfdata::amber, amberdata::application, mmtkdata::comment, cdfdata::conventions, amberdata::conventionversion, cdfdata::mmtk, cdfdata::ncid, amberdata::program, amberdata::programversion, and amberdata::title.

Referenced by open_cdf_read.

char* find_closing_bracket char *    s [static]
 

Definition at line 433 of file cdfplugin.c.

Referenced by read_mmtk_cdf_structure.

int open_amber_cdf_read cdfdata   cdf [static]
 

Definition at line 129 of file cdfplugin.c.

References cdfdata::amber, amberdata::application, amberdata::atomdim, amberdata::atomdimid, CDF_TYPE_AMBER, amberdata::cell_angles_id, amberdata::cell_lengths_id, amberdata::conventionversion, amberdata::coordinates_id, amberdata::framedim, amberdata::framedimid, amberdata::has_box, cdfdata::natoms, cdfdata::ncid, amberdata::program, amberdata::programversion, amberdata::spatial_id, amberdata::spatialdim, amberdata::spatialdimid, amberdata::title, cdfdata::type, and amberdata::velocities_id.

Referenced by open_cdf_read.

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

Definition at line 383 of file cdfplugin.c.

References CDF_TYPE_UNKNOWN, close_cdf_read, cdfdata::conventions, cdfdata::natoms, cdfdata::ncid, open_amber_cdf_read, open_mmtk_cdf_read, and cdfdata::type.

int open_mmtk_cdf_read cdfdata   cdf [static]
 

Definition at line 269 of file cdfplugin.c.

References mmtkdata::atom_numberdim, mmtkdata::atom_numberdimid, mmtkdata::box_size_id, CDF_TYPE_MMTK, mmtkdata::comment, mmtkdata::configuration_id, mmtkdata::description_id, mmtkdata::description_lengthdim, mmtkdata::description_lengthdimid, mmtkdata::has_box, mmtkdata::minor_step_numberdim, mmtkdata::minor_step_numberdimid, cdfdata::mmtk, cdfdata::natoms, cdfdata::ncid, mmtkdata::step_numberdim, mmtkdata::step_numberdimid, cdfdata::type, mmtkdata::xyzdim, and mmtkdata::xyzdimid.

Referenced by open_cdf_read.

int read_amber_cdf_timestep void *    mydata,
int    natoms,
molfile_timestep_t   ts
[static]
 

Definition at line 798 of file cdfplugin.c.

References molfile_timestep_t::A, molfile_timestep_t::alpha, cdfdata::amber, amberdata::atomdim, molfile_timestep_t::B, molfile_timestep_t::beta, molfile_timestep_t::C, amberdata::cell_angles_id, amberdata::cell_lengths_id, amberdata::coordinates_id, molfile_timestep_t::coords, cdfdata::curframe, molfile_timestep_t::gamma, amberdata::has_box, MOLFILE_ERROR, MOLFILE_SUCCESS, cdfdata::ncid, and amberdata::spatialdim.

Referenced by read_cdf_timestep.

int read_cdf_structure void *    mydata,
int *    optflags,
molfile_atom_t   atoms
[static]
 

Definition at line 782 of file cdfplugin.c.

References CDF_TYPE_AMBER, CDF_TYPE_MMTK, MOLFILE_ERROR, MOLFILE_NOSTRUCTUREDATA, read_mmtk_cdf_structure, and cdfdata::type.

int read_cdf_timestep void *    mydata,
int    natoms,
molfile_timestep_t   ts
[static]
 

Definition at line 942 of file cdfplugin.c.

References CDF_TYPE_AMBER, CDF_TYPE_MMTK, MOLFILE_ERROR, read_amber_cdf_timestep, read_mmtk_cdf_timestep, and cdfdata::type.

int read_mmtk_cdf_structure void *    mydata,
int *    optflags,
molfile_atom_t   atoms
[static]
 

Definition at line 515 of file cdfplugin.c.

References molfile_atom_t::chain, cdfdata::curframe, mmtkdata::description, mmtkdata::description_id, mmtkdata::description_lengthdim, find_closing_bracket, cdfdata::mmtk, MOLFILE_ERROR, MOLFILE_NOOPTIONS, MOLFILE_SUCCESS, name, molfile_atom_t::name, cdfdata::natoms, cdfdata::ncid, molfile_atom_t::resid, molfile_atom_t::resname, molfile_atom_t::segid, set_atom_attributes, and molfile_atom_t::type.

Referenced by read_cdf_structure.

int read_mmtk_cdf_timestep void *    mydata,
int    natoms,
molfile_timestep_t   ts
[static]
 

Definition at line 858 of file cdfplugin.c.

References molfile_timestep_t::A, molfile_timestep_t::alpha, mmtkdata::atom_numberdim, molfile_timestep_t::B, molfile_timestep_t::beta, mmtkdata::box_size_id, molfile_timestep_t::C, mmtkdata::configuration_id, molfile_timestep_t::coords, cdfdata::curframe, molfile_timestep_t::gamma, mmtkdata::has_box, mmtkdata::minor_step_numberdim, cdfdata::mmtk, MOLFILE_ERROR, MOLFILE_SUCCESS, cdfdata::ncid, and mmtkdata::xyzdim.

Referenced by read_cdf_timestep.

void set_atom_attributes molfile_atom_t   atoms,
int    natoms,
char **    atom_pointers,
char    chain_id,
char *    resname,
int    resnum,
char *    start,
char *    end,
int    name_correction_type
[static]
 

Definition at line 466 of file cdfplugin.c.

References atom_name_remove_underscores, atom_name_replace, molfile_atom_t::chain, molfile_atom_t::name, molfile_atom_t::resid, and molfile_atom_t::resname.

Referenced by read_mmtk_cdf_structure.

VMDPLUGIN_API int VMDPLUGIN_fini void   
 

Definition at line 979 of file cdfplugin.c.

References VMDPLUGIN_API, and VMDPLUGIN_SUCCESS.

VMDPLUGIN_API int VMDPLUGIN_init void   
 

Definition at line 978 of file cdfplugin.c.

References VMDPLUGIN_API, and VMDPLUGIN_SUCCESS.

VMDPLUGIN_API int VMDPLUGIN_register void *    v,
vmdplugin_register_cb    cb
 

Definition at line 980 of file cdfplugin.c.

References VMDPLUGIN_API, vmdplugin_register_cb, and VMDPLUGIN_SUCCESS.


Variable Documentation

molfile_plugin_t cdfplugin [static]
 

Initial value:

 {
  vmdplugin_ABIVERSION,                         
  MOLFILE_PLUGIN_TYPE,                          
  "netcdf",                                     
  "NetCDF (AMBER, MMTK)",                       
  "John E. Stone",                              
  0,                                            
  5,                                            
  VMDPLUGIN_THREADSAFE,                         
  "nc",                                         
  open_cdf_read,
  read_cdf_structure,
  0,
  read_cdf_timestep,
  close_cdf_read,
  0,
  0,
  0,
  0,
}

Definition at line 957 of file cdfplugin.c.


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