Main Page   Alphabetical List   Compound List   File List   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

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, float *occupancy, float *bfactor, int *elementindex, int *resid, char *type, float *charge, float *x, float *y, float *z, char *insert)
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)
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)
int read_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 bgfplugin


Define Documentation

#define LINESIZE   256
 

Definition at line 28 of file xbgfplugin.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 114 of file xbgfplugin.C.

Referenced by get_bgf_fields.

void close_bgf_read void *    v [static]
 

Definition at line 607 of file xbgfplugin.C.

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

void close_bgf_write void *    mydata [static]
 

Definition at line 594 of file xbgfplugin.C.

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

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

Definition at line 130 of file xbgfplugin.C.

Referenced by get_bgf_fields, and read_bgf_timestep.

void get_bgf_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 151 of file xbgfplugin.C.

References adjust_bgf_field_string, get_bgf_coordinates, and name.

Referenced by read_bgf_structure.

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

Definition at line 42 of file xbgfplugin.C.

References 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.

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

Definition at line 312 of file xbgfplugin.C.

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

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

Definition at line 339 of file xbgfplugin.C.

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

Referenced by read_bonds.

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

Definition at line 221 of file xbgfplugin.C.

References molfile_atom_t::atomicnumber, molfile_atom_t::bfactor, molfile_atom_t::chain, molfile_atom_t::charge, xbgfdata::file, get_bgf_fields, molfile_atom_t::insertion, LINESIZE, MOLFILE_ERROR, MOLFILE_SUCCESS, 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.

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

Definition at line 264 of file xbgfplugin.C.

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

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

Definition at line 467 of file xbgfplugin.C.

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

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

Definition at line 625 of file xbgfplugin.C.

References xbgfdata::meta, and MOLFILE_SUCCESS.

VMDPLUGIN_API int VMDPLUGIN_fini void   
 

Definition at line 667 of file xbgfplugin.C.

References VMDPLUGIN_API, and VMDPLUGIN_SUCCESS.

VMDPLUGIN_API int VMDPLUGIN_init void   
 

Definition at line 658 of file xbgfplugin.C.

References VMDPLUGIN_API, and VMDPLUGIN_SUCCESS.

VMDPLUGIN_API int VMDPLUGIN_register void *    v,
vmdplugin_register_cb    cb
 

Definition at line 662 of file xbgfplugin.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 330 of file xbgfplugin.C.

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

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

Definition at line 495 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, MOLFILE_SUCCESS, 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.

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

Definition at line 576 of file xbgfplugin.C.

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


Variable Documentation

molfile_plugin_t bgfplugin [static]
 

Initial value:

 {
  vmdplugin_ABIVERSION,
  MOLFILE_PLUGIN_TYPE,                      
  "xbgf",                                    
  "Internal Paratool Format",
  "Peter Freddolino ",    
  0,                                        
  6,                                        
  VMDPLUGIN_THREADSAFE,                     
  "xbgf",
  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,
  read_molecule_metadata,
  write_bonds  
}

Definition at line 632 of file xbgfplugin.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