本文整理汇总了C++中PatchMap::max_c方法的典型用法代码示例。如果您正苦于以下问题:C++ PatchMap::max_c方法的具体用法?C++ PatchMap::max_c怎么用?C++ PatchMap::max_c使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PatchMap
的用法示例。
在下文中一共展示了PatchMap::max_c方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: noWork
//.........这里部分代码省略.........
pairlistsValid = 0;
}
params.plcutoff = cutoff;
params.groupplcutoff = cutoff +
patch[0]->flags.maxGroupRadius + patch[1]->flags.maxGroupRadius;
if ( params.savePairlists ) {
pairlistsValid = 1;
pairlistTolerance = patch[0]->flags.pairlistTolerance +
patch[1]->flags.pairlistTolerance;
params.plcutoff += pairlistTolerance;
params.groupplcutoff += pairlistTolerance;
}
const Lattice &lattice = patch[0]->lattice;
params.offset = lattice.offset(trans[a]) - lattice.offset(trans[b]);
// Atom Sorting : If we are sorting the atoms along the line connecting
// the patch centers, then calculate a normalized vector pointing from
// patch a to patch b (i.e. outer loop patch to inner loop patch).
#if NAMD_ComputeNonbonded_SortAtoms != 0
// Center of patch a (outer-loop; i-loop) and patch b (inner-loop; j/k-loop)
PatchMap* patchMap = PatchMap::Object();
ScaledPosition p_a_center, p_b_center;
p_a_center.x = patchMap->min_a(patchID[a]);
p_a_center.y = patchMap->min_b(patchID[a]);
p_a_center.z = patchMap->min_c(patchID[a]);
p_b_center.x = patchMap->min_a(patchID[b]);
p_b_center.y = patchMap->min_b(patchID[b]);
p_b_center.z = patchMap->min_c(patchID[b]);
p_a_center.x += patchMap->max_a(patchID[a]);
p_a_center.y += patchMap->max_b(patchID[a]);
p_a_center.z += patchMap->max_c(patchID[a]);
p_b_center.x += patchMap->max_a(patchID[b]);
p_b_center.y += patchMap->max_b(patchID[b]);
p_b_center.z += patchMap->max_c(patchID[b]);
p_a_center *= (BigReal)0.5;
p_b_center *= (BigReal)0.5;
p_a_center = lattice.unscale(p_a_center);
p_b_center = lattice.unscale(p_b_center);
// Adjust patch a's center by the offset
p_a_center.x += params.offset.x;
p_a_center.y += params.offset.y;
p_a_center.z += params.offset.z;
// Calculate and fill in the projected line vector
params.projLineVec = p_b_center - p_a_center;
params.projLineVec /= params.projLineVec.length(); // Normalize the vector
#endif
params.p[0] = p[a];
params.p[1] = p[b];
params.pExt[0] = pExt[a];
params.pExt[1] = pExt[b];
// BEGIN LA
params.doLoweAndersen = patch[0]->flags.doLoweAndersen;
if (params.doLoweAndersen) {
DebugM(4, "opening velocity boxes\n");
v[0] = velocityBox[0]->open();
v[1] = velocityBox[1]->open();
params.v[0] = v[a];
params.v[1] = v[b];
}