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

psfplugin.c File Reference

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

Go to the source code of this file.

Compounds

struct  psfdata

Defines

#define PSF_RECORD_LENGTH   256

Functions

int strnwscpy_shift (char *target, const char *source, const int len, const int maxlen)
int atoifw (char **ptr, int fw)
int get_psf_atom (FILE *f, char *name, char *atype, char *resname, char *segname, int *resid, char *insertion, float *q, float *m, int namdfmt, int charmmext, int charmmdrude)
int psf_start_block (FILE *file, const char *blockname)
int psf_get_bonds (FILE *f, int nbond, int fromAtom[], int toAtom[], int charmmext, int namdfmt)
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, int **bondtype, int *nbondtypes, char ***bondtypename)
int psf_get_angles (FILE *f, int n, int *angles, int charmmext)
int psf_get_dihedrals_impropers (FILE *f, int n, int *dihedrals, int charmmext)
int read_angles (void *v, int *numangles, int **angles, double **angleforces, int *numdihedrals, int **dihedrals, double **dihedralforces, int *numimpropers, int **impropers, double **improperforces, int *numcterms, int **cterms, int *ctermcols, int *ctermrows, double **ctermforces)
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, int *bondtype, int nbondtypes, char **bondtypename)
int write_angles (void *v, int numangles, const int *angles, const double *angleforces, int numdihedrals, const int *dihedrals, const double *dihedralforces, int numimpropers, const int *impropers, const double *improperforces, int numcterms, const int *cterms, int ctermcols, int ctermrows, const double *ctermforces)
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   256
 

Definition at line 27 of file psfplugin.c.

Referenced by get_psf_atom, open_psf_read, psf_get_angles, psf_get_bonds, psf_get_dihedrals_impropers, and psf_start_block.


Function Documentation

int atoifw char **    ptr,
int    fw
[static]
 

Definition at line 88 of file psfplugin.c.

Referenced by psf_get_angles, psf_get_bonds, and psf_get_dihedrals_impropers.

void close_psf_read void *    mydata [static]
 

Definition at line 708 of file psfplugin.c.

References psfdata::angles, psfdata::cterms, psfdata::dihedrals, psfdata::fp, psfdata::from, psfdata::impropers, and psfdata::to.

Referenced by VMDPLUGIN_init.

void close_psf_write void *    v [static]
 

Definition at line 1059 of file psfplugin.c.

References psfdata::angles, psfdata::cterms, psfdata::dihedrals, psfdata::fp, psfdata::from, psfdata::impropers, and psfdata::to.

Referenced by VMDPLUGIN_init.

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

Definition at line 115 of file psfplugin.c.

References name, PSF_RECORD_LENGTH, strnwscpy, and strnwscpy_shift.

Referenced by read_psf.

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

Definition at line 351 of file psfplugin.c.

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

Referenced by VMDPLUGIN_init.

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

Definition at line 737 of file psfplugin.c.

References psfdata::charmmcheq, psfdata::charmmcmap, psfdata::charmmdrude, psfdata::charmmext, psfdata::charmmfmt, psfdata::fp, psfdata::from, psfdata::namdfmt, psfdata::nbonds, psfdata::numatoms, and psfdata::to.

Referenced by VMDPLUGIN_init.

int psf_get_angles FILE *    f,
int    n,
int *    angles,
int    charmmext
[static]
 

Definition at line 503 of file psfplugin.c.

References atoifw, and PSF_RECORD_LENGTH.

Referenced by read_angles.

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

Definition at line 282 of file psfplugin.c.

References atoifw, and PSF_RECORD_LENGTH.

Referenced by read_bonds.

int psf_get_dihedrals_impropers FILE *    f,
int    n,
int *    dihedrals,
int    charmmext
[static]
 

Definition at line 530 of file psfplugin.c.

References atoifw, and PSF_RECORD_LENGTH.

Referenced by read_angles.

int psf_start_block FILE *    file,
const char *    blockname
[static]
 

Definition at line 256 of file psfplugin.c.

References PSF_RECORD_LENGTH.

Referenced by read_angles, and read_bonds.

int read_angles void *    v,
int *    numangles,
int **    angles,
double **    angleforces,
int *    numdihedrals,
int **    dihedrals,
double **    dihedralforces,
int *    numimpropers,
int **    impropers,
double **    improperforces,
int *    numcterms,
int **    cterms,
int *    ctermcols,
int *    ctermrows,
double **    ctermforces
[static]
 

Definition at line 643 of file psfplugin.c.

References psfdata::angles, psfdata::cterms, psfdata::dihedrals, psfdata::fp, psfdata::impropers, psfdata::numangles, psfdata::numcterms, psfdata::numdihedrals, psfdata::numimpropers, psf_get_angles, psf_get_dihedrals_impropers, and psf_start_block.

Referenced by VMDPLUGIN_init.

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

Definition at line 466 of file psfplugin.c.

References psfdata::charmmext, psfdata::fp, psfdata::from, MOLFILE_ERROR, psfdata::namdfmt, psf_get_bonds, psf_start_block, and psfdata::to.

Referenced by VMDPLUGIN_init.

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

Definition at line 440 of file psfplugin.c.

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

Referenced by VMDPLUGIN_init.

int strnwscpy_shift char *    target,
const char *    source,
const int    len,
const int    maxlen
[static]
 

Definition at line 61 of file psfplugin.c.

Referenced by get_psf_atom.

VMDPLUGIN_API int VMDPLUGIN_fini void   
 

Definition at line 1124 of file psfplugin.c.

References VMDPLUGIN_API, and VMDPLUGIN_SUCCESS.

VMDPLUGIN_API int VMDPLUGIN_init void   
 

Definition at line 1091 of file psfplugin.c.

References molfile_plugin_t::close_file_read, molfile_plugin_t::close_file_write, close_psf_read, close_psf_write, molfile_plugin_t::filename_extension, MOLFILE_PLUGIN_TYPE, molfile_plugin_t::open_file_read, molfile_plugin_t::open_file_write, open_psf_read, open_psf_write, read_angles, molfile_plugin_t::read_angles, read_bonds, molfile_plugin_t::read_bonds, read_psf, molfile_plugin_t::read_structure, vmdplugin_ABIVERSION, VMDPLUGIN_API, VMDPLUGIN_SUCCESS, VMDPLUGIN_THREADSAFE, write_angles, molfile_plugin_t::write_angles, write_bonds, molfile_plugin_t::write_bonds, write_psf_structure, and molfile_plugin_t::write_structure.

VMDPLUGIN_API int VMDPLUGIN_register void *    v,
vmdplugin_register_cb    cb
 

Definition at line 1119 of file psfplugin.c.

References VMDPLUGIN_API, vmdplugin_register_cb, and VMDPLUGIN_SUCCESS.

int write_angles void *    v,
int    numangles,
const int *    angles,
const double *    angleforces,
int    numdihedrals,
const int *    dihedrals,
const double *    dihedralforces,
int    numimpropers,
const int *    impropers,
const double *    improperforces,
int    numcterms,
const int *    cterms,
int    ctermcols,
int    ctermrows,
const double *    ctermforces
[static]
 

Definition at line 1029 of file psfplugin.c.

References psfdata::angles, psfdata::cterms, psfdata::dihedrals, psfdata::impropers, psfdata::numangles, psfdata::numcterms, psfdata::numdihedrals, and psfdata::numimpropers.

Referenced by VMDPLUGIN_init.

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

Definition at line 981 of file psfplugin.c.

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

Referenced by VMDPLUGIN_init.

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

Definition at line 763 of file psfplugin.c.

References psfdata::angles, molfile_atom_t::charge, psfdata::charmmcmap, psfdata::charmmext, psfdata::charmmfmt, psfdata::cterms, psfdata::dihedrals, psfdata::fp, psfdata::from, psfdata::impropers, molfile_atom_t::mass, psfdata::namdfmt, molfile_atom_t::name, name, psfdata::nbonds, psfdata::numangles, psfdata::numatoms, psfdata::numcterms, psfdata::numdihedrals, psfdata::numimpropers, molfile_atom_t::resid, molfile_atom_t::resname, molfile_atom_t::segid, psfdata::to, and molfile_atom_t::type.

Referenced by VMDPLUGIN_init.


Variable Documentation

molfile_plugin_t plugin [static]
 

Definition at line 1089 of file psfplugin.c.


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