| 1 | 
– | 
 | 
| 1 | 
  | 
#include <cstdlib> | 
| 2 | 
  | 
#include <cstdio> | 
| 3 | 
  | 
#include <cstring> | 
| 55 | 
  | 
 | 
| 56 | 
  | 
  int hasErrors; | 
| 57 | 
  | 
 | 
| 59 | 
– | 
 | 
| 60 | 
– | 
  MakeStamps* the_stamps = NULL; | 
| 61 | 
– | 
  Globals* the_globals = NULL; | 
| 62 | 
– | 
  Component** the_components = NULL; | 
| 63 | 
– | 
  LinkedMolStamp* headStamp = NULL; | 
| 64 | 
– | 
  LinkedMolStamp* currStamp; | 
| 65 | 
– | 
 | 
| 58 | 
  | 
  // initialize all functions and variables | 
| 59 | 
  | 
 | 
| 60 | 
  | 
  initSimError(); | 
| 66 | 
  | 
  headInc = NULL; | 
| 67 | 
  | 
 | 
| 68 | 
  | 
  bsInfo.includes = NULL; | 
| 77 | 
– | 
  bsInfo.componentsNmol = NULL; | 
| 78 | 
– | 
  bsInfo.compStamps = NULL; | 
| 79 | 
– | 
  bsInfo.havePressure = 0; | 
| 80 | 
– | 
  bsInfo.haveTauBarostat = 0; | 
| 81 | 
– | 
  bsInfo.haveTauThermostat = 0; | 
| 82 | 
– | 
  bsInfo.haveQmass = 0; | 
| 69 | 
  | 
 | 
| 84 | 
– | 
  //Nanobuilder components. | 
| 85 | 
– | 
  bsInfo.latticeType = FCC_LATTICE_TYPE; // set lattice type to FCC. | 
| 86 | 
– | 
  bsInfo.hasVacancies = 0; //set vacancies to false. | 
| 87 | 
– | 
  bsInfo.buildCoreShell = 0; | 
| 70 | 
  | 
 | 
| 89 | 
– | 
  bsInfo.latticeSpacing = 0.0; | 
| 90 | 
– | 
  bsInfo.coreRadius = 0.0; | 
| 91 | 
– | 
  bsInfo.particleRadius = 0.0; | 
| 92 | 
– | 
  bsInfo.shellRadius = 0.0; | 
| 93 | 
– | 
  bsInfo.vacancyRadius = 0.0; | 
| 94 | 
– | 
  bsInfo.vacancyFraction = 0.0; | 
| 95 | 
– | 
  bsInfo.soluteX = 0.0; | 
| 96 | 
– | 
 | 
| 97 | 
– | 
 | 
| 98 | 
– | 
 | 
| 99 | 
– | 
  headStamp = new LinkedMolStamp(); | 
| 100 | 
– | 
  the_stamps = new MakeStamps(); | 
| 101 | 
– | 
  the_globals = new Globals(); | 
| 102 | 
– | 
  set_interface_stamps( the_stamps, the_globals ); | 
| 103 | 
– | 
 | 
| 71 | 
  | 
  // parse command line arguments | 
| 72 | 
  | 
 | 
| 73 | 
  | 
  if (cmdline_parser (argc, argv, &args_info) != 0) | 
| 116 | 
  | 
  bsInfo.dt = the_globals->getDt(); | 
| 117 | 
  | 
  bsInfo.runTime = the_globals->getRunTime(); | 
| 118 | 
  | 
 | 
| 152 | 
– | 
  std::cerr << "dt = " << bsInfo.dt << "\n"; | 
| 153 | 
– | 
 | 
| 119 | 
  | 
  // get the ones we know are there, yet still may need some work. | 
| 120 | 
  | 
  bsInfo.nComponents = the_globals->getNComponents(); | 
| 121 | 
  | 
  strcpy( bsInfo.forceField, the_globals->getForceField() ); |