Skip to content
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

LoadOrbitalsFromRestartFile and miscellaneous changes #226

Merged
merged 8 commits into from
May 2, 2024
Merged

Conversation

dreamer2368
Copy link
Collaborator

@dreamer2368 dreamer2368 commented May 1, 2024

Once merged to release branch, this PR must be merged from release to ROMFPMD.

loadOrbitalFromRestartFile

MGmol<OrbitalsType>::loadOrbitalFromRestartFile(const std::string filename) reads a restart file from a specified filename, initializes an orbitals based on the restart file.

While LocGridOrbitals::read_func_hdf5 or ExtendedGridOrbitals::read_func_hdf5 do read orbital data from a restart file, additional initialization routines are necessary to directly use an orbital from a file. These routines, at least for MD-type simulation, are spread throughout the entire workflow. The newly implemented function loadOrbitalFromRestartFile collected all these necessary routines to initialize orbitals, so that the returned orbital is ready to use right away.

Caveats:

  • This only allows MD or Quench type simulations
  • Only double-precision HDF5 file (restart_info = 4) is allowed for now.

Miscellaneous changes

  • cmake_modules/FindSCALAPACK.cmake searches default paths for scalapack library.
  • Carbyne example input files are added.
  • name change: src/tools/Signal.h -> src/tools/mgmol_Signal.h
  • MGmol<OrbitalsType>::orbitals_extrapol_ and OrbitalsExtrapolation::orbitals_minus1_ are initialized as nullptr at class declaration. This is a change reflecting the issue nullptr initialization of pointer member variables in class definition #223 .

@dreamer2368 dreamer2368 marked this pull request as ready for review May 1, 2024 21:49
Copy link
Collaborator

@oseikuffuor1 oseikuffuor1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dreamer2368 this looks good to me. Thanks. Have you been able to test the load functionality yet?

@dreamer2368
Copy link
Collaborator Author

@dreamer2368 this looks good to me. Thanks. Have you been able to test the load functionality yet?

In short answer, yes.
I rebased #216 into rombasis-rebase, which is a temporary PR #227 . PR #227 is only a placeholder for me to track changes. I reconciled all discrepancies caused from rebasing, and tested on LC quartz. This PR #226 cherry-picked the common part of the reconciled PR #227.

src/md.cc Show resolved Hide resolved
src/md.cc Outdated Show resolved Hide resolved
src/md.cc Outdated Show resolved Hide resolved
src/md.cc Show resolved Hide resolved
@dreamer2368
Copy link
Collaborator Author

@jeanlucf22 , I commented out some unnecessary parts. I left them commented, since we're not sure whether they may be needed in future for ROM workflow. Also see the detailed comments above.

src/md.cc Outdated Show resolved Hide resolved
@jeanlucf22
Copy link
Collaborator

I would remove most of the comments: I don't think they are useful, and some may be misleading in this context. Beside, this makes a relatively simple function look very complicated

@jeanlucf22 jeanlucf22 merged commit d46c35b into release May 2, 2024
@jeanlucf22 jeanlucf22 deleted the misc branch May 2, 2024 18:43
This was referenced May 2, 2024
jeanlucf22 added a commit that referenced this pull request May 2, 2024
* Fix build with HDF5P on (#231)

* LoadOrbitalsFromRestartFile and miscellaneous changes (#226)

* Signal.h -> mgmol_Signal.h

* Carbyne example files.

* fixed FindSCALAPACK.cmake to search for default paths

* MGmol::loadOrbitalFromRestartFile

* nullptr initialization

---------

Co-authored-by: Jean-Luc Fattebert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants