NAMD
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
ComputeNonbondedSelf Class Reference

#include <ComputeNonbondedSelf.h>

Inheritance diagram for ComputeNonbondedSelf:
ComputePatch ComputeNonbondedUtil Compute

Public Member Functions

 ComputeNonbondedSelf (ComputeID c, PatchID pid, ComputeNonbondedWorkArrays *_workArrays, int minPartition=0, int maxPartition=1, int numPartitions=1)
 
virtual ~ComputeNonbondedSelf ()
 
- Public Member Functions inherited from ComputePatch
 ComputePatch (ComputeID c, PatchID pid)
 
virtual ~ComputePatch ()
 
virtual void atomUpdate ()
 
virtual void doWork ()
 
- Public Member Functions inherited from Compute
 Compute (ComputeID)
 
int type ()
 
virtual ~Compute ()
 
void setNumPatches (int n)
 
int getNumPatches ()
 
virtual void patchReady (PatchID, int doneMigration, int seq)
 
virtual void finishPatch (int)
 
int sequence (void)
 
int priority (void)
 
int getGBISPhase (void)
 
virtual void gbisP2PatchReady (PatchID, int seq)
 
virtual void gbisP3PatchReady (PatchID, int seq)
 

Public Attributes

nonbonded params
 
GBISParamStruct gbisParams
 
BigReal reductionData [reductionDataSize]
 
- Public Attributes inherited from Compute
const ComputeID cid
 
LDObjHandle ldObjHandle
 
LocalWorkMsg *const localWorkMsg
 

Protected Member Functions

virtual void initialize ()
 
virtual int noWork ()
 
virtual void doForce (CompAtom *p, CompAtomExt *pExt, Results *r)
 
- Protected Member Functions inherited from Compute
void enqueueWork ()
 

Protected Attributes

Box< Patch, CompAtom > * avgPositionBox
 
Box< Patch, CompAtom > * velocityBox
 
RealintRad
 
Box< Patch, Real > * intRadBox
 
Box< Patch, GBReal > * psiSumBox
 
Box< Patch, Real > * bornRadBox
 
Box< Patch, GBReal > * dEdaSumBox
 
Box< Patch, Real > * dHdrPrefixBox
 
Pairlists gbisStepPairlists [numGBISPairlists]
 
SubmitReductionreduction
 
SubmitReductionpressureProfileReduction
 
BigRealpressureProfileData
 
ComputeNonbondedWorkArrays *const workArrays
 
Pairlists pairlists
 
int pairlistsValid
 
BigReal pairlistTolerance
 
int minPart
 
int maxPart
 
int numParts
 
- Protected Attributes inherited from ComputePatch
int numAtoms
 
CompAtomExtpExt
 
CompAtomp
 
Resultsr
 
Patchpatch
 
PatchID patchID
 
Box< Patch, CompAtom > * positionBox
 
Box< Patch, Results > * forceBox
 
- Protected Attributes inherited from Compute
int computeType
 
int basePriority
 
int gbisPhase
 
int gbisPhasePriority [3]
 

Static Protected Attributes

static const int numGBISPairlists = 4
 

Detailed Description

Copyright (c) 1995, 1996, 1997, 1998, 1999, 2000 by The Board of Trustees of the University of Illinois. All rights reserved.

Definition at line 14 of file ComputeNonbondedSelf.h.

Constructor & Destructor Documentation

ComputeNonbondedSelf::ComputeNonbondedSelf ( ComputeID  c,
PatchID  pid,
ComputeNonbondedWorkArrays _workArrays,
int  minPartition = 0,
int  maxPartition = 1,
int  numPartitions = 1 
)

Definition at line 23 of file ComputeNonbondedSelf.C.

References Node::Object(), ReductionMgr::Object(), pairlistsValid, pairlistTolerance, Node::parameters, nonbonded::parameters, params, ComputeNonbondedUtil::pressureProfileAtomTypes, pressureProfileData, ComputeNonbondedUtil::pressureProfileOn, pressureProfileReduction, ComputeNonbondedUtil::pressureProfileSlabs, Node::rand, nonbonded::random, reduction, REDUCTIONS_BASIC, REDUCTIONS_PPROF_NONBONDED, Node::simParameters, nonbonded::simParameters, and ReductionMgr::willSubmit().

26  : ComputePatch(c,pid), workArrays(_workArrays),
27  minPart(minPartition), maxPart(maxPartition), numParts(numPartitions)
28 {
30  if (pressureProfileOn) {
35  } else {
37  pressureProfileData = NULL;
38  }
39  pairlistsValid = 0;
40  pairlistTolerance = 0.;
44 }
static Node * Object()
Definition: Node.h:86
Parameters * parameters
ComputeNonbondedWorkArrays *const workArrays
SimParameters * simParameters
Definition: Node.h:178
SubmitReduction * willSubmit(int setID, int size=-1)
Definition: ReductionMgr.C:365
static ReductionMgr * Object(void)
Definition: ReductionMgr.h:278
SimParameters * simParameters
SubmitReduction * pressureProfileReduction
ComputePatch(ComputeID c, PatchID pid)
Definition: ComputePatch.C:24
SubmitReduction * reduction
Parameters * parameters
Definition: Node.h:177
Random * rand
Definition: Node.h:172
double BigReal
Definition: common.h:112
ComputeNonbondedSelf::~ComputeNonbondedSelf ( )
virtual

Definition at line 82 of file ComputeNonbondedSelf.C.

References avgPositionBox, bornRadBox, dEdaSumBox, dHdrPrefixBox, intRadBox, ComputePatch::patch, pressureProfileData, pressureProfileReduction, psiSumBox, reduction, Patch::unregisterAvgPositionPickup(), Patch::unregisterBornRadPickup(), Patch::unregisterDEdaSumDeposit(), Patch::unregisterDHdrPrefixPickup(), Patch::unregisterIntRadPickup(), Patch::unregisterPsiSumDeposit(), Patch::unregisterVelocityPickup(), and velocityBox.

83 {
84  delete reduction;
86  delete [] pressureProfileData;
87  if (avgPositionBox != NULL) {
89  }
90  // BEGIN LA
91  if (velocityBox != NULL) {
93  }
94  // END LA
95 
96  if (psiSumBox != NULL)
98  if (intRadBox != NULL)
100  if (bornRadBox != NULL)
102  if (dEdaSumBox != NULL)
104  if (dHdrPrefixBox != NULL)
106 }
Box< Patch, CompAtom > * avgPositionBox
void unregisterAvgPositionPickup(Compute *cid, Box< Patch, CompAtom > **const box)
Definition: Patch.C:140
void unregisterPsiSumDeposit(Compute *cid, Box< Patch, GBReal > **const box)
Definition: Patch.C:174
Patch * patch
Definition: ComputePatch.h:46
Box< Patch, Real > * dHdrPrefixBox
void unregisterDHdrPrefixPickup(Compute *cid, Box< Patch, Real > **const box)
Definition: Patch.C:222
Box< Patch, GBReal > * dEdaSumBox
SubmitReduction * pressureProfileReduction
SubmitReduction * reduction
void unregisterBornRadPickup(Compute *cid, Box< Patch, Real > **const box)
Definition: Patch.C:199
Box< Patch, Real > * bornRadBox
Box< Patch, GBReal > * psiSumBox
Box< Patch, Real > * intRadBox
void unregisterIntRadPickup(Compute *cid, Box< Patch, Real > **const box)
Definition: Patch.C:182
Box< Patch, CompAtom > * velocityBox
void unregisterVelocityPickup(Compute *cid, Box< Patch, CompAtom > **const box)
Definition: Patch.C:154
void unregisterDEdaSumDeposit(Compute *cid, Box< Patch, GBReal > **const box)
Definition: Patch.C:212

Member Function Documentation

void ComputeNonbondedSelf::doForce ( CompAtom p,
CompAtomExt pExt,
Results r 
)
protectedvirtual

Implements ComputePatch.

Definition at line 163 of file ComputeNonbondedSelf.C.

