| 77 |
|
std::string outPrefix; |
| 78 |
|
std::string outMdFileName; |
| 79 |
|
std::string outInitFileName; |
| 80 |
< |
BaseLattice *simpleLat; |
| 80 |
> |
Lattice *simpleLat; |
| 81 |
|
int numMol; |
| 82 |
|
double latticeConstant; |
| 83 |
|
std::vector<double> lc; |
| 104 |
|
//get lattice type |
| 105 |
|
latticeType = UpperCase(args_info.latticetype_arg); |
| 106 |
|
|
| 107 |
< |
if (!LatticeFactory::getInstance()->hasLatticeCreator(latticeType)) { |
| 108 |
< |
std::cerr << latticeType << " is an invalid lattice type" << std::endl; |
| 109 |
< |
std::cerr << LatticeFactory::getInstance()->toString() << std::endl; |
| 110 |
< |
exit(1); |
| 107 |
> |
simpleLat = LatticeFactory::getInstance()->createLattice(latticeType); |
| 108 |
> |
|
| 109 |
> |
if (simpleLat == NULL) { |
| 110 |
> |
sprintf(painCave.errMsg, "Lattice Factory can not create %s lattice\n", |
| 111 |
> |
latticeType.c_str()); |
| 112 |
> |
painCave.isFatal = 1; |
| 113 |
> |
simError(); |
| 114 |
|
} |
| 115 |
|
|
| 116 |
|
//get the number of unit cell |
| 190 |
|
<< std::endl; |
| 191 |
|
std::cerr << "A new .md file: " << outMdFileName |
| 192 |
|
<< " is generated, use it to rerun the simpleBuilder" << std::endl; |
| 193 |
< |
exit(1); |
| 193 |
> |
exit(1); |
| 194 |
|
} |
| 195 |
|
|
| 196 |
|
//determine the output file names |