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_RESCALESOLUTECHARGES,
00025   SCRIPT_CHECKPOINT,
00026   SCRIPT_REVERT,
00027   SCRIPT_CHECKPOINT_STORE,
00028   SCRIPT_CHECKPOINT_LOAD,
00029   SCRIPT_CHECKPOINT_SWAP,
00030   SCRIPT_CHECKPOINT_FREE,
00031   SCRIPT_ATOMSENDRECV,
00032   SCRIPT_ATOMSEND,
00033   SCRIPT_ATOMRECV,
00034   SCRIPT_MINIMIZE,
00035   SCRIPT_DUMMY
00036 };
00037 
00038 // Tags used in common by all users of broadcast system.
00039 enum {
00040   velocityRescaleFactorTag,
00041   positionRescaleFactorTag,
00042   // For multigrator
00043   velocityRescaleTensorTag,
00044   velocityRescaleTensor2Tag,
00045   velocityRescaleFactor2Tag,
00046   positionRescaleFactor2Tag,
00047   // End multigrator
00048   tcoupleCoefficientTag,
00049   stochRescaleCoefficientTag,
00050   minimizeCoefficientTag,
00051   momentumCorrectionTag,
00052 #if USE_BARRIER
00053   cycleBarrierTag,
00054 #endif
00055   scriptBarrierTag,
00056   traceBarrierTag,
00057   accelMDRescaleFactorTag,
00058   adaptTemperatureTag, //Tag for adaptive tempering temperature updates to Sequencer
00059 #ifdef MEASURE_NAMD_WITH_PAPI
00060   papiMeasureTag,
00061 #endif
00062   dummyTag
00063 };
00064 
00065 // Broadcasts used by Contoller <-> Sequencer communication.
00066 struct ControllerBroadcasts
00067 {
00068   SimpleBroadcastObject<BigReal> velocityRescaleFactor;
00069   SimpleBroadcastObject<Tensor> positionRescaleFactor;
00070   // For multigrator
00071   SimpleBroadcastObject<Tensor> velocityRescaleTensor;
00072   SimpleBroadcastObject<Tensor> velocityRescaleTensor2;
00073   SimpleBroadcastObject<BigReal> velocityRescaleFactor2;
00074   SimpleBroadcastObject<Tensor> positionRescaleFactor2;
00075   // End multigrator
00076   SimpleBroadcastObject<BigReal> tcoupleCoefficient;
00077   SimpleBroadcastObject<BigReal> stochRescaleCoefficient;
00078   SimpleBroadcastObject<BigReal> minimizeCoefficient;
00079   SimpleBroadcastObject<Vector> momentumCorrection;
00080 #if USE_BARRIER
00081   SimpleBroadcastObject<int> cycleBarrier;
00082 #endif
00083   SimpleBroadcastObject<int> scriptBarrier;
00084   SimpleBroadcastObject<int> traceBarrier;
00085   SimpleBroadcastObject<Vector> accelMDRescaleFactor;
00086   SimpleBroadcastObject<BigReal> adaptTemperature;
00087 #ifdef MEASURE_NAMD_WITH_PAPI
00088   SimpleBroadcastObject<int> papiMeasureBarrier;
00089 #endif
00090 
00091   ControllerBroadcasts(const LDObjHandle *ldObjPtr = 0) :
00092     velocityRescaleFactor(velocityRescaleFactorTag, ldObjPtr),
00093     positionRescaleFactor(positionRescaleFactorTag, ldObjPtr),
00094     // For multigrator
00095     velocityRescaleTensor(velocityRescaleTensorTag, ldObjPtr),
00096     velocityRescaleTensor2(velocityRescaleTensor2Tag, ldObjPtr),
00097     velocityRescaleFactor2(velocityRescaleFactor2Tag, ldObjPtr),
00098     positionRescaleFactor2(positionRescaleFactor2Tag, ldObjPtr),
00099     // End multigrator
00100     tcoupleCoefficient(tcoupleCoefficientTag, ldObjPtr),
00101     stochRescaleCoefficient(stochRescaleCoefficientTag, ldObjPtr),
00102     minimizeCoefficient(minimizeCoefficientTag, ldObjPtr),
00103     momentumCorrection(momentumCorrectionTag, ldObjPtr),
00104 #if USE_BARRIER
00105     cycleBarrier(cycleBarrierTag, ldObjPtr),
00106 #endif
00107     accelMDRescaleFactor(accelMDRescaleFactorTag, ldObjPtr),
00108     adaptTemperature(adaptTemperatureTag, ldObjPtr),
00109     scriptBarrier(scriptBarrierTag, ldObjPtr),
00110 #ifdef MEASURE_NAMD_WITH_PAPI
00111         papiMeasureBarrier(papiMeasureTag, ldObjPtr),
00112 #endif
00113         traceBarrier(traceBarrierTag, ldObjPtr)
00114   { ; }
00115 };
00116 
00117 #endif // BROADCASTS_H
00118 

Generated on Sat Jul 21 01:17:11 2018 for NAMD by  doxygen 1.4.7