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::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:181
SubmitReduction * willSubmit(int setID, int size=-1)
Definition: ReductionMgr.C:366
static ReductionMgr * Object(void)
Definition: ReductionMgr.h:279
SimParameters * simParameters
SubmitReduction * pressureProfileReduction
ComputePatch(ComputeID c, PatchID pid)
Definition: ComputePatch.C:24
SubmitReduction * reduction
Parameters * parameters
Definition: Node.h:180
Random * rand
Definition: Node.h:175
double BigReal
Definition: common.h:123

◆ ~ComputeNonbondedSelf()

ComputeNonbondedSelf::~ComputeNonbondedSelf ( )
virtual

Definition at line 78 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.

79 {
80  delete reduction;
82  delete [] pressureProfileData;
83  if (avgPositionBox != NULL) {
85  }
86  // BEGIN LA
87  if (velocityBox != NULL) {
89  }
90  // END LA
91 
92  if (psiSumBox != NULL)
94  if (intRadBox != NULL)
96  if (bornRadBox != NULL)
98  if (dEdaSumBox != NULL)
100  if (dHdrPrefixBox != NULL)
102 }
Box< Patch, CompAtom > * avgPositionBox
void unregisterAvgPositionPickup(Compute *cid, Box< Patch, CompAtom > **const box)
Definition: Patch.C:139
void unregisterPsiSumDeposit(Compute *cid, Box< Patch, GBReal > **const box)
Definition: Patch.C:173
Patch * patch
Definition: ComputePatch.h:46
Box< Patch, Real > * dHdrPrefixBox
void unregisterDHdrPrefixPickup(Compute *cid, Box< Patch, Real > **const box)
Definition: Patch.C:221
Box< Patch, GBReal > * dEdaSumBox
SubmitReduction * pressureProfileReduction
SubmitReduction * reduction
void unregisterBornRadPickup(Compute *cid, Box< Patch, Real > **const box)
Definition: Patch.C:198
Box< Patch, Real > * bornRadBox
Box< Patch, GBReal > * psiSumBox
Box< Patch, Real > * intRadBox
void unregisterIntRadPickup(Compute *cid, Box< Patch, Real > **const box)
Definition: Patch.C:181
Box< Patch, CompAtom > * velocityBox
void unregisterVelocityPickup(Compute *cid, Box< Patch, CompAtom > **const box)
Definition: Patch.C:153
void unregisterDEdaSumDeposit(Compute *cid, Box< Patch, GBReal > **const box)
Definition: Patch.C:211

Member Function Documentation

◆ doForce()

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

Implements ComputePatch.

Definition at line 159 of file ComputeNonbondedSelf.C.

References GBISParamStruct::a_cut, GBISParamStruct::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, GBISParamStruct::cutoff, ComputeNonbondedUtil::cutoff, DebugM, GBISParamStruct::dEdaSum, dEdaSumBox, GBISParamStruct::delta, GBISParamStruct::dHdrPrefix, dHdrPrefixBox, 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, nonbonded::fullf, GBISParamStruct::gamma, GBISParamStruct::gbInterEnergy, gbisParams, Compute::gbisPhase, GBISParamStruct::gbisPhase, gbisStepPairlists, GBISParamStruct::gbisStepPairlists, GBISParamStruct::gbSelfEnergy, Patch::getPatchID(), nonbonded::groupplcutoff, GBISParamStruct::intRad, intRadBox, SubmitReduction::item(), GBISParamStruct::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, ComputePatch::r, 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, Flags::step, nonbonded::step, SubmitReduction::submit(), ComputeNonbondedUtil::submitPressureProfileData(), ComputeNonbondedUtil::submitReductionData(), TRACE_COMPOBJ_IDOFFSET, Flags::usePairlists, nonbonded::usePairlists, nonbonded::v, velocityBox, workArrays, nonbonded::workArrays, and Vector::z.

