ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/applications/simpleBuilder/simpleBuilder.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/applications/simpleBuilder/simpleBuilder.cpp (file contents):
Revision 2060 by tim, Thu Feb 24 20:55:07 2005 UTC vs.
Revision 2184 by tim, Tue Apr 12 22:33:50 2005 UTC

# Line 49 | Line 49
49   #include <fstream>
50  
51   #include "applications/simpleBuilder/simpleBuilderCmd.h"
52 < #include "applications/simpleBuilder/LatticeFactory.hpp"
53 < #include "applications/simpleBuilder/MoLocator.hpp"
54 < #include "applications/simpleBuilder/Lattice.hpp"
52 > #include "lattice/LatticeFactory.hpp"
53 > #include "utils/MoLocator.hpp"
54 > #include "lattice/Lattice.hpp"
55   #include "brains/Register.hpp"
56   #include "brains/SimInfo.hpp"
57   #include "brains/SimCreator.hpp"
# Line 69 | Line 69 | int main(int argc, char *argv []) {
69  
70      //register force fields
71      registerForceFields();
72 +    registerLattice();
73      
74      gengetopt_args_info args_info;
75      std::string latticeType;
# Line 76 | Line 77 | int main(int argc, char *argv []) {
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;
# Line 103 | Line 104 | int main(int argc, char *argv []) {
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
# Line 186 | Line 190 | int main(int argc, char *argv []) {
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  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines