21 #define MIN_DEBUG_LEVEL 4 27 int minPartition,
int maxPartition,
int numPartitions)
29 minPart(minPartition), maxPart(maxPartition), numParts(numPartitions)
54 knl_fast_grad_table, knl_fast_ener_table,
55 knl_scor_grad_table, knl_scor_ener_table,
56 avx_tiles_eps4_sigma, avx_tiles_eps4_sigma_14,
59 knl_slow_ener_table, knl_excl_grad_table,
60 knl_excl_ener_table, avxTilesMode);
61 tileLists.atomUpdate(
patch[0]->getTiles(),
patch[1]->getTiles());
68 for (
int i=0; i<2; i++) {
87 for (
int i=0; i<2; i++) {
117 if (
patch[0]->flags.doGBIS) {
121 #if !(defined(NAMD_CUDA) || defined(NAMD_HIP)) 129 if (
patch[0]->flags.doGBIS) {
131 for (
int i=0; i<2; i++) {
135 if (
patch[0]->flags.doNonbonded)
return 1;
139 for (
int i=0; i<2; i++) {
143 if (
patch[0]->flags.doNonbonded)
return 1;
147 for (
int i=0; i<2; i++) {
154 for (
int i=0; i<2; i++) {
168 #if !(defined(NAMD_CUDA) || defined(NAMD_HIP)) 191 int a = 0;
int b = 1;
202 #ifdef TRACE_COMPUTE_OBJECTS 203 double traceObjStartTime = CmiWallTimer();
206 DebugM(2,
"doForce() called.\n");
208 numAtoms[1] <<
" patch #2 atoms\n");
234 if (
patch[0]->flags.savePairlists ) {
239 (
patch[0]->flags.maxAtomMovement +
271 #if NAMD_ComputeNonbonded_SortAtoms != 0 288 DebugM(4,
"opening velocity boxes\n");
295 #if !(defined(NAMD_CUDA) || defined(NAMD_HIP)) 296 params.
ff[0] =
r[a]->
f[Results::nbond_virial];
297 params.
ff[1] =
r[b]->
f[Results::nbond_virial];
304 #if NAMD_SeparateWaters != 0 305 params.numWaterAtoms[0] = numWaterAtoms[a];
306 params.numWaterAtoms[1] = numWaterAtoms[b];
316 if (
patch[0]->flags.doFullElectrostatics )
318 #if !(defined(NAMD_CUDA) || defined(NAMD_HIP)) 322 if (
patch[0]->flags.doMolly ) {
351 DebugM(4,
"closing velocity boxes\n");
361 if (
patch[0]->flags.doGBIS) {
441 #ifdef TRACE_COMPUTE_OBJECTS 460 const int pid0 = tileLists.patchOrder0();
461 const int pid1 = tileLists.patchOrder1();
463 #ifdef TRACE_COMPUTE_OBJECTS 464 double traceObjStartTime = CmiWallTimer();
467 DebugM(2,
"doForceTiles() called.\n");
469 numAtoms[1] <<
" patch #2 atoms\n");
476 if (
patch[0]->flags.savePairlists ) {
494 if (
patch[0]->flags.savePairlists)
505 const int t1 =
trans[pid0];
506 const int t2 =
trans[pid1];
507 offset.
x += (t1%3-1) - (t2%3-1);
508 offset.
y += ((t1/3)%3-1) - ((t2/3)%3-1);
509 offset.
z += (t1/9-1) - (t2/9-1);
510 tileLists.updateParams(lattice, offset,
cutoff);
512 tileLists.nbForceAVX512(doEnergy, doVirial, doFull, doList);
532 reductionData[fullElectVirialIndex_XX] = tileLists.virialSlowXX();
533 reductionData[fullElectVirialIndex_XY] = tileLists.virialSlowXY();
534 reductionData[fullElectVirialIndex_XZ] = tileLists.virialSlowXZ();
535 reductionData[fullElectVirialIndex_YX] = tileLists.virialSlowXY();
536 reductionData[fullElectVirialIndex_YY] = tileLists.virialSlowYY();
537 reductionData[fullElectVirialIndex_YZ] = tileLists.virialSlowYZ();
538 reductionData[fullElectVirialIndex_ZX] = tileLists.virialSlowXZ();
539 reductionData[fullElectVirialIndex_ZY] = tileLists.virialSlowYZ();
540 reductionData[fullElectVirialIndex_ZZ] = tileLists.virialSlowZZ();
547 #ifdef TRACE_COMPUTE_OBJECTS
Box< Patch, GBReal > * registerDEdaSumDeposit(Compute *cid)
static int pressureProfileSlabs
Box< Patch, CompAtom > * registerAvgPositionPickup(Compute *cid)
ScaledPosition center(int pid) const
virtual void initialize()
void unregisterAvgPositionPickup(Compute *cid, Box< Patch, CompAtom > **const box)
NAMD_HOST_DEVICE Vector c() const
Box< Patch, Real > * dHdrPrefixBox[2]
static void submitReductionData(BigReal *, SubmitReduction *)
#define TRACE_COMPOBJ_IDOFFSET
void unregisterPsiSumDeposit(Compute *cid, Box< Patch, GBReal > **const box)
Box< Patch, CompAtom > * positionBox[2]
static PatchMap * Object()
void calcGBIS(nonbonded *params, GBISParamStruct *gbisParams)
SimParameters * simParameters
ComputeNonbondedWorkArrays *const workArrays
NAMD_HOST_DEVICE Position unscale(ScaledPosition s) const
Box< Patch, Real > * intRadBox[2]
virtual void doForce(CompAtom *p[2], CompAtomExt *pExt[2], Results *r[2])
void unregisterDHdrPrefixPickup(Compute *cid, Box< Patch, Real > **const box)
static void submitPressureProfileData(BigReal *, SubmitReduction *)
static BigReal pressureProfileThickness
SubmitReduction * willSubmit(int setID, int size=-1)
Box< Patch, Real > * registerBornRadPickup(Compute *cid)
static ReductionMgr * Object(void)
static void(* calcMergePair)(nonbonded *)
Pairlists gbisStepPairlists[numGBISPairlists]
static int pressureProfileAtomTypes
static void(* calcMergePairEnergy)(nonbonded *)
SimParameters * simParameters
BigReal * pressureProfileData
static void(* calcSlowPairEnergy)(nonbonded *)
SubmitReduction * pressureProfileReduction
Box< Patch, CompAtom > * avgPositionBox[2]
static void(* calcPair)(nonbonded *)
Box< Patch, GBReal > * registerPsiSumDeposit(Compute *cid)
static void(* calcSlowPair)(nonbonded *)
Box< Patch, Results > * forceBox[2]
virtual void initialize()
NAMD_HOST_DEVICE BigReal length(void) const
Pairlists * gbisStepPairlists[4]
Box< Patch, CompAtom > * velocityBox[2]
static BigReal pressureProfileMin
Box< Patch, GBReal > * psiSumBox[2]
BigReal pairlistTolerance
Box< Patch, Real > * registerIntRadPickup(Compute *cid)
void skipWork(const LDObjHandle &handle)
int get_table_dim() const
static Bool pressureProfileOn
const TableEntry * table_val(unsigned int i, unsigned int j) const
PatchID getPatchID() const
virtual void atomUpdate()
Box< Patch, Real > * bornRadBox[2]
static LdbCoordinator * Object()
NAMD_HOST_DEVICE Vector offset(int i) const
Box< Patch, GBReal > * dEdaSumBox[2]
void unregisterBornRadPickup(Compute *cid, Box< Patch, Real > **const box)
static void(* calcPairEnergy)(nonbonded *)
SubmitReduction * reduction
GBISParamStruct gbisParams
static void(* calcFullPair)(nonbonded *)
void unregisterIntRadPickup(Compute *cid, Box< Patch, Real > **const box)
Box< Patch, Real > * registerDHdrPrefixPickup(Compute *cid)
ComputeNonbondedPair(ComputeID c, PatchID pid[], int trans[], ComputeNonbondedWorkArrays *_workArrays, int minPartition=0, int maxPartition=1, int numPartitions=1)
static const LJTable * ljTable
static const int numGBISPairlists
static void(* calcFullPairEnergy)(nonbonded *)
BigReal pairlistTolerance
void unregisterVelocityPickup(Compute *cid, Box< Patch, CompAtom > **const box)
BigReal reductionData[reductionDataSize]
BigReal * pressureProfileReduction
NAMD_HOST_DEVICE Vector origin() const
void unregisterDEdaSumDeposit(Compute *cid, Box< Patch, GBReal > **const box)
Box< Patch, CompAtom > * registerVelocityPickup(Compute *cid)
void close(Data **const t)
ComputeNonbondedWorkArrays * workArrays