compas / grasp

General Relativistic Atomic Structure Package
https://compas.github.io/grasp/
MIT License
55 stars 25 forks source link

rmixextract -- serious big fix (Gaigalas) #83

Closed jongrumer closed 2 years ago

jongrumer commented 2 years ago

Update of rmixextract - by G. Gaigalas (March-April, 2022).

Idea: extraction of CSF's if a mixing coefficient is larger than a given cut-off value. This was previously done for across all eigenstates together - i.e. if the mixing coeff. for a given CSF was larger than the cut-off in any of the eigenstates, it was extracted. Now, a second option will be added where this can be done also for each eigenstate separately. This facilitates e.g. extractions of CSF's for more problematic eigenstates, i.e. you can weight your calculation to include more important interactions for the more challenging eigenstates.

Original patch description files (from GG)

The attached files with output from the OLD and NEW versions illustrate the issues.

Appendix (save for now, use in documentation later):

OLD 

E(1) =  a(11) CSF(11) + a(12) CSF (12) + a(13) CSF (13) + ... + a(1n) CSF (1n)  | limit > 0,001
E(2) =  a(21) CSF(21) + a(22) CSF (22) + a(23) CSF (13) + ... + a(2m) CSF (2m)  | limit > 0,001
...
E(k) =  a(k1) CSF(k1) + a(k2) CSF (k2) + a(k3) CSF (k3) + ... + a(kn) CSF (kl)  | limit > 0,001

output > for each E 

CSF(11) CSF (12) CSF (13)  ... CSF (1n) ... CSF(k1) CSF (k2) CSF (k3)  ... CSF (kl)

=========================================================================================
NEW

E(1) =  a(11) CSF(11) + a(12) CSF (12) + a(13) CSF (13) + ... + a(1n) CSF (1n)  | limit > 0,001
E(2) =  a(21) CSF(21) + a(22) CSF (22) + a(23) CSF (13) + ... + a(2m) CSF (2m)  | limit > 0,001
...
E(k) =  a(k1) CSF(k1) + a(k2) CSF (k2) + a(k3) CSF (k3) + ... + a(kn) CSF (kl)  | limit > 0,001

output > for ech E(1) 

CSF(11) CSF (12) CSF (13)  ... CSF (1n)

output > for ech E(2) 

CSF(21) CSF (22) CSF (23)  ... CSF (2m)

output > for ech E(k) 

CSF(k1) CSF (k2) CSF (k3)  ... CSF (kl)

=========================================================================================
jongrumer commented 2 years ago

Great, thanks @mortenpi! Aren't you busy with your thesis? ;)

Yes, about if the method changes are correct or not - I fully trust @gaigalas here.

I'll merge this once everyone agrees on the fix (there's an email thread). I'll summarize the conclusion here.

cffischer commented 2 years ago

I think this is an example where some clear documentation is needed as to how the exctraction is performed. Is it done independently for each block, one at a time, or more universally over all expansions on the basis of some weighted average.

jongrumer commented 2 years ago

@gaigalas Do you mind sending a few sentences about how the code operates now - properly, as you see it? Just to help me and the rest of the community of users understand what goes on. I.e. with regards to if the extraction is carried out independently for each block, one at a time, or more universally over all expansions on the basis of some weighted average? We can then perhaps add a few sentences about this in the manual or elsewhere, just to keep each code, at least, briefly, documented.

Would be much appreciated! Thanks! /Jon

gaigalas commented 2 years ago

@jon Can we Skype and I will tel you.

Best wishes, Gediminas

jongrumer commented 2 years ago

@gaigalas Ok, I'll send you an email with a skype-link!

jongrumer commented 2 years ago

Update: Me and Gediminas have agreed to update the code to either extract CSF's based on all eigenstates, or separately for each given eigenstate. This allows for the code to be used for both e.g. production of multireferences (via the option: across all eigenstates) or to e.g. extract additional CSF's for some given more problematic eigenstates (via the option: separate extraction for each individual state). Gedminas is working on this now.