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

gromacsplugin.C File Reference

#include "largefiles.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "Gromacs.h"
#include "molfile_plugin.h"

Go to the source code of this file.

Compounds

struct  gmxdata

Defines

#define M_PI   3.14159265358979323846
#define GROMACS_PLUGIN_MAJOR_VERSION   1
#define GROMACS_PLUGIN_MINOR_VERSION   3

Functions

void convert_vmd_box_for_writing (const molfile_timestep_t *ts, float *x, float *y, float *z)
void * open_gro_read (const char *filename, const char *, int *natoms)
int read_gro_structure (void *mydata, int *optflags, molfile_atom_t *atoms)
int read_gro_molecule_metadata (void *v, molfile_metadata_t **metadata)
int read_gro_timestep (void *v, int natoms, molfile_timestep_t *ts)
void close_gro_read (void *v)
void * open_gro_write (const char *filename, const char *filetype, int natoms)
int write_gro_structure (void *v, int optflags, const molfile_atom_t *atoms)
int write_gro_timestep (void *v, const molfile_timestep_t *ts)
void close_gro_write (void *v)
void * open_g96_read (const char *filename, const char *, int *natoms)
int read_g96_structure (void *mydata, int *optflags, molfile_atom_t *atoms)
int read_g96_timestep (void *v, int natoms, molfile_timestep_t *ts)
void close_g96_read (void *v)
void * open_trr_read (const char *filename, const char *filetype, int *natoms)
int read_trr_timestep (void *v, int natoms, molfile_timestep_t *ts)
void close_trr_read (void *v)
void * open_trr_write (const char *filename, const char *filetype, int natoms)
int write_trr_timestep (void *mydata, const molfile_timestep_t *ts)
void close_trr_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 gro_plugin
molfile_plugin_t g96_plugin
molfile_plugin_t trr_plugin
molfile_plugin_t xtc_plugin
molfile_plugin_t trj_plugin


Define Documentation

#define GROMACS_PLUGIN_MAJOR_VERSION   1
 

Definition at line 629 of file gromacsplugin.C.

Referenced by VMDPLUGIN_init.

#define GROMACS_PLUGIN_MINOR_VERSION   3
 

Definition at line 630 of file gromacsplugin.C.

Referenced by VMDPLUGIN_init.

#define M_PI   3.14159265358979323846
 

Definition at line 33 of file gromacsplugin.C.

Referenced by convert_vmd_box_for_writing, and write_trr_timestep.


Function Documentation

void close_g96_read void *    v [static]
 

Definition at line 425 of file gromacsplugin.C.

References mdio_close, and gmxdata::mf.

Referenced by VMDPLUGIN_init.

void close_gro_read void *    v [static]
 

Definition at line 166 of file gromacsplugin.C.

References mdio_close, gmxdata::meta, and gmxdata::mf.

Referenced by VMDPLUGIN_init.

void close_gro_write void *    v [static]
 

Definition at line 257 of file gromacsplugin.C.

References gmxdata::atomlist, mdio_close, gmxdata::meta, and gmxdata::mf.

Referenced by VMDPLUGIN_init.

void close_trr_read void *    v [static]
 

Definition at line 514 of file gromacsplugin.C.

References mdio_close, and gmxdata::mf.

Referenced by VMDPLUGIN_init.

void close_trr_write void *    v [static]
 

Definition at line 623 of file gromacsplugin.C.

References mdio_close, and gmxdata::mf.

Referenced by VMDPLUGIN_init.

void convert_vmd_box_for_writing const molfile_timestep_t   ts,
float *    x,
float *    y,
float *    z
[static]
 

Definition at line 49 of file gromacsplugin.C.

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

Referenced by write_gro_timestep.

void* open_g96_read const char *    filename,
const char *   ,
int *    natoms
[static]
 

Definition at line 266 of file gromacsplugin.C.

References g96_countatoms, g96_header, MAX_G96_LINE, MAX_MDIO_TITLE, MDFMT_G96, mdio_errmsg, mdio_errno, mdio_open, mdio_readline, gmxdata::mf, gmxdata::natoms, md_header::timeval, and md_header::title.

