/* _______________________________________________________________________ * * RDPARM/PTRAJ: APR 2000 * _______________________________________________________________________ * * $Header: /thr/gamow/cvsroot/amber7/src/ptraj/analyze.h,v 1.2 2000/05/10 21:51:59 cheatham Exp $ * * Revision: $Revision: 1.2 $ * Date: $Date: 2000/05/10 21:51:59 $ * Last checked in by $Author: cheatham $ * * This source is now archived under CVS at Scripps in the amber7 tree. * * NOTE: this is a beta, pre-release version, is under constant development, * probably contains some bugs and is under constant revision; therefore * take care. Please report bugs (and fixes!) to cheatham@chpc.utah.edu or * cheatham@cgl.ucsf.edu * * Do not distribute this code without explicit permission. * Do not incorporate into other codes without explicit permission. * * Current contact information: * * Thomas Cheatham, III * 2000 East, 30 South, Skaggs Hall 201 * Department of Medicinal Chemistry * University of Utah * Salt Lake City, UT 84112-5820 * cheatham@chpc.utah.edu * (801) 587-9653 * FAX: (801) 585-5366 * * Other contributors: * * David Case (Scripps) * Michael Crowley (Scripps) * Jed Pitera (UCSF) * Vickie Tsui (Scripps) * _______________________________________________________________________ */ /* * This is the header file for analyze.c which contains the basic structures * necessary for analyzing data acculated by the various actions in ptraj() * * (1) EXTERNALLY VISIBLE DEFINITIONS * (2) GLOBAL VARIABLES * (3) EXTERNALLY VISIBLE FUNCTION PROTOTYPES * (4) LOCAL STRUCTURES */ /* * (1) EXTERNALLY VISIBLE DEFINITIONS */ /* * ANALYZE INFORMATION */ typedef enum _analyzeType { ANALYZE_NOOP, ANALYZE_CORRELATIONCOEFFICIENT, ANALYZE_HBOND, ANALYZE_SET, ANALYZE_STATISTICS, ANALYZE_TEST } analyzeType; # ifdef __STDC__ typedef int (*analyzeFunction)(void *, stackType *, int); # else typedef int (*analyzeFunction)(); # endif typedef struct _analyzeInformation { analyzeFunction fxn; analyzeType type; int iarg1; int iarg2; int iarg3; int iarg4; double darg1; double darg2; double darg3; double darg4; void *carg1; void *carg2; void *carg3; void *carg4; } analyzeInformation; #define INITIALIZE_analyzeInformation(_p_) \ _p_->fxn = NULL; \ _p_->type = ANALYZE_NOOP; \ _p_->iarg1 = 0; \ _p_->iarg2 = 0; \ _p_->iarg3 = 0; \ _p_->iarg4 = 0; \ _p_->darg1 = 0.0; \ _p_->darg2 = 0.0; \ _p_->darg3 = 0.0; \ _p_->darg4 = 0.0; \ _p_->carg1 = NULL; \ _p_->carg2 = NULL; \ _p_->carg3 = NULL; \ _p_->carg4 = NULL /* * Information for the stackStack, i.e. saving various * scalar values for later processing */ typedef enum _scalarMode { SCALAR_NULL, SCALAR_DISTANCE, SCALAR_ANGLE, SCALAR_TORSION, SCALAR_PUCKER, SCALAR_RMS } scalarMode; typedef struct _scalarInfo { char *name; char *filename; scalarMode mode; int atom1, atom2, atom3, atom4, atom5; int *mask1, *mask2, *mask3, *mask4, *mask5; int totalFrames; int frame; double *value; void *results; } scalarInfo; #define INITIALIZE_scalarInfo(_p_) \ _p_->name = NULL; \ _p_->filename = NULL; \ _p_->mode = SCALAR_NULL; \ _p_->atom1 = -1; _p_->atom2 = -1; _p_->atom3 = -1; _p_->atom4 = -1; _p_->atom5 = -1; \ _p_->mask1=NULL; _p_->mask2=NULL; _p_->mask3=NULL; _p_->mask4=NULL; _p_->mask5=NULL; \ _p_->totalFrames = 0; \ _p_->frame = 0; \ _p_->value = NULL; \ _p_->results = NULL /* * (2) GLOBAL VARIABLES */ /* * (3) EXTERNALLY VISIBLE FUNCTION PROTOTYPES */ #ifndef ANALYZE_MODULE # ifdef __STDC__ extern int analyzeTest(analyzeInformation *, stackType *, int); extern int analyzeCorrelationCoefficient(analyzeInformation *, stackType *, int); extern int analyzeHBond(analyzeInformation *, stackType *, int); extern int analyzeSet(analyzeInformation *, stackType *, int); extern int analyzeStatistics(analyzeInformation *, stackType *, int); extern int analyzeTest(analyzeInformation *, stackType *, int); # else /* __STDC__ */ extern int analyzeTest(); extern int analyzeCorrelationCoefficient(); extern int analyzeHBond(); extern int analyzeSet(); extern int analyzeStatistics(); extern int analyzeTest(); # endif /* __STDC__ */ #endif /* ANALYZE_MODULE */ /* * (4) LOCAL STRUCTURES */ typedef enum _unaryOperator { UNARY_NOOP, UNARY_NORMALIZE, UNARY_COSINE, UNARY_SINE, UNARY_ARCCOS, UNARY_ARCSIN, UNARY_SHIFT } unaryOperator; typedef enum _binaryOperator { BINARY_NOOP, BINARY_PLUS, BINARY_MINUS, BINARY_TIMES, BINARY_DIVIDE } binaryOperator; typedef struct _correlationCoefficientResults { int N; double average; double a2; double stddev; double coeff; double a; double b; double significance; } correlationCoefficientResults; #define INITIALIZE_correlationCoefficientResults(_p_) \ _p_->N = 0; \ _p_->average = 0.0; \ _p_->a2 = 0.0; \ _p_->stddev = 0.0; \ _p_->coeff = 0.0; \ _p_->a = 0.0; \ _p_->b = 0.0; \ _p_->significance = 0.0