qmcpack icon indicating copy to clipboard operation
qmcpack copied to clipboard

Adding Arbitrary Terms into the Hamiltonian

Open lizhuzh opened this issue 5 months ago • 2 comments

Hi QMCPACK developers,

I am wondering if I want to add arbitrary terms into the Hamiltonian, which part of the code I should take a look at and in which file the force for propagating the electrons is calculated?

Thanks in advance, Lizhu

lizhuzh avatar Jul 18 '25 05:07 lizhuzh

@lizhuzh Here is some information on how to add new potential terms to the Hamiltonian. This guide should be particularly useful:

https://qmcpack.readthedocs.io/en/develop/developing.html#single-scalar-estimator-implementation-guide

Some in-code examples you can follow are in src/QMCHamiltonians, such as HarmonicExternalPotential.* (one body term) and CoulombPotential.* (two body term). You can safely ignore anything in these classes/files bracketed in #if !defined(REMOVE_TRACEMANAGER).

I'm not sure what you mean by "the force for propagating electrons". Could you clarify further?

jtkrogel avatar Jul 28 '25 13:07 jtkrogel

@jtkrogel Thanks for the reply!

I'm not sure what you mean by "the force for propagating electrons". Could you clarify further?

By "the force for propagating electrons" I mean at each Monte Carlo step, there should be some trial move to propose new electron positions. I was thinking maybe some sort of Langevin dynamics (as is done in molecular dynamics simulations) is used so that electrons move along Hamiltonian flow and the acceptance rate will not be too low. Is this type of algorithm is used in QMCPACK? If not, can I safely assume that in QMCPACK some random trial move is proposed at each step and the new configuration is accepted or rejected using Metropolis-Hastings criteria?

lizhuzh avatar Sep 16 '25 19:09 lizhuzh