QMCPACK / QMCPACK/qmcpack

TWFPrototype construction

Open
#3,738 1 comment 0 reactions 2 assignees Claimed by @rcclay View on GitHub
discussion
Dominant language
C++
Stars
403
Forks
154
Avg merge
1d 12h
Merged PRs (30d)
82

Description

In light of letting #3713 be approved, convince me that dropping the cyclic dependency between TWFPrototype, TWF, and WFC and having a constructor in the usual way for TWFPrototype isn't better.

Meaning

class TWFPrototype
{
TWFPrototype(ParticleSet& pset, RefVector);
};

If is_jastrow and is_determinant flags were added to WFC interface and How to deal with the nested SlaterDet was resolved (worth doing). The parts of the TWFPrototype construction that is hidden in the WFCs could be moved into the actual TWFPrototype constructor as well

// Now when we read the constructor we can see what is required
// and what must be done with it to create a valid TWFProtoType
TWFProtoType::TWFPrototype(ParticleSet& pset, RefVector wfcs)
{
for( WaveFunctionComponent& wfc : wfcs)
{
if (wfc.is_jastrow)
addJastrow(wfc);
else if (wfc.is_determinant)
addGroup(pset.something, pset.somethingelse, wfc.getPhi());
//yes getPhi() isn't part of the WFC interface but adding it seems less problematic
//Than a type that is actually dependent on WFC having interfaces dependent on it added
};
}

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.