Complex functions and 2C spinors for everyone!#286
Draft
Dheasra wants to merge 100 commits into
Draft
Conversation
…ntation errors, now the code runs up untill the end with real valued energy!
…d also the SCF cycle tho it has still some problem on the computation of the norm of the difference
…ith the sigma matrices, by expressing it in a explicit form. Mreover, i fixed the computation of term number 2 (kin), yet, now the SCF is not working :(
…xed several things and now it should be ok
…ossibility to get a verbose compilation, so that it shows what is doing. Also added a SUMMARY print of the SCF cycle at the end.
…orrected an error, also explicitated a few loops not to worry about C++ wierd stuff. The resulta is exact with respect to the Literature.
… of Rho = conj(Psi)*Psi, that should be real, but mrcpp::multiply sees this as a ComplexDouble*ComplexDouble and thus assumes that the result MUST be ComplexDouble. Later on in the code it tries to fetch the data of the FunctionTree<double> that is a null pointer as it has been only allocated the FunctionTree<ComplexDouble>
…n class. The code still has some segmentation issues, but at least there are far less of them
…e hearders for this, it was tested on the already working H atomi relativistic and it was all right. Roberto solved the racing error in FunctionTree.cpp. Finally, I adjusted the Updating_var_ZORA header so that K and K_inverse are computed properly, the map path was a complete waste of time!
… the apply_Helmoholtz subroutine that was not effecting the result for spherically symmetric atoms like H and He, but now all the things have been corrected!
…format of the output a bit. Moreover, I added the Smeared Potential instead of 1/r
… sign in the apply_ZORA, and wrapped all the SCF cycle in a subroutine. There is still an issue, probaby in the form of a memory leak as at each cycle the memory in use gets progressively larger, until the machine runs out of memory and needs to kill the program (on Sandel it gets to the 5th iteration). There is also a small bug in the computation of the norm difference but in either case, there is no impact on the functionalities, just that it does not know when to stop, but no problem, the machine kills the calculation for memory overflow in either case!
…g other components. Code needs cleaning
…make_density. Commented out debug messages (still need cleaning, but will not do that before the code works for real)
…mplex FunctionTree) that caused problems in other instances of multiply, thus hopefully avoiding future problems with it
…trix, the issue was using of non-thread-safe operators on std::maps
…s in CompFunction. The fix was the use of thread-safe operations on std::maps. The code seems to handle parallisation well now.
… one) were the same. Cleaned code in CompFunction/ removed unimplemented and useless copy of multiply, thus had to explicitly make some functions abort rather than call another function that would abort. Cleaned some debug messages.
… input real, also fixed the conversion to complex if it is the opposite case. Fixed some mistake in the last fix to calc_overlap_matrix_cplx(BraKet), where the iterator was redeclared instead of given a value. Cleaned the code a bit
… issues with grid creation if components don't have the same grid. CompFunction: added parallel's new functionality to rotate_cplx to try and debug, fixed some pointer clearing in rotate_cplx. Grid: Fixed complete copy of input's CompFunctionData which made the function's later behaviour dead code.
… simply convert the input vectors to complex to avoid issues in case the vectors are not uniformly complex or real
… CompFunction::make_density was modified to avoid using copy_grid, and is now more in line with the rest of the code
…hout ever being flagged as having coefficients in its nodes. Also proactively fixed rescale where a real CompFunction rescaled by a complex value would not convert all its components to complex before attempting to rescale them
…ore the merge, now. Also fixed some issues where the coefficient c1 of CompFunction was not taken into account in some routines, but some more work is required here
… to avoid seg faults if used with classes that don't allocate components in their constructors.
…c to take into account the CompFunction's c1 factors, with conjugation if needed. For some reason, including this in rotate gives bogus results. Need to investigate
…per mega giga inefficient hack to handle them properly.
…c1,now all 4 can be set using this setter. Cleaned out some more debug messages in .cpp
…et after being included into the tree itself
…o eager in pushing to git
…rom not converting the output to complex when it should
…lation on other machines. Need to clean the pilot now that it is no longer needed
…2C only. Much more dev friendly than apply_pauli, and allow much more memory efficient uses
…ARebase 2nd try
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Finally had time to solve the conflicts. 2C + complex mrcpp is now working.
Not much left to do, except testing and maybe think up a smart way to exploit Kramers symmetry to reduce the memory problem, but the way we orthogonalise the functions is not straightforward to adapt it to the symmetry (in the case where the spin multiplicity is not 1).