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

xyzplugin.c File Reference

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

Go to the source code of this file.

Compounds

struct  xyzdata

Functions

void * open_xyz_read (const char *filename, const char *filetype, int *natoms)
int read_xyz_structure (void *mydata, int *optflags, molfile_atom_t *atoms)
int read_xyz_timestep (void *mydata, int natoms, molfile_timestep_t *ts)
void close_xyz_read (void *mydata)
void * open_xyz_write (const char *filename, const char *filetype, int natoms)
int write_xyz_structure (void *mydata, int optflags, const molfile_atom_t *atoms)
int write_xyz_timestep (void *mydata, const molfile_timestep_t *ts)
void close_xyz_write (void *mydata)
VMDPLUGIN_API int VMDPLUGIN_init ()
VMDPLUGIN_API int VMDPLUGIN_register (void *v, vmdplugin_register_cb cb)
VMDPLUGIN_API int VMDPLUGIN_fini ()

Variables

molfile_plugin_t xyzplugin


Function Documentation

void close_xyz_read void *    mydata [static]
 

Definition at line 176 of file xyzplugin.c.

References xyzdata::file, and xyzdata::file_name.

void close_xyz_write void *    mydata [static]
 

Definition at line 232 of file xyzplugin.c.

References xyzdata::atomlist, xyzdata::file, and xyzdata::file_name.

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

Definition at line 55 of file xyzplugin.c.

References xyzdata::file, xyzdata::file_name, and xyzdata::numatoms.

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

Definition at line 184 of file xyzplugin.c.

References xyzdata::file, xyzdata::file_name, and xyzdata::numatoms.

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

Definition at line 83 of file xyzplugin.c.

References molfile_atom_t::atomicnumber, molfile_atom_t::chain, xyzdata::file, xyzdata::file_name, get_pte_idx, get_pte_mass, get_pte_vdw_radius, molfile_atom_t::mass, MOLFILE_ATOMICNUMBER, MOLFILE_ERROR, MOLFILE_MASS, MOLFILE_RADIUS, MOLFILE_SUCCESS, molfile_atom_t::name, xyzdata::numatoms, molfile_atom_t::radius, molfile_atom_t::resid, molfile_atom_t::resname, molfile_atom_t::segid, and molfile_atom_t::type.

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

Definition at line 138 of file xyzplugin.c.

References molfile_timestep_t::coords, xyzdata::file, xyzdata::file_name, MOLFILE_ERROR, and MOLFILE_SUCCESS.

VMDPLUGIN_API int VMDPLUGIN_fini void   
 

The Fini method is called when the application will no longer use any plugins in the library.

Definition at line 274 of file xyzplugin.c.

References VMDPLUGIN_API, and VMDPLUGIN_SUCCESS.

VMDPLUGIN_API int VMDPLUGIN_init void   
 

Init routine: called the first time the library is loaded by the application and before any other API functions are referenced. Return 0 on success.

Definition at line 265 of file xyzplugin.c.

References VMDPLUGIN_API, and VMDPLUGIN_SUCCESS.

VMDPLUGIN_API int VMDPLUGIN_register void *   ,
vmdplugin_register_cb   
 

Allow the library to register plugins with the application. The callback should be called using the passed-in void pointer, which should not be interpreted in any way by the library. Each vmdplugin_t pointer passed to the application should point to statically-allocated or heap-allocated memory and should never be later modified by the plugin. Applications must be permitted to retain only a copy of the the plugin pointer, without making any deep copy of the items in the struct.

Definition at line 269 of file xyzplugin.c.

References VMDPLUGIN_API, vmdplugin_register_cb, and VMDPLUGIN_SUCCESS.

int write_xyz_structure void *    mydata,
int    optflags,
const molfile_atom_t   atoms
[static]
 

Definition at line 203 of file xyzplugin.c.

References xyzdata::atomlist, MOLFILE_SUCCESS, and xyzdata::numatoms.

int write_xyz_timestep void *    mydata,
const molfile_timestep_t   ts
[static]
 

Definition at line 211 of file xyzplugin.c.

References xyzdata::atomlist, molfile_timestep_t::coords, xyzdata::file, MOLFILE_SUCCESS, xyzdata::numatoms, and molfile_atom_t::type.


Variable Documentation

molfile_plugin_t xyzplugin [static]
 

Initial value:

 {
  vmdplugin_ABIVERSION,
  MOLFILE_PLUGIN_TYPE,                         
  "xyz",                                       
  "XYZ",                                       
  "Mauricio Carrillo Tripp, John E. Stone, Axel Kohlmeyer",    
  0,                                           
  9,                                           
  VMDPLUGIN_THREADSAFE,                        
  "xyz",
  open_xyz_read,
  read_xyz_structure,
  0,
  read_xyz_timestep,
  close_xyz_read,
  open_xyz_write,
  write_xyz_structure,
  write_xyz_timestep,
  close_xyz_write,
  0,                            
  0,                            
  0                             
}

Definition at line 241 of file xyzplugin.c.


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