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

psfplugin.c File Reference

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

Go to the source code of this file.

Compounds

struct  psfdata

Defines

#define PSF_RECORD_LENGTH   160

Functions

int get_psf_atom (FILE *f, char *name, char *atype, char *resname, char *segname, int *resid, float *q, float *m, int charmmext)
int start_psf_bonds (FILE *f)
int get_psf_bonds (FILE *f, int nbond, int fromAtom[], int toAtom[], int charmmext)
void * open_psf_read (const char *path, const char *filetype, int *natoms)
int read_psf (void *v, int *optflags, molfile_atom_t *atoms)
int read_bonds (void *v, int *nbonds, int **fromptr, int **toptr, float **bondorder)
void close_psf_read (void *mydata)
void * open_psf_write (const char *path, const char *filetype, int natoms)
int write_psf_structure (void *v, int optflags, const molfile_atom_t *atoms)
int write_bonds (void *v, int nbonds, int *fromptr, int *toptr, float *bondorderptr)
void close_psf_write (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 plugin


Define Documentation

#define PSF_RECORD_LENGTH   160
 

Definition at line 24 of file psfplugin.c.

Referenced by get_psf_atom, get_psf_bonds, open_psf_read, and start_psf_bonds.


Function Documentation

void close_psf_read void *    mydata [static]
 

Definition at line 306 of file psfplugin.c.

References psfdata::fp, psfdata::from, and psfdata::to.

void close_psf_write void *    v [static]
 

Definition at line 454 of file psfplugin.c.

References psfdata::fp, psfdata::from, and psfdata::to.

int get_psf_atom FILE *    f,
char *    name,
char *    atype,
char *    resname,
char *    segname,
int *    resid,
float *    q,
float *    m,
int    charmmext
[static]
 

Definition at line 42 of file psfplugin.c.

References name, and PSF_RECORD_LENGTH.

Referenced by read_psf.

int get_psf_bonds FILE *    f,
int    nbond,
int    fromAtom[],
int    toAtom[],
int    charmmext
[static]
 

Definition at line 144 of file psfplugin.c.

References PSF_RECORD_LENGTH.

Referenced by read_bonds.

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

Definition at line 185 of file psfplugin.c.

References psfdata::charmmcheq, psfdata::charmmcmap, psfdata::charmmext, psfdata::charmmfmt, psfdata::fp, MOLFILE_NUMATOMS_NONE, psfdata::numatoms, and PSF_RECORD_LENGTH.

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

Definition at line 320 of file psfplugin.c.

References psfdata::charmmfmt, psfdata::fp, psfdata::from, psfdata::nbonds, psfdata::numatoms, and psfdata::to.

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

Definition at line 280 of file psfplugin.c.

References psfdata::charmmext, psfdata::fp, psfdata::from, get_psf_bonds, MOLFILE_ERROR, MOLFILE_SUCCESS, start_psf_bonds, and psfdata::to.

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

Definition at line 256 of file psfplugin.c.

References molfile_atom_t::chain, molfile_atom_t::charge, psfdata::charmmext, psfdata::fp, get_psf_atom, molfile_atom_t::mass, MOLFILE_CHARGE, MOLFILE_ERROR, MOLFILE_MASS, MOLFILE_SUCCESS, molfile_atom_t::name, psfdata::numatoms, molfile_atom_t::resid, molfile_atom_t::resname, molfile_atom_t::segid, and molfile_atom_t::type.

int start_psf_bonds FILE *    f [static]
 

Definition at line 123 of file psfplugin.c.

References PSF_RECORD_LENGTH.

Referenced by read_bonds.

VMDPLUGIN_API int VMDPLUGIN_fini void   
 

Definition at line 506 of file psfplugin.c.

References VMDPLUGIN_API, and VMDPLUGIN_SUCCESS.

VMDPLUGIN_API int VMDPLUGIN_init void   
 

Definition at line 497 of file psfplugin.c.

References VMDPLUGIN_API, and VMDPLUGIN_SUCCESS.

VMDPLUGIN_API int VMDPLUGIN_register void *    v,
vmdplugin_register_cb    cb
 

Definition at line 501 of file psfplugin.c.

References VMDPLUGIN_API, vmdplugin_register_cb, and VMDPLUGIN_SUCCESS.

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

Definition at line 440 of file psfplugin.c.

References psfdata::from, MOLFILE_SUCCESS, psfdata::nbonds, and psfdata::to.

int write_psf_structure void *    v,
int    optflags,
const molfile_atom_t   atoms
[static]
 

Definition at line 341 of file psfplugin.c.

References molfile_atom_t::charge, psfdata::charmmfmt, psfdata::fp, psfdata::from, molfile_atom_t::mass, MOLFILE_SUCCESS, molfile_atom_t::name, psfdata::nbonds, psfdata::numatoms, molfile_atom_t::resid, molfile_atom_t::resname, molfile_atom_t::segid, psfdata::to, and molfile_atom_t::type.


Variable Documentation

molfile_plugin_t plugin [static]
 

Initial value:

 {
  vmdplugin_ABIVERSION,              
  MOLFILE_PLUGIN_TYPE,               
  "psf",                             
  "CHARMM,NAMD,XPLOR PSF",           
  "Justin Gullingsrud, John Stone",  
  0,                                 
  7,                                 
  VMDPLUGIN_THREADSAFE,              
  "psf",                             
  open_psf_read,                     
  read_psf,                          
  read_bonds,                        
  0,                                 
  close_psf_read,                    
  open_psf_write,                    
  write_psf_structure,               
  0,                                 
  close_psf_write,                   
  0,                                 
  0,                                 
  0,                                 
  0,                                 
  write_bonds                        
}

Definition at line 471 of file psfplugin.c.


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