Draft: Resolve "Proposal of updates with Langevin equation"#592
Draft: Resolve "Proposal of updates with Langevin equation"#592ALF-Import-Bot wants to merge 41 commits into
Conversation
|
In GitLab by @fassaad on Feb 5, 2026, 09:51 UTC: added 39 commits
|
|
In GitLab by @fassaad on Feb 5, 2026, 09:58 UTC: I tested Propose_MALA = .true.
Delta_t_MALA_sequential = 0.1
Max_Force_MALA_sequential = 5.0And this works just fine! For global_tau_MALA with: Global_tau_MALA_moves = .true.
N_Global_tau_MALA = 1
Delta_t_MALA_global_tau = 0.1
Max_Force_MALA_global_tau = 5.0I get an error, the issue being that Nt_sequential_end=-1 |
|
In GitLab by @fassaad on Feb 9, 2026, 07:57 UTC: @anika, All seems to be working now. I have also rewritten the documentation for the updating schemes. I have also modified the Hubbard model module such that one can test all the updating schemes (at the exception of the parallel tempering) out of the box, without having to program anything. I did that on the 6 sites lattice with open boundary conditions and consistently obtained the same results with different updating schemes. It would be great if you could go through the documentation. Thanks Fakher. |
|
Looks good! I think that snippets of code/parameters for Langevin and HMC updates are missing. It would make it more clear on how to use/implement these methods. |
Hi Joao, I have added the snippets of code/parameters for the Langevin and HMC. I think that it is always good if the code issues a warning, and I would keep it like that |
| deallocate(forces_0) | ||
|
|
||
| end Subroutine Ham_Langevin_HMC_S0_single_base | ||
|
|
There was a problem hiding this comment.
I assumed S0(phi) = 1/2 phi^2, which is dangerous and likely incorrect as the warning message states. Now I'm thinking it would be better to flip the logic around, i.e., HMC_S0_base builds all forces_0 out of the single version, accompanied by an inefficiency warning asking the user to override it.
Here, it's probably best to terminate and given an error message instead of assuming the simplest gaussian form of S0.
| !-------------------------------------------------------------------- | ||
| Subroutine Overide_global_tau_sampling_parameters_base(Nt_sequential_start,Nt_sequential_end,N_Global_tau) | ||
| Subroutine Overide_global_tau_sampling_parameters_base(Nt_sequential_start,Nt_sequential_end, & | ||
| & N_Global_tau, N_Global_tau_MALA) |
There was a problem hiding this comment.
We can probably remove this override sampling function now and use the new QMC variables functionality and set those variables according to the model parameters in the hamiltonian directly.
| T0_Proposal_ratio = 1 | ||
|
|
||
|
|
||
| End Subroutine Global_move |
There was a problem hiding this comment.
What is the relation between those global moves and MALA updates?
| S0_ratio = S0(Flip_list(1),ntau,Flip_value(1)) | ||
|
|
||
|
|
||
| end Subroutine Global_move_tau |
There was a problem hiding this comment.
How does this relate to MALA moves?
| Subroutine Global_MALA_move_base(Flip_list) | ||
|
|
||
| Implicit none | ||
| Integer , INTENT(OUT) :: Flip_list(:,:) |
There was a problem hiding this comment.
Flip list essentially tags a field to be updated via MALA moves if the entry is set to 1, correct? Wouldn't it be better turning this into a logical array? And change the name to something like perform_MALA or MALA_tag or enable_MALA?
| do n = 1, n1 | ||
| if (OP_V(n,1)%type == 3 ) then | ||
| do nt = 1, n2 | ||
| if ( flip_list(n,nt) == 1 ) then |
There was a problem hiding this comment.
looks like logical variable would be better here. I struggle reading the code atm.
| Call Metropolis_Langevin%make(.False., .False., MALA, delta_t_MALA_global, MAX_Force_MALA_global, Leapfrog_steps) | ||
| else | ||
| Call Langevin_HMC%set_Update_scheme(Langevin, HMC ) | ||
| Call Metropolis_Langevin%set_Update_scheme(.False., .False., MALA ) |
There was a problem hiding this comment.
Do we need to keep Langevin_HMC separate from Metropolis_Langevin? I'd understand the overall logic yet...
There was a problem hiding this comment.
If I'm not mistaken, we planed to clean the doc.pdf outside of the repo and use artefacts of the pipeline on the website. @jonasschwab is this still the case?
johanneshofmann87
left a comment
There was a problem hiding this comment.
@fassaad I would really appreciate more comments in the source code. I'm trying to read the code and it's not very easy.
In GitLab by @fassaad on Feb 5, 2026, 09:45 UTC:
Anika has done a great job here, and we should merge this into the master once tested by a third party.
Assignees: fassaad
Migrated from GitLab: https://git.physik.uni-wuerzburg.de/ALF/ALF/-/merge_requests/262