50 |
|
|
51 |
|
#include "nanorodBuilderCmd.h" |
52 |
|
//#include "GeometryBuilder.hpp" |
53 |
< |
#include "applications/simpleBuilder/LatticeFactory.hpp" |
54 |
< |
#include "applications/simpleBuilder/MoLocator.hpp" |
55 |
< |
#include "applications/simpleBuilder/Lattice.hpp" |
53 |
> |
#include "lattice/LatticeFactory.hpp" |
54 |
> |
#include "utils/MoLocator.hpp" |
55 |
> |
#include "lattice/Lattice.hpp" |
56 |
|
#include "brains/Register.hpp" |
57 |
|
#include "brains/SimInfo.hpp" |
58 |
|
#include "brains/SimCreator.hpp" |
70 |
|
|
71 |
|
//register force fields |
72 |
|
registerForceFields(); |
73 |
+ |
registerLattice(); |
74 |
|
|
75 |
|
gengetopt_args_info args_info; |
76 |
|
std::string latticeType; |
81 |
|
std::string outGeomFileName; |
82 |
|
|
83 |
|
|
84 |
< |
BaseLattice *simpleLat; |
84 |
> |
Lattice *simpleLat; |
85 |
|
int numMol; |
86 |
|
double latticeConstant; |
87 |
|
std::vector<double> lc; |
112 |
|
//get lattice type |
113 |
|
latticeType = UpperCase(args_info.latticetype_arg); |
114 |
|
|
114 |
– |
if (!LatticeFactory::getInstance()->hasLatticeCreator(latticeType)) { |
115 |
– |
std::cerr << latticeType << " is an invalid lattice type" << std::endl; |
116 |
– |
std::cerr << LatticeFactory::getInstance()->toString() << std::endl; |
117 |
– |
exit(1); |
118 |
– |
} |
115 |
|
|
116 |
< |
|
116 |
> |
simpleLat = LatticeFactory::getInstance()->createLattice(latticeType); |
117 |
> |
if (simpleLat == NULL) { |
118 |
> |
sprintf(painCave.errMsg, "Lattice Factory can not create %s lattice\n", |
119 |
> |
latticeType.c_str()); |
120 |
> |
painCave.isFatal = 1; |
121 |
> |
simError(); |
122 |
> |
} |
123 |
> |
|
124 |
|
//get input file name |
125 |
|
if (args_info.inputs_num) |
126 |
|
inputFileName = args_info.inputs[0]; |