References GBISParamStruct::a_cut, SimParameters::alpha_cutoff, GBISParamStruct::alpha_max, SimParameters::alpha_max, avgPositionBox, GBISParamStruct::beta, GBISParamStruct::bornRad, bornRadBox, Lattice::c(), ComputeNonbondedUtil::calcFullSelf, ComputeNonbondedUtil::calcFullSelfEnergy, ComputeNonbondedUtil::calcGBIS(), ComputeNonbondedUtil::calcMergeSelf, ComputeNonbondedUtil::calcMergeSelfEnergy, ComputeNonbondedUtil::calcSelf, ComputeNonbondedUtil::calcSelfEnergy, ComputeNonbondedUtil::calcSlowSelf, ComputeNonbondedUtil::calcSlowSelfEnergy, Compute::cid, GBISParamStruct::cid, Box< Owner, Data >::close(), ComputeNonbondedUtil::commOnly, SimParameters::coulomb_radius_offset, GBISParamStruct::cutoff, SimParameters::cutoff, ComputeNonbondedUtil::cutoff, DebugM, GBISParamStruct::dEdaSum, dEdaSumBox, GBISParamStruct::delta, GBISParamStruct::dHdrPrefix, dHdrPrefixBox, SimParameters::dielectric, Flags::doEnergy, GBISParamStruct::doEnergy, Flags::doFullElectrostatics, GBISParamStruct::doFullElectrostatics, Flags::doGBIS, GBISParamStruct::doGBIS, Flags::doLoweAndersen, nonbonded::doLoweAndersen, Flags::doMolly, GBISParamStruct::doSmoothing, GBISParamStruct::epsilon_p, GBISParamStruct::epsilon_s, Results::f, nonbonded::ff, Patch::flags, GBISParamStruct::fsMax, SimParameters::fsMax, nonbonded::fullf, GBISParamStruct::gamma, GBISParamStruct::gbInterEnergy, SimParameters::gbis_beta, SimParameters::gbis_delta, SimParameters::gbis_gamma, gbisParams, Compute::gbisPhase, GBISParamStruct::gbisPhase, gbisStepPairlists, GBISParamStruct::gbisStepPairlists, GBISParamStruct::gbSelfEnergy, Patch::getPatchID(), nonbonded::groupplcutoff, if(), GBISParamStruct::intRad, intRadBox, SubmitReduction::item(), GBISParamStruct::kappa, SimParameters::kappa, Patch::lattice, Flags::maxAtomMovement, Flags::maxForceMerged, Flags::maxGroupRadius, GBISParamStruct::maxGroupRadius, maxPart, nonbonded::maxPart, minPart, nonbonded::minPart, NAMD_die(), ComputePatch::numAtoms, nonbonded::numAtoms, numGBISPairlists, numParts, nonbonded::numParts, GBISParamStruct::numPatches, Node::Object(), nonbonded::offset, nonbonded::offset_f, Box< Owner, Data >::open(), Lattice::origin(), ComputePatch::p, nonbonded::p, pairlists, nonbonded::pairlists, pairlistsValid, Flags::pairlistTolerance, pairlistTolerance, ComputeNonbondedUtil::pairlistWarningIndex, params, ComputePatch::patch, GBISParamStruct::patchID, ComputePatch::pExt, nonbonded::pExt, nonbonded::plcutoff, ComputeNonbondedUtil::pressureProfileAtomTypes, pressureProfileData, ComputeNonbondedUtil::pressureProfileMin, ComputeNonbondedUtil::pressureProfileOn, pressureProfileReduction, nonbonded::pressureProfileReduction, ComputeNonbondedUtil::pressureProfileSlabs, ComputeNonbondedUtil::pressureProfileThickness, GBISParamStruct::psiSum, psiSumBox, reduction, nonbonded::reduction, REDUCTION_ELECT_ENERGY, reductionData, ComputeNonbondedUtil::reductionDataSize, GBISParamStruct::rho_0, Flags::savePairlists, nonbonded::savePairlists, Compute::sequence(), GBISParamStruct::sequence, Node::simParameters, simParams, Results::slow, SimParameters::solvent_dielectric, Flags::step, nonbonded::step, SubmitReduction::submit(), ComputeNonbondedUtil::submitPressureProfileData(), ComputeNonbondedUtil::submitReductionData(), SimParameters::switchingActive, TRACE_COMPOBJ_IDOFFSET, Flags::usePairlists, nonbonded::usePairlists, nonbonded::v, velocityBox, workArrays, nonbonded::workArrays, and Vector::z.

164 {
165  #ifdef NAMD_AVXTILES
166  if (avxTilesMode) {
167  doForceTiles(p, pExt, r);
168  return;
169  }
170  #endif
171 
172  // Inform load balancer.
173  // I assume no threads will suspend until endWork is called
174  //single phase declarations
175  CompAtom* v;
176  int doEnergy = patch->flags.doEnergy;
177 
178 
179 /*******************************************************************************
180  * Prepare Parameters
181  ******************************************************************************/
182  if (!patch->flags.doGBIS || gbisPhase == 1) {
183 
184 #ifdef TRACE_COMPUTE_OBJECTS
185  double traceObjStartTime = CmiWallTimer();
186 #endif
187 
188  DebugM(2,"doForce() called.\n");
189  DebugM(1,numAtoms << " patch 1 atoms\n");
190  DebugM(3, "NUMATOMSxNUMATOMS = " << numAtoms*numAtoms << "\n");
191 
192  for ( int i = 0; i < reductionDataSize; ++i ) reductionData[i] = 0;
193  if (pressureProfileOn) {
194  int n = pressureProfileAtomTypes;
195  memset(pressureProfileData, 0, 3*n*n*pressureProfileSlabs*sizeof(BigReal));
196  // adjust lattice dimensions to allow constant pressure
197  const Lattice &lattice = patch->lattice;
199  pressureProfileMin = lattice.origin().z - 0.5*lattice.c().z;
200  }
201 
202  plint maxa = (plint)(-1);
203  if ( numAtoms > maxa ) {
204  char estr[1024];
205  sprintf(estr,"patch has %d atoms, maximum allowed is %d",numAtoms,maxa);
206  NAMD_die(estr);
207  }
208 
209  params.offset = 0.;
210  params.offset_f = 0.;
211  params.p[0] = p;
212  params.p[1] = p;
213  params.pExt[0] = pExt;
214  params.pExt[1] = pExt;
215 #ifdef NAMD_KNL
216  CompAtomFlt *pFlt = patch->getCompAtomFlt();
217  params.pFlt[0] = pFlt;
218  params.pFlt[1] = pFlt;
219 #endif
221  // BEGIN LA
223  if (params.doLoweAndersen) {
224  DebugM(4, "opening velocity box\n");
225  v = velocityBox->open();
226  params.v[0] = v;
227  params.v[1] = v;
228  }
229  // END LA
230 #ifndef NAMD_CUDA
231  params.ff[0] = r->f[Results::nbond_virial];
232  params.ff[1] = r->f[Results::nbond_virial];
233 #endif
234  params.numAtoms[0] = numAtoms;
235  params.numAtoms[1] = numAtoms;
236 
237  // DMK - Atom Separation (water vs. non-water)
238  #if NAMD_SeparateWaters != 0
239  params.numWaterAtoms[0] = numWaterAtoms;
240  params.numWaterAtoms[1] = numWaterAtoms;
241  #endif
242 
245 
249 
251 
253  params.savePairlists = 0;
254  params.usePairlists = 0;
255  if ( patch->flags.savePairlists ) {
256  params.savePairlists = 1;
257  params.usePairlists = 1;
258  } else if ( patch->flags.usePairlists ) {
259  if ( ! pairlistsValid ||
262  } else {
263  params.usePairlists = 1;
264  }
265  }
266  if ( ! params.usePairlists ) {
267  pairlistsValid = 0;
268  }
271  if ( params.savePairlists ) {
272  pairlistsValid = 1;
276  }
277 
278 
279 /*******************************************************************************
280  * Call Nonbonded Functions
281  ******************************************************************************/
282 
283  if (numAtoms) {
285  {
286 #ifndef NAMD_CUDA
287  params.fullf[0] = r->f[Results::slow_virial];
288  params.fullf[1] = r->f[Results::slow_virial];
289 #endif
290  if ( patch->flags.doMolly ) {
291  if ( doEnergy ) calcSelfEnergy(&params);
292  else calcSelf(&params);
293  CompAtom *p_avg = avgPositionBox->open();
294  params.p[0] = p_avg;
295  params.p[1] = p_avg;
296  if ( doEnergy ) calcSlowSelfEnergy(&params);
297  else calcSlowSelf(&params);
298  avgPositionBox->close(&p_avg);
299  } else if ( patch->flags.maxForceMerged == Results::slow ) {
300  if ( doEnergy ) calcMergeSelfEnergy(&params);
301  else calcMergeSelf(&params);
302  } else {
303  if ( doEnergy ) calcFullSelfEnergy(&params);
304  else calcFullSelf(&params);
305  }
306  }
307  else
308  if ( doEnergy ) calcSelfEnergy(&params);
309  else calcSelf(&params);
310  }//end if atoms
311 
312  // BEGIN LA
313  if (params.doLoweAndersen) {
314  DebugM(4, "closing velocity box\n");
315  velocityBox->close(&v);
316  }
317  // END LA
318  }//end if not gbis
319 
320 /*******************************************************************************
321  * gbis Loop
322 *******************************************************************************/
323 if (patch->flags.doGBIS) {
327  gbisParams.numPatches = 1;//self
331  gbisParams.epsilon_p = simParams->dielectric;
333  gbisParams.kappa = simParams->kappa;
334  gbisParams.cutoff = simParams->cutoff;
336  gbisParams.a_cut = simParams->alpha_cutoff;
337  gbisParams.delta = simParams->gbis_delta;
338  gbisParams.beta = simParams->gbis_beta;
339  gbisParams.gamma = simParams->gbis_gamma;
340  gbisParams.alpha_max = simParams->alpha_max;
341  gbisParams.cid = cid;
345  gbisParams.doEnergy = doEnergy;
346  gbisParams.fsMax = simParams->fsMax;
347  for (int i = 0; i < numGBISPairlists; i++)
349 
350  //open boxes
351  if (gbisPhase == 1) {
358  } else if (gbisPhase == 2) {
363  } else if (gbisPhase == 3) {
366  }
367 
368  //make call to calculate GBIS
371  }
372 
373  //close boxes
374  if (gbisPhase == 1) {
376  } else if (gbisPhase == 2) {
378  } else if (gbisPhase == 3) {
384  }
385 }// end if doGBIS
386 
387 /*******************************************************************************
388  * Reduction
389 *******************************************************************************/
390  if (!patch->flags.doGBIS || gbisPhase == 3) {
392  if (pressureProfileOn)
394 
395 
396 #ifdef TRACE_COMPUTE_OBJECTS
397  traceUserBracketEvent(TRACE_COMPOBJ_IDOFFSET+cid, traceObjStartTime, CmiWallTimer());
398 #endif
399 
400  reduction->submit();
401  if (pressureProfileOn)
403  }// end not gbis
404 }
static Node * Object()
Definition: Node.h:86
Pairlists * pairlists
Box< Patch, CompAtom > * avgPositionBox
CompAtom * p
Definition: ComputePatch.h:37
int sequence(void)
Definition: Compute.h:64
CompAtomExt * pExt
Definition: ComputePatch.h:36
BigReal solvent_dielectric
static void submitReductionData(BigReal *, SubmitReduction *)
#define TRACE_COMPOBJ_IDOFFSET
Definition: Compute.h:77
static void(* calcSelf)(nonbonded *)
Lattice & lattice
Definition: Patch.h:126
CompAtom * p[2]
ComputeNonbondedWorkArrays *const workArrays
Patch * patch
Definition: ComputePatch.h:46
Box< Patch, Real > * dHdrPrefixBox
void calcGBIS(nonbonded *params, GBISParamStruct *gbisParams)
Definition: ComputeGBIS.C:261
SimParameters * simParameters
Definition: Node.h:178
int savePairlists
Definition: PatchTypes.h:39
BigReal & item(int i)
Definition: ReductionMgr.h:312
GBISParamStruct gbisParams
#define DebugM(x, y)
Definition: Debug.h:59
CompAtom * v[2]
BigReal gbis_gamma
BigReal z
Definition: Vector.h:66
int usePairlists
Definition: PatchTypes.h:38
BigReal * reduction
static void submitPressureProfileData(BigReal *, SubmitReduction *)
static BigReal pressureProfileThickness
if(ComputeNonbondedUtil::goMethod==2)
int doLoweAndersen
Definition: PatchTypes.h:26
Box< Patch, GBReal > * dEdaSumBox
Vector origin() const
Definition: Lattice.h:262
BigReal coulomb_radius_offset
Flags flags
Definition: Patch.h:127
BigReal alpha_max
unsigned short plint
static void(* calcMergeSelfEnergy)(nonbonded *)
Pairlists * gbisStepPairlists[4]
static BigReal pressureProfileMin
SubmitReduction * pressureProfileReduction
int doEnergy
Definition: PatchTypes.h:20
int doFullElectrostatics
Definition: PatchTypes.h:23
Force * f[maxNumForces]
Definition: PatchTypes.h:67
BigReal gbis_beta
SubmitReduction * reduction
CompAtomExt * pExt[2]
BigReal alpha_cutoff
static void(* calcFullSelf)(nonbonded *)
void NAMD_die(const char *err_msg)
Definition: common.C:83
static void(* calcSlowSelf)(nonbonded *)
BigReal maxAtomMovement
Definition: PatchTypes.h:41
static void(* calcSlowSelfEnergy)(nonbonded *)
Box< Patch, Real > * bornRadBox
int gbisPhase
Definition: Compute.h:39
Box< Patch, GBReal > * psiSumBox
static void(* calcSelfEnergy)(nonbonded *)
PatchID getPatchID()
Definition: Patch.h:114
Box< Patch, Real > * intRadBox
#define simParams
Definition: Output.C:127
Box< Patch, CompAtom > * velocityBox
BigReal pairlistTolerance
Definition: PatchTypes.h:40
BigReal gbis_delta
BigReal dielectric
int doGBIS
Definition: PatchTypes.h:28
Pairlists gbisStepPairlists[numGBISPairlists]
void submit(void)
Definition: ReductionMgr.h:323
Force * fullf[2]
int maxForceMerged
Definition: PatchTypes.h:32
BigReal * pressureProfileReduction
Data * open(void)
Definition: Box.h:39
static const int numGBISPairlists
BigReal maxGroupRadius
Definition: PatchTypes.h:42
const ComputeID cid
Definition: Compute.h:43
BigReal reductionData[reductionDataSize]
void close(Data **const t)
Definition: Box.h:49
int doMolly
Definition: PatchTypes.h:24
Vector c() const
Definition: Lattice.h:254
ComputeNonbondedWorkArrays * workArrays
static void(* calcMergeSelf)(nonbonded *)
double BigReal
Definition: common.h:112
int step
Definition: PatchTypes.h:16
static void(* calcFullSelfEnergy)(nonbonded *)
void ComputeNonbondedSelf::initialize ( void  )
protectedvirtual

Reimplemented from ComputePatch.

Definition at line 64 of file ComputeNonbondedSelf.C.

References avgPositionBox, bornRadBox, Compute::cid, dEdaSumBox, dHdrPrefixBox, ComputePatch::initialize(), intRadBox, ComputePatch::patch, ComputePatch::patchID, psiSumBox, register_cuda_compute_self(), Patch::registerAvgPositionPickup(), Patch::registerBornRadPickup(), Patch::registerDEdaSumDeposit(), Patch::registerDHdrPrefixPickup(), Patch::registerIntRadPickup(), Patch::registerPsiSumDeposit(), Patch::registerVelocityPickup(), and velocityBox.

64  {
67  // BEGIN LA
69  // END LA
70 
76 
77 #ifdef NAMD_CUDA
79 #endif
80 }
Box< Patch, GBReal > * registerDEdaSumDeposit(Compute *cid)
Definition: Patch.C:204
Box< Patch, CompAtom > * avgPositionBox
Box< Patch, CompAtom > * registerAvgPositionPickup(Compute *cid)
Definition: Patch.C:134
Patch * patch
Definition: ComputePatch.h:46
Box< Patch, Real > * dHdrPrefixBox
Box< Patch, Real > * registerBornRadPickup(Compute *cid)
Definition: Patch.C:196
Box< Patch, GBReal > * dEdaSumBox
void register_cuda_compute_self(ComputeID c, PatchID pid)
Box< Patch, GBReal > * registerPsiSumDeposit(Compute *cid)
Definition: Patch.C:164
PatchID patchID
Definition: ComputePatch.h:49
Box< Patch, Real > * registerIntRadPickup(Compute *cid)
Definition: Patch.C:179
Box< Patch, Real > * bornRadBox
Box< Patch, GBReal > * psiSumBox
Box< Patch, Real > * intRadBox
virtual void initialize()
Definition: ComputePatch.C:46
Box< Patch, Real > * registerDHdrPrefixPickup(Compute *cid)
Definition: Patch.C:218
Box< Patch, CompAtom > * velocityBox
const ComputeID cid
Definition: Compute.h:43
Box< Patch, CompAtom > * registerVelocityPickup(Compute *cid)
Definition: Patch.C:148
int ComputeNonbondedSelf::noWork ( )
protectedvirtual

Reimplemented from Compute.

Definition at line 108 of file ComputeNonbondedSelf.C.

References avgPositionBox, bornRadBox, dEdaSumBox, dHdrPrefixBox, Flags::doGBIS, Flags::doLoweAndersen, Flags::doMolly, Flags::doNonbonded, Patch::flags, ComputePatch::forceBox, Compute::gbisPhase, intRadBox, SubmitReduction::item(), Compute::ldObjHandle, ComputePatch::numAtoms, LdbCoordinator::Object(), ComputePatch::patch, ComputePatch::positionBox, ComputeNonbondedUtil::pressureProfileOn, pressureProfileReduction, psiSumBox, reduction, REDUCTION_COMPUTE_CHECKSUM, Box< Owner, Data >::skip(), LdbCoordinator::skipWork(), SubmitReduction::submit(), and velocityBox.

108  {
109 
110  if (patch->flags.doGBIS) {
111  gbisPhase = 1 + (gbisPhase % 3);//1->2->3->1...
112  }
113 
114 #ifndef NAMD_CUDA
115  if ( patch->flags.doNonbonded && numAtoms ) {
116  return 0; // work to do, enqueue as usual
117  } else {
118 #else
119  {
120 #endif
121 
122  if (patch->flags.doGBIS) {
123  if (gbisPhase == 1) {
124  psiSumBox->skip();
125  intRadBox->skip();
126  if (patch->flags.doNonbonded) return 1;
127  else gbisPhase = 2;
128  }
129  if (gbisPhase == 2) {
130  bornRadBox->skip();
131  dEdaSumBox->skip();
132  if (patch->flags.doNonbonded) return 1;
133  else gbisPhase = 3;
134  }
135  if (gbisPhase == 3) {
136  dHdrPrefixBox->skip();
137  }
138  }
139 
140  // skip all boxes
141  positionBox->skip();
142  forceBox->skip();
144  // BEGIN LA
146  // END LA
147 
149  reduction->submit();
150 
151  if (pressureProfileOn)
153 
154 #ifndef NAMD_CUDA
155  // Inform load balancer
157 #endif
158 
159  return 1; // no work to do, do not enqueue
160  }
161 }
Box< Patch, CompAtom > * avgPositionBox
Patch * patch
Definition: ComputePatch.h:46
Box< Patch, Real > * dHdrPrefixBox
Box< Patch, Results > * forceBox
Definition: ComputePatch.h:51
BigReal & item(int i)
Definition: ReductionMgr.h:312
LDObjHandle ldObjHandle
Definition: Compute.h:44
int doLoweAndersen
Definition: PatchTypes.h:26
Box< Patch, GBReal > * dEdaSumBox
Flags flags
Definition: Patch.h:127
SubmitReduction * pressureProfileReduction
void skipWork(const LDObjHandle &handle)
SubmitReduction * reduction
int doNonbonded
Definition: PatchTypes.h:22
static LdbCoordinator * Object()
void skip(void)
Definition: Box.h:63
Box< Patch, Real > * bornRadBox
int gbisPhase
Definition: Compute.h:39
Box< Patch, GBReal > * psiSumBox
Box< Patch, Real > * intRadBox
Box< Patch, CompAtom > * positionBox
Definition: ComputePatch.h:50
Box< Patch, CompAtom > * velocityBox
int doGBIS
Definition: PatchTypes.h:28
void submit(void)
Definition: ReductionMgr.h:323
int doMolly
Definition: PatchTypes.h:24

Member Data Documentation

Box<Patch,CompAtom>* ComputeNonbondedSelf::avgPositionBox
protected

Definition at line 36 of file ComputeNonbondedSelf.h.

Referenced by doForce(), initialize(), noWork(), and ~ComputeNonbondedSelf().

Box<Patch,Real>* ComputeNonbondedSelf::bornRadBox
protected

Definition at line 44 of file ComputeNonbondedSelf.h.

Referenced by doForce(), initialize(), noWork(), and ~ComputeNonbondedSelf().

Box<Patch,GBReal>* ComputeNonbondedSelf::dEdaSumBox
protected

Definition at line 45 of file ComputeNonbondedSelf.h.

Referenced by doForce(), initialize(), noWork(), and ~ComputeNonbondedSelf().

Box<Patch,Real>* ComputeNonbondedSelf::dHdrPrefixBox
protected

Definition at line 46 of file ComputeNonbondedSelf.h.

Referenced by doForce(), initialize(), noWork(), and ~ComputeNonbondedSelf().

GBISParamStruct ComputeNonbondedSelf::gbisParams

Definition at line 18 of file ComputeNonbondedSelf.h.

Referenced by doForce().

Pairlists ComputeNonbondedSelf::gbisStepPairlists[numGBISPairlists]
protected

Definition at line 48 of file ComputeNonbondedSelf.h.

Referenced by doForce().

Real* ComputeNonbondedSelf::intRad
protected

Definition at line 41 of file ComputeNonbondedSelf.h.

Box<Patch,Real>* ComputeNonbondedSelf::intRadBox
protected

Definition at line 42 of file ComputeNonbondedSelf.h.

Referenced by doForce(), initialize(), noWork(), and ~ComputeNonbondedSelf().

int ComputeNonbondedSelf::maxPart
protected

Definition at line 61 of file ComputeNonbondedSelf.h.

Referenced by doForce().

int ComputeNonbondedSelf::minPart
protected

Definition at line 61 of file ComputeNonbondedSelf.h.

Referenced by doForce().

const int ComputeNonbondedSelf::numGBISPairlists = 4
staticprotected

Definition at line 47 of file ComputeNonbondedSelf.h.

Referenced by doForce().

int ComputeNonbondedSelf::numParts
protected

Definition at line 61 of file ComputeNonbondedSelf.h.

Referenced by doForce().

Pairlists ComputeNonbondedSelf::pairlists
protected

Definition at line 56 of file ComputeNonbondedSelf.h.

Referenced by doForce().

int ComputeNonbondedSelf::pairlistsValid
protected

Definition at line 57 of file ComputeNonbondedSelf.h.

Referenced by ComputeNonbondedSelf(), and doForce().

BigReal ComputeNonbondedSelf::pairlistTolerance
protected

Definition at line 58 of file ComputeNonbondedSelf.h.

Referenced by ComputeNonbondedSelf(), and doForce().

nonbonded ComputeNonbondedSelf::params

Definition at line 17 of file ComputeNonbondedSelf.h.

Referenced by ComputeNonbondedSelf(), and doForce().

BigReal* ComputeNonbondedSelf::pressureProfileData
protected

Definition at line 52 of file ComputeNonbondedSelf.h.

Referenced by ComputeNonbondedSelf(), doForce(), and ~ComputeNonbondedSelf().

SubmitReduction* ComputeNonbondedSelf::pressureProfileReduction
protected
Box<Patch,GBReal>* ComputeNonbondedSelf::psiSumBox
protected

Definition at line 43 of file ComputeNonbondedSelf.h.

Referenced by doForce(), initialize(), noWork(), and ~ComputeNonbondedSelf().

SubmitReduction* ComputeNonbondedSelf::reduction
protected
BigReal ComputeNonbondedSelf::reductionData[reductionDataSize]

Definition at line 23 of file ComputeNonbondedSelf.h.

Referenced by doForce().

Box<Patch,CompAtom>* ComputeNonbondedSelf::velocityBox
protected

Definition at line 38 of file ComputeNonbondedSelf.h.

Referenced by doForce(), initialize(), noWork(), and ~ComputeNonbondedSelf().

ComputeNonbondedWorkArrays* const ComputeNonbondedSelf::workArrays
protected

Definition at line 54 of file ComputeNonbondedSelf.h.

Referenced by doForce().


The documentation for this class was generated from the following files: