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

bgfplugin.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  bgfdata

Defines

#define LINESIZE   256

Functions

void * open_bgf_read (const char *path, const char *filetype, int *natoms)
void adjust_bgf_field_string (char *field)
void get_bgf_coordinates (const char *record, float *x, float *y, float *z)
void get_bgf_fields (const char *record, char *name, char *resname, char *chain, char *segname, int *resid, char *type, float *charge, float *x, float *y, float *z)
int read_bgf_structure (void *v, int *optflags, molfile_atom_t *atoms)
int read_bgf_timestep (void *v, int natoms, molfile_timestep_t *ts)
void * open_bgf_write (const char *filename, const char *filetype, int natoms)
int write_bgf_structure (void *mydata, int optflags, const molfile_atom_t *atoms)
void getatomfield (char *atomfield, const char *resname)
void getdreiidff (char *outputtype, const char *psftype, int &numbonds, int &lp)
int read_bgf_bonds (void *v, int *nbonds, int **fromptr, int **toptr, float **bondorderptr)
int read_bonds (void *v, int *nbonds, int **fromptr, int **toptr, float **bondorderptr)
int write_bgf_timestep (void *mydata, const molfile_timestep_t *ts)
int write_bonds (void *v, int nbonds, int *fromptr, int *toptr, float *bondorderptr)
void close_bgf_write (void *mydata)
void close_bgf_read (void *v)
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 bgfplugin


Define Documentation

#define LINESIZE   256
 

Definition at line 28 of file bgfplugin.C.

Referenced by open_bgf_read, read_bgf_bonds, read_bgf_structure, and read_bgf_timestep.


Function Documentation

void adjust_bgf_field_string char *    field [static]
 

Definition at line 91 of file bgfplugin.C.

void close_bgf_read void *    v [static]
 

Definition at line 652 of file bgfplugin.C.

References bgfdata::bondorder, bgfdata::file, bgfdata::from, and bgfdata::to.

void close_bgf_write void *    mydata [static]
 

Definition at line 639 of file bgfplugin.C.

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

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

Definition at line 108 of file bgfplugin.C.

void get_bgf_fields const char *    record,
char *    name,
char *    resname,
char *    chain,
char *    segname,
int *    resid,
char *    type,
float *    charge,
float *    x,
float *    y,
float *    z
[static]
 

Definition at line 129 of file bgfplugin.C.

References adjust_bgf_field_string, get_bgf_coordinates, and name.

void getatomfield char *    atomfield,
const char *    resname
 

Definition at line 293 of file bgfplugin.C.

Referenced by write_bgf_timestep.

void getdreiidff char *    outputtype,
const char *    psftype,
int &    numbonds,
int &    lp
[static]
 

Definition at line 301 of file bgfplugin.C.

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

Definition at line 40 of file bgfplugin.C.

References bgfdata::bondorder, bgfdata::coords_read, bgfdata::file, bgfdata::from, LINESIZE, MOLFILE_CHARGE, MOLFILE_INSERTION, bgfdata::natoms, bgfdata::nbonds, bgfdata::optflags, and bgfdata::to.

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

Definition at line 268 of file bgfplugin.C.

References bgfdata::file, and bgfdata::natoms.

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

Definition at line 368 of file bgfplugin.C.

References bgfdata::bondorder, bgfdata::file, bgfdata::from, LINESIZE, MOLFILE_ERROR, MOLFILE_SUCCESS, bgfdata::nbonds, and bgfdata::to.

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

Definition at line 176 of file bgfplugin.C.

References molfile_atom_t::chain, molfile_atom_t::charge, bgfdata::file, get_bgf_fields, LINESIZE, MOLFILE_ERROR, MOLFILE_SUCCESS, molfile_atom_t::name, bgfdata::natoms, bgfdata::optflags, molfile_atom_t::resid, molfile_atom_t::resname, molfile_atom_t::segid, and molfile_atom_t::type.

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

Definition at line 220 of file bgfplugin.C.

References molfile_timestep_t::coords, bgfdata::coords_read, bgfdata::file, get_bgf_coordinates, LINESIZE, MOLFILE_EOF, MOLFILE_ERROR, MOLFILE_SUCCESS, and bgfdata::natoms.

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

Definition at line 499 of file bgfplugin.C.

References bgfdata::bondorder, bgfdata::file, bgfdata::from, MOLFILE_ERROR, MOLFILE_SUCCESS, bgfdata::nbonds, read_bgf_bonds, and bgfdata::to.

VMDPLUGIN_API int VMDPLUGIN_fini void   
 

Definition at line 699 of file bgfplugin.C.

References VMDPLUGIN_API, and VMDPLUGIN_SUCCESS.

VMDPLUGIN_API int VMDPLUGIN_init void   
 

Definition at line 690 of file bgfplugin.C.

References VMDPLUGIN_API, and VMDPLUGIN_SUCCESS.

VMDPLUGIN_API int VMDPLUGIN_register void *    v,
vmdplugin_register_cb    cb
 

Definition at line 694 of file bgfplugin.C.

References VMDPLUGIN_API, vmdplugin_register_cb, and VMDPLUGIN_SUCCESS.

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

Definition at line 285 of file bgfplugin.C.

References bgfdata::atomlist, MOLFILE_SUCCESS, and bgfdata::natoms.

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

Definition at line 528 of file bgfplugin.C.

References bgfdata::atomlist, bgfdata::bondorder, molfile_atom_t::chain, molfile_atom_t::charge, molfile_timestep_t::coords, bgfdata::file, bgfdata::from, getatomfield, MOLFILE_SUCCESS, molfile_atom_t::name, bgfdata::natoms, bgfdata::nbonds, molfile_atom_t::resid, molfile_atom_t::resname, bgfdata::to, and molfile_atom_t::type.

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

Definition at line 622 of file bgfplugin.C.

References bgfdata::bondorder, bgfdata::from, MOLFILE_SUCCESS, bgfdata::nbonds, and bgfdata::to.


Variable Documentation

molfile_plugin_t bgfplugin [static]
 

Initial value:

 {
  vmdplugin_ABIVERSION,
  MOLFILE_PLUGIN_TYPE,                      
  "bgf",                                    
  "MSI Biograf Format",
  "Peter Freddolino ",    
  0,                                        
  9,                                        
  VMDPLUGIN_THREADSAFE,                     
  "bgf",
  open_bgf_read,
  read_bgf_structure,
  read_bonds,
  read_bgf_timestep,
  close_bgf_read,
  open_bgf_write,
  write_bgf_structure,
  write_bgf_timestep,
  close_bgf_write,
  0,                            
  0,                            
  0,
  0,
  write_bonds  
}

Definition at line 664 of file bgfplugin.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