Referenced by VMDPLUGIN_init.

void* open_gro_read const char *    filename,
const char *   ,
int *    natoms
[static]
 

Definition at line 69 of file gromacsplugin.C.

References gro_header, MAX_MDIO_TITLE, MDFMT_GRO, mdio_errmsg, mdio_errno, mdio_open, gmxdata::meta, gmxdata::mf, gmxdata::natoms, md_header::natoms, gmxdata::timeval, md_header::timeval, molfile_metadata_t::title, and md_header::title.

Referenced by VMDPLUGIN_init.

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

Definition at line 174 of file gromacsplugin.C.

References MDFMT_GRO, mdio_errmsg, mdio_errno, mdio_open, MDIO_WRITE, gmxdata::meta, gmxdata::mf, gmxdata::natoms, gmxdata::step, and molfile_metadata_t::title.

Referenced by VMDPLUGIN_init.

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

Definition at line 436 of file gromacsplugin.C.

References MDFMT_TRJ, MDFMT_TRR, MDFMT_XTC, mdio_close, mdio_errmsg, mdio_errno, mdio_header, mdio_open, gmxdata::mf, gmxdata::natoms, and md_header::natoms.

Referenced by VMDPLUGIN_init.

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

Definition at line 521 of file gromacsplugin.C.

References host_is_little_endian, MDFMT_TRR, MDFMT_XTC, mdio_errmsg, mdio_errno, mdio_open, MDIO_WRITE, gmxdata::mf, gmxdata::natoms, md_file::prec, md_file::rev, and gmxdata::step.

Referenced by VMDPLUGIN_init.

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

Definition at line 316 of file gromacsplugin.C.

References md_atom::atomname, molfile_atom_t::chain, md_file::f, g96_rec, MAX_G96_LINE, mdio_errmsg, mdio_errno, mdio_readline, gmxdata::mf, MOLFILE_ERROR, MOLFILE_NOOPTIONS, molfile_atom_t::name, gmxdata::natoms, md_atom::resid, molfile_atom_t::resid, md_atom::resname, molfile_atom_t::resname, molfile_atom_t::segid, and molfile_atom_t::type.

Referenced by VMDPLUGIN_init.

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

Definition at line 401 of file gromacsplugin.C.

References md_box::A, molfile_timestep_t::A, md_box::alpha, molfile_timestep_t::alpha, md_box::B, molfile_timestep_t::B, md_box::beta, molfile_timestep_t::beta, md_ts::box, md_box::C, molfile_timestep_t::C, molfile_timestep_t::coords, md_box::gamma, molfile_timestep_t::gamma, mdio_timestep, mdio_tsfree, gmxdata::mf, MOLFILE_ERROR, gmxdata::natoms, md_ts::natoms, and md_ts::pos.

Referenced by VMDPLUGIN_init.

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

Definition at line 137 of file gromacsplugin.C.

References gmxdata::meta.

Referenced by VMDPLUGIN_init.

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

Definition at line 103 of file gromacsplugin.C.

References md_atom::atomname, molfile_atom_t::chain, md_file::f, gro_rec, MAX_GRO_LINE, mdio_errmsg, mdio_errno, mdio_readline, gmxdata::mf, MOLFILE_ERROR, MOLFILE_NOOPTIONS, molfile_atom_t::name, gmxdata::natoms, md_atom::resid, molfile_atom_t::resid, md_atom::resname, molfile_atom_t::resname, molfile_atom_t::segid, and molfile_atom_t::type.

Referenced by VMDPLUGIN_init.

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

Definition at line 143 of file gromacsplugin.C.

References md_box::A, molfile_timestep_t::A, md_box::alpha, molfile_timestep_t::alpha, md_box::B, molfile_timestep_t::B, md_box::beta, molfile_timestep_t::beta, md_ts::box, md_box::C, molfile_timestep_t::C, molfile_timestep_t::coords, md_box::gamma, molfile_timestep_t::gamma, mdio_timestep, mdio_tsfree, gmxdata::mf, MOLFILE_ERROR, gmxdata::natoms, md_ts::natoms, and md_ts::pos.

