Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

xbgfplugin.C File Reference

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

Go to the source code of this file.

Compounds

struct  xbgfdata

Defines

#define LINESIZE   256
#define MAXBONDS   16

Functions

void * open_xbgf_read (const char *path, const char *filetype, int *natoms)
void adjust_xbgf_field_string (char *field)
void get_xbgf_coordinates (const char *record, float *x, float *y, float *z)
void get_xbgf_fields (const char *record, char *name, char *resname, char *chain, char *segname, float *occupancy, float *bfactor, int *elementindex, int *resid, char *type, float *charge, float *x, float *y, float *z, char *insert)
int read_xbgf_structure (void *v, int *optflags, molfile_atom_t *atoms)
int read_xbgf_timestep (void *v, int natoms, molfile_timestep_t *ts)
void * open_xbgf_write (const char *filename, const char *filetype, int natoms)
int write_xbgf_structure (void *mydata, int optflags, const molfile_atom_t *atoms)
int read_xbgf_bonds_aux (void *v, int *nbonds, int **fromptr, int **toptr, float **bondorderptr)
int read_xbgf_bonds (void *v, int *nbonds, int **fromptr, int **toptr, float **bondorderptr, int **bondtype, int *nbondtypes, char ***bondtypename)
int write_xbgf_timestep (void *mydata, const molfile_timestep_t *ts)
int write_xbgf_bonds (void *v, int nbonds, int *fromptr, int *toptr, float *bondorderptr, int *bondtype, int nbondtypes, char **bondtypename)
void close_xbgf_write (void *mydata)
void close_xbgf_read (void *v)
int read_xbgf_molecule_metadata (void *v, molfile_metadata_t **metadata)
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


Define Documentation

#define LINESIZE   256
 

Definition at line 28 of file xbgfplugin.C.

Referenced by open_xbgf_read, read_xbgf_bonds_aux, read_xbgf_structure, and read_xbgf_timestep.

#define MAXBONDS   16
 

Definition at line 29 of file xbgfplugin.C.

Referenced by read_xbgf_bonds_aux, and write_xbgf_timestep.


Function Documentation

void adjust_xbgf_field_string char *    field [static]
 

Definition at line 117 of file xbgfplugin.C.

Referenced by get_xbgf_fields.

void close_xbgf_read void *    v [static]
 

Definition at line 646 of file xbgfplugin.C.

References xbgfdata::bondorder, xbgfdata::file, xbgfdata::from, xbgfdata::meta, molfile_metadata_t::remarks, and xbgfdata::to.

Referenced by VMDPLUGIN_init.

void close_xbgf_write void *    mydata [static]
 

Definition at line 627 of file xbgfplugin.C.

References xbgfdata::atomlist, xbgfdata::bondorder, xbgfdata::file, xbgfdata::from, and xbgfdata::to.

Referenced by VMDPLUGIN_init.

void get_xbgf_coordinates const char *    record,
float *    x,
float *    y,
float *    z
[static]
 

Definition at line 133 of file xbgfplugin.C.

Referenced by get_xbgf_fields, and read_xbgf_timestep.

void get_xbgf_fields const char *    record,
char *    name,
char *    resname,
char *    chain,
char *    segname,
float *    occupancy,
float *    bfactor,
int *    elementindex,
int *    resid,
char *    type,
float *    charge,
float *    x,
float *    y,
float *    z,
char *    insert
[static]
 

Definition at line 154 of file xbgfplugin.C.

References adjust_xbgf_field_string, get_xbgf_coordinates, and name.

Referenced by read_xbgf_structure.

void* open_xbgf_read const char *    path,
const char *    filetype,
int *    natoms
[static]
 

Definition at line 43 of file xbgfplugin.C.

References xbgfdata::bondorder, xbgfdata::coords_read, xbgfdata::file, xbgfdata::from, LINESIZE, xbgfdata::meta, MOLFILE_ATOMICNUMBER, MOLFILE_BFACTOR, MOLFILE_CHARGE, MOLFILE_INSERTION, MOLFILE_OCCUPANCY, xbgfdata::natoms, xbgfdata::nbonds, xbgfdata::optflags, molfile_metadata_t::remarklen, molfile_metadata_t::remarks, and xbgfdata::to.

Referenced by VMDPLUGIN_init.

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

Definition at line 315 of file xbgfplugin.C.

References xbgfdata::file, xbgfdata::natoms, and xbgfdata::nbonds.

Referenced by VMDPLUGIN_init.

int read_xbgf_bonds void *    v,
int *    nbonds,
int **    fromptr,
int **    toptr,
float **    bondorderptr,
int **    bondtype,
int *    nbondtypes,
char ***    bondtypename
[static]
 

Definition at line 468 of file xbgfplugin.C.

