-
Notifications
You must be signed in to change notification settings - Fork 1
/
Broadcasts.h
92 lines (84 loc) · 2.44 KB
/
Broadcasts.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/**
*** Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by
*** The Board of Trustees of the University of Illinois.
*** All rights reserved.
**/
#ifndef BROADCASTS_H
#define BROADCASTS_H
#include "NamdTypes.h"
#include "Lattice.h"
#include "BroadcastObject.h"
enum {
SCRIPT_END,
SCRIPT_RUN,
SCRIPT_CONTINUE,
SCRIPT_OUTPUT,
SCRIPT_FORCEOUTPUT,
SCRIPT_MEASURE,
SCRIPT_REINITVELS,
SCRIPT_RESCALEVELS,
SCRIPT_RELOADCHARGES,
SCRIPT_CHECKPOINT,
SCRIPT_REVERT,
SCRIPT_ATOMSENDRECV,
SCRIPT_ATOMSEND,
SCRIPT_ATOMRECV,
SCRIPT_MINIMIZE,
SCRIPT_DUMMY
};
// Tags used in common by all users of broadcast system.
enum {
velocityRescaleFactorTag,
positionRescaleFactorTag,
tcoupleCoefficientTag,
minimizeCoefficientTag,
momentumCorrectionTag,
#if USE_BARRIER
cycleBarrierTag,
#endif
scriptBarrierTag,
traceBarrierTag,
accelMDRescaleFactorTag,
adaptTemperatureTag, //Tag for adaptive tempering temperature updates to Sequencer
#ifdef MEASURE_NAMD_WITH_PAPI
papiMeasureTag,
#endif
dummyTag
};
// Broadcasts used by Contoller <-> Sequencer communication.
struct ControllerBroadcasts
{
SimpleBroadcastObject<BigReal> velocityRescaleFactor;
SimpleBroadcastObject<Tensor> positionRescaleFactor;
SimpleBroadcastObject<BigReal> tcoupleCoefficient;
SimpleBroadcastObject<BigReal> minimizeCoefficient;
SimpleBroadcastObject<Vector> momentumCorrection;
#if USE_BARRIER
SimpleBroadcastObject<int> cycleBarrier;
#endif
SimpleBroadcastObject<int> scriptBarrier;
SimpleBroadcastObject<int> traceBarrier;
SimpleBroadcastObject<Vector> accelMDRescaleFactor;
SimpleBroadcastObject<BigReal> adaptTemperature;
#ifdef MEASURE_NAMD_WITH_PAPI
SimpleBroadcastObject<int> papiMeasureBarrier;
#endif
ControllerBroadcasts(const LDObjHandle *ldObjPtr = 0) :
velocityRescaleFactor(velocityRescaleFactorTag, ldObjPtr),
positionRescaleFactor(positionRescaleFactorTag, ldObjPtr),
tcoupleCoefficient(tcoupleCoefficientTag, ldObjPtr),
minimizeCoefficient(minimizeCoefficientTag, ldObjPtr),
momentumCorrection(momentumCorrectionTag, ldObjPtr),
#if USE_BARRIER
cycleBarrier(cycleBarrierTag, ldObjPtr),
#endif
accelMDRescaleFactor(accelMDRescaleFactorTag, ldObjPtr),
adaptTemperature(adaptTemperatureTag, ldObjPtr),
scriptBarrier(scriptBarrierTag, ldObjPtr),
#ifdef MEASURE_NAMD_WITH_PAPI
papiMeasureBarrier(papiMeasureTag, ldObjPtr),
#endif
traceBarrier(traceBarrierTag, ldObjPtr)
{ ; }
};
#endif // BROADCASTS_H