Changeset a71ad8 for molecuilder
- Timestamp:
- May 8, 2010, 7:14:29 PM (15 years ago)
- Children:
- 4d2636
- Parents:
- 3bbc59
- git-author:
- Frederik Heber <heber@…> (05/08/10 18:40:49)
- git-committer:
- Frederik Heber <heber@…> (05/08/10 19:14:29)
- Location:
- molecuilder
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/configure.ac
r3bbc59 ra71ad8 28 28 # Boost libraries 29 29 AX_BOOST_BASE([1.33.1]) 30 #AX_BOOST_PROGRAM_OPTIONS30 AX_BOOST_PROGRAM_OPTIONS 31 31 #AX_BOOST_FOREACH 32 32 #AX_BOOST_FILESYSTEM -
molecuilder/src/Makefile.am
r3bbc59 ra71ad8 241 241 bondgraph.cpp \ 242 242 boundary.cpp \ 243 CommandLineParser.cpp \ 243 244 config.cpp \ 244 245 element.cpp \ … … 284 285 bondgraph.hpp \ 285 286 boundary.hpp \ 287 CommandLineParser.hpp \ 286 288 config.hpp \ 287 289 defs.hpp \ … … 324 326 molecuilder_LDFLAGS = $(BOOST_LDFLAGS) 325 327 molecuilder_SOURCES = builder.cpp 326 molecuilder_LDADD = libmolecuilder.a libgslwrapper.a $(BOOST_LIB) ${BOOST_THREAD_LIB} 328 molecuilder_LDADD = libmolecuilder.a libgslwrapper.a $(BOOST_LIB) ${BOOST_THREAD_LIB} ${BOOST_PROGRAM_OPTIONS_LIB} 327 329 joiner_SOURCES = joiner.cpp datacreator.cpp parser.cpp datacreator.hpp helpers.hpp parser.hpp periodentafel.hpp 328 330 joiner_LDADD = libmolecuilder.a $(BOOST_LIB) ${BOOST_THREAD_LIB} -
molecuilder/src/builder.cpp
r3bbc59 ra71ad8 60 60 #include "bondgraph.hpp" 61 61 #include "boundary.hpp" 62 #include "CommandLineParser.hpp" 62 63 #include "config.hpp" 63 64 #include "element.hpp" … … 2549 2550 logger::purgeInstance(); 2550 2551 errorLogger::purgeInstance(); 2552 CommandLineParser::purgeInstance(); 2551 2553 ActionRegistry::purgeInstance(); 2552 2554 ActionHistory::purgeInstance(); … … 2555 2557 int main(int argc, char **argv) 2556 2558 { 2557 molecule *mol = NULL;2558 2559 config *configuration = new config; 2559 2560 Vector x, y, z, n; … … 2562 2563 string line; 2563 2564 char *ConfigFileName = NULL; 2564 int j;2565 2565 2566 2566 cout << ESPACKVersion << endl; … … 2569 2569 // need to init the history before any action is created 2570 2570 ActionHistory::init(); 2571 /* structure of ParseCommandLineOptions will be refactored later */ 2572 j = ParseCommandLineOptions(argc, argv, World::getInstance().getMolecules(), World::getInstance().getPeriode(), *configuration, ConfigFileName); 2573 switch (j){ 2574 case 255: 2575 case 2: 2576 case 1: 2577 cleanUp(configuration); 2578 return (j == 1 ? 0 : j); 2579 default: 2580 break; 2571 2572 { 2573 // Parse command line options and if present create respective UI 2574 CommandLineParser::getInstance().generic.add_options() 2575 ("help,h", "produce help message") 2576 ("parse-xyz,p", po::value< vector<string> >(), "parse xyz file into World") 2577 ; 2578 CommandLineParser::getInstance().Run(argc,argv); 2579 if (!CommandLineParser::getInstance().isEmpty()) 2580 UIFactory::makeUserInterface(UIFactory::CommandLine); 2581 else 2582 UIFactory::makeUserInterface(UIFactory::Text); 2581 2583 } 2582 if(World::getInstance().numMolecules() == 0){2583 mol = World::getInstance().createMolecule();2584 World::getInstance().getMolecules()->insert(mol);2585 cout << "Molecule created" << endl;2586 if(World::getInstance().getDomain()[0] == 0.){2587 Log() << Verbose(0) << "enter lower tridiagonal form of basis matrix" << endl << endl;2588 for(int i = 0;i < 6;i++){2589 Log() << Verbose(1) << "Cell size" << i << ": ";2590 cin >> World::getInstance().getDomain()[i];2591 }2592 }2593 mol->ActiveFlag = true;2594 }2595 2584 2596 2585 { 2597 cout << ESPACKVersion << endl;2598 2599 setVerbosity(0);2600 2601 2586 menuPopulaters populaters; 2602 2587 populaters.MakeEditMoleculesMenu = populateEditMoleculesMenu; 2603 2588 2604 UIFactory::makeUserInterface(UIFactory::Text);2605 2589 MainWindow *mainWindow = UIFactory::getInstance().makeMainWindow(populaters,World::getInstance().getMolecules(), configuration, World::getInstance().getPeriode(), ConfigFileName); 2606 2590 mainWindow->display();
Note:
See TracChangeset
for help on using the changeset viewer.