Skip to content

Commit

Permalink
Removed the fourier_pseudo configuration option.
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierandrade committed Dec 14, 2024
1 parent 5c0eb71 commit 70ed75a
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 33 deletions.
8 changes: 1 addition & 7 deletions src/hamiltonian/atomic_potential.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,14 @@ namespace hamiltonian {
std::unordered_map<std::string, pseudopotential_type> pseudopotential_list_;
bool has_nlcc_;
basis::double_grid double_grid_;
bool fourier_pseudo_;

public:

template <class SpeciesList>
atomic_potential(SpeciesList const & species_list, double gcutoff, options::electrons const & conf = {}):
sep_(0.625), //this is the default from octopus
default_pseudo_set_(species_list.pseudopotentials()),
double_grid_(conf.double_grid_value()),
fourier_pseudo_(conf.fourier_pseudo_value())
double_grid_(conf.double_grid_value())
{

CALI_CXX_MARK_FUNCTION;
Expand Down Expand Up @@ -318,10 +316,6 @@ namespace hamiltonian {
return double_grid_;
}

auto & fourier_pseudo() const {
return fourier_pseudo_;
}

};

}
Expand Down
5 changes: 0 additions & 5 deletions src/interface/electrons.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,6 @@ the user.
el_opts.save(input::environment::global().comm(), ".inq/default_electrons_options");
}

static void fourier_pseudo() {
auto el_opts = options::electrons::load(".inq/default_electrons_options").fourier_pseudo();
el_opts.save(input::environment::global().comm(), ".inq/default_electrons_options");
}

static void spin_unpolarized() {
auto el_opts = options::electrons::load(".inq/default_electrons_options").spin_unpolarized();
el_opts.save(input::environment::global().comm(), ".inq/default_electrons_options");
Expand Down
21 changes: 0 additions & 21 deletions src/options/electrons.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class electrons {
std::optional<bool> double_grid_;
std::optional<double> density_factor_;
std::optional<bool> spherical_grid_;
std::optional<bool> fourier_pseudo_;

public:

Expand Down Expand Up @@ -131,22 +130,6 @@ class electrons {
return density_factor_.value_or(1.0);
}

auto real_space_pseudo() const {
electrons conf = *this;
conf.fourier_pseudo_ = false;
return conf;
}

auto fourier_pseudo() const {
electrons conf = *this;
conf.fourier_pseudo_ = true;
return conf;
}

auto fourier_pseudo_value() const {
return fourier_pseudo_.value_or(false);
}

void save(parallel::communicator & comm, std::string const & dirname) const {
auto error_message = "INQ error: Cannot save the options::electrons to directory '" + dirname + "'.";

Expand All @@ -158,7 +141,6 @@ class electrons {
utils::save_optional(comm, dirname + "/double_grid", double_grid_, error_message);
utils::save_optional(comm, dirname + "/density_factor", density_factor_, error_message);
utils::save_optional(comm, dirname + "/spherical_grid", spherical_grid_, error_message);
utils::save_optional(comm, dirname + "/fourier_pseudo", fourier_pseudo_, error_message);
utils::save_optional(comm, dirname + "/spin", spin_, error_message);

}
Expand All @@ -173,7 +155,6 @@ class electrons {
utils::load_optional(dirname + "/double_grid", opts.double_grid_);
utils::load_optional(dirname + "/density_factor", opts.density_factor_);
utils::load_optional(dirname + "/spherical_grid", opts.spherical_grid_);
utils::load_optional(dirname + "/fourier_pseudo", opts.fourier_pseudo_);
utils::load_optional(dirname + "/spin", opts.spin_);

return opts;
Expand Down Expand Up @@ -246,15 +227,13 @@ TEST_CASE(INQ_TEST_FILE, INQ_TEST_TAG) {

CHECK(conf.extra_states_val() == 666);
CHECK(conf.spacing_value() == 23.1_a);
CHECK(conf.fourier_pseudo_value() == false);
CHECK(conf.spin_val() == states::spin_config::NON_COLLINEAR);

conf.save(comm, "options_electrons_save");
auto read_conf = options::electrons::load("options_electrons_save");

CHECK(read_conf.extra_states_val() == 666);
CHECK(read_conf.spacing_value() == 23.1_a);
CHECK(read_conf.fourier_pseudo_value() == false);
CHECK(read_conf.spin_val() == states::spin_config::NON_COLLINEAR);

}
Expand Down

0 comments on commit 70ed75a

Please sign in to comment.