Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

Sequencer.h

Go to the documentation of this file.
00001 
00007 #ifndef SEQUENCER_H
00008 #define SEQUENCER_H
00009 
00010 #include "converse.h"
00011 #include "Priorities.h"
00012 #include "PatchTypes.h"
00013 
00014 class HomePatch;
00015 class SimParameters;
00016 class SubmitReduction;
00017 class CollectionMgr;
00018 class ControllerBroadcasts;
00019 class LdbCoordinator;
00020 class Random;
00021 
00022 class Sequencer
00023 {
00024     friend class HomePatch;
00025 public:
00026     Sequencer(HomePatch *p);
00027     virtual ~Sequencer(void);
00028     void run(void);             // spawn thread, etc.
00029     void awaken(void) {
00030       CthAwakenPrio(thread, CK_QUEUEING_IFIFO, PRIORITY_SIZE, &priority);
00031     }
00032     void suspend(void);
00033 
00034 protected:
00035     virtual void algorithm(void);       // subclasses redefine this method
00036 
00037     void integrate(); // Verlet integrator
00038     void minimize(); // CG minimizer
00039 
00040     void runComputeObjects(int migration = 1, int pairlists = 0);
00041     int pairlistsAreValid;
00042     int pairlistsAge;
00043 
00044     void submitReductions(int);
00045     void submitHalfstep(int);
00046     void submitMinimizeReductions(int, BigReal fmax2);
00047     void submitCollections(int step, int zeroVel = 0);
00048 
00049     void submitMomentum(int step);
00050     void correctMomentum(int step, BigReal drifttime);
00051 
00052     void saveForce(const int ftag = Results::normal);
00053     void addForceToMomentum(BigReal, const int ftag = Results::normal,
00054                                                 const int useSaved = 0, const int pressure = 0);
00055     void addVelocityToPosition(BigReal);
00056     
00057     void addRotDragToPosition(BigReal);
00058     void addMovDragToPosition(BigReal);
00059 
00060     void minimizeMoveDownhill(BigReal fmax2);
00061     void newMinimizeDirection(BigReal);
00062     void newMinimizePosition(BigReal);
00063     void quenchVelocities();
00064 
00065     void hardWallDrude(BigReal,int);
00066 
00067     void rattle1(BigReal,int);
00068     void rattle2(BigReal,int);
00069 
00070     void maximumMove(BigReal);
00071     void minimizationQuenchVelocity(void);
00072 
00073     void reloadCharges();
00074 
00075     BigReal adaptTempT;         // adaptive tempering temperature
00076     void adaptTempUpdate(int); // adaptive tempering temperature update
00077 
00078     void rescaleVelocities(int);
00079     void rescaleaccelMD(int, int, int); // for accelMD
00080     int rescaleVelocities_numTemps;
00081     void reassignVelocities(BigReal,int);
00082     void reinitVelocities(void);
00083     void rescaleVelocitiesByFactor(BigReal);
00084     void tcoupleVelocities(BigReal,int);
00085     void berendsenPressure(int);
00086       int berendsenPressure_count;
00087       int checkpoint_berendsenPressure_count;
00088     void langevinPiston(int);
00089       int slowFreq;
00090     void langevinVelocities(BigReal);
00091     void langevinVelocitiesBBK1(BigReal);
00092     void langevinVelocitiesBBK2(BigReal);
00093 
00094     void cycleBarrier(int,int);
00095         void traceBarrier(int);
00096 #ifdef MEASURE_NAMD_WITH_PAPI
00097         void papiMeasureBarrier(int);
00098 #endif
00099     void terminate(void);
00100 
00101     Random *random;
00102     SimParameters *const simParams;     // for convenience
00103     HomePatch *const patch;             // access methods in patch
00104     SubmitReduction *reduction;
00105     SubmitReduction *pressureProfileReduction;
00106 
00107     CollectionMgr *const collection;
00108     ControllerBroadcasts * broadcast;
00109 
00110     int ldbSteps;
00111     void rebalanceLoad(int timestep);
00112 
00113 
00114 private:
00115     CthThread thread;
00116     unsigned int priority;
00117     static void threadRun(Sequencer*);
00118 
00119     LdbCoordinator *ldbCoordinator;
00120 };
00121 
00122 #endif

Generated on Wed May 22 04:07:18 2013 for NAMD by  doxygen 1.3.9.1