Skip to content

Commit

Permalink
commented unnecessary part.
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamer2368 committed May 2, 2024
1 parent c147bb5 commit 9989a50
Showing 1 changed file with 51 additions and 34 deletions.
85 changes: 51 additions & 34 deletions src/md.cc
Original file line number Diff line number Diff line change
Expand Up @@ -693,35 +693,42 @@ OrbitalsType* MGmol<OrbitalsType>::loadOrbitalFromRestartFile(const std::string

/* This corresponds to MGmol<OrbitalsType>::initial */
{
// If not an initial run read data from files
if (ct.isLocMode())
{
std::string name = "ExtrapolatedFunction";
if (ct.verbose > 0)
printWithTimeStamp(
"read LRs from ExtrapolatedFunction database...", os_);
int n = read_restart_lrs(h5file, name);
if (n == 0)
{
if (ct.verbose > 0)
printWithTimeStamp("read LRs from Function database...", os_);
name = "Function";
n = read_restart_lrs(h5file, name);
}
if (n < 0) return nullptr;

if (n > 0) lrs_->setup();
}
/*
Just for the orbital loading, this part is currently not needed.
but left commented here for future reference.
*/
// // If not an initial run read data from files
// if (ct.isLocMode())
// {
// std::string name = "ExtrapolatedFunction";
// if (ct.verbose > 0)
// printWithTimeStamp(
// "read LRs from ExtrapolatedFunction database...", os_);
// int n = read_restart_lrs(h5file, name);
// if (n == 0)
// {
// if (ct.verbose > 0)
// printWithTimeStamp("read LRs from Function database...", os_);
// name = "Function";
// n = read_restart_lrs(h5file, name);
// }
// if (n < 0) return nullptr;

// if (n > 0) lrs_->setup();
// }

// Copy from current orbital, instead of constructing brand-new one
restart_orbitals = new OrbitalsType("ForLoading", *current_orbitals_, false);

// TODO(kevin): do we need this?
/*
Just for the orbital loading, this part is currently not needed.
but left commented here for future reference.
*/
// increaseMemorySlotsForOrbitals<MemorySpaceType>();

// If not an initial run read data from files
md_time_ = h5file.getMDTimeFromFile();
md_iteration_ = h5file.getMDstepFromFile();
// // If not an initial run read data from files
// md_time_ = h5file.getMDTimeFromFile();
// md_iteration_ = h5file.getMDstepFromFile();

/* This corresponds to MGmol<OrbitalsType>::read_restart_data */
{
Expand All @@ -731,14 +738,20 @@ OrbitalsType* MGmol<OrbitalsType>::loadOrbitalFromRestartFile(const std::string
ierr = restart_orbitals->read_func_hdf5(h5file);
} // read_restart_data

// TODO(kevin): Do we need this routine?
restart_orbitals->applyMask();
/*
Just for the orbital loading, this part is currently not needed.
but left commented here for future reference.
*/
// restart_orbitals->applyMask();

} // initial()

/* This corresponds to MGmol<OrbitalsType>::md */
{
// TODO(kevin): do we need this?
/*
Just for the orbital loading, this part is currently not needed.
but left commented here for future reference.
*/
// if (!ct.override_restart)
// {
// if (onpe0) os_ << "Use restart file to initialize MD..." << std::endl;
Expand Down Expand Up @@ -778,15 +791,19 @@ OrbitalsType* MGmol<OrbitalsType>::loadOrbitalFromRestartFile(const std::string
dm_strategy_->update();
}

DFTsolver<OrbitalsType>::setItCountLarge();
/*
Just for the orbital loading, this part is currently not needed.
but left commented here for future reference.
*/
// DFTsolver<OrbitalsType>::setItCountLarge();

// check if we are restarting from an MD dump
// no extrapolated functions -> atomic positions were extrapolated
// in stepper->init()
if (!flag_extrapolated_data)
{
moveVnuc(*ions_);
}
// // check if we are restarting from an MD dump
// // no extrapolated functions -> atomic positions were extrapolated
// // in stepper->init()
// if (!flag_extrapolated_data)
// {
// moveVnuc(*ions_);
// }

/* main workflow delete h5f_file_ here, meaning the loading is over. */
// delete h5f_file_;
Expand Down

0 comments on commit 9989a50

Please sign in to comment.