160 {
161  #ifdef NAMD_AVXTILES
162  if (avxTilesMode) {
163  doForceTiles(p, pExt, r);
164  return;
165  }
166  #endif
167 
168  // Inform load balancer.
169  // I assume no threads will suspend until endWork is called
170  //single phase declarations
171  CompAtom* v;
172  int doEnergy = patch->flags.doEnergy;
173 
174 
175 /*******************************************************************************
176  * Prepare Parameters
177  ******************************************************************************/
178  if (!patch->flags.doGBIS || gbisPhase == 1) {
179 
180 #ifdef TRACE_COMPUTE_OBJECTS
181  double traceObjStartTime = CmiWallTimer();
182 #endif
183 
184  DebugM(2,"doForce() called.\n");
185  DebugM(1,numAtoms << " patch 1 atoms\n");
186  DebugM(3, "NUMATOMSxNUMATOMS = " << numAtoms*numAtoms << "\n");
187 
188  for ( int i = 0; i < reductionDataSize; ++i ) reductionData[i] = 0;
189  if (pressureProfileOn) {
190  int n = pressureProfileAtomTypes;
191  memset(pressureProfileData, 0, 3*n*n*pressureProfileSlabs*sizeof(BigReal));
192  // adjust lattice dimensions to allow constant pressure
193  const Lattice &lattice = patch->lattice;
195  pressureProfileMin = lattice.origin().z - 0.5*lattice.c().z;
196  }
197 
198  plint maxa = (plint)(-1);
199  if ( numAtoms > maxa ) {
200  char estr[1024];
201  sprintf(estr,"patch has %d atoms, maximum allowed is %d",numAtoms,maxa);
202  NAMD_die(estr);
203  }
204 
205  params.offset = 0.;
206  params.offset_f = 0.;
207  params.p[0] = p;
208  params.p[1] = p;
209  params.pExt[0] = pExt;
210  params.pExt[1] = pExt;
211 #ifdef NAMD_KNL
212  CompAtomFlt *pFlt = patch->getCompAtomFlt();
213  params.pFlt[0] = pFlt;
214  params.pFlt[1] = pFlt;
215 #endif
217  // BEGIN LA
219  if (params.doLoweAndersen) {
220  DebugM(4, "opening velocity box\n");
221  v = velocityBox->open();
222  params.v[0] = v;
223  params.v[1] = v;
224  }
225  // END LA
226 #if !(defined(NAMD_CUDA) || defined(NAMD_HIP))
227  params.ff[0] = r->f[Results::nbond_virial];
228  params.ff[1] = r->f[Results::nbond_virial];
229 #endif
230  params.numAtoms[0] = numAtoms;
231  params.numAtoms[1] = numAtoms;
232 
233  // DMK - Atom Separation (water vs. non-water)
234  #if NAMD_SeparateWaters != 0
235  params.numWaterAtoms[0] = numWaterAtoms;
236  params.numWaterAtoms[1] = numWaterAtoms;
237  #endif
238 
241 
245 
247 
249  params.savePairlists = 0;
250  params.usePairlists = 0;
251  if ( patch->flags.savePairlists ) {
252  params.savePairlists = 1;
253  params.usePairlists = 1;
254  } else if ( patch->flags.usePairlists ) {
255  if ( ! pairlistsValid ||
258  } else {
259  params.usePairlists = 1;
260  }
261  }
262  if ( ! params.usePairlists ) {
263  pairlistsValid = 0;
264  }
267  if ( params.savePairlists ) {
268  pairlistsValid = 1;
272  }
273 
274 
275 /*******************************************************************************
276  * Call Nonbonded Functions
277  ******************************************************************************/
278 
279  if (numAtoms) {
281  {
282 #if !(defined(NAMD_CUDA) || defined(NAMD_HIP))
283  params.fullf[0] = r->f[Results::slow_virial];
284  params.fullf[1] = r->f[Results::slow_virial];
285 #endif
286  if ( patch->flags.doMolly ) {
287  if ( doEnergy ) calcSelfEnergy(&params);
288  else calcSelf(&params);
289  CompAtom *p_avg = avgPositionBox->open();
290  params.p[0] = p_avg;
291  params.p[1] = p_avg;
292  if ( doEnergy ) calcSlowSelfEnergy(&params);
293  else calcSlowSelf(&params);
294  avgPositionBox->close(&p_avg);
295  } else if ( patch->flags.maxForceMerged == Results::slow ) {
296  if ( doEnergy ) calcMergeSelfEnergy(&params);
297  else calcMergeSelf(&params);
298  } else {
299  if ( doEnergy ) calcFullSelfEnergy(&params);
300  else calcFullSelf(&params);
301  }
302  }
303  else
304  if ( doEnergy ) calcSelfEnergy(&params);
305  else calcSelf(&params);
306  }//end if atoms
307 
308  // BEGIN LA
309  if (params.doLoweAndersen) {
310  DebugM(4, "closing velocity box\n");
311  velocityBox->close(&v);
312  }
313  // END LA
314  }//end if not gbis
315 
316 /*******************************************************************************
317  * gbis Loop
318 *******************************************************************************/
319 if (patch->flags.doGBIS) {
323  gbisParams.numPatches = 1;//self
326  gbisParams.epsilon_s = simParams->solvent_dielectric;
327  gbisParams.epsilon_p = simParams->dielectric;
328  gbisParams.rho_0 = simParams->coulomb_radius_offset;
329  gbisParams.kappa = simParams->kappa;
330  gbisParams.cutoff = simParams->cutoff;
331  gbisParams.doSmoothing = simParams->switchingActive;
332  gbisParams.a_cut = simParams->alpha_cutoff;
333  gbisParams.delta = simParams->gbis_delta;
334  gbisParams.beta = simParams->gbis_beta;
335  gbisParams.gamma = simParams->gbis_gamma;
336  gbisParams.alpha_max = simParams->alpha_max;
337  gbisParams.cid = cid;
341  gbisParams.doEnergy = doEnergy;
342  gbisParams.fsMax = simParams->fsMax;
343  for (int i = 0; i < numGBISPairlists; i++)
345 
346  //open boxes
347  if (gbisPhase == 1) {
354  } else if (gbisPhase == 2) {
359  } else if (gbisPhase == 3) {
362  }
363 
364  //make call to calculate GBIS
367  }
368 
369  //close boxes
370  if (gbisPhase == 1) {
372  } else if (gbisPhase == 2) {
374  } else if (gbisPhase == 3) {
380  }
381 }// end if doGBIS
382 
383 /*******************************************************************************
384  * Reduction
385 *******************************************************************************/
386  if (!patch->flags.doGBIS || gbisPhase == 3) {
388  if (pressureProfileOn)
390 
391 
392 #ifdef TRACE_COMPUTE_OBJECTS
393  traceUserBracketEvent(TRACE_COMPOBJ_IDOFFSET+cid, traceObjStartTime, CmiWallTimer());
394 #endif
395 
396  reduction->submit();
397  if (pressureProfileOn)
399  }// end not gbis
400 }
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
NAMD_HOST_DEVICE Vector c() const
Definition: Lattice.h:270
static void submitReductionData(BigReal *, SubmitReduction *)
#define TRACE_COMPOBJ_IDOFFSET
Definition: Compute.h:77
static void(* calcSelf)(nonbonded *)
Lattice & lattice
Definition: Patch.h:127
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:181
int savePairlists
Definition: PatchTypes.h:40
BigReal & item(int i)
Definition: ReductionMgr.h:313
GBISParamStruct gbisParams
#define DebugM(x, y)
Definition: Debug.h:75
CompAtom * v[2]
BigReal z
Definition: Vector.h:74
int usePairlists
Definition: PatchTypes.h:39
BigReal * reduction
static void submitPressureProfileData(BigReal *, SubmitReduction *)
static BigReal pressureProfileThickness
int doLoweAndersen
Definition: PatchTypes.h:27
Box< Patch, GBReal > * dEdaSumBox
Flags flags
Definition: Patch.h:128
unsigned short plint
static void(* calcMergeSelfEnergy)(nonbonded *)
Pairlists * gbisStepPairlists[4]
static BigReal pressureProfileMin
SubmitReduction * pressureProfileReduction
Results * r
Definition: ComputePatch.h:38
int doEnergy
Definition: PatchTypes.h:20
int doFullElectrostatics
Definition: PatchTypes.h:23
Force * f[maxNumForces]
Definition: PatchTypes.h:146
SubmitReduction * reduction
CompAtomExt * pExt[2]
PatchID getPatchID() const
Definition: Patch.h:114
static void(* calcFullSelf)(nonbonded *)
void NAMD_die(const char *err_msg)
Definition: common.C:147
static void(* calcSlowSelf)(nonbonded *)
BigReal maxAtomMovement
Definition: PatchTypes.h:42
static void(* calcSlowSelfEnergy)(nonbonded *)
Box< Patch, Real > * bornRadBox
int gbisPhase
Definition: Compute.h:39
Box< Patch, GBReal > * psiSumBox
static void(* calcSelfEnergy)(nonbonded *)
Box< Patch, Real > * intRadBox
#define simParams
Definition: Output.C:129
Box< Patch, CompAtom > * velocityBox
BigReal pairlistTolerance
Definition: PatchTypes.h:41
int doGBIS
Definition: PatchTypes.h:29
Pairlists gbisStepPairlists[numGBISPairlists]
void submit(void)
Definition: ReductionMgr.h:324
Force * fullf[2]
int maxForceMerged
Definition: PatchTypes.h:33
BigReal * pressureProfileReduction
Data * open(void)
Definition: Box.h:39
static const int numGBISPairlists
BigReal maxGroupRadius
Definition: PatchTypes.h:43
const ComputeID cid
Definition: Compute.h:43
NAMD_HOST_DEVICE Vector origin() const
Definition: Lattice.h:278
BigReal reductionData[reductionDataSize]
void close(Data **const t)
Definition: Box.h:49
int doMolly
Definition: PatchTypes.h:24
ComputeNonbondedWorkArrays * workArrays
static void(* calcMergeSelf)(nonbonded *)
double BigReal
Definition: common.h:123
int step
Definition: PatchTypes.h:16
static void(* calcFullSelfEnergy)(nonbonded *)

◆ initialize()

void ComputeNonbondedSelf::initialize ( void  )
protectedvirtual

Reimplemented from ComputePatch.

Definition at line 64 of file ComputeNonbondedSelf.C.

References avgPositionBox, bornRadBox, dEdaSumBox, dHdrPrefixBox, ComputePatch::initialize(), intRadBox, ComputePatch::patch, psiSumBox, 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 }
Box< Patch, GBReal > * registerDEdaSumDeposit(Compute *cid)
Definition: Patch.C:203
Box< Patch, CompAtom > * avgPositionBox
Box< Patch, CompAtom > * registerAvgPositionPickup(Compute *cid)
Definition: Patch.C:133
Patch * patch
Definition: ComputePatch.h:46
Box< Patch, Real > * dHdrPrefixBox
Box< Patch, Real > * registerBornRadPickup(Compute *cid)
Definition: Patch.C:195
Box< Patch, GBReal > * dEdaSumBox
Box< Patch, GBReal > * registerPsiSumDeposit(Compute *cid)
Definition: Patch.C:163
Box< Patch, Real > * registerIntRadPickup(Compute *cid)
Definition: Patch.C:178
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:217
Box< Patch, CompAtom > * velocityBox
Box< Patch, CompAtom > * registerVelocityPickup(Compute *cid)
Definition: Patch.C:147

◆ noWork()

int ComputeNonbondedSelf::noWork ( )
protectedvirtual

Reimplemented from Compute.

Definition at line 104 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.

104  {
105 
106  if (patch->flags.doGBIS) {
107  gbisPhase = 1 + (gbisPhase % 3);//1->2->3->1...
108  }
109 
110 #if !(defined(NAMD_CUDA) || defined(NAMD_HIP))
111  if ( patch->flags.doNonbonded && numAtoms ) {
112  return 0; // work to do, enqueue as usual
113  } else {
114 #else
115  {
116 #endif
117 
118  if (patch->flags.doGBIS) {
119  if (gbisPhase == 1) {
120  psiSumBox->skip();
121  intRadBox->skip();
122  if (patch->flags.doNonbonded) return 1;
123  else gbisPhase = 2;
124  }
125  if (gbisPhase == 2) {
126  bornRadBox->skip();
127  dEdaSumBox->skip();
128  if (patch->flags.doNonbonded) return 1;
129  else gbisPhase = 3;
130  }
131  if (gbisPhase == 3) {
132  dHdrPrefixBox->skip();
133  }
134  }
135 
136  // skip all boxes
137  positionBox->skip();
138  forceBox->skip();
140  // BEGIN LA
142  // END LA
143 
145  reduction->submit();
146 
147  if (pressureProfileOn)
149 
150 #if !(defined(NAMD_CUDA) || defined(NAMD_HIP))
151  // Inform load balancer
153 #endif
154 
155  return 1; // no work to do, do not enqueue
156  }
157 }
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:313
LDObjHandle ldObjHandle
Definition: Compute.h:44
int doLoweAndersen
Definition: PatchTypes.h:27
Box< Patch, GBReal > * dEdaSumBox
Flags flags
Definition: Patch.h:128
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:29
void submit(void)
Definition: ReductionMgr.h:324
int doMolly
Definition: PatchTypes.h:24

Member Data Documentation

◆ avgPositionBox

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

Definition at line 36 of file ComputeNonbondedSelf.h.

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

◆ bornRadBox

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

Definition at line 44 of file ComputeNonbondedSelf.h.

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

◆ dEdaSumBox

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

Definition at line 45 of file ComputeNonbondedSelf.h.

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

◆ dHdrPrefixBox

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

Definition at line 46 of file ComputeNonbondedSelf.h.

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

◆ gbisParams

GBISParamStruct ComputeNonbondedSelf::gbisParams

Definition at line 18 of file ComputeNonbondedSelf.h.

Referenced by doForce().

◆ gbisStepPairlists

Pairlists ComputeNonbondedSelf::gbisStepPairlists[numGBISPairlists]
protected

Definition at line 48 of file ComputeNonbondedSelf.h.

Referenced by doForce().

◆ intRad

Real* ComputeNonbondedSelf::intRad
protected

Definition at line 41 of file ComputeNonbondedSelf.h.

◆ intRadBox

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

Definition at line 42 of file ComputeNonbondedSelf.h.

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

◆ maxPart

int ComputeNonbondedSelf::maxPart
protected

Definition at line 61 of file ComputeNonbondedSelf.h.

Referenced by doForce().

◆ minPart

int ComputeNonbondedSelf::minPart
protected

Definition at line 61 of file ComputeNonbondedSelf.h.

Referenced by doForce().

◆ numGBISPairlists

const int ComputeNonbondedSelf::numGBISPairlists = 4
staticprotected

Definition at line 47 of file ComputeNonbondedSelf.h.

Referenced by doForce().

◆ numParts

int ComputeNonbondedSelf::numParts
protected

Definition at line 61 of file ComputeNonbondedSelf.h.

Referenced by doForce().

◆ pairlists

Pairlists ComputeNonbondedSelf::pairlists
protected

Definition at line 56 of file ComputeNonbondedSelf.h.

Referenced by doForce().

◆ pairlistsValid

int ComputeNonbondedSelf::pairlistsValid
protected

Definition at line 57 of file ComputeNonbondedSelf.h.

Referenced by ComputeNonbondedSelf(), and doForce().

◆ pairlistTolerance

BigReal ComputeNonbondedSelf::pairlistTolerance
protected

Definition at line 58 of file ComputeNonbondedSelf.h.

Referenced by ComputeNonbondedSelf(), and doForce().

◆ params

nonbonded ComputeNonbondedSelf::params

Definition at line 17 of file ComputeNonbondedSelf.h.

Referenced by ComputeNonbondedSelf(), and doForce().

◆ pressureProfileData

BigReal* ComputeNonbondedSelf::pressureProfileData
protected

Definition at line 52 of file ComputeNonbondedSelf.h.

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

◆ pressureProfileReduction

SubmitReduction* ComputeNonbondedSelf::pressureProfileReduction
protected

◆ psiSumBox

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

Definition at line 43 of file ComputeNonbondedSelf.h.

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

◆ reduction

SubmitReduction* ComputeNonbondedSelf::reduction
protected

◆ reductionData

BigReal ComputeNonbondedSelf::reductionData[reductionDataSize]

Definition at line 23 of file ComputeNonbondedSelf.h.

Referenced by doForce().

◆ velocityBox

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

Definition at line 38 of file ComputeNonbondedSelf.h.

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

◆ workArrays

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: