main.cpp 731 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #include <string>
  2. #include "csv.hpp"
  3. #include "moly.hpp"
  4. #include "smiles.hpp"
  5. using namespace std;
  6. int main(int argc, char* argv[]) {
  7. CSVParser csv;
  8. csv.Load("elements.csv");
  9. for(vector<string>* line : csv.lines) {
  10. Element* e;
  11. int num = strtol((*line)[0].c_str(), NULL, 10);
  12. e = &g_Elements[num];
  13. e->number = num;
  14. e->symbol = (*line)[1];
  15. e->name = (*line)[2];
  16. e->AtomicMass = strtof((*line)[3].c_str(), NULL);
  17. e->ElectroNegativity = strtof((*line)[6].c_str(), NULL);
  18. e->AtomicRadius = strtof((*line)[7].c_str(), NULL);
  19. e->IonEnergy1st = strtof((*line)[8].c_str(), NULL);
  20. e->ElectronAffinity = strtof((*line)[9].c_str(), NULL);
  21. }
  22. parseSmiles("C1CC1");
  23. return 0;
  24. }