23    std::vector<std::string> modelnames={
 
   24            "Tersoff_LAMMPS_Tersoff_1988T3_Si__MO_186459956893_004" 
   27    std::cout << 
"Querying models." << std::endl;
 
   28    for (
int i = 0; i < modelnames.size(); ++i) {
 
   29        std::cout << 
"Model: " << modelnames[i] << std::endl;
 
   30        std::regex rgx(
"MO_\\d+_\\d{3}");
 
   33        if (!std::regex_search(modelnames[i], match, rgx))
 
   34            std::cout << 
"Regex error!" << std::endl;
 
   38                "get_lattice_constant_cubic",
 
   40                        "model=[\"" + match.str()+ 
"\"]",
 
   41                        "crystal=[\"diamond\"]",
 
   43                        "units=[\"angstrom\"]" 
   46        std::cout << 
"Lattice constant = " << latticeConstant << std::endl;
 
   48                "get_elastic_constants_isothermal_cubic",
 
   50                        "model=[\"" + match.str()+ 
"\"]",
 
   51                        "crystal=[\"diamond\"]",
 
   53                        "units=[\"eV/angstrom^3\"]" 
   56        std::cout << 
"Elastic constants = " << elasticConstants << std::endl;
 
   57        std::cout << 
"------------------------------------------ " << std::endl;
 
   62    int numberOfParticles;
 
   63    int referenceAndFinal= 
true;
 
   64    std::string configFileName= 
"config.data";
 
   65    std::ifstream file(configFileName);
 
   66    if(!file) 
MY_ERROR(
"ERROR: config.dat could not be opened for reading!");
 
   68    file >> numberOfParticles;
 
   69    if (numberOfParticles < 0) 
MY_ERROR(
"Error: Negative number of particles.\n");
 
   72    body.
read(configFileName,referenceAndFinal);
 
   79    gridFromFile.
read(
"grid_cauchy.data");
 
   84    for (
const auto modelname : modelnames)
 
   92                            std::tie(hardyStress), 
true);
 
   93            hardyStress.
write(
"project_hardy_" + modelname);
 
   95        catch(
const std::runtime_error& e){
 
   96            std::cout << e.what() << std::endl;
 
   97            std::cout << 
"Compute stress with projected forces failed. Moving on" << std::endl;
 
  106                            std::tie(hardyStress));
 
  107            hardyStress.
write(
"hardy_" + modelname);
 
  109        catch(
const std::runtime_error& e){
 
  110            std::cout << e.what() << std::endl;
 
  111            std::cout << 
"Compute stress with process_dedr failed. Moving on" << std::endl;