Changes in / [6940bb:573ca5]
- Files:
-
- 107 added
- 18 deleted
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
configure.ac
r6940bb r573ca5 38 38 AX_BOOST_BASE([1.40]) 39 39 AX_BOOST_PROGRAM_OPTIONS 40 #AX_BOOST_FOREACH41 40 AX_BOOST_FILESYSTEM 42 41 AX_BOOST_THREAD -
src/Actions/MapOfActions.cpp
r6940bb r573ca5 31 31 #include <boost/optional.hpp> 32 32 #include <boost/program_options.hpp> 33 #include <boost/filesystem.hpp> 33 34 34 35 #include <iostream> … … 190 191 BV.zz = boost::lexical_cast<double>(components.at(5)); 191 192 v = boost::any(BoxValue(BV)); 193 } 194 195 void validate(boost::any& v, const std::vector<std::string>& values, boost::filesystem::path *, int) 196 { 197 boost::filesystem::path filename; 198 std::vector<std::string> components; 199 200 std::cout << "boost::filesystem::path validator used." << std::endl; 201 202 // split comma-separated values 203 if (values.size() != 1) { 204 cerr << "Not one file but " << components.size() << " given " << endl; 205 throw boost::program_options::validation_error("Unequal to one file given"); 206 } 207 filename = values.at(0); 208 v = boost::any(boost::filesystem::path(filename)); 192 209 } 193 210 … … 367 384 TypeMap["fill-void"] = &typeid(std::string); 368 385 TypeMap["fragment-mol"] = &typeid(std::string); 369 TypeMap["input"] = &typeid( std::string);386 TypeMap["input"] = &typeid(boost::filesystem::path); 370 387 TypeMap["linear-interpolate"] = &typeid(std::string); 371 388 TypeMap["molecular-volume"] = &typeid(molecule); … … 446 463 TypeEnumMap[&typeid(bool)] = Boolean; 447 464 TypeEnumMap[&typeid(int)] = Integer; 465 TypeEnumMap[&typeid(boost::filesystem::path)] = File; 448 466 TypeEnumMap[&typeid(std::vector<int>)] = ListOfIntegers; 449 467 TypeEnumMap[&typeid(double)] = Double; … … 825 843 } 826 844 845 void MapOfActions::queryCurrentValue(const char * name, boost::filesystem::path&_T) 846 { 847 std::string tmp; 848 if (typeid( boost::filesystem::path ) == *TypeMap[name]) { 849 if (CurrentValue.find(name) == CurrentValue.end()) 850 throw MissingValueException(__FILE__, __LINE__); 851 std::istringstream stream(CurrentValue[name]); 852 CurrentValue.erase(name); 853 if (!stream.fail()) { 854 stream >> tmp >> ws; 855 _T = tmp; 856 } 857 } else 858 throw IllegalTypeException(__FILE__,__LINE__); 859 } 860 827 861 828 862 void MapOfActions::setCurrentValue(const char * name, class atom * &_T) … … 927 961 stream << (*iter)->getId() << " "; 928 962 } 963 CurrentValue[name] = stream.str(); 964 } else 965 throw IllegalTypeException(__FILE__,__LINE__); 966 } 967 968 void MapOfActions::setCurrentValue(const char * name, boost::filesystem::path &_T) 969 { 970 if (typeid( boost::filesystem::path ) == *TypeMap[name]) { 971 std::ostringstream stream; 972 stream << _T.string(); 929 973 CurrentValue[name] = stream.str(); 930 974 } else … … 1051 1095 ; 1052 1096 break; 1097 case File: 1098 ListRunner->second->add_options() 1099 (getKeyAndShortForm(*OptionRunner).c_str(), 1100 po::value< boost::filesystem::path >(), 1101 getDescription(*OptionRunner).c_str()) 1102 ; 1103 break; 1053 1104 case Integer: 1054 1105 ListRunner->second->add_options() -
src/Actions/MapOfActions.hpp
r6940bb r573ca5 9 9 #define MAPOFACTIONS_HPP_ 10 10 11 #include <boost/filesystem.hpp> 12 #include <boost/lexical_cast.hpp> 11 13 #include <boost/program_options.hpp> 12 #include <boost/lexical_cast.hpp>13 14 14 15 #include <map> … … 31 32 32 33 namespace po = boost::program_options; 34 namespace fs = boost::filesystem; 33 35 34 36 using boost::lexical_cast; … … 136 138 friend class MapOfActionsTest; 137 139 public: 138 enum OptionTypes { None, Boolean, Integer, ListOfIntegers, Double, ListOfDoubles, String, ListOfStrings, Vector, ListOfVectors, Box, Molecule, ListOfMolecules, Atom, ListOfAtoms, Element, ListOfElements };140 enum OptionTypes { None, Boolean, Integer, File, ListOfIntegers, Double, ListOfDoubles, String, ListOfStrings, Vector, ListOfVectors, Box, Molecule, ListOfMolecules, Atom, ListOfAtoms, Element, ListOfElements }; 139 141 140 142 // getter for the action descriptions and short forms … … 173 175 void queryCurrentValue(const char * name, std::vector<const element *>&_T); 174 176 void queryCurrentValue(const char * name, std::vector<molecule *>&_T); 177 void queryCurrentValue(const char * name, fs::path&_T); 175 178 template<typename T> void queryCurrentValue(const char * name, T &_T) 176 179 { … … 208 211 void setCurrentValue(const char * name, std::vector<const element *>&_T); 209 212 void setCurrentValue(const char * name, std::vector<molecule *>&_T); 213 void setCurrentValue(const char * name, fs::path&_T); 210 214 template<class T> void setCurrentValue(const char * name, T &_T) 211 215 { -
src/Actions/WorldAction/InputAction.cpp
r6940bb r573ca5 30 30 #include <string> 31 31 32 #include <boost/filesystem/fstream.hpp> 33 32 34 using namespace std; 33 35 … … 39 41 /** =========== define the function ====================== */ 40 42 Action::state_ptr WorldInputAction::performCall() { 41 MoleculeListClass *molecules = World::getInstance().getMolecules();42 molecule *mol = NULL;43 std::ifstream test;43 // MoleculeListClass *molecules = World::getInstance().getMolecules(); 44 // molecule *mol = NULL; 45 boost::filesystem::ifstream test; 44 46 45 47 // obtain information 46 48 getParametersfromValueStorage(); 47 49 48 DoLog(0) && (Log() << Verbose(0) << "Config file given." << endl); 49 if (params.filename.find('.') != string::npos) { 50 std::string FilenamePrefix = params.filename.substr(0,params.filename.find_last_of('.')); 51 std::string FilenameSuffix = params.filename.substr(params.filename.find_last_of('.')+1, params.filename.length()); 50 DoLog(0) && (Log() << Verbose(0) << "Config file given " << params.filename << "." << endl); 51 // using the filename as prefix for all parsers 52 std::string FilenameSuffix; 53 std::string FilenamePrefix; 54 if (params.filename.has_filename()) { 55 // get suffix 56 FilenameSuffix = params.filename.extension().substr(1); // remove the prefixed "." 57 FilenamePrefix = params.filename.stem(); 52 58 DoLog(1) && (Log() << Verbose(1) << "Setting config file name prefix to " << FilenamePrefix << "." << endl); 53 test.open(params.filename.c_str());54 if (test == NULL) {55 DoLog(1) && (Log() << Verbose(1) << "Specified config file " << params.filename << " not found." << endl);56 } else {57 DoLog(1) && (Log() << Verbose(1) << "Specified config file found, parsing ... ");58 FormatParserStorage::getInstance().get((std::istream &)test, FilenameSuffix);59 test.close();60 }61 59 FormatParserStorage::getInstance().SetOutputPrefixForAll(FilenamePrefix); 62 // set mol to first active molecule63 if (molecules->ListOfMolecules.size() != 0) {64 for (MoleculeList::iterator ListRunner = molecules->ListOfMolecules.begin(); ListRunner != molecules->ListOfMolecules.end(); ListRunner++)65 if ((*ListRunner)->ActiveFlag) {66 mol = *ListRunner;67 break;68 }69 }70 if (mol == NULL) {71 mol = World::getInstance().createMolecule();72 mol->ActiveFlag = true;73 molecules->insert(mol);74 }75 mol->SetNameFromFilename(params.filename.substr(0,params.filename.find('.')).c_str());76 60 } else { 77 61 DoeLog(1) && (eLog() << Verbose(1) << "Input file does not have a suffix, cannot recognize format." << endl); 62 return Action::failure; 63 } 64 65 // parsing file if present 66 if (!boost::filesystem::exists(params.filename)) { 67 DoLog(1) && (Log() << Verbose(1) << "Specified config file " << params.filename << " not found." << endl); 68 // DONT FAIL: it's just empty and we use the name. // return Action::failure; 69 } else { 70 DoLog(1) && (Log() << Verbose(1) << "Specified config file found, parsing ... "); 71 72 // parse the file 73 test.open(params.filename); 74 FormatParserStorage::getInstance().get(test, FilenameSuffix); 75 test.close(); 76 77 // set file name of last molecule 78 MoleculeList::const_iterator iter = World::getInstance().getMolecules()->ListOfMolecules.end(); 79 iter--; 80 (*iter)->SetNameFromFilename(FilenamePrefix.c_str()); 78 81 } 79 82 return Action::success; -
src/Actions/WorldAction/InputAction.def
r6940bb r573ca5 7 7 8 8 // all includes and forward declarations necessary for non-integral types below 9 9 #include <boost/filesystem.hpp> 10 10 11 11 // i.e. there is an integer with variable name Z that can be found in 12 12 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 13 13 // "undefine" if no parameters are required 14 #define paramtypes ( std::string)14 #define paramtypes (boost::filesystem::path) 15 15 #define paramtokens (WorldInputAction::NAME) 16 16 #define paramreferences (filename) -
src/Makefile.am
r6940bb r573ca5 120 120 Thermostats/Woodcock.hpp 121 121 122 QTUIMOC_HEADER = UIElements/Q T4/QTDialog.hpp \123 UIElements/Q T4/QTMainWindow.hpp \124 UIElements/Menu/Q T4/QTMenu.hpp \125 UIElements/Views/Q T4/QTWorldView.hpp \126 UIElements/Views/Q T4/GLMoleculeView.hpp \127 UIElements/Views/Q T4/QTMoleculeView.hpp \128 UIElements/Views/Q T4/QTStatusBar.hpp122 QTUIMOC_HEADER = UIElements/Qt4/QtDialog.hpp \ 123 UIElements/Qt4/QtMainWindow.hpp \ 124 UIElements/Menu/Qt4/QtMenu.hpp \ 125 UIElements/Views/Qt4/QtWorldView.hpp \ 126 UIElements/Views/Qt4/GLMoleculeView.hpp \ 127 UIElements/Views/Qt4/QtMoleculeView.hpp \ 128 UIElements/Views/Qt4/QtStatusBar.hpp 129 129 130 130 QTUISOURCE = allmocs.moc.cpp \ 131 UIElements/QT4/QTMainWindow.cpp \ 132 UIElements/QT4/QTDialog.cpp \ 133 UIElements/QT4/QTUIFactory.cpp \ 134 UIElements/Menu/QT4/QTMenu.cpp \ 135 UIElements/Views/QT4/QTWorldView.cpp \ 136 UIElements/Views/QT4/GLMoleculeView.cpp \ 137 UIElements/Views/QT4/QTMoleculeView.cpp \ 138 UIElements/Views/QT4/QTStatusBar.cpp 131 UIElements/Qt4/Pipe/AtomQtQueryPipe.cpp \ 132 UIElements/Qt4/Pipe/AtomsQtQueryPipe.cpp \ 133 UIElements/Qt4/Pipe/BooleanQtQueryPipe.cpp \ 134 UIElements/Qt4/Pipe/BoxQtQueryPipe.cpp \ 135 UIElements/Qt4/Pipe/DoubleQtQueryPipe.cpp \ 136 UIElements/Qt4/Pipe/ElementsQtQueryPipe.cpp \ 137 UIElements/Qt4/Pipe/EmptyQtQueryPipe.cpp \ 138 UIElements/Qt4/Pipe/ElementQtQueryPipe.cpp \ 139 UIElements/Qt4/Pipe/FileQtQueryPipe.cpp \ 140 UIElements/Qt4/Pipe/IntQtQueryPipe.cpp \ 141 UIElements/Qt4/Pipe/MoleculeQtQueryPipe.cpp \ 142 UIElements/Qt4/Pipe/MoleculesQtQueryPipe.cpp \ 143 UIElements/Qt4/Pipe/StringQtQueryPipe.cpp \ 144 UIElements/Qt4/Pipe/VectorQtQueryPipe.cpp \ 145 UIElements/Qt4/Pipe/VectorsQtQueryPipe.cpp \ 146 UIElements/Qt4/Query/AtomQtQuery.cpp \ 147 UIElements/Qt4/Query/AtomsQtQuery.cpp \ 148 UIElements/Qt4/Query/BooleanQtQuery.cpp \ 149 UIElements/Qt4/Query/BoxQtQuery.cpp \ 150 UIElements/Qt4/Query/DoubleQtQuery.cpp \ 151 UIElements/Qt4/Query/DoublesQtQuery.cpp \ 152 UIElements/Qt4/Query/ElementQtQuery.cpp \ 153 UIElements/Qt4/Query/ElementsQtQuery.cpp \ 154 UIElements/Qt4/Query/EmptyQtQuery.cpp \ 155 UIElements/Qt4/Query/FileQtQuery.cpp \ 156 UIElements/Qt4/Query/IntQtQuery.cpp \ 157 UIElements/Qt4/Query/IntsQtQuery.cpp \ 158 UIElements/Qt4/Query/MoleculeQtQuery.cpp \ 159 UIElements/Qt4/Query/MoleculesQtQuery.cpp \ 160 UIElements/Qt4/Query/StringQtQuery.cpp \ 161 UIElements/Qt4/Query/StringsQtQuery.cpp \ 162 UIElements/Qt4/Query/VectorQtQuery.cpp \ 163 UIElements/Qt4/Query/VectorsQtQuery.cpp \ 164 UIElements/Qt4/QtMainWindow.cpp \ 165 UIElements/Qt4/QtDialog.cpp \ 166 UIElements/Qt4/QtUIFactory.cpp \ 167 UIElements/Menu/Qt4/QtMenu.cpp \ 168 UIElements/Views/Qt4/QtWorldView.cpp \ 169 UIElements/Views/Qt4/GLMoleculeView.cpp \ 170 UIElements/Views/Qt4/QtMoleculeView.cpp \ 171 UIElements/Views/Qt4/QtStatusBar.cpp 139 172 140 QTUIHEADER = ${QTUIMOC_HEADER} UIElements/QT4/QTUIFactory.hpp 173 QTUIHEADER = \ 174 ${QTUIMOC_HEADER} \ 175 UIElements/Qt4/Pipe/QtQueryListPipe.hpp \ 176 UIElements/Qt4/QtUIFactory.hpp 141 177 142 178 QTUI_DEFS = … … 289 325 290 326 291 BOOST_LIB = $(BOOST_LDFLAGS) $(BOOST_MPL_LIB) 327 BOOST_LIB = $(BOOST_LDFLAGS) $(BOOST_MPL_LIB) $(BOOST_PROGRAM_OPTIONS_LIB) $(BOOST_FILESYSTEM_LIB) $(BOOST_THREAD_LIB) 292 328 GUI_LIBS = ${QT_LDADD} ${QT_LIB_GUI} -lQtOpenGL ${GLU_LIBS} 293 329 INCLUDES = -I$(top_srcdir)/src/unittests -I$(top_srcdir)/src/Actions -I$(top_srcdir)/src/UIElements … … 315 351 Exceptions/libMolecuilderExceptions-@MOLECUILDER_API_VERSION@.la \ 316 352 Helpers/libMolecuilderHelpers-@MOLECUILDER_API_VERSION@.la \ 317 $(BOOST_LIB) \ 318 ${BOOST_THREAD_LIB} \ 319 ${BOOST_PROGRAM_OPTIONS_LIB} 320 321 322 #Stuff for building the GUI using QT 353 $(BOOST_LIB) 354 355 #Stuff for building the GUI using Qt 323 356 molecuildergui_SOURCES = ${QTUISOURCE} builder.cpp 324 357 molecuildergui_CXXFLAGS = ${QT_CXXFLAGS} ${GLU_CXXFLAGS} -DUSE_GUI_QT … … 326 359 327 360 unity_SOURCES = unity.cpp 328 unity_LDADD = $(BOOST_LIB) ${BOOST_THREAD_LIB} ${BOOST_PROGRAM_OPTIONS_LIB}361 unity_LDADD = $(BOOST_LIB) 329 362 330 363 molecuildergui_LDADD = \ … … 337 370 Helpers/libMolecuilderHelpers-@MOLECUILDER_API_VERSION@.la \ 338 371 $(BOOST_LIB) \ 339 ${BOOST_THREAD_LIB} \340 ${BOOST_PROGRAM_OPTIONS_LIB} \341 372 ${GUI_LIBS} 342 373 … … 350 381 Exceptions/libMolecuilderExceptions-@MOLECUILDER_API_VERSION@.la \ 351 382 Helpers/libMolecuilderHelpers-@MOLECUILDER_API_VERSION@.la \ 352 $(BOOST_LIB) \ 353 ${BOOST_THREAD_LIB} \ 354 ${BOOST_PROGRAM_OPTIONS_LIB} 383 $(BOOST_LIB) 355 384 356 385 analyzer_SOURCES = analyzer.cpp datacreator.cpp periodentafel.hpp datacreator.hpp … … 363 392 Exceptions/libMolecuilderExceptions-@MOLECUILDER_API_VERSION@.la \ 364 393 Helpers/libMolecuilderHelpers-@MOLECUILDER_API_VERSION@.la \ 365 $(BOOST_LIB) \ 366 ${BOOST_THREAD_LIB} \ 367 ${BOOST_PROGRAM_OPTIONS_LIB} 368 369 #Rules needed for QT4 394 $(BOOST_LIB) 395 396 #Rules needed for Qt4 370 397 # UI-Files are scattered throughout several subdirectories 371 398 # Therfore `%'-rules do not seem to work -
src/Parser/MpqcParser.cpp
r6940bb r573ca5 49 49 void MpqcParser::load(istream *file) 50 50 { 51 DoeLog(0) && (Log() << Verbose(0) << "Not yet implemented" << endl) ; 51 // TODO: MpqcParser::load implementation 52 ASSERT(false, "Not implemented yet"); 52 53 } 53 54 -
src/Parser/PcpParser.cpp
r6940bb r573ca5 355 355 // 3. parse the molecule in 356 356 molecule *mol = World::getInstance().createMolecule(); 357 MoleculeListClass *molecules = World::getInstance().getMolecules(); 358 molecules->insert(mol); 357 mol->ActiveFlag = true; 358 // TODO: Remove the insertion into molecule when saving does not depend on them anymore. Also, remove molecule.hpp include 359 World::getInstance().getMolecules()->insert(mol); 359 360 LoadMolecule(mol, FileBuffer, World::getInstance().getPeriode(), FastParsing); 360 //mol->SetNameFromFilename(filename);361 mol->ActiveFlag = true;362 //MolList->insert(mol);363 361 364 362 // 4. dissect the molecule into connected subgraphs -
src/Parser/PdbParser.cpp
r6940bb r573ca5 74 74 */ 75 75 void PdbParser::load(istream* file) { 76 // TODO: PdbParser::load implementation 77 ASSERT(false, "Not implemented yet"); 76 78 // string line; 77 79 // string::size_type location; … … 132 134 elementNo[Z] = (elementNo[Z]+1) % 100; // confine to two digits 133 135 const molecule *mol = (*atomIt)->getMolecule(); 134 if (mol == NULL) { // for homeless atoms, MolNo = 0is reserved135 MolNo = 0;136 if (mol == NULL) { // for homeless atoms, MolNo = -1 is reserved 137 MolNo = -1; 136 138 } else { 137 139 MolNo = mol->getId(); -
src/Parser/TremoloParser.cpp
r6940bb r573ca5 92 92 usedFields.clear(); 93 93 molecule *newmol = World::getInstance().createMolecule(); 94 newmol->ActiveFlag = true; 95 // TODO: Remove the insertion into molecule when saving does not depend on them anymore. Also, remove molecule.hpp include 96 World::getInstance().getMolecules()->insert(newmol); 94 97 while (file->good()) { 95 98 std::getline(*file, line, '\n'); -
src/UIElements/CommandLineUI/CommandLineDialog.cpp
r6940bb r573ca5 20 20 #include "Helpers/MemDebug.hpp" 21 21 22 #include <iostream>23 #include <vector>24 25 #include <Descriptors/AtomDescriptor.hpp>26 #include <Descriptors/AtomIdDescriptor.hpp>27 #include <Descriptors/MoleculeDescriptor.hpp>28 #include <Descriptors/MoleculeIdDescriptor.hpp>29 22 #include "CommandLineUI/CommandLineDialog.hpp" 30 23 31 #include "Actions/Values.hpp"32 33 #include "element.hpp"34 #include "periodentafel.hpp"35 #include "CommandLineParser.hpp"36 #include "defs.hpp"37 #include "Helpers/Log.hpp"38 #include "LinearAlgebra/Matrix.hpp"39 #include "periodentafel.hpp"40 #include "Helpers/Verbose.hpp"41 #include "World.hpp"42 #include "Box.hpp"43 44 #include "atom.hpp"45 #include "element.hpp"46 #include "molecule.hpp"47 #include "LinearAlgebra/Vector.hpp"48 24 49 25 using namespace std; … … 127 103 } 128 104 129 /************************** Query Infrastructure ************************/ 130 131 CommandLineDialog::EmptyCommandLineQuery::EmptyCommandLineQuery(string title, string _description) : 132 Dialog::EmptyQuery(title, _description) 133 {} 134 135 CommandLineDialog::EmptyCommandLineQuery::~EmptyCommandLineQuery() {} 136 137 bool CommandLineDialog::EmptyCommandLineQuery::handle() { 138 cout << "Message of " << getTitle() << ":\n" << getDescription() << "\n"; 139 return true; 105 void CommandLineDialog::queryFile(const char* title, string _description){ 106 registerQuery(new FileCommandLineQuery(title, _description)); 140 107 } 141 108 142 CommandLineDialog::IntCommandLineQuery::IntCommandLineQuery(string title, string _description) : 143 Dialog::IntQuery(title, _description) 144 {} 145 146 CommandLineDialog::IntCommandLineQuery::~IntCommandLineQuery() {} 147 148 bool CommandLineDialog::IntCommandLineQuery::handle() { 149 if (CommandLineParser::getInstance().vm.count(getTitle())) { 150 tmp = CommandLineParser::getInstance().vm[getTitle()].as<int>(); 151 return true; 152 } else { 153 DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing integer for " << getTitle() << "." << endl); 154 return false; 155 } 156 } 157 158 CommandLineDialog::IntsCommandLineQuery::IntsCommandLineQuery(string title, string _description) : 159 Dialog::IntsQuery(title, _description) 160 {} 161 162 CommandLineDialog::IntsCommandLineQuery::~IntsCommandLineQuery() {} 163 164 bool CommandLineDialog::IntsCommandLineQuery::handle() { 165 if (CommandLineParser::getInstance().vm.count(getTitle())) { 166 tmp = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<int> >(); 167 return true; 168 } else { 169 DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing integers for " << getTitle() << "." << endl); 170 return false; 171 } 172 } 173 174 CommandLineDialog::BooleanCommandLineQuery::BooleanCommandLineQuery(string title, string _description) : 175 Dialog::BooleanQuery(title, _description) 176 {} 177 178 CommandLineDialog::BooleanCommandLineQuery::~BooleanCommandLineQuery() {} 179 180 bool CommandLineDialog::BooleanCommandLineQuery::handle() { 181 if (CommandLineParser::getInstance().vm.count(getTitle())) { 182 tmp = CommandLineParser::getInstance().vm[getTitle()].as<bool>(); 183 return true; 184 } else { 185 DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing boolean for " << getTitle() << "." << endl); 186 return false; 187 } 188 } 189 190 CommandLineDialog::StringCommandLineQuery::StringCommandLineQuery(string title, string _description) : 191 Dialog::StringQuery(title, _description) 192 {} 193 194 CommandLineDialog::StringCommandLineQuery::~StringCommandLineQuery() {} 195 196 bool CommandLineDialog::StringCommandLineQuery::handle() { 197 if (CommandLineParser::getInstance().vm.count(getTitle())) { 198 tmp = CommandLineParser::getInstance().vm[getTitle()].as<string>(); 199 return true; 200 } else { 201 DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing string for " << getTitle() << "." << endl); 202 return false; 203 } 204 } 205 206 CommandLineDialog::StringsCommandLineQuery::StringsCommandLineQuery(string title, string _description) : 207 Dialog::StringsQuery(title, _description) 208 {} 209 210 CommandLineDialog::StringsCommandLineQuery::~StringsCommandLineQuery() {} 211 212 bool CommandLineDialog::StringsCommandLineQuery::handle() { 213 if (CommandLineParser::getInstance().vm.count(getTitle())) { 214 tmp = CommandLineParser::getInstance().vm[getTitle()].as< vector<string> >(); 215 return true; 216 } else { 217 DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing strings for " << getTitle() << "." << endl); 218 return false; 219 } 220 } 221 222 CommandLineDialog::DoubleCommandLineQuery::DoubleCommandLineQuery(string title, string _description) : 223 Dialog::DoubleQuery(title, _description) 224 {} 225 226 CommandLineDialog::DoubleCommandLineQuery::~DoubleCommandLineQuery() {} 227 228 bool CommandLineDialog::DoubleCommandLineQuery::handle() { 229 if (CommandLineParser::getInstance().vm.count(getTitle())) { 230 tmp = CommandLineParser::getInstance().vm[getTitle()].as<double>(); 231 return true; 232 } else { 233 DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing double for " << getTitle() << "." << endl); 234 return false; 235 } 236 } 237 238 CommandLineDialog::DoublesCommandLineQuery::DoublesCommandLineQuery(string title, string _description) : 239 Dialog::DoublesQuery(title, _description) 240 {} 241 242 CommandLineDialog::DoublesCommandLineQuery::~DoublesCommandLineQuery() {} 243 244 bool CommandLineDialog::DoublesCommandLineQuery::handle() { 245 if (CommandLineParser::getInstance().vm.count(getTitle())) { 246 tmp = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<double> >(); 247 return true; 248 } else { 249 DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing doubles for " << getTitle() << "." << endl); 250 return false; 251 } 252 } 253 254 CommandLineDialog::AtomCommandLineQuery::AtomCommandLineQuery(string title, string _description) : 255 Dialog::AtomQuery(title, _description) 256 {} 257 258 CommandLineDialog::AtomCommandLineQuery::~AtomCommandLineQuery() {} 259 260 bool CommandLineDialog::AtomCommandLineQuery::handle() { 261 int IdxOfAtom = -1; 262 if (CommandLineParser::getInstance().vm.count(getTitle())) { 263 IdxOfAtom = CommandLineParser::getInstance().vm[getTitle()].as<int>(); 264 tmp = World::getInstance().getAtom(AtomById(IdxOfAtom)); 265 return true; 266 } else { 267 DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing atom for " << getTitle() << "." << endl); 268 return false; 269 } 270 } 271 272 CommandLineDialog::AtomsCommandLineQuery::AtomsCommandLineQuery(string title, string _description) : 273 Dialog::AtomsQuery(title, _description) 274 {} 275 276 CommandLineDialog::AtomsCommandLineQuery::~AtomsCommandLineQuery() {} 277 278 bool CommandLineDialog::AtomsCommandLineQuery::handle() { 279 std::vector<int> IdxOfAtom; 280 if (CommandLineParser::getInstance().vm.count(getTitle())) { 281 IdxOfAtom = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<int> >(); 282 for (std::vector<int>::iterator iter = IdxOfAtom.begin(); iter != IdxOfAtom.end(); ++iter) { 283 temp = World::getInstance().getAtom(AtomById(*iter)); 284 if (temp) 285 tmp.push_back(temp); 286 } 287 return true; 288 } else { 289 DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing atoms for " << getTitle() << "." << endl); 290 return false; 291 } 292 } 293 294 CommandLineDialog::MoleculeCommandLineQuery::MoleculeCommandLineQuery(string title, string _description) : 295 Dialog::MoleculeQuery(title, _description) 296 {} 297 298 CommandLineDialog::MoleculeCommandLineQuery::~MoleculeCommandLineQuery() {} 299 300 bool CommandLineDialog::MoleculeCommandLineQuery::handle() { 301 int IdxOfMol = -1; 302 if (CommandLineParser::getInstance().vm.count(getTitle())) { 303 IdxOfMol = CommandLineParser::getInstance().vm[getTitle()].as<int>(); 304 tmp = World::getInstance().getMolecule(MoleculeById(IdxOfMol)); 305 return true; 306 } else { 307 DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing molecule for " << getTitle() << "." << endl); 308 return false; 309 } 310 } 311 312 CommandLineDialog::MoleculesCommandLineQuery::MoleculesCommandLineQuery(string title, string _description) : 313 Dialog::MoleculesQuery(title, _description) 314 {} 315 316 CommandLineDialog::MoleculesCommandLineQuery::~MoleculesCommandLineQuery() {} 317 318 bool CommandLineDialog::MoleculesCommandLineQuery::handle() { 319 std::vector<int> IdxOfMol; 320 if (CommandLineParser::getInstance().vm.count(getTitle())) { 321 IdxOfMol = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<int> >(); 322 for (std::vector<int>::iterator iter = IdxOfMol.begin(); iter != IdxOfMol.end(); ++iter) { 323 temp = World::getInstance().getMolecule(MoleculeById(*iter)); 324 if (temp) 325 tmp.push_back(temp); 326 } 327 return true; 328 } else { 329 DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing molecules for " << getTitle() << "." << endl); 330 return false; 331 } 332 } 333 334 CommandLineDialog::VectorCommandLineQuery::VectorCommandLineQuery(string title, bool _check, string _description) : 335 Dialog::VectorQuery(title,_check, _description) 336 {} 337 338 CommandLineDialog::VectorCommandLineQuery::~VectorCommandLineQuery() 339 {} 340 341 bool CommandLineDialog::VectorCommandLineQuery::handle() { 342 VectorValue temp; 343 if (CommandLineParser::getInstance().vm.count(getTitle())) { 344 temp = CommandLineParser::getInstance().vm[getTitle()].as< VectorValue >(); 345 tmp[0] = temp.x; 346 tmp[1] = temp.y; 347 tmp[2] = temp.z; 348 if ((check) && (!World::getInstance().getDomain().isInside(tmp))) { 349 DoeLog(1) && (eLog() << Verbose(1) << "Vector " << tmp << " would be outside of box domain." << endl); 350 return false; 351 } 352 return true; 353 } else { 354 DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing vector for " << getTitle() << "." << endl); 355 return false; 356 } 357 } 358 359 CommandLineDialog::VectorsCommandLineQuery::VectorsCommandLineQuery(string title, bool _check, string _description) : 360 Dialog::VectorsQuery(title,_check, _description) 361 {} 362 363 CommandLineDialog::VectorsCommandLineQuery::~VectorsCommandLineQuery() 364 {} 365 366 bool CommandLineDialog::VectorsCommandLineQuery::handle() { 367 std::vector<VectorValue> temporary; 368 if (CommandLineParser::getInstance().vm.count(getTitle())) { 369 temporary = CommandLineParser::getInstance().vm[getTitle()].as< std::vector<VectorValue> >(); 370 for(std::vector<VectorValue>::iterator iter = temporary.begin(); iter != temporary.end(); ++iter) { 371 temp[0] = (*iter).x; 372 temp[1] = (*iter).y; 373 temp[2] = (*iter).z; 374 if ((!check) || (World::getInstance().getDomain().isInside(temp))) 375 tmp.push_back(temp); 376 else 377 DoeLog(1) && (eLog() << Verbose(1) << "Vector " << temp << " would be outside of box domain." << endl); 378 } 379 return true; 380 } else { 381 DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing vectors for " << getTitle() << "." << endl); 382 return false; 383 } 384 } 385 386 CommandLineDialog::BoxCommandLineQuery::BoxCommandLineQuery(string title, string _description) : 387 Dialog::BoxQuery(title, _description) 388 {} 389 390 CommandLineDialog::BoxCommandLineQuery::~BoxCommandLineQuery() 391 {} 392 393 bool CommandLineDialog::BoxCommandLineQuery::handle() { 394 BoxValue temp; 395 if (CommandLineParser::getInstance().vm.count(getTitle())) { 396 temp = CommandLineParser::getInstance().vm[getTitle()].as< BoxValue >(); 397 Matrix M; 398 M.set(0,0, temp.xx); 399 M.set(0,1, temp.yx); 400 M.set(0,2, temp.zx); 401 M.set(1,0, temp.yx); 402 M.set(1,1, temp.yy); 403 M.set(1,2, temp.zy); 404 M.set(2,0, temp.zx); 405 M.set(2,1, temp.zy); 406 M.set(2,2, temp.zz); 407 tmp.setM(M); 408 return true; 409 } else { 410 DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing symmetric box matrix for " << getTitle() << "." << endl); 411 return false; 412 } 413 } 414 415 CommandLineDialog::ElementCommandLineQuery::ElementCommandLineQuery(string title, string _description) : 416 Dialog::ElementQuery(title, _description) 417 {} 418 419 CommandLineDialog::ElementCommandLineQuery::~ElementCommandLineQuery() 420 {} 421 422 bool CommandLineDialog::ElementCommandLineQuery::handle() { 423 // TODO: vector of ints and removing first is not correctly implemented yet. How to remove from a vector? 424 periodentafel *periode = World::getInstance().getPeriode(); 425 if (CommandLineParser::getInstance().vm.count(getTitle())) { 426 int Z = CommandLineParser::getInstance().vm[getTitle()].as< int >(); 427 tmp = periode->FindElement(Z); 428 ASSERT(tmp != NULL, "Invalid element specified in ElementCommandLineQuery"); 429 return true; 430 } else { 431 DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing element for " << getTitle() << "." << endl); 432 return false; 433 } 434 } 435 436 CommandLineDialog::ElementsCommandLineQuery::ElementsCommandLineQuery(string title, string _description) : 437 Dialog::ElementsQuery(title, _description) 438 {} 439 440 CommandLineDialog::ElementsCommandLineQuery::~ElementsCommandLineQuery() 441 {} 442 443 bool CommandLineDialog::ElementsCommandLineQuery::handle() { 444 // TODO: vector of ints and removing first is not correctly implemented yet. How to remove from a vector? 445 periodentafel *periode = World::getInstance().getPeriode(); 446 if (CommandLineParser::getInstance().vm.count(getTitle())) { 447 vector<int> AllElements = CommandLineParser::getInstance().vm[getTitle()].as< vector<int> >(); 448 for (vector<int>::iterator ZRunner = AllElements.begin(); ZRunner != AllElements.end(); ++ZRunner) { 449 temp = periode->FindElement(*ZRunner); 450 ASSERT(temp != NULL, "Invalid element specified in ElementCommandLineQuery"); 451 tmp.push_back(temp); 452 } 453 return true; 454 } else { 455 DoeLog(1) && (eLog() << Verbose(1) << "CommandLineUI parsing error: Missing elements for " << getTitle() << "." << endl); 456 return false; 457 } 458 } 109 /************************** Query Infrastructure ************************/ 110 /* ---> shifted to folder Query */ 111 /************************************************************************/ -
src/UIElements/CommandLineUI/CommandLineDialog.hpp
r6940bb r573ca5 44 44 virtual void queryElement(const char*, std::string = ""); 45 45 virtual void queryElements(const char*, std::string = ""); 46 virtual void queryFile(const char*, std::string = ""); 46 47 47 48 protected: … … 165 166 virtual bool handle(); 166 167 }; 168 169 class FileCommandLineQuery : public Dialog::FileQuery { 170 public: 171 FileCommandLineQuery(std::string title, std::string _description = ""); 172 virtual ~FileCommandLineQuery(); 173 virtual bool handle(); 174 }; 167 175 }; 168 176 -
src/UIElements/Dialog.cpp
r6940bb r573ca5 23 23 #include "Actions/ValueStorage.hpp" 24 24 25 #include "Helpers/Log.hpp" 25 26 #include "Helpers/Verbose.hpp" 26 #include "atom.hpp" 27 #include "Box.hpp" 28 #include "element.hpp" 29 #include "molecule.hpp" 30 #include "LinearAlgebra/BoxVector.hpp" 31 #include "LinearAlgebra/Vector.hpp" 32 #include "LinearAlgebra/Matrix.hpp" 27 28 class Atom; 29 class Box; 30 class element; 31 class Matrix; 32 class molecule; 33 class Vector; 33 34 34 35 using namespace std; … … 180 181 } 181 182 182 /****************** Query types Infrastructure **************************/ 183 184 // Base class 185 Dialog::Query::Query(string _title, string _description) : 186 title(_title), 187 description(_description) 188 {} 189 190 Dialog::Query::~Query() {} 191 192 const std::string Dialog::Query::getTitle() const{ 193 return title; 183 template <> void Dialog::query< boost::filesystem::path >(const char *token, std::string description) 184 { 185 queryFile(token, description); 194 186 } 195 187 196 const std::string Dialog::Query::getDescription() const{ 197 return description; 198 } 199 // empty Queries 200 201 Dialog::EmptyQuery::EmptyQuery(string title, std::string description) : 202 Query(title, description) 203 {} 204 205 Dialog::EmptyQuery::~EmptyQuery() {} 206 207 void Dialog::EmptyQuery::setResult() { 208 } 209 210 // Int Queries 211 212 Dialog::IntQuery::IntQuery(string title, std::string description) : 213 Query(title, description) 214 {} 215 216 Dialog::IntQuery::~IntQuery() {} 217 218 void Dialog::IntQuery::setResult() { 219 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 220 } 221 222 // Ints Queries 223 224 Dialog::IntsQuery::IntsQuery(string title, std::string description) : 225 Query(title, description) 226 {} 227 228 Dialog::IntsQuery::~IntsQuery() {} 229 230 void Dialog::IntsQuery::setResult() { 231 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 232 } 233 234 // Bool Queries 235 236 Dialog::BooleanQuery::BooleanQuery(string title,std::string description) : 237 Query(title, description) 238 {} 239 240 Dialog::BooleanQuery::~BooleanQuery() {} 241 242 void Dialog::BooleanQuery::setResult() { 243 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 244 } 245 246 // String Queries 247 248 Dialog::StringQuery::StringQuery(string title,std::string _description) : 249 Query(title, _description) 250 {} 251 252 Dialog::StringQuery::~StringQuery() {}; 253 254 void Dialog::StringQuery::setResult() { 255 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 256 } 257 258 // Strings Queries 259 260 Dialog::StringsQuery::StringsQuery(string title,std::string _description) : 261 Query(title, _description) 262 {} 263 264 Dialog::StringsQuery::~StringsQuery() {}; 265 266 void Dialog::StringsQuery::setResult() { 267 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 268 } 269 270 // Double Queries 271 272 Dialog::DoubleQuery::DoubleQuery(string title, std::string _description) : 273 Query(title, _description) 274 {} 275 276 Dialog::DoubleQuery::~DoubleQuery() {}; 277 278 void Dialog::DoubleQuery::setResult() { 279 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 280 } 281 282 // Doubles Queries 283 284 Dialog::DoublesQuery::DoublesQuery(string title, std::string _description) : 285 Query(title, _description) 286 {} 287 288 Dialog::DoublesQuery::~DoublesQuery() {}; 289 290 void Dialog::DoublesQuery::setResult() { 291 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 292 } 293 294 295 // Atom Queries 296 297 Dialog::AtomQuery::AtomQuery(string title, std::string _description) : 298 Query(title, _description), 299 tmp(0) 300 {} 301 302 Dialog::AtomQuery::~AtomQuery() {} 303 304 void Dialog::AtomQuery::setResult() { 305 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 306 } 307 308 // Atoms Queries 309 310 Dialog::AtomsQuery::AtomsQuery(string title, std::string _description) : 311 Query(title, _description), 312 tmp(0) 313 {} 314 315 Dialog::AtomsQuery::~AtomsQuery() {} 316 317 void Dialog::AtomsQuery::setResult() { 318 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 319 } 320 321 // Molecule Queries 322 323 Dialog::MoleculeQuery::MoleculeQuery(string title, std::string _description) : 324 Query(title, _description), 325 tmp(0) 326 {} 327 328 Dialog::MoleculeQuery::~MoleculeQuery() {} 329 330 void Dialog::MoleculeQuery::setResult() { 331 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 332 } 333 334 // Molecules Queries 335 336 Dialog::MoleculesQuery::MoleculesQuery(string title, std::string _description) : 337 Query(title, _description), 338 tmp(0) 339 {} 340 341 Dialog::MoleculesQuery::~MoleculesQuery() {} 342 343 void Dialog::MoleculesQuery::setResult() { 344 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 345 } 346 347 // Vector Queries 348 349 Dialog::VectorQuery::VectorQuery(std::string title,bool _check, std::string _description) : 350 Query(title, _description), 351 check(_check) 352 {} 353 354 Dialog::VectorQuery::~VectorQuery() 355 {} 356 357 void Dialog::VectorQuery::setResult() { 358 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 359 } 360 361 // Vectors Queries 362 363 Dialog::VectorsQuery::VectorsQuery(std::string title,bool _check, std::string _description) : 364 Query(title, _description), 365 check(_check) 366 {} 367 368 Dialog::VectorsQuery::~VectorsQuery() 369 {} 370 371 void Dialog::VectorsQuery::setResult() { 372 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 373 } 374 375 // Box Queries 376 377 Dialog::BoxQuery::BoxQuery(std::string title, std::string _description) : 378 Query(title, _description) 379 {} 380 381 Dialog::BoxQuery::~BoxQuery() 382 {} 383 384 void Dialog::BoxQuery::setResult() { 385 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 386 } 387 388 // Element Queries 389 Dialog::ElementQuery::ElementQuery(std::string title, std::string _description) : 390 Query(title, _description) 391 {} 392 393 Dialog::ElementQuery::~ElementQuery(){} 394 395 void Dialog::ElementQuery::setResult(){ 396 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 397 } 398 399 // Elements Queries 400 Dialog::ElementsQuery::ElementsQuery(std::string title, std::string _description) : 401 Query(title, _description) 402 {} 403 404 Dialog::ElementsQuery::~ElementsQuery(){} 405 406 void Dialog::ElementsQuery::setResult(){ 407 ValueStorage::getInstance().setCurrentValue(title.c_str(), tmp); 408 } 188 /************************** Query Infrastructure ************************/ 189 /* ---> shifted to folder Query */ 190 /************************************************************************/ -
src/UIElements/Dialog.hpp
r6940bb r573ca5 13 13 #include<vector> 14 14 15 #include <boost/filesystem.hpp> 16 15 17 #include "Box.hpp" 16 18 #include "LinearAlgebra/Vector.hpp" … … 24 26 /** Dialog is one of the two main classes of the UIFactory base class. 25 27 * 26 * The Dialog is meant for asking the user for information needed to perform actions he27 * desires, such as asking for a position in space or a length.28 * The Dialog is meant for asking the user for information needed to perform 29 * actions he desires, such as asking for a position in space or a length. 28 30 * 29 * For this purpose there is the base class Query and numerous specializations for each30 * of the types to be asked. There are primitives integer, doubles and string, but also31 * advanced types such as element, molecule or Vector. There is also an empty query for32 * displaying text.31 * For this purpose there is the base class Query and numerous specializations 32 * for each of the types to be asked. There are primitives integer, doubles and 33 * string, but also advanced types such as element, molecule or Vector. There 34 * is also an empty query for displaying text. 33 35 */ 34 36 class Dialog … … 57 59 virtual void queryElement(const char*, std::string = "")=0; 58 60 virtual void queryElements(const char*, std::string = "")=0; 61 virtual void queryFile(const char*, std::string = "")=0; 59 62 60 63 virtual bool display(); … … 76 79 //due to lack of common code for query types as well as GUI-Types (all subtypes differ a lot) 77 80 78 //base class for all queries 81 /** Base class for all queries. 82 * 83 * 84 * <h1>How to add another query?</h1> 85 * 86 * Let's say we want to query for a type called \a Value. 87 * 88 * Then, we do the following: 89 * -# Add a class ValueQuery inside class Dialog, the class contains 90 * -# constructor/destructor (latter virtual! because of derived class) 91 * -# virtual bool handle() and virtual void setResult() 92 * -# a protected member tmp of type Value (NOTE: herein the result is stored) 93 * -# if temporaries for conversion are needed put them in here 94 * -# add a function queryValue 95 * -# now, for each of the GUIs we basically have to repeat the above, i.e. 96 * add the class and the function that implement the virtual ones above. 97 * -# QT: an extra class called ValueQtQueryPipe that actually handles 98 * showing dialogs to obtain the value and placing it into the \a tmp 99 * variable (via a given pointer to it as reference). handle() will 100 * simply return true. This is needed because of a restriction of Qt4: 101 * its meta-object-compiler does not like nested classes. 102 * -# CommandLine: nothing special, handle() imports value from \a 103 * CommandLineParser and sets the tmp variable. 104 * -# Text: nothing special, handle() queries the user and sets the tmp 105 * variable 106 */ 79 107 class Query { 80 108 friend class Dialog; … … 271 299 }; 272 300 301 class FileQuery : public Query { 302 public: 303 FileQuery(std::string title, std::string _description = ""); 304 virtual ~FileQuery(); 305 virtual bool handle()=0; 306 virtual void setResult(); 307 protected: 308 boost::filesystem::path tmp; 309 }; 310 273 311 void registerQuery(Query* query); 274 312 -
src/UIElements/Makefile.am
r6940bb r573ca5 41 41 ${TEXTUISOURCE} \ 42 42 ${VIEWSOURCE} \ 43 Query/AtomQuery.cpp \ 44 Query/AtomsQuery.cpp \ 45 Query/BooleanQuery.cpp \ 46 Query/BoxQuery.cpp \ 47 Query/DoubleQuery.cpp \ 48 Query/DoublesQuery.cpp \ 49 Query/ElementQuery.cpp \ 50 Query/ElementsQuery.cpp \ 51 Query/EmptyQuery.cpp \ 52 Query/FileQuery.cpp \ 53 Query/IntQuery.cpp \ 54 Query/IntsQuery.cpp \ 55 Query/MoleculeQuery.cpp \ 56 Query/MoleculesQuery.cpp \ 57 Query/Query.cpp \ 58 Query/StringQuery.cpp \ 59 Query/StringsQuery.cpp \ 60 Query/VectorQuery.cpp \ 61 Query/VectorsQuery.cpp \ 43 62 Dialog.cpp \ 44 63 MainWindow.cpp … … 54 73 55 74 TEXTUISOURCE = \ 75 TextUI/Query/AtomsTextQuery.cpp \ 76 TextUI/Query/AtomTextQuery.cpp \ 77 TextUI/Query/BooleanTextQuery.cpp \ 78 TextUI/Query/BoxTextQuery.cpp \ 79 TextUI/Query/DoubleTextQuery.cpp \ 80 TextUI/Query/DoublesTextQuery.cpp \ 81 TextUI/Query/ElementTextQuery.cpp \ 82 TextUI/Query/ElementsTextQuery.cpp \ 83 TextUI/Query/EmptyTextQuery.cpp \ 84 TextUI/Query/FileTextQuery.cpp \ 85 TextUI/Query/IntTextQuery.cpp \ 86 TextUI/Query/IntsTextQuery.cpp \ 87 TextUI/Query/MoleculesTextQuery.cpp \ 88 TextUI/Query/MoleculeTextQuery.cpp \ 89 TextUI/Query/StringTextQuery.cpp \ 90 TextUI/Query/StringsTextQuery.cpp \ 91 TextUI/Query/VectorTextQuery.cpp \ 92 TextUI/Query/VectorsTextQuery.cpp \ 56 93 TextUI/TextDialog.cpp \ 57 94 TextUI/TextStatusIndicator.cpp \ … … 65 102 66 103 COMMANDLINEUISOURCE = \ 104 CommandLineUI/Query/AtomCommandLineQuery.cpp \ 105 CommandLineUI/Query/AtomsCommandLineQuery.cpp \ 106 CommandLineUI/Query/BooleanCommandLineQuery.cpp \ 107 CommandLineUI/Query/BoxCommandLineQuery.cpp \ 108 CommandLineUI/Query/DoubleCommandLineQuery.cpp \ 109 CommandLineUI/Query/DoublesCommandLineQuery.cpp \ 110 CommandLineUI/Query/ElementCommandLineQuery.cpp \ 111 CommandLineUI/Query/ElementsCommandLineQuery.cpp \ 112 CommandLineUI/Query/EmptyCommandLineQuery.cpp \ 113 CommandLineUI/Query/FileCommandLineQuery.cpp \ 114 CommandLineUI/Query/IntCommandLineQuery.cpp \ 115 CommandLineUI/Query/IntsCommandLineQuery.cpp \ 116 CommandLineUI/Query/MoleculeCommandLineQuery.cpp \ 117 CommandLineUI/Query/MoleculesCommandLineQuery.cpp \ 118 CommandLineUI/Query/StringCommandLineQuery.cpp \ 119 CommandLineUI/Query/StringsCommandLineQuery.cpp \ 120 CommandLineUI/Query/VectorCommandLineQuery.cpp \ 121 CommandLineUI/Query/VectorsCommandLineQuery.cpp \ 67 122 CommandLineUI/CommandLineDialog.cpp \ 68 123 CommandLineUI/CommandLineStatusIndicator.cpp \ -
src/UIElements/TextUI/TextDialog.cpp
r6940bb r573ca5 20 20 #include "Helpers/MemDebug.hpp" 21 21 22 #include <iostream>23 24 #include <Descriptors/AtomDescriptor.hpp>25 #include <Descriptors/AtomIdDescriptor.hpp>26 #include <Descriptors/MoleculeDescriptor.hpp>27 #include <Descriptors/MoleculeIdDescriptor.hpp>28 #include <boost/lexical_cast.hpp>29 22 #include "TextUI/TextDialog.hpp" 30 31 #include "World.hpp"32 #include "periodentafel.hpp"33 #include "Helpers/Log.hpp"34 #include "Helpers/Verbose.hpp"35 36 #include "atom.hpp"37 #include "element.hpp"38 #include "molecule.hpp"39 #include "LinearAlgebra/Vector.hpp"40 #include "LinearAlgebra/Matrix.hpp"41 #include "Box.hpp"42 43 #include <boost/lexical_cast.hpp>44 23 45 24 using namespace std; … … 125 104 } 126 105 127 /************************** Query Infrastructure ************************/ 128 129 TextDialog::EmptyTextQuery::EmptyTextQuery(string title, std::string _description) : 130 Dialog::EmptyQuery(title,_description) 131 {} 132 133 TextDialog::EmptyTextQuery::~EmptyTextQuery() {} 134 135 bool TextDialog::EmptyTextQuery::handle() { 136 cout << "Message of " << getTitle() << ":\n" << getDescription() << "\n"; 137 return true; 106 void TextDialog::queryFile(const char* title, std::string description){ 107 registerQuery(new FileTextQuery(title,description)); 138 108 } 139 109 140 TextDialog::IntTextQuery::IntTextQuery(string title, std::string _description) : 141 Dialog::IntQuery(title,_description) 142 {} 110 /************************** Query Infrastructure ************************/ 111 /* ---> shifted to folder Query */ 112 /************************************************************************/ 143 113 144 TextDialog::IntTextQuery::~IntTextQuery() {}145 146 bool TextDialog::IntTextQuery::handle() {147 bool badInput = false;148 do{149 badInput = false;150 Log() << Verbose(0) << getTitle();151 cin >> tmp;152 if(cin.fail()){153 badInput=true;154 cin.clear();155 cin.ignore(std::numeric_limits<streamsize>::max(),'\n');156 Log() << Verbose(0) << "Input was not a number!" << endl;157 }158 } while(badInput);159 // clear the input buffer of anything still in the line160 cin.ignore(std::numeric_limits<streamsize>::max(),'\n');161 return true;162 }163 164 TextDialog::IntsTextQuery::IntsTextQuery(string title, std::string _description) :165 Dialog::IntsQuery(title,_description)166 {}167 168 TextDialog::IntsTextQuery::~IntsTextQuery() {}169 170 bool TextDialog::IntsTextQuery::handle() {171 Log() << Verbose(0) << getTitle();172 std::string line;173 getline(cin,line);174 // dissect by " "175 std::string::iterator olditer = line.begin();176 for(string::iterator iter = line.begin(); iter != line.end(); ++iter) {177 if (*iter == ' ') {178 std::istringstream stream(string(iter, olditer));179 stream >> temp;180 tmp.push_back(temp);181 olditer = iter;182 }183 }184 if (olditer != line.begin()) { // insert last part also185 std::istringstream stream(string(olditer, line.end()));186 stream >> temp;187 tmp.push_back(temp);188 }189 190 return true;191 }192 193 TextDialog::BooleanTextQuery::BooleanTextQuery(string title, std::string _description) :194 Dialog::BooleanQuery(title,_description)195 {}196 197 TextDialog::BooleanTextQuery::~BooleanTextQuery() {}198 199 bool TextDialog::BooleanTextQuery::handle() {200 bool badInput = false;201 char input = ' ';202 do{203 badInput = false;204 Log() << Verbose(0) << getTitle();205 cin >> input;206 if ((input == 'y' ) || (input == 'Y')) {207 tmp = true;208 } else if ((input == 'n' ) || (input == 'N')) {209 tmp = false;210 } else {211 badInput=true;212 cin.clear();213 cin.ignore(std::numeric_limits<streamsize>::max(),'\n');214 Log() << Verbose(0) << "Input was not of [yYnN]!" << endl;215 }216 } while(badInput);217 // clear the input buffer of anything still in the line218 cin.ignore(std::numeric_limits<streamsize>::max(),'\n');219 return true;220 }221 222 TextDialog::StringTextQuery::StringTextQuery(string title, std::string _description) :223 Dialog::StringQuery(title,_description)224 {}225 226 TextDialog::StringTextQuery::~StringTextQuery() {}227 228 bool TextDialog::StringTextQuery::handle() {229 Log() << Verbose(0) << getTitle();230 getline(cin,tmp);231 return true;232 }233 234 TextDialog::StringsTextQuery::StringsTextQuery(string title, std::string _description) :235 Dialog::StringsQuery(title,_description)236 {}237 238 TextDialog::StringsTextQuery::~StringsTextQuery() {}239 240 bool TextDialog::StringsTextQuery::handle() {241 Log() << Verbose(0) << getTitle();242 getline(cin,temp);243 // dissect by " "244 std::string::iterator olditer = temp.begin();245 for(string::iterator iter = temp.begin(); iter != temp.end(); ++iter) {246 if (*iter == ' ') {247 tmp.push_back(string(iter, olditer));248 olditer = iter;249 }250 }251 if (olditer != temp.begin()) // insert last part also252 tmp.push_back(string(olditer, temp.end()));253 254 return true;255 }256 257 TextDialog::DoubleTextQuery::DoubleTextQuery(string title, std::string _description) :258 Dialog::DoubleQuery(title,_description)259 {}260 261 TextDialog::DoubleTextQuery::~DoubleTextQuery() {}262 263 bool TextDialog::DoubleTextQuery::handle() {264 bool badInput = false;265 do{266 badInput = false;267 Log() << Verbose(0) << getTitle();268 cin >> tmp;269 if(cin.fail()){270 badInput = true;271 cin.clear();272 cin.ignore(std::numeric_limits<streamsize>::max(),'\n');273 Log() << Verbose(0) << "Input was not a number!" << endl;274 }275 }while(badInput);276 cin.ignore(std::numeric_limits<streamsize>::max(),'\n');277 return true;278 }279 280 281 TextDialog::DoublesTextQuery::DoublesTextQuery(string title, std::string _description) :282 Dialog::DoublesQuery(title,_description)283 {}284 285 TextDialog::DoublesTextQuery::~DoublesTextQuery() {}286 287 bool TextDialog::DoublesTextQuery::handle() {288 Log() << Verbose(0) << getTitle();289 std::string line;290 getline(cin,line);291 // dissect by " "292 std::string::iterator olditer = line.begin();293 for(string::iterator iter = line.begin(); iter != line.end(); ++iter) {294 if (*iter == ' ') {295 std::istringstream stream(string(iter, olditer));296 stream >> temp;297 tmp.push_back(temp);298 olditer = iter;299 }300 }301 if (olditer != line.begin()) { // insert last part also302 std::istringstream stream(string(olditer, line.end()));303 stream >> temp;304 tmp.push_back(temp);305 }306 307 return true;308 }309 310 TextDialog::AtomTextQuery::AtomTextQuery(string title, std::string _description) :311 Dialog::AtomQuery(title,_description)312 {}313 314 TextDialog::AtomTextQuery::~AtomTextQuery() {}315 316 bool TextDialog::AtomTextQuery::handle() {317 int idxOfAtom=-1;318 bool badInput = false;319 do{320 badInput = false;321 Log() << Verbose(0) << getTitle();322 cin >> idxOfAtom;323 if(cin.fail()){324 badInput = true;325 cin.clear();326 cin.ignore(std::numeric_limits<streamsize>::max(),'\n');327 Log() << Verbose(0) << "Input was not a number!" << endl;328 continue;329 }330 331 tmp = World::getInstance().getAtom(AtomById(idxOfAtom));332 if(!tmp && idxOfAtom!=-1){333 Log() << Verbose(0) << "Invalid Atom Index" << idxOfAtom << endl;334 badInput = true;335 }336 337 } while(badInput);338 cin.ignore(std::numeric_limits<streamsize>::max(),'\n');339 return (idxOfAtom!=-1);340 }341 342 343 TextDialog::AtomsTextQuery::AtomsTextQuery(string title, std::string _description) :344 Dialog::AtomsQuery(title,_description)345 {}346 347 TextDialog::AtomsTextQuery::~AtomsTextQuery() {}348 349 bool TextDialog::AtomsTextQuery::handle() {350 int idxOfAtom=-1;351 Log() << Verbose(0) << getTitle();352 std::string line;353 getline(cin,line);354 // dissect by " "355 std::string::iterator olditer = line.begin();356 for(string::iterator iter = line.begin(); iter != line.end(); ++iter) {357 if (*iter == ' ') {358 std::istringstream stream(string(iter, olditer));359 stream >> idxOfAtom;360 temp = World::getInstance().getAtom(AtomById(idxOfAtom));361 if(!temp && idxOfAtom!=-1){362 Log() << Verbose(0) << "Invalid Atom Index" << idxOfAtom << endl;363 break;364 }365 tmp.push_back(temp);366 olditer = iter;367 }368 }369 if (olditer != line.begin()) { // insert last part also370 std::istringstream stream(string(olditer, line.end()));371 stream >> idxOfAtom;372 temp = World::getInstance().getAtom(AtomById(idxOfAtom));373 if(!temp && idxOfAtom!=-1) {374 Log() << Verbose(0) << "Invalid Atom Index" << idxOfAtom << endl;375 tmp.push_back(temp);376 }377 }378 379 return (idxOfAtom!=-1);380 }381 382 TextDialog::MoleculeTextQuery::MoleculeTextQuery(string title, std::string _description) :383 Dialog::MoleculeQuery(title,_description)384 {}385 386 TextDialog::MoleculeTextQuery::~MoleculeTextQuery() {}387 388 bool TextDialog::MoleculeTextQuery::handle() {389 int idxOfMol=0;390 bool badInput = false;391 do{392 badInput = false;393 Log() << Verbose(0) << getTitle();394 cin >> idxOfMol;395 if(cin.fail()){396 badInput = true;397 cin.clear();398 cin.ignore(std::numeric_limits<streamsize>::max(),'\n');399 Log() << Verbose(0) << "Input was not a number!" << endl;400 continue;401 }402 403 tmp = World::getInstance().getMolecule(MoleculeById(idxOfMol));404 if(!tmp && idxOfMol!=-1){405 Log() << Verbose(0) << "Invalid Molecule Index" << endl;406 badInput = true;407 }408 409 } while(badInput);410 cin.ignore(std::numeric_limits<streamsize>::max(),'\n');411 return (idxOfMol!=-1);412 }413 414 415 TextDialog::MoleculesTextQuery::MoleculesTextQuery(string title, std::string _description) :416 Dialog::MoleculesQuery(title,_description)417 {}418 419 TextDialog::MoleculesTextQuery::~MoleculesTextQuery() {}420 421 bool TextDialog::MoleculesTextQuery::handle() {422 int idxOfMol=-1;423 Log() << Verbose(0) << getTitle();424 std::string line;425 getline(cin,line);426 // dissect by " "427 std::string::iterator olditer = line.begin();428 for(string::iterator iter = line.begin(); iter != line.end(); ++iter) {429 if (*iter == ' ') {430 std::istringstream stream(string(iter, olditer));431 stream >> idxOfMol;432 temp = World::getInstance().getMolecule(MoleculeById(idxOfMol));433 if(!temp && idxOfMol!=-1){434 Log() << Verbose(0) << "Invalid Molecule Index" << idxOfMol << endl;435 break;436 }437 tmp.push_back(temp);438 olditer = iter;439 }440 }441 if (olditer != line.begin()) { // insert last part also442 std::istringstream stream(string(olditer, line.end()));443 stream >> idxOfMol;444 temp = World::getInstance().getMolecule(MoleculeById(idxOfMol));445 if(!temp && idxOfMol!=-1){446 Log() << Verbose(0) << "Invalid Molecule Index" << idxOfMol << endl;447 tmp.push_back(temp);448 }449 }450 451 return (idxOfMol!=-1);452 }453 454 TextDialog::VectorTextQuery::VectorTextQuery(std::string title, bool _check, std::string _description) :455 Dialog::VectorQuery(title,_check,_description)456 {}457 458 TextDialog::VectorTextQuery::~VectorTextQuery()459 {}460 461 bool TextDialog::VectorTextQuery::handle() {462 std::cout << getTitle();463 const Matrix &M = World::getInstance().getDomain().getM();464 char coords[3] = {'x', 'y', 'z'};465 for (int i=0;i<3;i++)466 std::cout << coords[i] << "[0.." << M.at(i,i) << ( (i!=2) ? "], " : "]: ");467 468 std::string line;469 getline(cin,line);470 471 // dissect by ","472 double coord = 0.;473 int counter = 0;474 std::string::iterator olditer = line.begin();475 for(string::iterator iter = line.begin(); (iter != line.end()) && (counter != 3); ++iter) {476 if (*iter == ',') {477 std::istringstream stream(string(iter, olditer));478 stream >> coord;479 tmp[counter++] = coord;480 olditer = iter;481 }482 }483 if ((olditer != line.begin()) && (counter != 3)) { // insert last part also484 std::istringstream stream(string(olditer, line.end()));485 stream >> coord;486 tmp[counter++] = coord;487 }488 489 // check vector490 return World::getInstance().getDomain().isInside(tmp);491 }492 493 TextDialog::VectorsTextQuery::VectorsTextQuery(std::string title, bool _check, std::string _description) :494 Dialog::VectorsQuery(title,_check,_description)495 {}496 497 TextDialog::VectorsTextQuery::~VectorsTextQuery()498 {}499 500 bool TextDialog::VectorsTextQuery::handle() {501 std::cout << getTitle();502 char coords[3] = {'x', 'y', 'z'};503 const Matrix &M = World::getInstance().getDomain().getM();504 for (int i=0;i<3;i++)505 std::cout << coords[i] << "[0.." << M.at(i,i) << ( (i!=2) ? "], " : "]: ");506 507 std::string line;508 getline(cin,line);509 510 // dissect by ","511 double coord = 0.;512 std::string::iterator olditerspace = line.begin();513 std::string::iterator olditercomma = line.begin();514 int counter = 0;515 for(string::iterator vectoriter = line.begin(); vectoriter != line.end(); ++vectoriter) {516 if (*vectoriter == ',')517 counter++;518 if ((*vectoriter == ' ') && (counter == 2)) {519 counter = 0;520 for(string::iterator componentiter = olditerspace; (componentiter != vectoriter) && (counter !=3); ++componentiter) {521 if (*componentiter == ',') {522 std::istringstream stream(string(componentiter, olditercomma));523 stream >> coord;524 temp[counter++] = coord;525 olditercomma = componentiter;526 }527 }528 if ((olditercomma != line.begin()) && (counter != 3)) { // insert last part also529 std::istringstream stream(string(olditercomma, vectoriter));530 stream >> coord;531 temp[counter++] = coord;532 }533 if (World::getInstance().getDomain().isInside(temp))534 tmp.push_back(temp);535 olditerspace = vectoriter;536 }537 }538 539 return true;540 }541 542 TextDialog::BoxTextQuery::BoxTextQuery(std::string title, std::string _description) :543 Dialog::BoxQuery(title,_description)544 {}545 546 TextDialog::BoxTextQuery::~BoxTextQuery()547 {}548 549 bool TextDialog::BoxTextQuery::handle() {550 Log() << Verbose(0) << getTitle();551 552 double temp[6];553 std::string coords[6] = {"xx","yx","yy", "zx", "zy", "zz"};554 for (int i=0;i<6;i++) {555 Log() << Verbose(0) << coords[i] << ": ";556 cin >> temp[i];557 }558 Matrix M;559 M.set(0,0, temp[0]);560 M.set(0,1, temp[1]);561 M.set(0,2, temp[2]);562 M.set(1,0, temp[1]);563 M.set(1,1, temp[3]);564 M.set(1,2, temp[4]);565 M.set(2,0, temp[2]);566 M.set(2,1, temp[4]);567 M.set(2,2, temp[5]);568 tmp.setM(M);569 return true;570 }571 572 TextDialog::ElementTextQuery::ElementTextQuery(std::string title, std::string _description) :573 Dialog::ElementQuery(title,_description)574 {}575 576 TextDialog::ElementTextQuery::~ElementTextQuery()577 {}578 579 bool TextDialog::ElementTextQuery::handle() {580 bool badInput=false;581 bool aborted = false;582 const element * temp = NULL;583 do{584 badInput = false;585 Log() << Verbose(0) << getTitle();586 587 // try to read as Atomic number588 int Z;589 cin >> Z;590 if(!cin.fail()){591 if(Z==-1){592 aborted = true;593 }594 else{595 temp = World::getInstance().getPeriode()->FindElement(Z);596 if(!temp){597 Log() << Verbose(0) << "No element with this atomic number!" << endl;598 badInput = true;599 }600 }601 continue;602 }603 else{604 cin.clear();605 }606 607 // Try to read as shorthand608 // the last buffer content was not removed, so we read the609 // same thing again, this time as a std::string610 std::string shorthand;611 cin >> shorthand;612 if(!cin.fail()){613 if(shorthand.empty()){614 aborted = true;615 }616 else{617 temp = World::getInstance().getPeriode()->FindElement(shorthand.c_str());618 if(!temp){619 Log() << Verbose(0) << "No element with this shorthand!" << endl;620 badInput = true;621 }622 }623 }624 else{625 Log() << Verbose(0) << "Could not read input. Try Again." << endl;626 cin.clear();627 cin.ignore(std::numeric_limits<streamsize>::max(),'\n');628 badInput = true;629 }630 631 }while(badInput);632 cin.ignore(std::numeric_limits<streamsize>::max(),'\n');633 return !aborted;634 }635 636 TextDialog::ElementsTextQuery::ElementsTextQuery(std::string title, std::string _description) :637 Dialog::ElementsQuery(title,_description)638 {}639 640 TextDialog::ElementsTextQuery::~ElementsTextQuery()641 {}642 643 bool TextDialog::ElementsTextQuery::handle() {644 std::string shorthand;645 int Z=-1;646 Log() << Verbose(0) << getTitle();647 std::string line;648 getline(cin,line);649 // dissect by " "650 std::string::iterator olditer = line.begin();651 for(string::iterator iter = line.begin(); iter != line.end(); ++iter) {652 if (*iter == ' ') {653 std::istringstream stream(string(iter, olditer));654 stream >> shorthand;655 try {656 Z = lexical_cast<int>(shorthand);657 temp = World::getInstance().getPeriode()->FindElement(Z);658 } catch (bad_lexical_cast) {659 temp = World::getInstance().getPeriode()->FindElement(shorthand.c_str());660 };661 if(!temp && Z!=-1){662 Log() << Verbose(0) << "Invalid Element" << shorthand << endl;663 break;664 }665 tmp.push_back(temp);666 olditer = iter;667 }668 }669 if (olditer != line.begin()) { // insert last part also670 std::istringstream stream(string(olditer, line.end()));671 stream >> shorthand;672 try {673 Z = lexical_cast<int>(shorthand);674 temp = World::getInstance().getPeriode()->FindElement(Z);675 } catch (bad_lexical_cast) {676 temp = World::getInstance().getPeriode()->FindElement(shorthand.c_str());677 };678 if(!temp && Z!=-1) {679 Log() << Verbose(0) << "Invalid Element" << shorthand << endl;680 tmp.push_back(temp);681 }682 }683 684 return (Z!=-1);685 } -
src/UIElements/TextUI/TextDialog.hpp
r6940bb r573ca5 41 41 virtual void queryElement(const char*, std::string = ""); 42 42 virtual void queryElements(const char*, std::string = ""); 43 virtual void queryFile(const char*, std::string = ""); 43 44 44 45 protected: … … 162 163 virtual bool handle(); 163 164 }; 165 166 class FileTextQuery : public Dialog::FileQuery { 167 public: 168 FileTextQuery(std::string title, std::string _description = NULL); 169 virtual ~FileTextQuery(); 170 virtual bool handle(); 171 }; 164 172 }; 165 173 -
src/builder.cpp
r6940bb r573ca5 86 86 #include "UIElements/CommandLineUI/CommandLineUIFactory.hpp" 87 87 #ifdef USE_GUI_QT 88 #include "UIElements/Q T4/QTUIFactory.hpp"88 #include "UIElements/Qt4/QtUIFactory.hpp" 89 89 #endif 90 90 #include "UIElements/MainWindow.hpp" … … 184 184 ASSERT_DO(Assert::Ask); 185 185 #ifdef USE_GUI_QT 186 DoLog(0) && (Log() << Verbose(0) << "Setting UI to Q T4." << endl);187 UIFactory::registerFactory(new Q TUIFactory::description());188 UIFactory::makeUserInterface("Q T4");186 DoLog(0) && (Log() << Verbose(0) << "Setting UI to Qt4." << endl); 187 UIFactory::registerFactory(new QtUIFactory::description()); 188 UIFactory::makeUserInterface("Qt4"); 189 189 #else 190 190 DoLog(0) && (Log() << Verbose(0) << "Setting UI to Text." << endl); -
src/unittests/DummyUI.hpp
r6940bb r573ca5 35 35 virtual void queryElement(const char*, std::string = ""){} 36 36 virtual void queryElements(const char*, std::string = ""){} 37 virtual void queryFile(const char*, std::string = ""){} 37 38 }; 38 39 -
src/unittests/Makefile.am
r6940bb r573ca5 49 49 noinst_PROGRAMS = $(TESTS) TestRunner 50 50 51 BOOST_LIB = $(BOOST_LDFLAGS) $(BOOST_MPL_LIB) $(BOOST_PROGRAM_OPTIONS_LIB) $(BOOST_FILESYSTEM_LIB) $(BOOST_THREAD_LIB) 51 52 GSLLIBS = \ 52 53 ../LinearAlgebra/libMolecuilderLinearAlgebra-@MOLECUILDER_API_VERSION@.la \ 53 54 ../Exceptions/libMolecuilderExceptions-@MOLECUILDER_API_VERSION@.la \ 54 55 ../Helpers/libMolecuilderHelpers-@MOLECUILDER_API_VERSION@.la \ 55 $(BOOST_LIB) \ 56 ${BOOST_THREAD_LIB} 56 $(BOOST_LIB) 57 57 ALLLIBS = \ 58 58 ../UIElements/libMolecuilderUI-@MOLECUILDER_API_VERSION@.la \ … … 60 60 ${PARSERLIBS} \ 61 61 ../libMolecuilder-@MOLECUILDER_API_VERSION@.la \ 62 ${GSLLIBS} \63 ${BOOST_PROGRAM_OPTIONS_LIB} 62 ${GSLLIBS} 63 64 64 PARSERLIBS = ../Parser/libMolecuilderParser-@MOLECUILDER_API_VERSION@.la 65 65 UILIBS = ../UIElements/libMolecuilderUI-@MOLECUILDER_API_VERSION@.la -
tests/regression/Simple_configuration/2/post/test.pdb
r6940bb r573ca5 1 1 REMARK created by molecuilder on Fri Aug 27 12:18:33 2010 2 ATOM 1 H01 non b 110.0 10.0 10.0 1.0 1.0 0 H 02 ATOM 1 H01 non b 0 10.0 10.0 10.0 1.0 1.0 0 H 0 3 3 END
Note:
See TracChangeset
for help on using the changeset viewer.