Main Page | Class List | Directories | File List | Class Members | File Members

SAVE.step.h

00001 
00031 #ifndef STEP_H
00032 #define STEP_H
00033 
00034 #include "mdapi/mdtypes.h"
00035 #include "random/random.h"
00036 
00037 #ifdef __cplusplus
00038 extern "C" {
00039 #endif
00040 
00041 #define STEP_FAIL   (-1)
00042 
00044 #define STEP_TRUE   (1)
00045 
00047 #define STEP_FALSE  (0)
00048 
00058   typedef struct StepParam_tag {
00059     unsigned long random_seed;
00061     double timestep;
00063     void *force_object;
00066     int32 (*force_compute)(void *force_object, MD_Dvec *force, MD_Dvec *pos);
00069     MD_Atom *atom;
00071     int32 natoms;
00073     int32 ndegfreedom;
00077   } StepParam;
00078 
00079 
00089   typedef struct StepSystem_tag {
00090     double kinetic_energy;
00093     double temperature;
00096     MD_Dvec *force;
00100     MD_Dvec *vel;
00106     MD_Dvec *pos;
00112     int32 is_force_valid;
00115   } StepSystem;
00116 
00117 
00122   typedef struct Step_tag {
00123     Random random;          /* random number generator */
00124     double tempkonst;       /* constant needed to compute temperature */
00125     StepParam *param;       /* shallow copy of user StepParam object */
00126     double *scal_inv_mass;  /* compute array of scaled inverse mass,
00127                                for efficiency */
00128   } Step;
00129 
00130 
00140   int step_init(Step *, StepParam *param);
00141 
00142 
00160   int step_compute(Step *, StepSystem *sys, int32 numsteps);
00161 
00162 
00172   int step_find_reductions(Step *, StepSystem *sys);
00173 
00174 
00184   int step_set_random_velocities(Step *, StepSystem *sys, double init_temp);
00185 
00186 
00195   int step_remove_com_motion(Step *, StepSystem *sys);
00196 
00197 
00203   void step_done(Step *);
00204 
00205 #ifdef __cplusplus
00206 }
00207 #endif
00208 
00209 #endif /* STEP_H */

Generated on Mon Sep 26 10:53:12 2005 for MDX by  doxygen 1.4.4