Beispiel #1
0
void SwappedSystem::reinitialize_phibetas (const Wavefunction<amplitude_t>::Amplitude &phialpha1, const Wavefunction<amplitude_t>::Amplitude &phialpha2)
{
    assert(subsystem_particle_counts_match());

#if defined(DEBUG_VMC_SWAPPED_SYSTEM) || defined(DEBUG_VMC_ALL)
    for (unsigned int species = 0; species < copy1_subsystem_indices.size(); ++species)
        std::cerr << "swapping " << copy1_subsystem_indices[species].size() << " particles of species " << species << std::endl;
    std::cerr << std::endl;
#endif

    PositionArguments swapped_r1(phialpha1.get_positions()), swapped_r2(phialpha2.get_positions());
    swap_positions(swapped_r1, swapped_r2);

    phibeta1 = phialpha1.clone();
    phibeta1->reset(swapped_r1);
    phibeta1_dirty = false;

    phibeta2 = phialpha2.clone();
    phibeta2->reset(swapped_r2);
    phibeta2_dirty = false;

#ifdef VMC_CAREFUL
    verify_phibetas(phialpha1, phialpha2);
#endif
}