Main Page   Namespace List   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-2011 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.50 $       $Date: 2011/05/19 03:41:44 $
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 "ResizeArray.h"
00029 #include "Matrix4.h"
00030 #include "QMTimestep.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 *pos_ptr;           
00048   float *vel;               
00049   float *force;             
00050   float *user;              
00051   float *user2;             
00052   float *user3;             
00053   float *user4;             
00054   QMTimestep *qm_timestep;
00055   float energy[TSENERGIES]; 
00056   int timesteps;            
00057   double physical_time;     
00058 
00060   float a_length, b_length, c_length, alpha, beta, gamma;
00061 
00063   void get_transform_vectors(float v1[3], float v2[3], float v3[3]) const;
00064  
00066   void get_transforms(Matrix4 &a, Matrix4 &b, Matrix4 &c) const;
00067 
00070   void get_transform_from_cell(const int *cell, Matrix4 &trans) const;
00071 
00072   Timestep(int n);              
00073   Timestep(const Timestep& ts); 
00074   ~Timestep(void);              
00075   
00076   void zero_values();           
00077 };
00078 
00079 #endif
00080 

Generated on Sat May 26 01:48:32 2012 for VMD (current) by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002