Referenced by VMDPLUGIN_init.

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

Definition at line 473 of file gromacsplugin.C.

References md_box::A, molfile_timestep_t::A, md_box::alpha, molfile_timestep_t::alpha, md_box::B, molfile_timestep_t::B, md_box::beta, molfile_timestep_t::beta, md_ts::box, md_box::C, molfile_timestep_t::C, molfile_timestep_t::coords, md_box::gamma, molfile_timestep_t::gamma, MDIO_EOF, mdio_errmsg, mdio_errno, MDIO_IOERROR, mdio_timestep, mdio_tsfree, gmxdata::mf, MOLFILE_ERROR, gmxdata::natoms, md_ts::natoms, and md_ts::pos.

Referenced by VMDPLUGIN_init.

VMDPLUGIN_API int VMDPLUGIN_fini void   
 

Definition at line 741 of file gromacsplugin.C.

References VMDPLUGIN_API.

VMDPLUGIN_API int VMDPLUGIN_init void   
 

Definition at line 643 of file gromacsplugin.C.

References molfile_plugin_t::close_file_read, molfile_plugin_t::close_file_write, close_g96_read, close_gro_read, close_gro_write, close_trr_read, close_trr_write, molfile_plugin_t::filename_extension, GROMACS_PLUGIN_MAJOR_VERSION, GROMACS_PLUGIN_MINOR_VERSION, MOLFILE_PLUGIN_TYPE, molfile_plugin_t::open_file_read, molfile_plugin_t::open_file_write, open_g96_read, open_gro_read, open_gro_write, open_trr_read, open_trr_write, read_g96_structure, read_g96_timestep, read_gro_molecule_metadata, read_gro_structure, read_gro_timestep, molfile_plugin_t::read_molecule_metadata, molfile_plugin_t::read_next_timestep, molfile_plugin_t::read_structure, read_trr_timestep, vmdplugin_ABIVERSION, VMDPLUGIN_API, VMDPLUGIN_THREADUNSAFE, write_gro_structure, write_gro_timestep, molfile_plugin_t::write_structure, molfile_plugin_t::write_timestep, and write_trr_timestep.

VMDPLUGIN_API int VMDPLUGIN_register void *    v,
vmdplugin_register_cb    cb
 

Definition at line 732 of file gromacsplugin.C.

References VMDPLUGIN_API, and vmdplugin_register_cb.

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

Definition at line 198 of file gromacsplugin.C.

References gmxdata::atomlist, and gmxdata::natoms.

Referenced by VMDPLUGIN_init.

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

Definition at line 209 of file gromacsplugin.C.

References ANGS_PER_NM, gmxdata::atomlist, convert_vmd_box_for_writing, molfile_timestep_t::coords, md_file::f, gmxdata::mf, molfile_atom_t::name, gmxdata::natoms, molfile_timestep_t::physical_time, molfile_atom_t::resid, molfile_atom_t::resname, and molfile_timestep_t::velocities.

Referenced by VMDPLUGIN_init.

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

Definition at line 554 of file gromacsplugin.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, md_file::fmt, molfile_timestep_t::gamma, M_PI, MDFMT_TRR, gmxdata::mf, MOLFILE_ERROR, gmxdata::natoms, put_trx_int, put_trx_real, put_trx_string, gmxdata::step, and TRX_MAGIC.

Referenced by VMDPLUGIN_init.


Variable Documentation

molfile_plugin_t g96_plugin [static]
 

Definition at line 637 of file gromacsplugin.C.

molfile_plugin_t gro_plugin [static]
 

Definition at line 636 of file gromacsplugin.C.

molfile_plugin_t trj_plugin [static]
 

Definition at line 640 of file gromacsplugin.C.

molfile_plugin_t trr_plugin [static]
 

Definition at line 638 of file gromacsplugin.C.

molfile_plugin_t xtc_plugin [static]
 

Definition at line 639 of file gromacsplugin.C.


Generated on Fri Mar 29 03:10:24 2024 for VMD Plugins (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002