References xbgfdata::bondorder, xbgfdata::file, xbgfdata::from, MOLFILE_ERROR, xbgfdata::nbonds, read_xbgf_bonds_aux, and xbgfdata::to.

Referenced by VMDPLUGIN_init.

int read_xbgf_bonds_aux void *    v,
int *    nbonds,
int **    fromptr,
int **    toptr,
float **    bondorderptr
[static]
 

Definition at line 345 of file xbgfplugin.C.

References xbgfdata::bondorder, xbgfdata::file, xbgfdata::from, LINESIZE, MAXBONDS, MOLFILE_ERROR, xbgfdata::nbonds, and xbgfdata::to.

Referenced by read_xbgf_bonds.

int read_xbgf_molecule_metadata void *    v,
molfile_metadata_t **    metadata
[static]
 

Definition at line 664 of file xbgfplugin.C.

References xbgfdata::meta.

Referenced by VMDPLUGIN_init.

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

Definition at line 224 of file xbgfplugin.C.

References molfile_atom_t::atomicnumber, molfile_atom_t::bfactor, molfile_atom_t::chain, molfile_atom_t::charge, xbgfdata::file, get_xbgf_fields, molfile_atom_t::insertion, LINESIZE, MOLFILE_ERROR, molfile_atom_t::name, xbgfdata::natoms, molfile_atom_t::occupancy, xbgfdata::optflags, molfile_atom_t::resid, molfile_atom_t::resname, molfile_atom_t::segid, and molfile_atom_t::type.

Referenced by VMDPLUGIN_init.

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

Definition at line 267 of file xbgfplugin.C.

References molfile_timestep_t::coords, xbgfdata::coords_read, xbgfdata::file, get_xbgf_coordinates, LINESIZE, MOLFILE_EOF, MOLFILE_ERROR, and xbgfdata::natoms.

Referenced by VMDPLUGIN_init.

VMDPLUGIN_API int VMDPLUGIN_fini void   
 

Definition at line 703 of file xbgfplugin.C.

References VMDPLUGIN_API, and VMDPLUGIN_SUCCESS.

VMDPLUGIN_API int VMDPLUGIN_init void   
 

Definition at line 673 of file xbgfplugin.C.

References molfile_plugin_t::close_file_read, molfile_plugin_t::close_file_write, close_xbgf_read, close_xbgf_write, molfile_plugin_t::filename_extension, MOLFILE_PLUGIN_TYPE, molfile_plugin_t::open_file_read, molfile_plugin_t::open_file_write, open_xbgf_read, open_xbgf_write, molfile_plugin_t::read_bonds, molfile_plugin_t::read_molecule_metadata, molfile_plugin_t::read_next_timestep, molfile_plugin_t::read_structure, read_xbgf_bonds, read_xbgf_molecule_metadata, read_xbgf_structure, read_xbgf_timestep, vmdplugin_ABIVERSION, VMDPLUGIN_API, VMDPLUGIN_SUCCESS, VMDPLUGIN_THREADSAFE, molfile_plugin_t::write_bonds, molfile_plugin_t::write_structure, molfile_plugin_t::write_timestep, write_xbgf_bonds, write_xbgf_structure, and write_xbgf_timestep.

VMDPLUGIN_API int VMDPLUGIN_register void *    v,
vmdplugin_register_cb    cb
 

Definition at line 698 of file xbgfplugin.C.

References VMDPLUGIN_API, vmdplugin_register_cb, and VMDPLUGIN_SUCCESS.

int write_xbgf_bonds void *    v,
int    nbonds,
int *    fromptr,
int *    toptr,
float *    bondorderptr,
int *    bondtype,
int    nbondtypes,
char **    bondtypename
[static]
 

Definition at line 600 of file xbgfplugin.C.

References xbgfdata::bondorder, xbgfdata::from, xbgfdata::nbonds, and xbgfdata::to.

Referenced by VMDPLUGIN_init.

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

Definition at line 335 of file xbgfplugin.C.

References xbgfdata::atomlist, and xbgfdata::natoms.

Referenced by VMDPLUGIN_init.

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

Definition at line 504 of file xbgfplugin.C.

References molfile_atom_t::atomicnumber, xbgfdata::atomlist, molfile_atom_t::bfactor, xbgfdata::bondorder, molfile_atom_t::chain, molfile_atom_t::charge, molfile_timestep_t::coords, xbgfdata::file, xbgfdata::from, MAXBONDS, molfile_atom_t::name, xbgfdata::natoms, xbgfdata::nbonds, molfile_atom_t::occupancy, molfile_atom_t::resid, molfile_atom_t::resname, molfile_atom_t::segid, xbgfdata::to, and molfile_atom_t::type.

Referenced by VMDPLUGIN_init.


Variable Documentation

molfile_plugin_t plugin [static]
 

Definition at line 671 of file xbgfplugin.C.


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