本文整理汇总了C++中MCWalkerConfiguration::first方法的典型用法代码示例。如果您正苦于以下问题:C++ MCWalkerConfiguration::first方法的具体用法?C++ MCWalkerConfiguration::first怎么用?C++ MCWalkerConfiguration::first使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MCWalkerConfiguration
的用法示例。
在下文中一共展示了MCWalkerConfiguration::first方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void
initialize(TrialWaveFunction& Psi, MCWalkerConfiguration& el,
ParticleBase& ion) {
enum {Up = 0, Down};
///add a distance table for ee IndexTypeeractions
IndexType iee = DistanceTable::add(el,"ee");
DistanceTableData* d_ee = DistanceTable::getTable(iee);
///add a distance table for ie interactions
int iei = DistanceTable::add(ion,el,"ie");
DistanceTableData* d_ei = DistanceTable::getTable(iei);
///create molecular orbital
MolecularOrbitals<SlaterTypeOrbitals_t> *MO =
new MolecularOrbitals<SlaterTypeOrbitals_t>;
AtomicOrbitalBuilder<SlaterTypeOrbitals_t> orbitalbuilder;
for(int iat=0; iat<ion.getTotalNum(); iat++) {
orbitalbuilder.add("He",*MO);
}
MO->setTable(d_ei);
typedef SlaterDeterminant<MolecularOrbitals<SlaterTypeOrbitals_t> > Det_t;
Det_t *DetU = new Det_t(*MO,el.first(Up));
DetU->set(el.first(Up),el.last(Up)-el.first(Up));
Det_t* DetD = new Det_t(*MO,el.first(Down));
DetD->set(el.first(Down),el.last(Down)-el.first(Down));
LinearSlaterDeterminant<MolecularOrbitals<SlaterTypeOrbitals_t> >
*asymmpsi
= new LinearSlaterDeterminant<MolecularOrbitals<SlaterTypeOrbitals_t> >;
asymmpsi->add(DetU);
asymmpsi->add(DetD);
Psi.add(asymmpsi,d_ei);
/*
OneBodyJastrow<PadeJastrow<ValueType>,FastWalkerIndex> *Jie
= new OneBodyJastrow<PadeJastrow<ValueType>,FastWalkerIndex>;
Jie->F.push_back(PadeJastrow<ValueType>(1.0,1.0));
Psi.add(Jie,d_ei);
*/
TwoBodyJastrow<PadeJastrow<ValueType>,FastWalkerIndex> *Jee
= new TwoBodyJastrow<PadeJastrow<ValueType>,FastWalkerIndex>;
Jee->F.push_back(PadeJastrow<double>(0.5,1.0));
Jee->F.push_back(PadeJastrow<double>(1.0/6.0,1.0));
Jee->F.push_back(PadeJastrow<double>(1.0/6.0,1.0));
Jee->F.push_back(PadeJastrow<double>(0.5,1.0));
Psi.add(Jee,d_ee);
}