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

graspplugin.C File Reference

#include <stdio.h>
#include <math.h>
#include <string.h>
#include "molfile_plugin.h"
#include "endianswap.h"

Go to the source code of this file.

Compounds

struct  grasp_t
 plugin data handle. More...

struct  GRASSP
 Grasp structure. More...


Defines

#define POTENTIALS   1
 Define variables by the name of Grasp property. More...

#define CURVATURES   2
#define DISTANCES   4
#define PROPERTY_1   8
#define PROPERTY_2   16
#define VERTEXCOLOR   32
#define GLOBALCOLOR   64
#define TRASH   fread(trash, 4, 1, infile)

Typedefs

typedef float COLOUR [3]
 Define other variables. More...

typedef unsigned int SHORTWORD
typedef float VECTOR [3]

Functions

void Set_Colour (float *c, float r, float g, float b)
 Sets colour. More...

void ClinComb2 (float c[], float k1, float c1[], float k2, float c2[])
 Combines colour. More...

void Get_Property_Values (GRASSP *grassp, float *properties, float *colores, int nvert)
 Gets properties. More...

void line3 (FILE *infile, GRASSP *grassp)
 Reads line3. More...

int is_little_endian (void)
void * open_file_read (const char *filepath, const char *filetype, int *natoms)
int read_rawgraphics (void *v, int *nelem, const molfile_graphics_t **data)
void close_file_read (void *v)
VMDPLUGIN_API int VMDPLUGIN_init (void)
VMDPLUGIN_API int VMDPLUGIN_register (void *v, vmdplugin_register_cb cb)
VMDPLUGIN_API int VMDPLUGIN_fini (void)

Variables

molfile_plugin_t plugin


Define Documentation

#define CURVATURES   2
 

Definition at line 40 of file graspplugin.C.

Referenced by line3.

#define DISTANCES   4
 

Definition at line 41 of file graspplugin.C.

Referenced by line3.

#define GLOBALCOLOR   64
 

Definition at line 45 of file graspplugin.C.

Referenced by Get_Property_Values, and line3.

#define POTENTIALS   1
 

Define variables by the name of Grasp property.

Definition at line 39 of file graspplugin.C.

Referenced by Get_Property_Values, and line3.

#define PROPERTY_1   8
 

Definition at line 42 of file graspplugin.C.

Referenced by line3.

#define PROPERTY_2   16
 

Definition at line 43 of file graspplugin.C.

Referenced by line3.

#define TRASH   fread(trash, 4, 1, infile)
 

#define VERTEXCOLOR   32
 

Definition at line 44 of file graspplugin.C.

Referenced by line3.


Typedef Documentation

typedef float COLOUR
 

Define other variables.

Definition at line 48 of file graspplugin.C.

typedef unsigned int SHORTWORD
 

Definition at line 50 of file graspplugin.C.

Referenced by Get_Property_Values.

typedef float VECTOR[3]
 

Definition at line 51 of file graspplugin.C.


Function Documentation

void ClinComb2 float    c[],
float    k1,
float    c1[],
float    k2,
float    c2[]
 

Combines colour.

Definition at line 76 of file graspplugin.C.

Referenced by Get_Property_Values.

void close_file_read void *    v [static]
 

Definition at line 482 of file graspplugin.C.

References grasp_t::fd, and grasp_t::graphics.

Referenced by VMDPLUGIN_init.

void Get_Property_Values GRASSP   grassp,
float *    properties,
float *    colores,
int    nvert
 

Gets properties.

Definition at line 84 of file graspplugin.C.

References GRASSP::chi, ClinComb2, GRASSP::clo, GRASSP::cmd, GRASSP::colors, GRASSP::flag, GLOBALCOLOR, name, POTENTIALS, GRASSP::range, Set_Colour, and SHORTWORD.

Referenced by read_rawgraphics.

int is_little_endian void    [static]
 

Definition at line 235 of file graspplugin.C.

Referenced by read_rawgraphics.

void line3 FILE *    infile,
GRASSP   grassp
 

Reads line3.

Definition at line 179 of file graspplugin.C.

References GRASSP::chi, GRASSP::clo, GRASSP::cmd, CURVATURES, DISTANCES, GRASSP::flag, GLOBALCOLOR, line3, POTENTIALS, PROPERTY_1, PROPERTY_2, Set_Colour, and VERTEXCOLOR.

Referenced by line3, and read_rawgraphics.

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

Definition at line 241 of file graspplugin.C.

References grasp_t::fd, and grasp_t::graphics.

Referenced by VMDPLUGIN_init.

int read_rawgraphics void *    v,
int *    nelem,
const molfile_graphics_t **    data
[static]
 

Definition at line 257 of file graspplugin.C.

References molfile_graphics_t::data, grasp_t::fd, Get_Property_Values, grasp_t::graphics, is_little_endian, line3, MOLFILE_COLOR, MOLFILE_ERROR, MOLFILE_NORMS, MOLFILE_TRINORM, swap2_aligned, swap4_aligned, and molfile_graphics_t::type.

Referenced by VMDPLUGIN_init.

void Set_Colour float *    c,
float    r,
float    g,
float    b
 

Sets colour.

Definition at line 68 of file graspplugin.C.

Referenced by Get_Property_Values, and line3.

VMDPLUGIN_API int VMDPLUGIN_fini void   
 

Definition at line 517 of file graspplugin.C.

References VMDPLUGIN_API, and VMDPLUGIN_SUCCESS.

VMDPLUGIN_API int VMDPLUGIN_init void   
 

Definition at line 495 of file graspplugin.C.

References close_file_read, molfile_plugin_t::close_file_read, molfile_plugin_t::filename_extension, MOLFILE_PLUGIN_TYPE, open_file_read, molfile_plugin_t::open_file_read, read_rawgraphics, molfile_plugin_t::read_rawgraphics, vmdplugin_ABIVERSION, VMDPLUGIN_API, VMDPLUGIN_SUCCESS, and VMDPLUGIN_THREADSAFE.

VMDPLUGIN_API int VMDPLUGIN_register void *    v,
vmdplugin_register_cb    cb
 

Definition at line 512 of file graspplugin.C.

References VMDPLUGIN_API, vmdplugin_register_cb, and VMDPLUGIN_SUCCESS.


Variable Documentation

molfile_plugin_t plugin [static]
 

Definition at line 493 of file graspplugin.C.


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