28 const Crystal& crystal_structure) {
29 if (dispersion_correction.empty() || dispersion_correction ==
"none") {
30 return std::make_unique<NullDispersionCalculator>(crystal_structure);
32 if (dispersion_correction ==
"d3bj") {
33 return std::make_unique<D3BJDispersionCalculator>(crystal_structure);
35 throw std::runtime_error(
"Unknown dispersion correction '" + dispersion_correction +
36 "'. Supported: none, d3bj");