Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   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 plugin


Function Documentation

void close_xyz_read void *    mydata [static]
 

Definition at line 184 of file xyzplugin.c.

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

Referenced by VMDPLUGIN_init.

void close_xyz_write void *    mydata [static]
 

Definition at line 247 of file xyzplugin.c.

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

Referenced by VMDPLUGIN_init.

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

Definition at line 61 of file xyzplugin.c.

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

Referenced by VMDPLUGIN_init.

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

Definition at line 192 of file xyzplugin.c.

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

Referenced by VMDPLUGIN_init.

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

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

Referenced by VMDPLUGIN_init.

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

Definition at line 146 of file xyzplugin.c.

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

Referenced by VMDPLUGIN_init.

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 285 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 258 of file xyzplugin.c.

References molfile_plugin_t::close_file_read, molfile_plugin_t::close_file_write, close_xyz_read, close_xyz_write, molfile_plugin_t::filename_extension, MOLFILE_PLUGIN_TYPE, molfile_plugin_t::open_file_read, molfile_plugin_t::open_file_write, open_xyz_read, open_xyz_write, molfile_plugin_t::read_next_timestep, molfile_plugin_t::read_structure, read_xyz_structure, read_xyz_timestep, vmdplugin_ABIVERSION, VMDPLUGIN_API, VMDPLUGIN_SUCCESS, VMDPLUGIN_THREADSAFE, molfile_plugin_t::write_structure, molfile_plugin_t::write_timestep, write_xyz_structure, and write_xyz_timestep.

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 280 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 211 of file xyzplugin.c.

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

Referenced by VMDPLUGIN_init.

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

Definition at line 219 of file xyzplugin.c.

References molfile_atom_t::atomicnumber, xyzdata::atomlist, molfile_timestep_t::coords, xyzdata::file, molfile_atom_t::name, and xyzdata::numatoms.

Referenced by VMDPLUGIN_init.


Variable Documentation

molfile_plugin_t plugin [static]
 

Definition at line 256 of file xyzplugin.c.


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