/* _______________________________________________________________________ * * RDPARM/PTRAJ: APR 2000 * _______________________________________________________________________ * * $Header: /thr/gamow/cvsroot/amber7/src/ptraj/ptraj_local.h,v 1.7 2000/05/10 21:52:01 cheatham Exp $ * * Revision: $Revision: 1.7 $ * Date: $Date: 2000/05/10 21:52:01 $ * 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) * _______________________________________________________________________ */ /* The parameter file assumes the atom, residue, symbol, etc. names to be * * four characters (we will store them as strings, requiring a newline, * * hence the size is 5). */ #define NAME_SIZE 5 #define NAME_DEFAULT " " typedef char Name[NAME_SIZE]; /* * state information necessary for the transformation routines */ typedef struct _ptrajState { double box[6]; /* box lengths and angles */ double *masses; /* atom masses */ double *charges; /* atom charges */ int atoms; /* number of atoms */ int residues; /* number of residues */ int *ipres; /* atoms in each residue */ int IFBOX; /* is there box information? */ int boxfixed[6]; /* equal to 1 if this box coordinate is fixed */ int molecules; /* total number of molecules */ int *moleculeInfo; /* number of atoms in each molecule */ int *solventMask; /* atoms in the solvent */ int solventMolecules; /* number of solvent molecules */ int *solventMoleculeStart; /* pointer into solventMask for first atom of each solvent */ int *solventMoleculeStop; /* pointer into solventMask for last atom of each solvent */ int solventAtoms; /* number of solvent atoms */ Name *atomName; /* atom names */ Name *residueName; /* residue names */ int maxFrames; /* number of useful frames in 1 pass of trajin's */ } ptrajState; #define INITIALIZE_ptrajState( _p_ ) \ _p_->box[0] = 0.0; _p_->box[1] = 0.0; _p_->box[2] = 0.0; \ _p_->box[3] = 90.0; _p_->box[4] = 90.0; _p_->box[5] = 90.0; \ _p_->masses = NULL; \ _p_->charges = NULL; \ _p_->atoms = 0; \ _p_->residues = 0; \ _p_->ipres = NULL; \ _p_->IFBOX = 0; \ _p_->boxfixed[0] = 0; _p_->boxfixed[1] = 0; _p_->boxfixed[2] = 0; \ _p_->boxfixed[3] = 0; _p_->boxfixed[4] = 0; _p_->boxfixed[5] = 0; \ _p_->molecules = 0; \ _p_->moleculeInfo = NULL; \ _p_->solventMask = NULL; \ _p_->solventMolecules = 0; \ _p_->solventMoleculeStart = NULL; \ _p_->solventMoleculeStop = NULL; \ _p_->solventAtoms = 0; \ _p_->atomName = NULL; \ _p_->residueName = NULL; \ _p_->maxFrames = 0 /* * structures used in the processing of the atom specification */ enum _parseOperators { PARSE_NOOP, PARSE_CONTINUATION, PARSE_ATOM, PARSE_RESIDUE }; typedef struct _parseEntry { char *token; int operator; int isnumber; } parseEntry; typedef enum _ptrajMode { PTRAJ_NOOP, PTRAJ_ACTION, PTRAJ_SETUP, PTRAJ_STATUS, PTRAJ_PRINT, PTRAJ_CLEANUP } ptrajMode;