Exemplo n.º 1
0
void MomentumEstimator::addObservables(PropertySetType& plist, BufferType& collectables)
{
  if (hdf5_out)
  {
    myIndex=collectables.size();
    collectables.add(nofK.begin(),nofK.end());
    collectables.add(compQ.begin(),compQ.end());
  }
  else
  {
    myIndex=plist.size();
    for (int i=0; i<nofK.size(); i++)
    {
      std::stringstream sstr;
      sstr << "nofk_" <<i;
      int id=plist.add(sstr.str());
    }
    for (int i=0; i<Q.size(); i++)
    {
      std::stringstream sstr;
      sstr << "Q_" <<i;
      int id=plist.add(sstr.str());
    }
  }
}
Exemplo n.º 2
0
 LocalECPotential::Return_t 
   LocalECPotential::registerData(ParticleSet& P, BufferType& buffer) 
   {
     PPart.resize(P.getTotalNum());
     NewValue=Value=evaluateForPbyP(P);
     buffer.add(PPart.begin(),PPart.end());
     buffer.add(Value);
     return Value;
   }
Exemplo n.º 3
0
CoulombPBCAB::Return_t
CoulombPBCAB::registerData(ParticleSet& P, BufferType& buffer)
{
  P.SK->DoUpdate=true;
  SRpart.resize(NptclB);
  LRpart.resize(NptclB);
  Value=evaluateForPyP(P);
  buffer.add(SRpart.begin(),SRpart.end());
  buffer.add(LRpart.begin(),LRpart.end());
  buffer.add(Value);
  return Value;
}
Exemplo n.º 4
0
CoulombPBCAATemp::Return_t
CoulombPBCAATemp::registerData(ParticleSet& P, BufferType& buffer)
{
  if(is_active)
  {
    P.SK->DoUpdate=true;
    SR2.resize(NumCenters,NumCenters);
    dSR.resize(NumCenters);
    del_eikr.resize(P.SK->KLists.numk);
    Value=evaluateForPbyP(P);
    buffer.add(SR2.begin(),SR2.end());
    buffer.add(Value);
  }
  return Value;
}
Exemplo n.º 5
0
void EnergyDensityEstimator::addObservables(PropertySetType& plist, BufferType& collectables)
{
  myIndex=collectables.size();
  //allocate space for energy density outside of any spacegrid
  outside_buffer_offset=collectables.size();
  int nvalues=(int)nEDValues;
  vector<RealType> tmp(nvalues);
  collectables.add(tmp.begin(),tmp.end());
  //allocate space for spacegrids
  for(int i=0; i<spacegrids.size(); i++)
  {
    spacegrids[i]->allocate_buffer_space(collectables);
  }
}
    /**  add the local energy, variance and all the Hamiltonian components to the scalar record container
     *@param record storage of scalar records (name,value)
     */
  void 
  MultipleEnergyEstimator::add2Record(RecordNamedProperty<RealType>& record, BufferType& msg) {
    if(ediff_name.size()) {
      FirstColumnIndex = record.add(ediff_name[0].c_str());
      for(int i=1; i<ediff_name.size(); i++) record.add(ediff_name[i].c_str());
      for(int i=0; i<esum_name.size(); i++) record.add(esum_name(i).c_str());
    } else {
      FirstColumnIndex = record.add(esum_name(0).c_str());
      for(int i=1; i<esum_name.size(); i++) record.add(esum_name(i).c_str());
    }
    //for(int i=0; i<elocal_name.size(); i++) record.add(elocal_name(i).c_str());

    msg.add(esum.begin(),esum.end());

    //FirstColumnIndex = record.add(esum_name(0).c_str());
    //for(int i=1; i<esum_name.size(); i++) record.add(esum_name(i).c_str());
    //for(int i=0; i<ediff_name.size(); i++) record.add(ediff_name[i].c_str());
    //for(int i=0; i<elocal_name.size(); i++) record.add(elocal_name(i).c_str());
  }
Exemplo n.º 7
0
 void SpinDensity::addObservables(PropertySetType& plist,BufferType& collectables)
 {
   myIndex=collectables.current();
   vector<RealType> tmp(nspecies*npoints);
   collectables.add(tmp.begin(),tmp.end());
 }