コード例 #1
0
ファイル: PairList.cpp プロジェクト: Amber-MD/cpptraj
// PairList::SetupPairList()
int PairList::SetupPairList(Box::BoxType typeIn, Vec3 const& recipLengthsIn) {
  Timer t_setup;
  t_setup.Start();
  if (typeIn == Box::NOBOX) {
    mprinterr("Error: Pair list code currently requires box coordinates.\n");
    return 1;
  }

  // Allocate/reallocate memory
  if (SetupGrids(recipLengthsIn)) return 1;
  t_setup.Stop();
  t_setup.WriteTiming(1, "Pair List Setup:");
  mprintf("\tGrid dimensions: %i %i %i (%zu total).\n", nGridX_, nGridY_, nGridZ_, cells_.size());
  return 0;
}
コード例 #2
0
ファイル: PairList.cpp プロジェクト: Amber-MD/cpptraj
// PairList::CreatePairList()
int PairList::CreatePairList(Frame const& frmIn, Matrix_3x3 const& ucell,
                             Matrix_3x3 const& recip, AtomMask const& maskIn)
{
  t_total_.Start();
  // Calculate translation vectors based on current unit cell.
  FillTranslateVec(ucell);
  // If box size has changed a lot this will reallocate grid
  t_gridpointers_.Start();
  if (SetupGrids(frmIn.BoxCrd().RecipLengths(recip))) return 1;
  t_gridpointers_.Stop();
  // Place atoms in grid cells
  t_map_.Start();
  GridUnitCell(frmIn, ucell, recip, maskIn);
  t_map_.Stop();
  t_total_.Stop();
  return 0;
}
コード例 #3
0
///////////////////////////////////////////////////////////////////////////////
// GetData
/////////////////////////////////////////////////////////////////////////////
void clSubstrateDepSeedSurvival::GetData(xercesc::DOMDocument * p_oDoc) {
  try {

    GetParameterFileData(p_oDoc);

    //Set up the grids
    SetupGrids();
  } catch (modelErr& err) {
    throw(err);
  } catch (modelMsg & msg) {
    throw(msg);
  } //non-fatal error
  catch (...) {
    modelErr stcErr;
    stcErr.iErrorCode = UNKNOWN;
    stcErr.sFunction = "clSubstrateDepSeedSurvival::GetData";
    throw(stcErr);
  }
}