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

Timestep.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *cr                                                                       
00003  *cr            (C) Copyright 1995-2008 The Board of Trustees of the           
00004  *cr                        University of Illinois                       
00005  *cr                         All Rights Reserved                        
00006  *cr                                                                   
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  * RCS INFORMATION:
00011  *
00012  *      $RCSfile: Timestep.h,v $
00013  *      $Author: johns $        $Locker:  $             $State: Exp $
00014  *      $Revision: 1.42 $       $Date: 2008/03/27 19:36:48 $
00015  *
00016  ***************************************************************************
00017  * DESCRIPTION:
00018  *
00019  * The Timestep class, which stores coordinates, energies, etc. for a
00020  * single timestep.
00021  *
00022  * Note: As more data is stored for each step, it should go in here.  For
00023  * example, H-Bonds could be calculated each step.
00024  ***************************************************************************/
00025 #ifndef TIMESTEP_H
00026 #define TIMESTEP_H
00027 
00028 #include "Atom.h"
00029 #include "ResizeArray.h"
00030 #include "Matrix4.h"
00031 
00032 // Energy terms and temperature stored for each timestep
00033 // TSENERGIES must be the last element.  It indicates the number
00034 // energies.  (TSE_TOTAL is the total energy).  If you add fields here
00035 // you should also add the lines in MolInfo.C so you can get access to
00036 // the fields from Tcl.
00037 enum { TSE_BOND, TSE_ANGLE, TSE_DIHE, TSE_IMPR, TSE_VDW, TSE_COUL,
00038        TSE_HBOND, TSE_KE, TSE_PE, TSE_TEMP, TSE_TOTAL, TSE_VOLUME,
00039        TSE_PRESSURE, TSE_EFIELD, TSE_UREY_BRADLEY, TSE_RESTRAINT,
00040        TSENERGIES};
00041 
00043 class Timestep {
00044 public:
00045   int num;                  
00046   float *pos;               
00047   float *vel;               
00048   float *force;             
00049   float *user;              
00050   float *user2;             
00051   float *user3;             
00052   float *user4;             
00053 
00054   float energy[TSENERGIES]; 
00055   int timesteps;            
00056   double physical_time;     
00057 
00059   float a_length, b_length, c_length, alpha, beta, gamma;
00060 
00062   void get_transform_vectors(float v1[3], float v2[3], float v3[3]) const;
00063  
00065   void get_transforms(Matrix4 &a, Matrix4 &b, Matrix4 &c) const;
00066 
00069   void get_transform_from_cell(const int *cell, Matrix4 &trans) const;
00070 
00071   Timestep(int n);              
00072   Timestep(const Timestep& ts); 
00073   ~Timestep(void);              
00074   
00075   void zero_values();           
00076 };
00077 
00078 #endif
00079 

Generated on Sat Aug 30 01:27:07 2008 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002