Broadcasts.h

Go to the documentation of this file.
00001 
00007 #ifndef BROADCASTS_H
00008 #define BROADCASTS_H
00009 
00010 #include "NamdTypes.h"
00011 #include "Lattice.h"
00012 #include "BroadcastObject.h"
00013 
00014 enum {
00015   SCRIPT_END,
00016   SCRIPT_RUN,
00017   SCRIPT_CONTINUE,
00018   SCRIPT_OUTPUT,
00019   SCRIPT_FORCEOUTPUT,
00020   SCRIPT_MEASURE,
00021   SCRIPT_REINITVELS,
00022   SCRIPT_RESCALEVELS,
00023   SCRIPT_RELOADCHARGES,
00024   SCRIPT_CHECKPOINT,
00025   SCRIPT_REVERT,
00026   SCRIPT_CHECKPOINT_STORE,
00027   SCRIPT_CHECKPOINT_LOAD,
00028   SCRIPT_CHECKPOINT_SWAP,
00029   SCRIPT_CHECKPOINT_FREE,
00030   SCRIPT_ATOMSENDRECV,
00031   SCRIPT_ATOMSEND,
00032   SCRIPT_ATOMRECV,
00033   SCRIPT_MINIMIZE,
00034   SCRIPT_DUMMY
00035 };
00036 
00037 // Tags used in common by all users of broadcast system.
00038 enum {
00039   velocityRescaleFactorTag,
00040   positionRescaleFactorTag,
00041   // For multigrator
00042   velocityRescaleTensorTag,
00043   velocityRescaleTensor2Tag,
00044   velocityRescaleFactor2Tag,
00045   positionRescaleFactor2Tag,
00046   // End multigrator
00047   tcoupleCoefficientTag,
00048   minimizeCoefficientTag,
00049   momentumCorrectionTag,
00050 #if USE_BARRIER
00051   cycleBarrierTag,
00052 #endif
00053   scriptBarrierTag,
00054   traceBarrierTag,
00055   accelMDRescaleFactorTag,
00056   adaptTemperatureTag, //Tag for adaptive tempering temperature updates to Sequencer
00057 #ifdef MEASURE_NAMD_WITH_PAPI
00058   papiMeasureTag,
00059 #endif
00060   dummyTag
00061 };
00062 
00063 // Broadcasts used by Contoller <-> Sequencer communication.
00064 struct ControllerBroadcasts
00065 {
00066   SimpleBroadcastObject<BigReal> velocityRescaleFactor;
00067   SimpleBroadcastObject<Tensor> positionRescaleFactor;
00068   // For multigrator
00069   SimpleBroadcastObject<Tensor> velocityRescaleTensor;
00070   SimpleBroadcastObject<Tensor> velocityRescaleTensor2;
00071   SimpleBroadcastObject<BigReal> velocityRescaleFactor2;
00072   SimpleBroadcastObject<Tensor> positionRescaleFactor2;
00073   // End multigrator
00074   SimpleBroadcastObject<BigReal> tcoupleCoefficient;
00075   SimpleBroadcastObject<BigReal> minimizeCoefficient;
00076   SimpleBroadcastObject<Vector> momentumCorrection;
00077 #if USE_BARRIER
00078   SimpleBroadcastObject<int> cycleBarrier;
00079 #endif
00080   SimpleBroadcastObject<int> scriptBarrier;
00081   SimpleBroadcastObject<int> traceBarrier;
00082   SimpleBroadcastObject<Vector> accelMDRescaleFactor;
00083   SimpleBroadcastObject<BigReal> adaptTemperature; 
00084 #ifdef MEASURE_NAMD_WITH_PAPI
00085   SimpleBroadcastObject<int> papiMeasureBarrier;
00086 #endif
00087 
00088   ControllerBroadcasts(const LDObjHandle *ldObjPtr = 0) : 
00089     velocityRescaleFactor(velocityRescaleFactorTag, ldObjPtr),
00090     positionRescaleFactor(positionRescaleFactorTag, ldObjPtr),
00091     // For multigrator
00092     velocityRescaleTensor(velocityRescaleTensorTag, ldObjPtr),
00093     velocityRescaleTensor2(velocityRescaleTensor2Tag, ldObjPtr),
00094     velocityRescaleFactor2(velocityRescaleFactor2Tag, ldObjPtr),
00095     positionRescaleFactor2(positionRescaleFactor2Tag, ldObjPtr),
00096     // End multigrator
00097     tcoupleCoefficient(tcoupleCoefficientTag, ldObjPtr),
00098     minimizeCoefficient(minimizeCoefficientTag, ldObjPtr),
00099     momentumCorrection(momentumCorrectionTag, ldObjPtr),
00100 #if USE_BARRIER
00101     cycleBarrier(cycleBarrierTag, ldObjPtr),
00102 #endif
00103     accelMDRescaleFactor(accelMDRescaleFactorTag, ldObjPtr),
00104     adaptTemperature(adaptTemperatureTag, ldObjPtr), 
00105     scriptBarrier(scriptBarrierTag, ldObjPtr),
00106 #ifdef MEASURE_NAMD_WITH_PAPI
00107         papiMeasureBarrier(papiMeasureTag, ldObjPtr),
00108 #endif
00109         traceBarrier(traceBarrierTag, ldObjPtr)
00110   { ; }
00111 };
00112 
00113 #endif // BROADCASTS_H
00114 

Generated on Fri Sep 22 01:17:10 2017 for NAMD by  doxygen 1.4.7