Skip to content

Commit 5653a8c

Browse files
authored
Merge branch 'develop' into adjust-ham-factory
2 parents cdb0308 + 7243b23 commit 5653a8c

File tree

2 files changed

+0
-70
lines changed

2 files changed

+0
-70
lines changed

src/QMCApp/QMCMain.cpp

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,6 @@ bool QMCMain::execute()
250250
executeLoop(cur);
251251
qmc_common.qmc_counter = 0;
252252
}
253-
else if (cname == "cmc")
254-
{
255-
executeCMCSection(cur);
256-
}
257253
}
258254
// free if m_qmcation owns the memory of xmlNodePtr before clearing
259255
for (auto& qmcactionPair : qmc_action_)
@@ -674,67 +670,4 @@ bool QMCMain::executeQMCSection(xmlNodePtr cur, bool reuse)
674670
return success;
675671
}
676672

677-
bool QMCMain::executeCMCSection(xmlNodePtr cur)
678-
{
679-
bool success = true;
680-
std::string target("ion0");
681-
OhmmsAttributeSet a;
682-
a.add(target, "target");
683-
a.put(cur);
684-
685-
MCWalkerConfiguration* ions = particle_set_pool_->getWalkerSet(target);
686-
TrialWaveFunction* primaryPsi = psi_pool_->getPrimary();
687-
QMCHamiltonian* primaryH = ham_pool_->getPrimary();
688-
689-
app_log() << "QMCMain::executeCMCSection moving " << target << " by dummy move." << std::endl;
690-
691-
int nat = ions->getTotalNum();
692-
ParticleSet::ParticlePos deltaR(nat);
693-
694-
makeGaussRandomWithEngine(deltaR, Random); //generate random displacement
695-
qmc_system_->update();
696-
697-
double logpsi1 = primaryPsi->evaluateLog(*qmc_system_);
698-
std::cout << "logpsi1 " << logpsi1 << std::endl;
699-
700-
double eloc1 = primaryH->evaluate(*primaryPsi, *qmc_system_);
701-
std::cout << "Local Energy " << eloc1 << std::endl;
702-
703-
for (int i = 0; i < primaryH->sizeOfObservables(); i++)
704-
app_log() << " HamTest " << primaryH->getObservableName(i) << " " << primaryH->getObservable(i) << std::endl;
705-
706-
for (int iat = 0; iat < nat; ++iat)
707-
{
708-
ions->R[iat] += deltaR[iat];
709-
710-
ions->update(); //update position and distance table of itself
711-
primaryH->updateSource(*ions);
712-
713-
qmc_system_->update();
714-
double logpsi2 = primaryPsi->evaluateLog(*qmc_system_);
715-
double eloc2 = primaryH->evaluate(*primaryPsi, *qmc_system_);
716-
717-
std::cout << "\nION " << iat << " " << ions->R[iat] << std::endl;
718-
std::cout << "logpsi " << logpsi2 << std::endl;
719-
std::cout << "Local Energy " << eloc2 << std::endl;
720-
for (int i = 0; i < primaryH->sizeOfObservables(); i++)
721-
app_log() << " HamTest " << primaryH->getObservableName(i) << " " << primaryH->getObservable(i) << std::endl;
722-
723-
ions->R[iat] -= deltaR[iat];
724-
ions->update(); //update position and distance table of itself
725-
primaryH->updateSource(*ions);
726-
727-
qmc_system_->update();
728-
double logpsi3 = primaryPsi->evaluateLog(*qmc_system_);
729-
double eloc3 = primaryH->evaluate(*primaryPsi, *qmc_system_);
730-
731-
if (std::abs(eloc1 - eloc3) > 1e-12)
732-
{
733-
std::cout << "ERROR Energies are different " << std::endl;
734-
}
735-
}
736-
return success;
737-
}
738-
739-
740673
} // namespace qmcplusplus

src/QMCApp/QMCMain.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,6 @@ class QMCMain : public MPIObjectBase, public QMCAppBase
113113
* @return true, if a section is successfully executed.
114114
*/
115115
bool executeQMCSection(xmlNodePtr cur, bool reuse = false);
116-
117-
///execute <cmc/> element
118-
bool executeCMCSection(xmlNodePtr cur);
119116
};
120117
} // namespace qmcplusplus
121118
#endif

0 commit comments

Comments
 (0)