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

tngplugin.C File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <tng/tng_io.h>
#include "molfile_plugin.h"

Go to the source code of this file.

Compounds

struct  tngdata

Defines

#define TNG_PLUGIN_MAJOR_VERSION   1
#define TNG_PLUGIN_MINOR_VERSION   0
#define M_PI_2   1.57079632679489661922

Functions

void convert_tng_box_shape_to_vmd (float *box_shape, float *vmd_box)
void convert_vmd_box_shape_to_tng (const molfile_timestep_t *ts, float *box_shape)
void * open_tng_read (const char *filename, const char *, int *natoms)
int read_tng_structure (void *v, int *optflags, molfile_atom_t *atoms)
int read_tng_bonds (void *v, int *nbonds, int **fromptr, int **toptr, float **bondorderptr)
void convert_to_float (void *from, float *to, const float fact, const int natoms, const int nvalues, const char datatype)
int read_tng_timestep (void *v, int natoms, molfile_timestep_t *ts)
int read_timestep_metadata (void *v, molfile_timestep_metadata_t *metadata)
void close_tng (void *v)
void * open_tng_write (const char *filename, const char *, int natoms)
int write_tng_structure (void *v, int optflags, const molfile_atom_t *atoms)
int write_tng_bonds (void *v, int nbonds, int *from, int *to, float *bondorder)
int write_tng_timestep (void *v, const molfile_timestep_t *ts)
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 tng_plugin


Define Documentation

#define M_PI_2   1.57079632679489661922
 

Definition at line 42 of file tngplugin.C.

Referenced by convert_tng_box_shape_to_vmd.

#define TNG_PLUGIN_MAJOR_VERSION   1
 

Definition at line 38 of file tngplugin.C.

Referenced by VMDPLUGIN_init.

#define TNG_PLUGIN_MINOR_VERSION   0
 

Definition at line 39 of file tngplugin.C.

Referenced by VMDPLUGIN_init.


Function Documentation

void close_tng void *    v [static]
 

Definition at line 402 of file tngplugin.C.

References tngdata::tng_traj.

Referenced by VMDPLUGIN_init.

void convert_tng_box_shape_to_vmd float *    box_shape,
float *    vmd_box
[static]
 

Definition at line 57 of file tngplugin.C.

References M_PI_2.

Referenced by read_tng_timestep.

void convert_to_float void *    from,
float *    to,
const float    fact,
const int    natoms,
const int    nvalues,
const char    datatype
[static]
 

Definition at line 226 of file tngplugin.C.

Referenced by read_tng_timestep.

void convert_vmd_box_shape_to_tng const molfile_timestep_t   ts,
float *    box_shape
[static]
 

Definition at line 93 of file tngplugin.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_tng_timestep.

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

Definition at line 113 of file tngplugin.C.

References tngdata::coord_exponential, tngdata::has_velocities, tngdata::n_frames, tngdata::natoms, tngdata::step, and tngdata::tng_traj.

Referenced by VMDPLUGIN_init.

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

Definition at line 409 of file tngplugin.C.

References tngdata::coord_exponential, tngdata::natoms, tngdata::step, tngdata::time_per_frame, and tngdata::tng_traj.

Referenced by VMDPLUGIN_init.

int read_timestep_metadata void *    v,
molfile_timestep_metadata_t   metadata
[static]
 

Definition at line 364 of file tngplugin.C.

References molfile_timestep_metadata::has_velocities, tngdata::has_velocities, MOLFILE_ERROR, and tngdata::tng_traj.

Referenced by VMDPLUGIN_init.

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

Definition at line 177 of file tngplugin.C.

References MOLFILE_ERROR, and tngdata::tng_traj.

Referenced by VMDPLUGIN_init.

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

Definition at line 144 of file tngplugin.C.

References molfile_atom_t::chain, MOLFILE_NOOPTIONS, molfile_atom_t::name, tngdata::natoms, molfile_atom_t::resid, molfile_atom_t::resname, molfile_atom_t::segid, tngdata::tng_traj, and molfile_atom_t::type.

Referenced by VMDPLUGIN_init.

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

Definition at line 272 of file tngplugin.C.

References molfile_timestep_t::A, molfile_timestep_t::alpha, molfile_timestep_t::B, molfile_timestep_t::beta, molfile_timestep_t::C, convert_tng_box_shape_to_vmd, convert_to_float, tngdata::coord_exponential, molfile_timestep_t::coords, molfile_timestep_t::gamma, MOLFILE_ERROR, molfile_timestep_t::physical_time, tngdata::step, tngdata::tng_traj, and molfile_timestep_t::velocities.

Referenced by VMDPLUGIN_init.

VMDPLUGIN_API int VMDPLUGIN_fini void   
 

Definition at line 625 of file tngplugin.C.

References VMDPLUGIN_API, and VMDPLUGIN_SUCCESS.

VMDPLUGIN_API int VMDPLUGIN_init void   
 

Definition at line 593 of file tngplugin.C.

References molfile_plugin_t::close_file_read, molfile_plugin_t::close_file_write, close_tng, molfile_plugin_t::filename_extension, MOLFILE_PLUGIN_TYPE, molfile_plugin_t::open_file_read, molfile_plugin_t::open_file_write, open_tng_read, open_tng_write, molfile_plugin_t::read_bonds, molfile_plugin_t::read_next_timestep, molfile_plugin_t::read_structure, read_timestep_metadata, molfile_plugin_t::read_timestep_metadata, read_tng_bonds, read_tng_structure, read_tng_timestep, TNG_PLUGIN_MAJOR_VERSION, TNG_PLUGIN_MINOR_VERSION, vmdplugin_ABIVERSION, VMDPLUGIN_API, VMDPLUGIN_SUCCESS, VMDPLUGIN_THREADUNSAFE, molfile_plugin_t::write_bonds, molfile_plugin_t::write_structure, molfile_plugin_t::write_timestep, write_tng_bonds, write_tng_structure, and write_tng_timestep.

VMDPLUGIN_API int VMDPLUGIN_register void *    v,
vmdplugin_register_cb    cb
 

Definition at line 620 of file tngplugin.C.

References VMDPLUGIN_API, vmdplugin_register_cb, and VMDPLUGIN_SUCCESS.

int write_tng_bonds void *    v,
int    nbonds,
int *    from,
int *    to,
float *    bondorder
[static]
 

Definition at line 496 of file tngplugin.C.

References MOLFILE_ERROR, and tngdata::tng_traj.

Referenced by VMDPLUGIN_init.

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

Definition at line 435 of file tngplugin.C.

References molfile_atom_t::chain, molfile_atom_t::name, tngdata::natoms, molfile_atom_t::resid, molfile_atom_t::resname, tngdata::tng_traj, and molfile_atom_t::type.

Referenced by VMDPLUGIN_init.

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

Definition at line 528 of file tngplugin.C.

References convert_vmd_box_shape_to_tng, molfile_timestep_t::coords, MOLFILE_ERROR, tngdata::natoms, molfile_timestep_t::physical_time, tngdata::step, tngdata::time_per_frame, tngdata::tng_traj, and molfile_timestep_t::velocities.

Referenced by VMDPLUGIN_init.


Variable Documentation

molfile_plugin_t tng_plugin [static]
 

Definition at line 591 of file tngplugin.C.


Generated on Sat Aug 15 03:07:15 2020 for VMD Plugins (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002