-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extension of PBC code to 1D #63
Comments
We don't have any plans to do so at the moment. You're welcome to submit a
pull request if you'd like to try it yourself.
…On Fri, Jul 28, 2023, 11:33 AM Elia Steve ***@***.***> wrote:
Hi, I was wondering if there are any plans to extend the code for
calculations in periodic boundary conditions to different choices of
dimensionality, for example to the one-dimensional case. Thanks!
—
Reply to this email directly, view it on GitHub
<#63>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABDACAO3JTV2AMZLSHHZWLXSOIRDANCNFSM6AAAAAA23KCUTQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
I see. I was thinking that, apart from setting system.ndim=1 in the config, I would need to rewrite the parts of the code implementing the envelopes, hamiltonian and feature layer and then "plug them in" to the rest of the code by setting the appropriate variables in the config (network.make_envelope_fn and so on). Does this sound right? Thanks. |
That sounds about right. Let us know if you run into any issues.
…On Fri, Jul 28, 2023, 4:09 PM Elia Steve ***@***.***> wrote:
I see. I was thinking that, apart from setting system.ndim=1 in the
config, I would need to rewrite the parts of the code implementing the
envelopes, hamiltonian and feature layer and then "plug them in" to the
rest of the code by setting the appropriate variables in the config
(network.make_envelope_fn and so on). Does this sound right? Thanks.
—
Reply to this email directly, view it on GitHub
<#63 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABDACADZVRVDM5LTDHZEC3XSPIZHANCNFSM6AAAAAA23KCUTQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Ok, thanks a lot for your replies! I'm closing the issue for now. |
So, it seems I have actually run into a bit of an issue. I tried adapting the parts of the original code implementing the envelopes, hamiltonian and feature layer to 1D instead of rewriting them from scratch to make sure the code would work before starting to optimize it. This is the code for the feature layer (which mostly works as-is by setting ndim = 1, the only thing I rewrote was the periodic norm)
This is the code for the envelopes (I just rewrote make_kpoints to give 1D "vectors", and this gives the correct value for the arguments of sine, cosine)
The systems I've been testing the code on are ideal gases, so the hamiltonian is just the kinetic energy part, and again the code is very similar to the original since when computing the laplacian the coordinate vector used is flattened anyway
This is one of the scripts I'm trying to run:
There are are a couple of indicators that there is a problem with the code:
I've also plotted the wavefunctions for 1, 2 electrons unpolarized: I ran a calculation for the 2 electron polarized gas to make sure that the wavefunction would come out antisymmetric, and it does: Any ideas what the problem might be? Thanks, and sorry for the long post. |
If your calculation is non-variational, then likely causes:
Finally you might just need to train for longer. [The N=(2,1) case looks to converge to 0.4, though hard to tell from the plot. If so, this is a bit suspicious...] You can also test your Hamiltonian on the exact wavefunction. |
Yeah, I thought the N=(2, 1) case converging to 0.4 (the theoretical energy is supposed to be 0.79 and the 3D case seems to converge to this value pretty well) was suspicious too: if the energy had been higher than the theoretical one I could have thought it just hadn't come to convergence yet, but I doubt then that the energy would be lower. The 3D cases also seemed to converge to a few hundredths of an Hartree of the theoretical value in a number of iterations of the order of 10000. I have run the (2, 1) calculation again with 1000 and 5000 burn-in steps (the original one was with the default of 100) and I get very similar results to the original calculation. I have also tested the wavefunction for antysymmetry and it seems to be ok, however there appears to maybe be a problem with the periodic boundary conditions: I will run tests on that and also try testing the hamiltonian with exact wavefunctions. I am marking this as closed for now and I'll reopen the issue if I run into any more problems. Thanks a lot for the help. |
Hi, I was wondering if there are any plans to extend the code for calculations in periodic boundary conditions to different choices of dimensionality, for example to the one-dimensional case. Thanks!
The text was updated successfully, but these errors were encountered: