Skip to content

Commit

Permalink
Adjusted typing on the inputs from a tuple string to a single string,…
Browse files Browse the repository at this point in the history
… and then to an integer
  • Loading branch information
jlheflin committed Aug 16, 2024
1 parent dc5e309 commit c327c3c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ghostfragment/ghostfragment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "screening/screening.hpp"
#include "topology/topology.hpp"
#include <ghostfragment/load_modules.hpp>
#include "hydrocarbon/hc.hpp"
#include "hydrocarbon/hydrocarbon.hpp"

namespace ghostfragment {

Expand Down
2 changes: 1 addition & 1 deletion src/ghostfragment/hydrocarbon/hydrocarbon.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace ghostfragment::hydrocarbon {

chemist::Molecule hydrocarbon(int num_carbon);
// chemist::Molecule hydrocarbon(int num_carbon);

DECLARE_MODULE(MakeHydrocarbon);

Expand Down
6 changes: 4 additions & 2 deletions src/ghostfragment/hydrocarbon/make_hydrocarbon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
*/

#include "position.hpp"
#include "hydrocarbon.hpp"
#include <simde/simde.hpp>
#include <string>

#define C_C_BOND 2.89
#define H_C_BOND 2.06
Expand Down Expand Up @@ -103,9 +105,9 @@ MODULE_CTOR(MakeHydrocarbon) {
}

MODULE_RUN(MakeHydrocarbon) {
auto num_carbon = simde::MoleculeFromString::unwrap_inputs(inputs);
const std::string& num_carbon_string = std::get<0>(simde::MoleculeFromString::unwrap_inputs(inputs));

auto hc = hydrocarbon(std::stoi(num_carbon));
auto hc = hydrocarbon(std::stoi(num_carbon_string));

auto rv = results();

Expand Down

0 comments on commit c327c3c

Please sign in to comment.