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

pqrplugin.c File Reference

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

Go to the source code of this file.

Compounds

struct  pqrdata

Defines

#define PQR_RECORD_LENGTH   80

Enumerations

enum  {
  PQR_REMARK, PQR_ATOM, PQR_UNKNOWN, PQR_END,
  PQR_EOF, PQR_ERROR, PQR_CRYST1
}

Functions

int read_pqr_record (FILE *f, char *retStr)
void get_pqr_cryst1 (const char *record, float *alpha, float *beta, float *gamma, float *a, float *b, float *c)
int get_pqr_fields (char *record, char *name, char *resname, char *chain, char *segname, char *resid, float *x, float *y, float *z, float *charge, float *radius)
int get_pqr_coordinates (char *record, float *x, float *y, float *z)
float get_atom_radius (molfile_atom_t *atom)
int write_pqr_atom (FILE *fd, int index, const molfile_atom_t *atom, float x, float y, float z)
void * open_pqr_read (const char *filepath, const char *filetype, int *natoms)
int read_pqr_structure (void *mydata, int *optflags, molfile_atom_t *atoms)
int read_pqr_timestep (void *v, int natoms, molfile_timestep_t *ts)
void close_pqr_read (void *v)
void * open_pqr_write (const char *path, const char *filetype, int natoms)
int write_pqr_structure (void *v, int optflags, const molfile_atom_t *atoms)
void write_pqr_cryst1 (FILE *fd, const molfile_timestep_t *ts)
int write_pqr_timestep (void *v, const molfile_timestep_t *ts)
void close_pqr_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 PQR_RECORD_LENGTH   80
 

Definition at line 31 of file pqrplugin.c.

Referenced by get_pqr_cryst1, open_pqr_read, read_pqr_record, read_pqr_structure, and read_pqr_timestep.


Enumeration Type Documentation

anonymous enum
 

Enumeration values:
PQR_REMARK 
PQR_ATOM 
PQR_UNKNOWN 
PQR_END 
PQR_EOF 
PQR_ERROR 
PQR_CRYST1 

Definition at line 34 of file pqrplugin.c.


Function Documentation

void close_pqr_read void *    v [static]
 

Definition at line 332 of file pqrplugin.c.

References pqrdata::fd.

Referenced by VMDPLUGIN_init.

void close_pqr_write void *    v [static]
 

Definition at line 412 of file pqrplugin.c.

References pqrdata::atomlist, and pqrdata::fd.

Referenced by VMDPLUGIN_init.

float get_atom_radius molfile_atom_t   atom [static]
 

Definition at line 160 of file pqrplugin.c.

References molfile_atom_t::name, name, and molfile_atom_t::type.

Referenced by write_pqr_structure.

int get_pqr_coordinates char *    record,
float *    x,
float *    y,
float *    z
[static]
 

Definition at line 149 of file pqrplugin.c.

Referenced by read_pqr_timestep.

void get_pqr_cryst1 const char *    record,
float *    alpha,
float *    beta,
float *    gamma,
float *    a,
float *    b,
float *    c
[static]
 

Definition at line 98 of file pqrplugin.c.

References PQR_RECORD_LENGTH.

Referenced by read_pqr_timestep.

int get_pqr_fields char *    record,
char *    name,
char *    resname,
char *    chain,
char *    segname,
char *    resid,
float *    x,
float *    y,
float *    z,
float *    charge,
float *    radius
[static]
 

Definition at line 123 of file pqrplugin.c.

References name.

Referenced by read_pqr_structure.

void* open_pqr_read const char *    filepath,
const char *    filetype,
int *    natoms
[static]
 

Definition at line 194 of file pqrplugin.c.

References pqrdata::fd, pqrdata::natoms, PQR_ATOM, PQR_END, PQR_EOF, PQR_ERROR, PQR_RECORD_LENGTH, and read_pqr_record.

Referenced by VMDPLUGIN_init.

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

Definition at line 341 of file pqrplugin.c.

References pqrdata::atomlist, pqrdata::fd, and pqrdata::natoms.

Referenced by VMDPLUGIN_init.

int read_pqr_record FILE *    f,
char *    retStr
[static]
 

Definition at line 41 of file pqrplugin.c.

References PQR_ATOM, PQR_CRYST1, PQR_END, PQR_EOF, PQR_ERROR, PQR_RECORD_LENGTH, and PQR_UNKNOWN.

Referenced by open_pqr_read, read_pqr_structure, and read_pqr_timestep.

int read_pqr_structure void *    mydata,
int *    optflags,
molfile_atom_t   atoms
[static]
 

Definition at line 234 of file pqrplugin.c.

References molfile_atom_t::chain, molfile_atom_t::charge, pqrdata::fd, get_pqr_fields, MOLFILE_CHARGE, MOLFILE_ERROR, MOLFILE_RADIUS, molfile_atom_t::name, pqrdata::natoms, PQR_ATOM, PQR_END, PQR_EOF, PQR_ERROR, PQR_RECORD_LENGTH, molfile_atom_t::radius, read_pqr_record, molfile_atom_t::resid, molfile_atom_t::resname, molfile_atom_t::segid, and molfile_atom_t::type.

Referenced by VMDPLUGIN_init.

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

Definition at line 280 of file pqrplugin.c.

References molfile_timestep_t::A, molfile_timestep_t::alpha, molfile_timestep_t::B, molfile_timestep_t::beta, molfile_timestep_t::C, molfile_timestep_t::coords, pqrdata::fd, molfile_timestep_t::gamma, get_pqr_coordinates, get_pqr_cryst1, MOLFILE_EOF, MOLFILE_ERROR, pqrdata::natoms, PQR_ATOM, PQR_CRYST1, PQR_END, PQR_EOF, PQR_ERROR, PQR_RECORD_LENGTH, and read_pqr_record.

Referenced by VMDPLUGIN_init.

VMDPLUGIN_API int VMDPLUGIN_fini void   
 

Definition at line 452 of file pqrplugin.c.

References VMDPLUGIN_API, and VMDPLUGIN_SUCCESS.

VMDPLUGIN_API int VMDPLUGIN_init void   
 

Definition at line 425 of file pqrplugin.c.

References molfile_plugin_t::close_file_read, molfile_plugin_t::close_file_write, close_pqr_read, close_pqr_write, molfile_plugin_t::filename_extension, MOLFILE_PLUGIN_TYPE, molfile_plugin_t::open_file_read, molfile_plugin_t::open_file_write, open_pqr_read, open_pqr_write, molfile_plugin_t::read_next_timestep, read_pqr_structure, read_pqr_timestep, molfile_plugin_t::read_structure, vmdplugin_ABIVERSION, VMDPLUGIN_API, VMDPLUGIN_SUCCESS, VMDPLUGIN_THREADSAFE, write_pqr_structure, write_pqr_timestep, molfile_plugin_t::write_structure, and molfile_plugin_t::write_timestep.

VMDPLUGIN_API int VMDPLUGIN_register void *    v,
vmdplugin_register_cb    cb
 

Definition at line 447 of file pqrplugin.c.

References VMDPLUGIN_API, vmdplugin_register_cb, and VMDPLUGIN_SUCCESS.

int write_pqr_atom FILE *    fd,
int    index,
const molfile_atom_t   atom,
float    x,
float    y,
float    z
[static]
 

Definition at line 172 of file pqrplugin.c.

References molfile_atom_t::charge, molfile_atom_t::name, molfile_atom_t::radius, molfile_atom_t::resid, and molfile_atom_t::resname.

Referenced by write_pqr_timestep.

void write_pqr_cryst1 FILE *    fd,
const molfile_timestep_t   ts
[static]
 

Definition at line 381 of file pqrplugin.c.

References molfile_timestep_t::A, molfile_timestep_t::alpha, molfile_timestep_t::B, molfile_timestep_t::beta, molfile_timestep_t::C, and molfile_timestep_t::gamma.

Referenced by write_pqr_timestep.

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

Definition at line 358 of file pqrplugin.c.

References pqrdata::atomlist, molfile_atom_t::charge, get_atom_radius, MOLFILE_CHARGE, MOLFILE_RADIUS, pqrdata::natoms, and molfile_atom_t::radius.

Referenced by VMDPLUGIN_init.

int write_pqr_timestep void *    v,
const molfile_timestep_t   ts
[static]
 

Definition at line 386 of file pqrplugin.c.

References pqrdata::atomlist, molfile_timestep_t::coords, pqrdata::fd, MOLFILE_ERROR, pqrdata::natoms, write_pqr_atom, and write_pqr_cryst1.

Referenced by VMDPLUGIN_init.


Variable Documentation

molfile_plugin_t plugin [static]
 

Definition at line 423 of file pqrplugin.c.


Generated on Tue Aug 11 03:06:51 2020 for VMD Plugins (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002