Changes in / [12a24c:79ac03]
- Files:
-
- 165 added
- 17 deleted
- 77 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile.am
r12a24c r79ac03 1 1 ACLOCAL_AMFLAGS = -I m4 2 SUBDIRS = LinearAlgebra src src/unittests tests utils doc2 SUBDIRS = LinearAlgebra data/icons src src/unittests tests utils doc 3 3 4 4 AUTOMAKE_OPTIONS = subdir-objects -
configure.ac
r12a24c r79ac03 3 3 4 4 AC_PREREQ(2.59) 5 AC_INIT(MoleCuilder, 1.3. 2, [heber@ins.uni-bonn.de], [molecuilder], [http://trac.ins.uni-bonn.de/projects/molecuilder/])5 AC_INIT(MoleCuilder, 1.3.6, [heber@ins.uni-bonn.de], [molecuilder], [http://trac.ins.uni-bonn.de/projects/molecuilder/]) 6 6 AC_CONFIG_AUX_DIR([build-aux]) 7 7 AC_CONFIG_SRCDIR([src/builder.cpp]) … … 57 57 [moc-qt4 moc], 58 58 [AC_MSG_ERROR(["Qts moc not found, please use --with-Qt-bin."])], 59 [$have_qtgui_path] 60 ) 61 AC_PATH_PROGS([QT_RCC], 62 [rcc-qt4 rcc], 63 [AC_MSG_ERROR(["Qts rcc not found, please use --with-Qt-bin."])], 59 64 [$have_qtgui_path] 60 65 ) … … 87 92 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html 88 93 AC_SUBST([MOLECUILDER_SO_VERSION], [10:2:0]) 89 AC_SUBST([MOLECUILDER_API_VERSION], [1.3. 2])94 AC_SUBST([MOLECUILDER_API_VERSION], [1.3.6]) 90 95 91 96 dnl this macro is used to get the arguments supplied … … 152 157 BOOST_FOREACH 153 158 BOOST_FUNCTION 159 BOOST_FUSION 154 160 BOOST_ITERATOR 155 161 BOOST_MULTIARRAY 162 BOOST_MPL 156 163 BOOST_PREPROCESSOR 157 164 BOOST_RANDOM … … 196 203 AM_CONDITIONAL([CONDJOBMARKET], [test x"$enable_jobmarket" = x"yes"]) 197 204 205 # VMG library 206 AC_MSG_CHECKING(whether to compile in long-range support via VMG) 207 AC_ARG_ENABLE( 208 [vmg], 209 [AS_HELP_STRING([--enable-vmg], [turn on long-range potential calculation via VMG [default=no]])], 210 [enable_vmg=$enableval], 211 enable_vmg="no") 212 AC_MSG_RESULT($enable_vmg) 213 AS_IF([test x"$enable_vmg" != x"no"],[ 214 PKG_CHECK_MODULES(VMG, VMG >= 0.1) 215 AC_SUBST(VMG_CFLAGS) 216 AC_SUBST(VMG_LIBS) 217 AC_DEFINE(HAVE_VMG,1, ["use VMG to calculate long-range contributions."]) 218 219 # check whether to use mpi 220 AC_ARG_WITH( 221 [vmg-mpi], 222 [AS_HELP_STRING([--with-vmg-mpi], [whether to use MPI for communication in VMGJobs])], 223 [with_vmg_mpi=yes], 224 [with_vmg_mpi=no]) 225 AS_IF( 226 [test "x$with_vmg_mpi" != xno], 227 [ 228 AC_LANG_SAVE 229 AC_LANG_CPLUSPLUS 230 LX_FIND_MPI 231 AC_LANG_RESTORE 232 AS_IF([test "x$have_CXX_mpi" = xyes],[ 233 AC_DEFINE([MPICH_SKIP_MPICXX], [1], [Skip C++ bindings]) 234 AC_DEFINE([OMPI_SKIP_MPICXX], [1], [Skip C++ bindings]) 235 AC_DEFINE([MPI_NO_CPPBIND], [1], [Skip C++ bindings]) 236 AC_DEFINE([_MPICC_H], [1], [Skip C++ bindings]) 237 AC_DEFINE([MPIBULL_SKIP_MPICXX], [1], [Skip C++ bindings]) 238 ]) 239 ], 240 []) 241 ]) 242 AM_CONDITIONAL([CONDVMG], [test x"$enable_vmg" = x"yes"]) 243 AM_CONDITIONAL([CONDVMGMPI], [test x"$have_CXX_mpi" = x"yes"]) 244 245 198 246 # Checks for header files. 199 247 AC_HEADER_STDC … … 321 369 doc/Makefile 322 370 src/Makefile 371 data/icons/Makefile 323 372 utils/Makefile 324 373 ]) -
m4/boost.m4
r12a24c r79ac03 571 571 572 572 573 # BOOST_FUSION() 574 # ---------------- 575 # Look for Boost.Fusion 576 BOOST_DEFUN([Fusion], 577 [BOOST_FIND_HEADER([boost/fusion/sequence.hpp])]) 578 579 573 580 # BOOST_GRAPH([PREFERRED-RT-OPT]) 574 581 # ------------------------------- … … 652 659 # Look for Boost.MultiArray 653 660 BOOST_DEFUN([MultiArray], 654 [BOOST_FIND_HEADER([boost/multi_array.hpp])]) 655 661 [BOOST_FIND_HEADER([boost/mpl/list.hpp])]) 662 663 664 # BOOST_MMPL() 665 # ------------------ 666 # Look for Boost.MPL 667 BOOST_DEFUN([MPL], 668 [BOOST_FIND_HEADER([boost/mpl/for_each.hpp])]) 656 669 657 670 # BOOST_NUMERIC_CONVERSION() -
src/Actions/FragmentationAction/FragmentationAutomationAction.cpp
r12a24c r79ac03 39 39 #include "CodePatterns/MemDebug.hpp" 40 40 41 #include <boost/mpl/remove.hpp> 42 #include <boost/lambda/lambda.hpp> 43 44 #include "CodePatterns/Assert.hpp" 41 45 #include "CodePatterns/Info.hpp" 42 46 #include "CodePatterns/Log.hpp" 43 #include "JobMarket/Controller/FragmentController.hpp"44 47 #include "JobMarket/Jobs/FragmentJob.hpp" 45 48 46 #include "Atom/atom.hpp" 49 #include "Fragmentation/Automation/createMatrixNrLookup.hpp" 50 #include "Fragmentation/Automation/extractJobIds.hpp" 51 #include "Fragmentation/Automation/FragmentationChargeDensity.hpp" 52 #include "Fragmentation/Automation/FragmentationResults.hpp" 53 #include "Fragmentation/Automation/MPQCFragmentController.hpp" 54 #include "Fragmentation/Automation/VMGDebugGridFragmentController.hpp" 55 #include "Fragmentation/Automation/VMGFragmentController.hpp" 47 56 #include "Fragmentation/EnergyMatrix.hpp" 48 57 #include "Fragmentation/ForceMatrix.hpp" 49 58 #include "Fragmentation/Fragmentation.hpp" 59 #include "Fragmentation/SetValues/Fragment.hpp" 60 #include "Fragmentation/SetValues/Histogram.hpp" 61 #include "Fragmentation/SetValues/IndexedVectors.hpp" 50 62 #include "Fragmentation/HydrogenSaturation_enum.hpp" 63 #include "Fragmentation/KeySet.hpp" 51 64 #include "Fragmentation/KeySetsContainer.hpp" 65 #include "Fragmentation/Summation/writeTable.hpp" 52 66 #include "Graph/DepthFirstSearchAnalysis.hpp" 53 #include "Jobs/MPQCCommandJob.hpp" 54 #include "molecule.hpp" 67 #include "Helpers/defs.hpp" 68 #include "Jobs/MPQCJob.hpp" 69 #include "Jobs/MPQCData.hpp" 70 #include "Jobs/MPQCData_printKeyNames.hpp" 71 #ifdef HAVE_VMG 72 #include "Jobs/VMGDebugGridJob.hpp" 73 #include "Jobs/VMGJob.hpp" 74 #include "Jobs/VMGData.hpp" 75 #include "Jobs/VMGDataFused.hpp" 76 #include "Jobs/VMGDataMap.hpp" 77 #include "Jobs/VMGData_printKeyNames.hpp" 78 #endif 55 79 #include "World.hpp" 56 80 81 #include <fstream> 57 82 #include <iostream> 58 83 #include <string> 59 84 #include <vector> 85 86 #include <boost/mpl/for_each.hpp> 60 87 61 88 #include "Actions/FragmentationAction/FragmentationAutomationAction.hpp" … … 74 101 { 75 102 return NULL; 76 }77 78 /** Creates a MPQCCommandJob with argument \a filename.79 *80 * @param jobs created job is added to this vector81 * @param command mpqc command to execute82 * @param filename filename being argument to job83 * @param nextid id for this job84 */85 void parsejob(86 std::vector<FragmentJob::ptr> &jobs,87 const std::string &command,88 const std::string &filename,89 const JobId_t nextid)90 {91 std::ifstream file;92 file.open(filename.c_str());93 ASSERT( file.good(), "parsejob() - file "+filename+" does not exist.");94 std::string output((std::istreambuf_iterator<char>(file)),95 std::istreambuf_iterator<char>());96 FragmentJob::ptr testJob( new MPQCCommandJob(output, nextid, command) );97 jobs.push_back(testJob);98 file.close();99 LOG(1, "INFO: Added MPQCCommandJob from file "+filename+".");100 103 } 101 104 … … 130 133 131 134 132 /** Print MPQCData from received results. 133 * 134 * @param results received results to extract MPQCData from 135 * @param KeySetFilename filename with keysets to associate forces correctly 135 136 /** Place results from FragmentResult into EnergyMatrix and ForceMatrix. 137 * 138 * @param fragmentData MPQCData resulting from the jobs 139 * @param MatrixNrLookup Lookup up-map from job id to fragment number 140 * @param FragmentCounter total number of fragments 136 141 * @param NoAtoms total number of atoms 142 * @param Energy energy matrix to be filled on return 143 * @param Force force matrix to be filled on return 144 * @return true - everything ok, false - else 137 145 */ 138 bool printReceivedMPQCResults( 139 const std::vector<FragmentResult::ptr> &results, 140 const std::string &KeySetFilename, 141 size_t NoAtoms) 146 bool putResultsintoMatrices( 147 const std::map<JobId_t, MPQCData> &fragmentData, 148 const std::map< JobId_t, size_t > &MatrixNrLookup, 149 const size_t FragmentCounter, 150 const size_t NoAtoms, 151 EnergyMatrix &Energy, 152 ForceMatrix &Force) 142 153 { 143 EnergyMatrix Energy; 144 EnergyMatrix EnergyFragments; 145 ForceMatrix Force; 146 ForceMatrix ForceFragments; 147 KeySetsContainer KeySet; 148 149 // align fragments 150 std::map< JobId_t, size_t > MatrixNrLookup; 151 size_t FragmentCounter = 0; 152 { 153 // bring ids in order ... 154 typedef std::map< JobId_t, FragmentResult::ptr> IdResultMap_t; 155 IdResultMap_t IdResultMap; 156 for (std::vector<FragmentResult::ptr>::const_iterator iter = results.begin(); 157 iter != results.end(); ++iter) { 158 #ifndef NDEBUG 159 std::pair< IdResultMap_t::iterator, bool> inserter = 160 #endif 161 IdResultMap.insert( make_pair((*iter)->getId(), *iter) ); 162 ASSERT( inserter.second, 163 "printReceivedMPQCResults() - two results have same id " 164 +toString((*iter)->getId())+"."); 165 } 166 // ... and fill lookup 167 for(IdResultMap_t::const_iterator iter = IdResultMap.begin(); 168 iter != IdResultMap.end(); ++iter) 169 MatrixNrLookup.insert( make_pair(iter->first, FragmentCounter++) ); 170 } 171 LOG(1, "INFO: There are " << FragmentCounter << " fragments."); 172 173 // extract results 174 std::vector<MPQCData> fragmentData(results.size()); 175 MPQCData combinedData; 176 177 LOG(2, "DEBUG: Parsing now through " << results.size() << " results."); 178 for (std::vector<FragmentResult::ptr>::const_iterator iter = results.begin(); 179 iter != results.end(); ++iter) { 180 LOG(1, "RESULT: job #"+toString((*iter)->getId())+": "+toString((*iter)->result)); 181 MPQCData extractedData; 182 std::stringstream inputstream((*iter)->result); 183 LOG(2, "DEBUG: First 50 characters FragmentResult's string: "+(*iter)->result.substr(0, 50)); 184 boost::archive::text_iarchive ia(inputstream); 185 ia >> extractedData; 186 LOG(1, "INFO: extracted data is " << extractedData << "."); 187 154 for (std::map<JobId_t, MPQCData>::const_iterator dataiter = fragmentData.begin(); 155 dataiter != fragmentData.end(); ++dataiter) { 156 const MPQCData &extractedData = dataiter->second; 157 const JobId_t &jobid = dataiter->first; 158 std::map< JobId_t, size_t >::const_iterator nriter = MatrixNrLookup.find(jobid); 159 ASSERT( nriter != MatrixNrLookup.end(), 160 "putResultsintoMatrices() - MatrixNrLookup does not contain id " 161 +toString(jobid)+"."); 188 162 // place results into EnergyMatrix ... 189 163 { 190 164 MatrixContainer::MatrixArray matrix; 191 165 matrix.resize(1); 192 matrix[0].resize(1, extractedData.energ y);166 matrix[0].resize(1, extractedData.energies.total); 193 167 if (!Energy.AddMatrix( 194 std::string("MPQCJob ")+toString( (*iter)->getId()),168 std::string("MPQCJob ")+toString(jobid), 195 169 matrix, 196 MatrixNrLookup[(*iter)->getId()])) {170 nriter->second)) { 197 171 ELOG(1, "Adding energy matrix failed."); 198 172 return false; … … 213 187 } 214 188 if (!Force.AddMatrix( 215 std::string("MPQCJob ")+toString( (*iter)->getId()),189 std::string("MPQCJob ")+toString(jobid), 216 190 matrix, 217 MatrixNrLookup[(*iter)->getId()])) {191 nriter->second)) { 218 192 ELOG(1, "Adding force matrix failed."); 219 193 return false; … … 234 208 return false; 235 209 210 return true; 211 } 212 213 /** Print MPQCData from received results. 214 * 215 * @param fragmentData MPQCData resulting from the jobs, associated to job id 216 * @param KeySetFilename filename with keysets to associate forces correctly 217 * @param NoAtoms total number of atoms 218 * @param full_sample summed up charge from fragments on return 219 */ 220 bool printReceivedMPQCResults( 221 const std::map<JobId_t, MPQCData> &fragmentData, 222 const std::string &KeySetFilename, 223 size_t NoAtoms) 224 { 225 // create a vector of all job ids 226 std::vector<JobId_t> jobids; 227 std::transform(fragmentData.begin(),fragmentData.end(), 228 std::back_inserter(jobids), 229 boost::bind( &std::map<JobId_t,MPQCData>::value_type::first, boost::lambda::_1 ) 230 ); 231 232 // create lookup from job nr to fragment number 233 size_t FragmentCounter = 0; 234 const std::map< JobId_t, size_t > MatrixNrLookup= 235 createMatrixNrLookup(jobids, FragmentCounter); 236 237 // place results into maps 238 EnergyMatrix Energy; 239 ForceMatrix Force; 240 if (!putResultsintoMatrices(fragmentData, MatrixNrLookup, FragmentCounter, NoAtoms, Energy, Force)) 241 return false; 242 243 // initialise keysets 244 KeySetsContainer KeySet; 245 KeySetsContainer ForceKeySet; 246 if (!Energy.InitialiseIndices()) return false; 247 248 if (!Force.ParseIndices(KeySetFilename.c_str())) return false; 249 250 { 251 // else needs keysets without hydrogens 252 std::stringstream filename; 253 filename << FRAGMENTPREFIX << KEYSETFILE; 254 if (!KeySet.ParseKeySets(KeySetFilename, filename.str(), FragmentCounter)) return false; 255 } 256 257 { 258 // forces need keysets including hydrogens 259 std::stringstream filename; 260 filename << FRAGMENTPREFIX << FORCESFILE; 261 if (!ForceKeySet.ParseKeySets(KeySetFilename, filename.str(), FragmentCounter)) return false; 262 } 236 263 237 264 // combine all found data 238 if (!Energy.InitialiseIndices()) return false;239 240 if (!Force.ParseIndices(KeySetFilename.c_str())) return false;241 242 if (!KeySet.ParseKeySets(KeySetFilename.c_str(), Force.RowCounter, Force.MatrixCounter)) return false;243 244 265 if (!KeySet.ParseManyBodyTerms()) return false; 245 266 267 EnergyMatrix EnergyFragments; 268 ForceMatrix ForceFragments; 246 269 if (!EnergyFragments.AllocateMatrix(Energy.Header, Energy.MatrixCounter, Energy.RowCounter, Energy.ColumnCounter)) return false; 247 270 if (!ForceFragments.AllocateMatrix(Force.Header, Force.MatrixCounter, Force.RowCounter, Force.ColumnCounter)) return false; … … 275 298 } 276 299 300 void writeToFile(const std::string &filename, const std::string contents) 301 { 302 std::ofstream tablefile(filename.c_str()); 303 tablefile << contents; 304 tablefile.close(); 305 } 306 307 /** Print MPQCData from received results. 308 * 309 * @param results summed up results container 310 */ 311 void printReceivedFullResults( 312 const FragmentationResults &results) 313 { 314 // print tables (without eigenvalues, they go extra) 315 { 316 typedef boost::mpl::remove<MPQCDataEnergyVector_t, MPQCDataFused::energy_eigenvalues>::type 317 MPQCDataEnergyVector_noeigenvalues_t; 318 const std::string energyresult = 319 writeTable<MPQCDataEnergyMap_t, MPQCDataEnergyVector_noeigenvalues_t >()( 320 results.Result_Energy_fused, results.getMaxLevel()); 321 LOG(0, "Energy table is \n" << energyresult); 322 std::string filename; 323 filename += FRAGMENTPREFIX + std::string("_Energy.dat"); 324 writeToFile(filename, energyresult); 325 } 326 327 { 328 const std::string gridresult = 329 writeTable<VMGDataMap_t, VMGDataVector_t >()( 330 results.Result_LongRange_fused, results.getMaxLevel(), 2); 331 LOG(0, "VMG table is \n" << gridresult); 332 std::string filename; 333 filename += FRAGMENTPREFIX + std::string("_VMGEnergy.dat"); 334 writeToFile(filename, gridresult); 335 } 336 337 { 338 const std::string gridresult = 339 writeTable<VMGDataLongRangeMap_t, VMGDataLongRangeVector_t >()( 340 results.Result_LongRangeIntegrated_fused, results.getMaxLevel(), 2); 341 LOG(0, "LongRange table is \n" << gridresult); 342 std::string filename; 343 filename += FRAGMENTPREFIX + std::string("_LongRangeEnergy.dat"); 344 writeToFile(filename, gridresult); 345 } 346 347 { 348 const std::string eigenvalueresult; 349 LOG(0, "Eigenvalue table is \n" << eigenvalueresult); 350 std::string filename; 351 filename += FRAGMENTPREFIX + std::string("_Eigenvalues.dat"); 352 writeToFile(filename, eigenvalueresult); 353 } 354 355 { 356 const std::string forceresult = 357 writeTable<MPQCDataForceMap_t, MPQCDataForceVector_t>()( 358 results.Result_Force_fused, results.getMaxLevel()); 359 LOG(0, "Force table is \n" << forceresult); 360 std::string filename; 361 filename += FRAGMENTPREFIX + std::string("_Forces.dat"); 362 writeToFile(filename, forceresult); 363 } 364 // we don't want to print grid to a table 365 { 366 // print times (without flops for now) 367 typedef boost::mpl::remove< 368 boost::mpl::remove<MPQCDataTimeVector_t, MPQCDataFused::times_total_flops>::type, 369 MPQCDataFused::times_gather_flops>::type 370 MPQCDataTimeVector_noflops_t; 371 const std::string timesresult = 372 writeTable<MPQCDataTimeMap_t, MPQCDataTimeVector_noflops_t >()( 373 results.Result_Time_fused, results.getMaxLevel()); 374 LOG(0, "Times table is \n" << timesresult); 375 std::string filename; 376 filename += FRAGMENTPREFIX + std::string("_Times.dat"); 377 writeToFile(filename, timesresult); 378 } 379 } 380 381 277 382 Action::state_ptr FragmentationFragmentationAutomationAction::performCall() { 278 383 boost::asio::io_service io_service; 279 FragmentController controller(io_service);280 384 281 385 // TODO: Have io_service run in second thread and merge with current again eventually 282 386 283 // Phase One: obtain ids 284 std::vector< boost::filesystem::path > jobfiles = params.jobfiles.get(); 285 controller.requestIds(params.host.get(), params.port.get(), jobfiles.size()); 286 { 287 io_service.reset(); 288 Info info("io_service: Phase One"); 289 io_service.run(); 290 } 291 // Phase Two: create and add jobs 292 { 293 std::vector<FragmentJob::ptr> jobs; 294 for (std::vector< boost::filesystem::path >::const_iterator iter = jobfiles .begin(); 295 iter != jobfiles .end(); ++iter) { 296 const std::string &filename = (*iter).string(); 297 if (boost::filesystem::exists(filename)) { 298 const JobId_t next_id = controller.getAvailableId(); 299 LOG(1, "INFO: Creating MPQCCommandJob with filename'" 300 +filename+"', and id "+toString(next_id)+"."); 301 parsejob(jobs, params.executable.get().string(), filename, next_id); 302 } else { 303 ELOG(1, "Fragment job "+filename+" does not exist."); 387 size_t Exitflag = 0; 388 std::map<JobId_t, MPQCData> fragmentData; 389 { 390 MPQCFragmentController mpqccontroller(io_service); 391 mpqccontroller.setHost(params.host.get()); 392 mpqccontroller.setPort(params.port.get()); 393 mpqccontroller.setLevel(params.level.get()); 394 // Phase One: obtain ids 395 std::vector< boost::filesystem::path > jobfiles = params.jobfiles.get(); 396 mpqccontroller.requestIds(jobfiles.size()); 397 398 // Phase Two: create and add MPQCJobs 399 if (!mpqccontroller.addJobsFromFiles(params.executable.get().string(), jobfiles)) 400 return Action::failure; 401 402 // Phase Three: calculate result 403 mpqccontroller.waitforResults(jobfiles.size()); 404 mpqccontroller.getResults(fragmentData); 405 406 Exitflag += mpqccontroller.getExitflag(); 407 } 408 409 #ifdef HAVE_VMG 410 if (params.DoLongrange.get()) { 411 if ( World::getInstance().getAllAtoms().size() == 0) { 412 ELOG(1, "Please load the full molecule into the world before starting this action."); 413 return Action::failure; 414 } 415 416 // obtain combined charge density 417 FragmentationChargeDensity summedChargeDensity( 418 fragmentData, 419 params.path.get()); 420 const std::vector<SamplingGrid> full_sample = summedChargeDensity.getFullSampledGrid(); 421 422 LOG(1, "INFO: There are " << fragmentData.size() << " short-range and " 423 << full_sample.size() << " level-wise long-range jobs."); 424 425 // Phase Four: obtain more ids 426 std::map<JobId_t, VMGData> longrangeData; 427 { 428 VMGFragmentController vmgcontroller(io_service); 429 vmgcontroller.setHost(params.host.get()); 430 vmgcontroller.setPort(params.port.get()); 431 const size_t NoJobs = fragmentData.size()+full_sample.size(); 432 vmgcontroller.requestIds(NoJobs); 433 434 // Phase Five: create VMGJobs 435 const size_t near_field_cells = params.near_field_cells.get(); 436 const size_t interpolation_degree = params.interpolation_degree.get(); 437 if (!vmgcontroller.createLongRangeJobs( 438 fragmentData, 439 full_sample, 440 summedChargeDensity.getFragment(), 441 near_field_cells, 442 interpolation_degree)) 443 return Action::failure; 444 445 // Phase Six: calculate result 446 vmgcontroller.waitforResults(NoJobs); 447 vmgcontroller.getResults(longrangeData); 448 ASSERT( NoJobs == longrangeData.size(), 449 "FragmentationFragmentationAutomationAction::performCall() - number of MPQCresults+" 450 +toString(full_sample.size())+"="+toString(NoJobs) 451 +" and VMGresults "+toString(longrangeData.size())+" don't match."); 452 Exitflag += vmgcontroller.getExitflag(); 453 } 454 455 // remove full solution corresponding to full_sample from map (must be highest ids), has to be treated extra 456 std::map<JobId_t, VMGData>::iterator iter = longrangeData.end(); 457 for (size_t i=0;i<full_sample.size();++i) 458 --iter; 459 std::map<JobId_t, VMGData>::iterator remove_iter = iter; 460 std::vector<VMGData> fullsolutionData; 461 for (; iter != longrangeData.end(); ++iter) 462 fullsolutionData.push_back(iter->second); 463 longrangeData.erase(remove_iter, longrangeData.end()); 464 465 // Final phase: sum up and print result 466 { 467 FragmentationResults results( 468 fragmentData, 469 longrangeData, 470 fullsolutionData, 471 params.path.get(), 472 getNoAtomsFromAdjacencyFile(params.path.get()), 473 full_sample); 474 475 LOG(1, "INFO: Parsing fragment files from " << params.path.get() << "."); 476 printReceivedFullResults(results); 477 } 478 479 std::map<JobId_t, std::string> debugData; 480 { 481 if (!full_sample.empty()) { 482 // create debug jobs for each level to print the summed-up potential to vtk files 483 VMGDebugGridFragmentController debugcontroller(io_service); 484 debugcontroller.setHost(params.host.get()); 485 debugcontroller.setPort(params.port.get()); 486 debugcontroller.requestIds(full_sample.size()); 487 if (!debugcontroller.createDebugJobs(full_sample)) 304 488 return Action::failure; 305 } 489 debugcontroller.waitforResults(full_sample.size()); 490 debugcontroller.getResults(debugData); 491 Exitflag += debugcontroller.getExitflag(); 306 492 } 307 controller.addJobs(jobs); 308 controller.sendJobs(params.host.get(), params.port.get()); 309 } 310 { 311 io_service.reset(); 312 Info info("io_service: Phase Two"); 313 io_service.run(); 314 } 315 // Phase Three: calculate result 316 size_t NoCalculatedResults = 0; 317 while (NoCalculatedResults != jobfiles.size()) { 318 // wait a bit 319 boost::asio::deadline_timer timer(io_service); 320 timer.expires_from_now(boost::posix_time::milliseconds(500)); 321 timer.wait(); 322 // then request status 323 controller.checkResults(params.host.get(), params.port.get()); 324 { 325 io_service.reset(); 326 Info info("io_service: Phase Three"); 327 io_service.run(); 328 } 329 const std::pair<size_t, size_t> JobStatus = controller.getJobStatus(); 330 LOG(1, "INFO: #" << JobStatus.first << " are waiting in the queue and #" << JobStatus.second << " jobs are calculated so far."); 331 NoCalculatedResults = JobStatus.second; 332 } 333 // Phase Three: get result 334 controller.receiveResults(params.host.get(), params.port.get()); 335 { 336 io_service.reset(); 337 Info info("io_service: Phase Four"); 338 io_service.run(); 339 } 493 } 494 } 495 #else 340 496 // Final phase: print result 341 497 { 342 498 LOG(1, "INFO: Parsing fragment files from " << params.path.get() << "."); 343 std::vector<FragmentResult::ptr> results = controller.getReceivedResults();344 499 printReceivedMPQCResults( 345 results,500 fragmentData, 346 501 params.path.get(), 347 502 getNoAtomsFromAdjacencyFile(params.path.get())); 348 503 } 349 size_t Exitflag = controller.getExitflag(); 504 #endif 350 505 351 506 return (Exitflag == 0) ? Action::success : Action::failure; -
src/Actions/FragmentationAction/FragmentationAutomationAction.def
r12a24c r79ac03 13 13 #include "Parameters/Validators/DummyValidator.hpp" 14 14 #include "Parameters/Validators/Ops_Validator.hpp" 15 #include "Parameters/Validators/RangeValidator.hpp" 15 16 #include "Parameters/Validators/STLVectorValidator.hpp" 16 17 #include "Parameters/Validators/Specific/ParserFileValidator.hpp" … … 20 21 // ValueStorage by the token "Z" -> first column: int, Z, "Z" 21 22 // "undefine" if no parameters are required, use (NOPARAM_DEFAULT) for each (undefined) default value 22 #define paramtypes (std::vector< boost::filesystem::path >)(std::string)(std::string)(std::string)(boost::filesystem::path) 23 #define paramtokens ("fragment-jobs")("fragment-path")("server-address")("server-port")("fragment-executable") 24 #define paramdescriptions ("vector of fragment files")("prefix of each fragment file")("hostname of server")("controller port of server")("executable to launch on clients") 25 #define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT("127.0.0.1"))(PARAM_DEFAULT("1026"))(NOPARAM_DEFAULT) 26 #define paramreferences (jobfiles)(path)(host)(port)(executable) 23 #define paramtypes (std::vector< boost::filesystem::path >)(std::string)(std::string)(std::string)(boost::filesystem::path)(unsigned int)(unsigned int)(unsigned int)(bool) 24 #define paramtokens ("fragment-jobs")("fragment-path")("server-address")("server-port")("fragment-executable")("grid-level")("near-field-cells")("interpolation-degree")("DoLongrange") 25 #define paramdescriptions ("vector of fragment files")("prefix of each fragment file")("hostname of server")("controller port of server")("executable to launch on clients")("resolution of multigrid")("number of cells used in smearing out core charge")("interpolation degree for getting the nuclei potential from the grid")("whether to calculate long-range contributions") 26 #define paramdefaults (NOPARAM_DEFAULT)(NOPARAM_DEFAULT)(PARAM_DEFAULT("127.0.0.1"))(PARAM_DEFAULT("1026"))(NOPARAM_DEFAULT)(PARAM_DEFAULT(5))(PARAM_DEFAULT(3))(PARAM_DEFAULT(3))(PARAM_DEFAULT("0")) 27 #define paramreferences (jobfiles)(path)(host)(port)(executable)(level)(near_field_cells)(interpolation_degree)(DoLongrange) 27 28 #define paramvalids \ 28 29 (STLVectorValidator< std::vector< boost::filesystem::path > >(ParserFileValidator() && FilePresentValidator())) \ … … 30 31 (DummyValidator< std::string >()) \ 31 32 (DummyValidator< std::string >()) \ 32 (DummyValidator< boost::filesystem::path >()) 33 (DummyValidator< boost::filesystem::path >()) \ 34 (RangeValidator< unsigned int >(1, 10)) \ 35 (RangeValidator< unsigned int >(1, 20)) \ 36 (RangeValidator< unsigned int >(1, 10)) \ 37 (DummyValidator< bool >()) 33 38 34 39 #undef statetypes -
src/Actions/GlobalListOfActions.hpp
r12a24c r79ac03 101 101 (SelectionNotAtomById) \ 102 102 (SelectionNotAtomByOrder) \ 103 (SelectionAllAtomsInsideCuboid) \104 103 (SelectionAllAtoms) \ 105 104 (SelectionClearAllAtoms) \ … … 107 106 (SelectionNotAllAtoms) \ 108 107 (SelectionNotAtomByElement) \ 109 (SelectionAllAtomsInside Sphere) \108 (SelectionAllAtomsInsideVolume) \ 110 109 (SelectionAllAtomsOfMolecule) \ 111 (SelectionNotAllAtomsInside Sphere) \110 (SelectionNotAllAtomsInsideVolume) \ 112 111 (SelectionAtomByElement) \ 113 112 (SelectionNotAllAtomsOfMolecule) \ 114 (SelectionNotAllAtomsInsideCuboid) \115 113 (SelectionAtomById) \ 116 114 (SelectionAtomByOrder) \ 115 (SelectionAllShapes) \ 116 (SelectionShapeByName) \ 117 (SelectionNotAllShapes) \ 118 (SelectionNotShapeByName) \ 117 119 (FragmentationFragmentation) \ 118 120 (FillRegularGrid) \ 119 (FillSphericalSurface) 121 (FillSurface) \ 122 (ShapeCombineShapes) \ 123 (ShapeCreateShape) \ 124 (ShapeRemoveShape) 120 125 121 126 // we need to append the automation action in case we have the JobMarket -
src/Actions/Makefile.am
r12a24c r79ac03 60 60 ${SELECTIONATOMACTIONSOURCE} \ 61 61 ${SELECTIONMOLECULEACTIONSOURCE} \ 62 ${SELECTIONSHAPEACTIONSOURCE} \ 63 ${SHAPEACTIONSOURCE} \ 62 64 ${TESSELATIONACTIONSOURCE} \ 63 65 $(UNDOACTIONSOURCE) \ … … 76 78 ${SELECTIONATOMACTIONHEADER} \ 77 79 ${SELECTIONMOLECULEACTIONHEADER} \ 80 ${SELECTIONSHAPEACTIONHEADER} \ 81 ${SHAPEACTIONHEADER} \ 78 82 ${TESSELATIONACTIONHEADER} \ 79 83 $(UNDOACTIONHEADER) \ … … 92 96 ${SELECTIONATOMACTIONDEFS} \ 93 97 ${SELECTIONMOLECULEACTIONDEFS} \ 98 ${SELECTIONSHAPEACTIONDEFS} \ 99 ${SHAPEACTIONDEFS} \ 94 100 ${TESSELATIONACTIONDEFS} \ 95 101 $(UNDOACTIONDEFS) \ … … 182 188 FILLACTIONSOURCE = \ 183 189 Actions/FillAction/FillRegularGridAction.cpp \ 184 Actions/FillAction/FillS phericalSurfaceAction.cpp190 Actions/FillAction/FillSurfaceAction.cpp 185 191 FILLACTIONHEADER = \ 186 192 Actions/FillAction/FillRegularGridAction.hpp \ 187 Actions/FillAction/FillS phericalSurfaceAction.hpp193 Actions/FillAction/FillSurfaceAction.hpp 188 194 FILLACTIONDEFS = \ 189 195 Actions/FillAction/FillRegularGridAction.def \ 190 Actions/FillAction/FillS phericalSurfaceAction.def196 Actions/FillAction/FillSurfaceAction.def 191 197 192 198 … … 303 309 SELECTIONATOMACTIONSOURCE = \ 304 310 Actions/SelectionAction/Atoms/AllAtomsAction.cpp \ 305 Actions/SelectionAction/Atoms/AllAtomsInsideCuboidAction.cpp \ 306 Actions/SelectionAction/Atoms/AllAtomsInsideSphereAction.cpp \ 311 Actions/SelectionAction/Atoms/AllAtomsInsideVolumeAction.cpp \ 307 312 Actions/SelectionAction/Atoms/AllAtomsOfMoleculeAction.cpp \ 308 313 Actions/SelectionAction/Atoms/AtomByElementAction.cpp \ … … 312 317 Actions/SelectionAction/Atoms/InvertAtomsAction.cpp \ 313 318 Actions/SelectionAction/Atoms/NotAllAtomsAction.cpp \ 314 Actions/SelectionAction/Atoms/NotAllAtomsInsideCuboidAction.cpp \ 315 Actions/SelectionAction/Atoms/NotAllAtomsInsideSphereAction.cpp \ 319 Actions/SelectionAction/Atoms/NotAllAtomsInsideVolumeAction.cpp \ 316 320 Actions/SelectionAction/Atoms/NotAllAtomsOfMoleculeAction.cpp \ 317 321 Actions/SelectionAction/Atoms/NotAtomByElementAction.cpp \ … … 320 324 SELECTIONATOMACTIONHEADER = \ 321 325 Actions/SelectionAction/Atoms/AllAtomsAction.hpp \ 322 Actions/SelectionAction/Atoms/AllAtomsInsideCuboidAction.hpp \ 323 Actions/SelectionAction/Atoms/AllAtomsInsideSphereAction.hpp \ 326 Actions/SelectionAction/Atoms/AllAtomsInsideVolumeAction.hpp \ 324 327 Actions/SelectionAction/Atoms/AllAtomsOfMoleculeAction.hpp \ 325 328 Actions/SelectionAction/Atoms/AtomByElementAction.hpp \ … … 329 332 Actions/SelectionAction/Atoms/InvertAtomsAction.hpp \ 330 333 Actions/SelectionAction/Atoms/NotAllAtomsAction.hpp \ 331 Actions/SelectionAction/Atoms/NotAllAtomsInsideCuboidAction.hpp \ 332 Actions/SelectionAction/Atoms/NotAllAtomsInsideSphereAction.hpp \ 334 Actions/SelectionAction/Atoms/NotAllAtomsInsideVolumeAction.hpp \ 333 335 Actions/SelectionAction/Atoms/NotAllAtomsOfMoleculeAction.hpp \ 334 336 Actions/SelectionAction/Atoms/NotAtomByElementAction.hpp \ … … 337 339 SELECTIONATOMACTIONDEFS = \ 338 340 Actions/SelectionAction/Atoms/AllAtomsAction.def \ 339 Actions/SelectionAction/Atoms/AllAtomsInsideCuboidAction.def \ 340 Actions/SelectionAction/Atoms/AllAtomsInsideSphereAction.def \ 341 Actions/SelectionAction/Atoms/AllAtomsInsideVolumeAction.def \ 341 342 Actions/SelectionAction/Atoms/AllAtomsOfMoleculeAction.def \ 342 343 Actions/SelectionAction/Atoms/AtomByElementAction.def \ … … 346 347 Actions/SelectionAction/Atoms/InvertAtomsAction.def \ 347 348 Actions/SelectionAction/Atoms/NotAllAtomsAction.def \ 348 Actions/SelectionAction/Atoms/NotAllAtomsInsideCuboidAction.def \ 349 Actions/SelectionAction/Atoms/NotAllAtomsInsideSphereAction.def \ 349 Actions/SelectionAction/Atoms/NotAllAtomsInsideVolumeAction.def \ 350 350 Actions/SelectionAction/Atoms/NotAllAtomsOfMoleculeAction.def \ 351 351 Actions/SelectionAction/Atoms/NotAtomByElementAction.def \ … … 398 398 Actions/SelectionAction/Molecules/NotMoleculeByOrderAction.def \ 399 399 Actions/SelectionAction/Molecules/NotMoleculeOfAtomAction.def 400 401 SELECTIONSHAPEACTIONSOURCE = \ 402 Actions/SelectionAction/Shapes/AllShapesAction.cpp \ 403 Actions/SelectionAction/Shapes/ShapeByNameAction.cpp \ 404 Actions/SelectionAction/Shapes/NotAllShapesAction.cpp \ 405 Actions/SelectionAction/Shapes/NotShapeByNameAction.cpp 406 SELECTIONSHAPEACTIONHEADER = \ 407 Actions/SelectionAction/Shapes/AllShapesAction.hpp \ 408 Actions/SelectionAction/Shapes/ShapeByNameAction.hpp \ 409 Actions/SelectionAction/Shapes/NotAllShapesAction.hpp \ 410 Actions/SelectionAction/Shapes/NotShapeByNameAction.hpp 411 SELECTIONSHAPEACTIONDEFS = \ 412 Actions/SelectionAction/Shapes/AllShapesAction.def \ 413 Actions/SelectionAction/Shapes/ShapeByNameAction.def \ 414 Actions/SelectionAction/Shapes/NotAllShapesAction.def \ 415 Actions/SelectionAction/Shapes/NotShapeByNameAction.def 416 417 SHAPEACTIONSOURCE = \ 418 Actions/ShapeAction/CombineShapesAction.cpp \ 419 Actions/ShapeAction/CreateShapeAction.cpp \ 420 Actions/ShapeAction/RemoveShapeAction.cpp 421 SHAPEACTIONHEADER = \ 422 Actions/ShapeAction/CombineShapesAction.hpp \ 423 Actions/ShapeAction/CreateShapeAction.hpp \ 424 Actions/ShapeAction/RemoveShapeAction.hpp 425 SHAPEACTIONDEFS = \ 426 Actions/ShapeAction/CombineShapesAction.def \ 427 Actions/ShapeAction/CreateShapeAction.def \ 428 Actions/ShapeAction/RemoveShapeAction.def 400 429 401 430 TESSELATIONACTIONSOURCE = \ 402 431 Actions/TesselationAction/ConvexEnvelopeAction.cpp \ 403 Actions/TesselationAction/NonConvexEnvelopeAction.cpp 432 Actions/TesselationAction/NonConvexEnvelopeAction.cpp 404 433 TESSELATIONACTIONHEADER = \ 405 434 Actions/TesselationAction/ConvexEnvelopeAction.hpp \ -
src/Fragmentation/Homology/HomologyContainer.cpp
r12a24c r79ac03 59 59 } 60 60 61 std::ostream& operator<<(std::ostream &out, const Fragment &container)62 {63 out << "Dummy fragment";64 return out;65 }66 67 61 bool HomologyContainer::operator>=(const HomologyContainer &other) const 68 62 { -
src/Fragmentation/Homology/HomologyContainer.hpp
r12a24c r79ac03 24 24 25 25 #include "Fragmentation/Homology/HomologyGraph.hpp" 26 27 class Fragment 28 { 29 //!> grant access to output operator 30 friend std::ostream& operator<<(std::ostream &out, const Fragment &container); 31 public: 32 typedef std::vector<double> position_t; 33 typedef std::vector< position_t > positions_t; 34 typedef std::vector< double > charges_t; 35 typedef std::pair< position_t, double> nucleus_t; 36 typedef std::vector< nucleus_t > nuclei_t; 37 Fragment() {} 38 Fragment(const positions_t &_positions, const charges_t &_charges) {} 39 40 bool operator==(const Fragment &other) const { 41 return true; 42 } 43 44 private: 45 friend class boost::serialization::access; 46 // serialization 47 template <typename Archive> 48 void serialize(Archive& ar, const unsigned int version) 49 {} 50 }; 51 52 std::ostream& operator<<(std::ostream &out, const Fragment &container); 53 54 // we need to give this class a unique key for serialization 55 BOOST_CLASS_EXPORT_KEY(Fragment) 26 #include "Fragmentation/SetValues/Fragment.hpp" 56 27 57 28 class HomologyContainerTest; -
src/Fragmentation/KeySetsContainer.cpp
r12a24c r79ac03 37 37 #include <fstream> 38 38 #include <sstream> 39 40 #include <boost/lexical_cast.hpp> 41 #include <boost/tokenizer.hpp> 39 42 40 43 #include "CodePatterns/Log.hpp" … … 72 75 * \return parsing succesful 73 76 */ 74 bool KeySetsContainer::ParseKeySets(const std::string name, const IntVector ACounter, const int FCounter) {77 bool KeySetsContainer::ParseKeySets(const std::string path, const std::string name, const int FCounter) { 75 78 ifstream input; 76 char *FragmentNumber = NULL;79 //char *FragmentNumber = NULL; 77 80 stringstream file; 78 81 char filename[1023]; 79 82 80 83 FragmentCounter = FCounter; 81 LOG(0, "Parsing key sets.");82 84 KeySets.resize(FragmentCounter); 83 file << name << FRAGMENTPREFIX << KEYSETFILE; 85 AtomCounter.resize(FragmentCounter); 86 87 // open file 88 file << path << "/" << name; 84 89 input.open(file.str().c_str(), ios::in); 85 90 if (input.fail()) { … … 88 93 } 89 94 90 AtomCounter.resize(FragmentCounter); 95 // parse each line, i.e. get the index set per fragment 96 LOG(0, "Parsing key sets."); 91 97 for(int i=0;(i<FragmentCounter) && (!input.eof());i++) { 92 stringstream line;93 AtomCounter[i] = ACounter[i];94 // parse the values95 KeySets[i].resize(AtomCounter[i]);96 for(int j=AtomCounter[i];j--;)97 KeySets[i][j] = -1;98 FragmentNumber = FixedDigitNumber(FragmentCounter, i);99 //std::stringstream output;100 //output << FRAGMENTPREFIX << FragmentNumber << "[" << AtomCounter[i] << "]:";101 delete[](FragmentNumber);102 98 input.getline(filename, 1023); 103 line.str(filename); 104 for(int j=0;(j<AtomCounter[i]) && (!line.eof());j++) { 105 line >> KeySets[i][j]; 106 //output << " " << KeySets[i][j]; 99 string line(filename); 100 // LOG(2, "DEBUG: line is " << line << "."); 101 std::stringstream set_output; 102 typedef boost::tokenizer<boost::char_separator<char> > tokenizer; 103 boost::char_separator<char> sep(" \t"); 104 tokenizer tok(line, sep); 105 for(tokenizer::iterator beg=tok.begin(); 106 beg != tok.end();++beg){ 107 const int tempvalue = boost::lexical_cast<int>(*beg); 108 KeySets[i].push_back(tempvalue); 109 // set_output << " " << KeySets[i].back(); 107 110 } 108 //LOG(0, output.str()); 111 // LOG(2, "DEBUG: Scanned keys are '" << set_output.str() << "'."); 112 AtomCounter[i] = KeySets[i].size(); 113 // { 114 // std::stringstream output; 115 // FragmentNumber = FixedDigitNumber(FragmentCounter, i); 116 // output << FRAGMENTPREFIX << FragmentNumber << "[" << AtomCounter[i] << "]:" << set_output.str(); 117 // delete[](FragmentNumber); 118 // LOG(0, output.str()); 119 // } 109 120 } 110 121 input.close(); -
src/Fragmentation/KeySetsContainer.hpp
r12a24c r79ac03 35 35 ~KeySetsContainer(); 36 36 37 bool ParseKeySets(const std::string name, const std::vector<int> ACounter, const int FCounter);37 bool ParseKeySets(const std::string path, const std::string name, const int FCounter); 38 38 bool ParseManyBodyTerms(); 39 39 bool Contains(const int GreaterSet, const int SmallerSet); -
src/Fragmentation/analyzer.cpp
r12a24c r79ac03 182 182 183 183 // ---------- Parse the KeySets into an array --------------- 184 if (!KeySet.ParseKeySets(argv[1], Force.RowCounter, Force.MatrixCounter)) return 1; 184 { 185 std::stringstream filename; 186 filename << FRAGMENTPREFIX << KEYSETFILE; 187 if (!KeySet.ParseKeySets(argv[1], filename.str(), Force.MatrixCounter)) return 1; 188 } 185 189 if (!KeySet.ParseManyBodyTerms()) return 1; 186 190 -
src/Fragmentation/joiner.cpp
r12a24c r79ac03 147 147 148 148 // ---------- Parse the KeySets into an array --------------- 149 if (!KeySet.ParseKeySets(argv[1], Force.RowCounter, Force.MatrixCounter)) return 1; 149 { 150 std::stringstream filename; 151 filename << FRAGMENTPREFIX << KEYSETFILE; 152 if (!KeySet.ParseKeySets(argv[1], filename.str(), Force.MatrixCounter)) return 1; 153 } 150 154 151 155 if (!KeySet.ParseManyBodyTerms()) return 1; -
src/Jobs/MPQCCommandJob.cpp
r12a24c r79ac03 134 134 tok_iter++; 135 135 std::stringstream energystring(*tok_iter); 136 energystring >> data.energ y;136 energystring >> data.energies.total; 137 137 } 138 138 // ... and forces ("Total Gradient") from resultstring -
src/Jobs/MPQCCommandJob.hpp
r12a24c r79ac03 21 21 #include "JobMarket/Jobs/SystemCommandJob.hpp" 22 22 23 #include "Jobs/MPQC CommandJob_MPQCData.hpp"23 #include "Jobs/MPQCData.hpp" 24 24 25 25 class MPQCCommandJobTest; -
src/Jobs/Makefile.am
r12a24c r79ac03 4 4 JOBSSOURCE = \ 5 5 Jobs/MPQCCommandJob.cpp \ 6 Jobs/MPQCCommandJob_MPQCData.cpp 6 Jobs/MPQCData.cpp \ 7 Jobs/MPQCJob.cpp 8 if CONDVMG 9 JOBSSOURCE += \ 10 Jobs/InterfaceVMGDebugGridJob.cpp \ 11 Jobs/InterfaceVMGJob.cpp \ 12 Jobs/VMGData.cpp \ 13 Jobs/VMGDebugGridJob.cpp \ 14 Jobs/VMGJob.cpp 15 endif 7 16 8 17 JOBSHEADER = \ 9 18 Jobs/MPQCCommandJob.hpp \ 10 Jobs/MPQCCommandJob_MPQCData.hpp 19 Jobs/MPQCData.hpp \ 20 Jobs/MPQCDataFused.hpp \ 21 Jobs/MPQCDataMap.hpp \ 22 Jobs/MPQCData_printKeyNames.hpp \ 23 Jobs/MPQCJob.hpp 24 if CONDVMG 25 JOBSHEADER += \ 26 Jobs/InterfaceVMGDebugGridJob.hpp \ 27 Jobs/InterfaceVMGJob.hpp \ 28 Jobs/VMGData.hpp \ 29 Jobs/VMGDataFused.hpp \ 30 Jobs/VMGDataMap.hpp \ 31 Jobs/VMGData_printKeyNames.hpp \ 32 Jobs/VMGDebugGridJob.hpp \ 33 Jobs/VMGJob.hpp 34 endif 11 35 12 36 lib_LTLIBRARIES += libMolecuilderJobs.la 13 37 libMolecuilderJobs_la_includedir = $(includedir)/MoleCuilder/ 14 38 nobase_libMolecuilderJobs_la_include_HEADERS = $(JOBSHEADER) 15 libMolecuilderJobs_la_CPPFLAGS = ${BOOST_CPPFLAGS} ${CodePatterns_CFLAGS} ${JobMarket_CFLAGS} 39 libMolecuilderJobs_la_CPPFLAGS = ${BOOST_CPPFLAGS} ${CodePatterns_CFLAGS} ${JobMarket_CFLAGS} -Dvmg_float=double -Dvmg_int=int $(VMG_CFLAGS) 16 40 libMolecuilderJobs_la_LDFLAGS = $(AM_LDFLAGS) \ 17 41 $(BOOST_SERIALIZATION_LDFLAGS) \ 42 $(BOOST_SYSTEM_LDFLAGS) \ 18 43 $(JobMarket_LDFLAGS) \ 19 44 $(CodePatterns_LDFLAGS) 20 45 libMolecuilderJobs_la_SOURCES = $(JOBSSOURCE) 21 46 libMolecuilderJobs_la_LIBADD = \ 22 $(JobMarket_LIBS) \ 47 libMolecuilderJobsGrid.la \ 48 $(VMG_LIBS) \ 49 $(JobMarket_LIBS) \ 23 50 $(BOOST_SERIALIZATION_LIBS) \ 24 $(top_builddir)/LinearAlgebra/src/LinearAlgebra/libLinearAlgebra.la \ 51 $(BOOST_SYSTEM_LIBS) \ 52 $(top_builddir)/LinearAlgebra/src/LinearAlgebra/libLinearAlgebra.la \ 25 53 $(CodePatterns_LIBS) 26 54 if CONDVMGMPI 55 libMolecuilderJobs_la_CPPFLAGS += $(MPI_CXXFLAGS) 56 libMolecuilderJobs_la_LDFLAGS += $(MPI_CXXLDFLAGS) 57 endif 58 -
src/Jobs/unittests/MPQCCommandJobUnitTest.cpp
r12a24c r79ac03 110 110 // prepare result container 111 111 MPQCData data; 112 data.energ y= -75.637499283020;112 data.energies.total = -75.637499283020; 113 113 std::vector<double> force; 114 114 std::vector< std::vector<double> > forces; -
src/Jobs/unittests/MPQCDataUnitTest.cpp
r12a24c r79ac03 46 46 #include "MPQCDataUnitTest.hpp" 47 47 48 #include "Jobs/MPQC CommandJob_MPQCData.hpp"48 #include "Jobs/MPQCData.hpp" 49 49 50 50 #include "CodePatterns/Assert.hpp" … … 67 67 data = new MPQCData; 68 68 69 data->energ y= -37.3479855;69 data->energies.total = -37.3479855; 70 70 std::vector<double> force; 71 71 std::vector< std::vector<double> > forces; … … 100 100 101 101 // construct closer and closer pendant 102 otherData.energ y= -37.3479855;102 otherData.energies.total = -37.3479855; 103 103 CPPUNIT_ASSERT( *data != otherData ); 104 104 std::vector<double> force; … … 117 117 118 118 // change energy 119 otherData.energ y= -4;119 otherData.energies.total = -4; 120 120 CPPUNIT_ASSERT( *data != otherData ); 121 otherData.energ y= -37.3479855;121 otherData.energies.total = -37.3479855; 122 122 CPPUNIT_ASSERT( *data == otherData ); 123 123 … … 129 129 130 130 // check sensibility 131 otherData.energ y-= 1e-1*std::numeric_limits<double>::epsilon();131 otherData.energies.total -= 1e-1*std::numeric_limits<double>::epsilon(); 132 132 CPPUNIT_ASSERT( *data == otherData ); 133 133 otherData.forces[1][0] -= 1e-1*std::numeric_limits<double>::epsilon(); -
src/Makefile.am
r12a24c r79ac03 16 16 include Filling/Makefile.am 17 17 include Fragmentation/Makefile.am 18 include Fragmentation/Converter/Makefile.am 19 include Fragmentation/Summation/Makefile.am 20 include Fragmentation/SetValues/Makefile.am 18 21 include Graph/Makefile.am 19 22 include Helpers/Makefile.am 20 23 21 24 if CONDJOBMARKET 25 include Fragmentation/Automation/Makefile.am 22 26 include Jobs/Makefile.am 27 include Jobs/Grid/Makefile.am 23 28 endif 24 29 … … 300 305 301 306 302 molecuilder_CPPFLAGS = $(AM_CPPFLAGS) 307 molecuilder_CPPFLAGS = $(AM_CPPFLAGS) ${QT_CFLAGS} 303 308 #molecuilder_CXXFLAGS += -DNO_CACHING 304 309 molecuilder_LDFLAGS = $(AM_LDFLAGS) $(BOOST_FILESYSTEM_LDFLAGS) $(BOOST_PROGRAM_OPTIONS_LDFLAGS) $(BOOST_RANDOM_LDFLAGS) $(BOOST_SYSTEM_LDFLAGS) $(BOOST_THREAD_LDFLAGS) -
src/Parameters/Makefile.am
r12a24c r79ac03 19 19 Parameters/Validators/Specific/RealSpaceMatrixInvertibleValidator.cpp \ 20 20 Parameters/Validators/Specific/RealSpaceMatrixSymmetricValidator.cpp \ 21 Parameters/Validators/Specific/ShapeNameValidator.cpp \ 22 Parameters/Validators/Specific/ShapeOpValidator.cpp \ 23 Parameters/Validators/Specific/ShapeTypeValidator.cpp \ 21 24 Parameters/Validators/Specific/TimeStepPresentValidator.cpp \ 22 25 Parameters/Validators/Specific/VectorNotZeroValidator.cpp \ … … 58 61 Parameters/Validators/Specific/RealSpaceMatrixSymmetricValidator.hpp \ 59 62 Parameters/Validators/Specific/RotationAngleValidator.hpp \ 63 Parameters/Validators/Specific/ShapeNameValidator.hpp \ 64 Parameters/Validators/Specific/ShapeOpValidator.hpp \ 65 Parameters/Validators/Specific/ShapeTypeValidator.hpp \ 60 66 Parameters/Validators/Specific/TimeStepPresentValidator.hpp \ 61 67 Parameters/Validators/Specific/VectorNotZeroValidator.hpp \ -
src/Parameters/Validators/DiscreteValidator.hpp
r12a24c r79ac03 42 42 43 43 void appendValidValue(const T &_value) throw(ParameterValidatorException); 44 const std::vector<T> &getValidValues() const;44 virtual const std::vector<T> &getValidValues() const; 45 45 46 46 private: -
src/Parameters/Validators/Ops_Validator_impl.hpp
r12a24c r79ac03 49 49 return false; 50 50 } 51 52 Validator<T> *getA(){ return a; } 53 Validator<T> *getB(){ return b; } 51 54 52 55 private: -
src/Parameters/Validators/STLVectorValidator.hpp
r12a24c r79ac03 122 122 } 123 123 124 Validator<value_type> *getElementwiseValidator(){ return ElementwiseValidator; } 125 Validator<size_t> *getNumberOfElementsValidator(){ return NumberOfElementsValidator; } 126 124 127 private: 125 128 /** Constructor for class STLVectorValidator, number of elements given by \ref RangeValidator. -
src/Parameters/Validators/Specific/BoundaryConditionValidator.cpp
r12a24c r79ac03 41 41 #include "Box_BoundaryConditions.hpp" 42 42 43 BoundaryConditionValidator::BoundaryConditionValidator() : 44 DiscreteValidator<std::string>(std::vector<std::string>()) 45 {} 46 43 47 bool BoundaryConditionValidator::isValid(const std::string & _value) const 44 48 { 45 49 BoundaryConditions::BCContainer bc; 46 50 return (bc.ReConverterBiMap.find(_value) != bc.ReConverterBiMap.end()); 51 } 52 53 const std::vector<std::string> &BoundaryConditionValidator::getValidValues() const 54 { 55 BoundaryConditions::BCContainer bc; 56 currentList.clear(); 57 for (BoundaryConditions::BCContainer::StringToEnumMap::iterator iter = bc.ReConverterBiMap.begin(); 58 iter != bc.ReConverterBiMap.end(); 59 iter ++) 60 currentList.push_back(iter->first); 61 return currentList; 47 62 } 48 63 -
src/Parameters/Validators/Specific/BoundaryConditionValidator.hpp
r12a24c r79ac03 17 17 #include <string> 18 18 19 #include "Parameters/Validators/ Validator.hpp"19 #include "Parameters/Validators/DiscreteValidator.hpp" 20 20 21 21 /** This validator checks whether the given string is one keyword of a box 22 22 * condition. 23 23 */ 24 class BoundaryConditionValidator : public Validator<std::string>24 class BoundaryConditionValidator : public DiscreteValidator<std::string> 25 25 { 26 public: 27 BoundaryConditionValidator(); 26 28 bool isValid(const std::string & _value) const; 29 const std::vector<std::string> &getValidValues() const; 27 30 bool operator==(const Validator<std::string> &_instance) const; 28 31 Validator< std::string >* clone() const; 32 private: 33 mutable std::vector<std::string> currentList; 29 34 }; 30 35 -
src/Parameters/Validators/Specific/ParserTypeValidator.cpp
r12a24c r79ac03 39 39 40 40 #include "Parser/FormatParserStorage.hpp" 41 #include "Parser/ParserTypes.hpp" 41 42 42 bool ParserTypeValidator::isValid(const std::string & _value) const 43 ParserTypeValidator::ParserTypeValidator() : 44 DiscreteValidator<std::string>(std::vector<std::string>()) 43 45 { 44 return (FormatParserStorage::getInstance().getTypeFromName(_value) != ParserTypes_end); 45 } 46 47 bool ParserTypeValidator::operator==(const Validator<std::string> &_instance) const 48 { 49 const ParserTypeValidator *inst = 50 dynamic_cast<const ParserTypeValidator *>(&_instance); 51 if (inst) 52 return true; 53 else 54 return false; 55 } 56 57 Validator< std::string >* ParserTypeValidator::clone() const 58 { 59 Validator< std::string > *inst = 60 new ParserTypeValidator(); 61 return inst; 46 for (ParserTypes t = ParserTypes_begin; t != ParserTypes_end; ++ t) 47 appendValidValue(FormatParserStorage::getInstance().getNameFromType(t)); 62 48 } 63 49 -
src/Parameters/Validators/Specific/ParserTypeValidator.hpp
r12a24c r79ac03 17 17 #include <string> 18 18 19 #include "Parameters/Validators/ Validator.hpp"19 #include "Parameters/Validators/DiscreteValidator.hpp" 20 20 21 21 /** This validator checks whether the given string refers to a valid 22 22 * \ref FormatParser type. 23 23 */ 24 class ParserTypeValidator : public Validator<std::string>24 class ParserTypeValidator : public DiscreteValidator<std::string> 25 25 { 26 bool isValid(const std::string & _value) const; 27 bool operator==(const Validator<std::string> &_instance) const; 28 Validator< std::string >* clone() const; 26 public: 27 ParserTypeValidator(); 29 28 }; 30 29 -
src/Parameters/Validators/Specific/RandomNumberValidators.cpp
r12a24c r79ac03 41 41 #include "RandomNumbers/RandomNumberEngineFactory.hpp" 42 42 43 RandomNumberDistributionNameValidator::RandomNumberDistributionNameValidator() : 44 DiscreteValidator<std::string>(std::vector<std::string>()) 45 {} 46 43 47 bool RandomNumberDistributionNameValidator::isValid(const std::string & _value) const 44 48 { … … 52 56 } 53 57 return false; 58 } 59 60 const std::vector<std::string> &RandomNumberDistributionNameValidator::getValidValues() const 61 { 62 currentList.clear(); 63 RandomNumberDistributionFactory::getInstance(); 64 for (RandomNumberDistributionFactory::NameMap::const_iterator 65 iter = RandomNumberDistributionFactory::getInstance().names.begin(); 66 iter != RandomNumberDistributionFactory::getInstance().names.end(); 67 ++iter) 68 currentList.push_back(iter->second); 69 return currentList; 54 70 } 55 71 … … 79 95 80 96 97 RandomNumberEngineNameValidator::RandomNumberEngineNameValidator() : 98 DiscreteValidator<std::string>(std::vector<std::string>()) 99 {} 100 81 101 bool RandomNumberEngineNameValidator::isValid(const std::string & _value) const 82 102 { … … 90 110 } 91 111 return false; 112 } 113 114 const std::vector<std::string> &RandomNumberEngineNameValidator::getValidValues() const 115 { 116 currentList.clear(); 117 RandomNumberEngineFactory::getInstance(); 118 for (RandomNumberEngineFactory::NameMap::const_iterator 119 iter = RandomNumberEngineFactory::getInstance().names.begin(); 120 iter != RandomNumberEngineFactory::getInstance().names.end(); 121 ++iter) 122 currentList.push_back(iter->second); 123 return currentList; 92 124 } 93 125 -
src/Parameters/Validators/Specific/RandomNumberValidators.hpp
r12a24c r79ac03 17 17 #include <string> 18 18 19 #include "Parameters/Validators/ Validator.hpp"19 #include "Parameters/Validators/DiscreteValidator.hpp" 20 20 21 21 /** This validator checks whether the given string contains the name of a 22 22 * present \ref RandomNumberDistribution. 23 23 */ 24 class RandomNumberDistributionNameValidator : public Validator<std::string>24 class RandomNumberDistributionNameValidator : public DiscreteValidator<std::string> 25 25 { 26 public: 27 RandomNumberDistributionNameValidator(); 26 28 bool isValid(const std::string & _value) const; 29 const std::vector<std::string> &getValidValues() const; 27 30 bool operator==(const Validator<std::string> &_instance) const; 28 31 Validator< std::string >* clone() const; 32 private: 33 mutable std::vector<std::string> currentList; 29 34 }; 30 35 … … 32 37 * present \ref RandomNumberEngine. 33 38 */ 34 class RandomNumberEngineNameValidator : public Validator<std::string>39 class RandomNumberEngineNameValidator : public DiscreteValidator<std::string> 35 40 { 41 public: 42 RandomNumberEngineNameValidator(); 36 43 bool isValid(const std::string & _value) const; 44 const std::vector<std::string> &getValidValues() const; 37 45 bool operator==(const Validator<std::string> &_instance) const; 38 46 Validator< std::string >* clone() const; 47 private: 48 mutable std::vector<std::string> currentList; 39 49 }; 40 50 -
src/Shapes/BaseShapes.cpp
r12a24c r79ac03 61 61 62 62 bool Cylinder_impl::isOnSurface(const Vector &point) const { 63 return fabs(Vector(point[0], point[1], 0.0).NormSquared()-1.0)<MYEPSILON && 64 (point[2] > -1.0-MYEPSILON) && (point[2] < 1.0+MYEPSILON); 63 // on the side? 64 if (fabs(Vector(point[0], point[1], 0.0).NormSquared()-1.0)<MYEPSILON && 65 (point[2] > -1.0-MYEPSILON) && (point[2] < 1.0+MYEPSILON)) 66 return true; 67 // on top/bottom? 68 if ((Vector(point[0], point[1], 0.0).NormSquared()< 1.0 + MYEPSILON) && 69 ((fabs(point[2]-1)<MYEPSILON) || (fabs(point[2]+1)<MYEPSILON))) 70 return true; 71 return false; 65 72 66 73 } … … 71 78 } 72 79 73 if ((fabs(point[2]-1)<MYEPSILON) || (fabs(point[2])<MYEPSILON)) 74 return Vector(0.0, 0.0, point[2]); 80 Vector n = Vector(0, 0, 0); 81 if ((fabs(point[2]-1)<MYEPSILON) || (fabs(point[2]+1)<MYEPSILON)) 82 n += Vector(0.0, 0.0, point[2]); 75 83 else 76 return Vector(point[0], point[1], 0.0); 84 n += Vector(point[0], point[1], 0.0); 85 n.Normalize(); 86 return n; 77 87 } 78 88 … … 109 119 std::vector<double> solutions; 110 120 111 // Common routine to solve quadratic quations, anywhere?121 // Common routine to solve quadratic equations, anywhere? 112 122 const double neg_p_half = -B/(2.0*A); 113 123 const double q = C/A; … … 168 178 169 179 for(int useg=0; useg<nu; useg++) 170 for(int zseg=0; zseg< nz; zseg++)180 for(int zseg=0; zseg<=nz; zseg++) 171 181 result.push_back(Vector(cos(useg*dphi), sin(useg*dphi), zseg*dz-1.0)); 172 182 … … 366 376 // figure out on which sides the Vector lies (maximum 3, when it is in a corner) 367 377 for(int i=NDIM;i--;){ 368 if( fabs(fabs(point[i])-1)<MYEPSILON){378 if((fabs(point[i])<MYEPSILON) || (fabs(point[i]-1)<MYEPSILON)){ 369 379 // add the scaled (-1/+1) Vector to the set of surface vectors 370 res[i] = point[i] ;380 res[i] = point[i] * 2.0 - 1.0; 371 381 } 372 382 } … … 442 452 std::vector<Vector> Cuboid_impl::getHomogeneousPointsOnSurface(const size_t N) const { 443 453 std::vector<Vector> PointsOnSurface; 444 ASSERT(false, "Cuboid_impl::getHomogeneousPointsOnSurface() not implemented yet"); 454 // sides 455 int n = sqrt((N - 1) / 6) + 1; 456 for (int i=0; i<=n; i++){ 457 double ii = (double)i / (double)n; 458 for (int k=0; k<n; k++){ 459 double kk = (double)k / (double)n; 460 PointsOnSurface.push_back(Vector(ii, kk, 1)); 461 PointsOnSurface.push_back(Vector(ii, 1, 1-kk)); 462 PointsOnSurface.push_back(Vector(ii, 1-kk, 0)); 463 PointsOnSurface.push_back(Vector(ii, 0, kk)); 464 } 465 } 466 // top and bottom 467 for (int i=1; i<n; i++){ 468 double ii = (double)i / (double)n; 469 for (int k=1; k<n; k++){ 470 double kk = (double)k / (double)n; 471 PointsOnSurface.push_back(Vector(0, ii, kk)); 472 PointsOnSurface.push_back(Vector(1, ii, kk)); 473 } 474 } 445 475 return PointsOnSurface; 446 476 } -
src/Shapes/Makefile.am
r12a24c r79ac03 5 5 Shapes/BaseShapes.cpp \ 6 6 Shapes/Shape.cpp \ 7 Shapes/ShapeOps.cpp 7 Shapes/ShapeFactory.cpp \ 8 Shapes/ShapeOps.cpp \ 9 Shapes/ShapeRegistry.cpp 8 10 SHAPEHEADER = \ 9 11 Shapes/BaseShapes.hpp \ … … 12 14 Shapes/Shape_impl.hpp \ 13 15 Shapes/ShapeExceptions.hpp \ 16 Shapes/ShapeFactory.hpp \ 14 17 Shapes/ShapeOps.hpp \ 15 18 Shapes/ShapeOps_impl.hpp \ 19 Shapes/ShapeRegistry.hpp \ 16 20 Shapes/ShapeType.hpp 17 21 -
src/Shapes/Shape.cpp
r12a24c r79ac03 52 52 53 53 Shape::Shape(const Shape& src) : 54 impl(src.getImpl()) 54 impl(src.getImpl()), name(src.getName()) 55 55 {} 56 56 … … 75 75 double Shape::getRadius() const{ 76 76 return impl->getRadius(); 77 } 78 79 void Shape::setName(const std::string &_name){ 80 name = _name; 81 } 82 83 std::string Shape::getName() const{ 84 return name; 77 85 } 78 86 -
src/Shapes/Shape.hpp
r12a24c r79ac03 58 58 enum ShapeType getType() const; 59 59 60 void setName(const std::string &_name); 61 std::string getName() const; 62 60 63 protected: 61 64 impl_ptr getImpl() const; … … 63 66 private: 64 67 impl_ptr impl; 68 std::string name; 65 69 }; 66 70 -
src/Shapes/ShapeType.hpp
r12a24c r79ac03 22 22 PolygonType, 23 23 CombinedType, 24 MAX_ShapeType,25 CylinderType24 CylinderType, 25 MAX_ShapeType 26 26 }; 27 27 -
src/Shapes/unittests/Makefile.am
r12a24c r79ac03 5 5 SHAPETESTSSOURCES = \ 6 6 ../Shapes/unittests/BaseShapesUnitTest.cpp \ 7 ../Shapes/unittests/ShapeFactoryUnitTest.cpp \ 7 8 ../Shapes/unittests/ShapeOpsUnitTest.cpp \ 9 ../Shapes/unittests/ShapeRegistryUnitTest.cpp \ 8 10 ../Shapes/unittests/Shape_HomogeneousPointsUnitTest.cpp 9 11 10 12 SHAPETESTSHEADERS= \ 11 13 ../Shapes/unittests/BaseShapesUnitTest.hpp \ 14 ../Shapes/unittests/ShapeFactoryUnitTest.hpp \ 12 15 ../Shapes/unittests/ShapeOpsUnitTest.hpp \ 16 ../Shapes/unittests/ShapeRegistryUnitTest.hpp \ 13 17 ../Shapes/unittests/Shape_HomogeneousPointsUnitTest.cpp 14 18 15 19 SHAPETESTS = \ 16 20 BaseShapesUnitTest \ 21 ShapeFactoryUnitTest \ 17 22 ShapeOpsUnitTest \ 23 ShapeRegistryUnitTest \ 18 24 Shape_HomogeneousPointsUnitTest 19 25 … … 38 44 BaseShapesUnitTest_LDADD = $(SHAPELIBS) 39 45 46 ShapeFactoryUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \ 47 ../Shapes/unittests/ShapeFactoryUnitTest.cpp \ 48 ../Shapes/unittests/ShapeFactoryUnitTest.hpp \ 49 ../Shapes/unittests/stubs/ApproximateShapeAreaStub.cpp \ 50 ../Shapes/unittests/stubs/ApproximateShapeVolumeStub.cpp 51 nodist_ShapeFactoryUnitTest_SOURCES = \ 52 ../Helpers/defs.hpp \ 53 ../Helpers/defs.cpp 54 ShapeFactoryUnitTest_LDADD = $(SHAPELIBS) 55 40 56 ShapeOpsUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \ 41 57 ../Shapes/unittests/ShapeOpsUnitTest.cpp \ … … 47 63 ../Helpers/defs.cpp 48 64 ShapeOpsUnitTest_LDADD = $(SHAPELIBS) 65 66 ShapeRegistryUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \ 67 ../Shapes/unittests/ShapeRegistryUnitTest.cpp \ 68 ../Shapes/unittests/ShapeRegistryUnitTest.hpp \ 69 ../Shapes/unittests/stubs/ApproximateShapeAreaStub.cpp \ 70 ../Shapes/unittests/stubs/ApproximateShapeVolumeStub.cpp 71 nodist_ShapeRegistryUnitTest_SOURCES = \ 72 ../Helpers/defs.hpp \ 73 ../Helpers/defs.cpp 74 ShapeRegistryUnitTest_LDADD = $(SHAPELIBS) 49 75 50 76 Shape_HomogeneousPointsUnitTest_SOURCES = $(top_srcdir)/src/unittests/UnitTestMain.cpp \ -
src/UIElements/CommandLineUI/CommandLineParser.cpp
r12a24c r79ac03 67 67 command("Command options"), 68 68 fill("fill options"), 69 shape("shape options"), 69 70 fragmentation("Fragmentation options"), 70 71 graph("Graph options"), … … 82 83 CmdParserLookup["edit"] = &edit; 83 84 CmdParserLookup["fill"] = &fill; 85 CmdParserLookup["shape"] = &shape; 84 86 CmdParserLookup["fragmentation"] = &fragmentation; 85 87 CmdParserLookup["graph"] = &graph; -
src/UIElements/CommandLineUI/CommandLineParser.hpp
r12a24c r79ac03 59 59 po::options_description edit; 60 60 po::options_description fill; 61 po::options_description shape; 61 62 po::options_description fragmentation; 62 63 po::options_description graph; -
src/UIElements/Makefile.am
r12a24c r79ac03 167 167 UIElements/Views/Qt4/QtInfoBox.cpp \ 168 168 UIElements/Views/Qt4/QtMoleculeList.cpp \ 169 UIElements/Views/Qt4/QtShapeController.cpp \ 170 UIElements/Views/Qt4/QtShapeList.cpp \ 169 171 UIElements/Views/Qt4/QtStatusBar.cpp \ 170 172 UIElements/Views/Qt4/QtToolBar.cpp \ … … 174 176 UIElements/Views/Qt4/Qt3D/GLMoleculeObject_atom.cpp \ 175 177 UIElements/Views/Qt4/Qt3D/GLMoleculeObject_bond.cpp \ 176 UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp 178 UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.cpp \ 179 UIElements/Views/Qt4/Qt3D/GLMoleculeObject_shape.cpp 177 180 # UIElements/Views/Qt4/dialoglight.cpp 178 181 … … 185 188 UIElements/Views/Qt4/QtInfoBox.hpp \ 186 189 UIElements/Views/Qt4/QtMoleculeList.hpp \ 190 UIElements/Views/Qt4/QtShapeController.hpp \ 191 UIElements/Views/Qt4/QtShapeList.hpp \ 187 192 UIElements/Views/Qt4/QtStatusBar.hpp \ 188 193 UIElements/Views/Qt4/QtToolBar.hpp \ … … 192 197 UIElements/Views/Qt4/Qt3D/GLMoleculeObject_atom.hpp \ 193 198 UIElements/Views/Qt4/Qt3D/GLMoleculeObject_bond.hpp \ 194 UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.hpp 199 UIElements/Views/Qt4/Qt3D/GLMoleculeObject_molecule.hpp \ 200 UIElements/Views/Qt4/Qt3D/GLMoleculeObject_shape.hpp 195 201 196 202 QTUIUI_UIFILES = \ … … 247 253 endif 248 254 libMolecuilderUI_la_LIBADD += \ 255 libMolecuilderFragmentationAutomation.la \ 256 libMolecuilderFragmentationConverter.la \ 257 libMolecuilderFragmentationSummation.la \ 258 libMolecuilderFragmentationSetValues.la \ 249 259 $(top_builddir)/LinearAlgebra/src/LinearAlgebra/libLinearAlgebra.la \ 250 260 ${CodePatterns_LIBS} \ … … 301 311 302 312 libMolecuilderQtUI_la_LIBADD = \ 313 ../data/icons/libicons.la \ 303 314 ${QT_LIBS} \ 304 315 -lQtOpenGL \ 305 316 ${GLU_LIBS} 317 318 ##libMolecuilderQtUI_la_LDADD = \ 319 ## ../data/icons/libicons.a 306 320 307 321 nobase_libMolecuilderQtUI_la_include_HEADERS = ${QTUIHEADER} $(QTUIUI_UIFILES) -
src/UIElements/Menu/MenuDescription.cpp
r12a24c r79ac03 71 71 MenuPositionMap->insert(std::make_pair("selection",TopPosition("edit",4))); 72 72 MenuPositionMap->insert(std::make_pair("tesselation",TopPosition("tools",2))); 73 MenuPositionMap->insert(std::make_pair("shape",TopPosition("tools",6))); 73 74 MenuPositionMap->insert(std::make_pair("tools",TopPosition("",4))); 74 75 MenuPositionMap->insert(std::make_pair("world",TopPosition("",1))); … … 86 87 MenuDescriptionsMap->insert(std::make_pair("selection","Select atoms/molecules")); 87 88 MenuDescriptionsMap->insert(std::make_pair("tesselation","Tesselate molecules")); 89 MenuDescriptionsMap->insert(std::make_pair("shape","Edit shapes")); 88 90 MenuDescriptionsMap->insert(std::make_pair("tools","Various tools")); 89 91 MenuDescriptionsMap->insert(std::make_pair("world","Edit world")); … … 101 103 MenuNameMap->insert(std::make_pair("selection","Selection")); 102 104 MenuNameMap->insert(std::make_pair("tesselation","Tesselation")); 105 MenuNameMap->insert(std::make_pair("shape","Shape")); 103 106 MenuNameMap->insert(std::make_pair("tools","Tools")); 104 107 MenuNameMap->insert(std::make_pair("world","Globals")); -
src/UIElements/Qt4/QtMainWindow.cpp
r12a24c r79ac03 53 53 #include "Views/Qt4/QtMoleculeList.hpp" 54 54 #include "Views/Qt4/QtElementList.hpp" 55 #include "Views/Qt4/QtShapeController.hpp" 55 56 #include "Views/Qt4/QtInfoBox.hpp" 56 57 #include "Views/Qt4/QtStatusBar.hpp" … … 70 71 #include "Actions/WorldAction/OutputAsAction.hpp" 71 72 73 72 74 using namespace MoleCuilder; 73 75 … … 75 77 theApp(_theApp) 76 78 { 79 Q_INIT_RESOURCE(icons); 77 80 QCoreApplication::setOrganizationName("ins"); 78 81 QCoreApplication::setOrganizationDomain("ins.uni-bonn.de"); … … 80 83 QSplitter *splitter1 = new QSplitter (Qt::Horizontal, this ); 81 84 QSplitter *splitter2 = new QSplitter (Qt::Vertical, splitter1 ); 85 QSplitter *splitter3 = new QSplitter (Qt::Vertical, splitter1 ); 82 86 QTabWidget *worldTab = new QTabWidget(splitter2); 83 87 84 88 moleculeList = new QtMoleculeList(worldTab); 85 89 elementList = new QtElementList(worldTab); 90 shapeController = new QtShapeController(worldTab); 86 91 87 92 infoBox = new QtInfoBox(); … … 101 106 setCentralWidget(splitter1); 102 107 splitter1->addWidget(splitter2); 103 splitter1->addWidget(infoBox); 108 splitter1->addWidget(splitter3); 109 splitter1->setStretchFactor(0, 10); 110 splitter3->addWidget(infoBox); 111 splitter3->addWidget(shapeController); 104 112 splitter2->addWidget(glWorldView); 105 113 splitter2->addWidget(worldTab); -
src/UIElements/Qt4/QtMainWindow.hpp
r12a24c r79ac03 25 25 class QtMoleculeList; 26 26 class QtElementList; 27 class QtShapeController; 27 28 class StringView; 28 29 class GLWorldView; … … 51 52 QtMoleculeList *moleculeList; 52 53 QtElementList *elementList; 54 QtShapeController *shapeController; 53 55 GLWorldView *glWorldView; 54 56 QtInfoBox *infoBox; -
src/UIElements/Qt4/Query/AtomsQtQuery.cpp
r12a24c r79ac03 45 45 QtDialog::AtomsQtQuery::AtomsQtQuery(Parameter<std::vector<const atom *> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) : 46 46 QtQuery<std::vector<const atom *> >(_param, _title), 47 QtQueryList<const atom *>(_par ent, _dialog, temp)47 QtQueryList<const atom *>(_param, _parent, _dialog, temp) 48 48 { 49 49 ListQuerySubDialog *subDialog = new ListQuerySubDialog(this); -
src/UIElements/Qt4/Query/DoublesQtQuery.cpp
r12a24c r79ac03 45 45 QtDialog::DoublesQtQuery::DoublesQtQuery(Parameter<std::vector<double> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) : 46 46 QtQuery<std::vector<double> >(_param, _title), 47 QtQueryList<double>(_par ent, _dialog, temp)47 QtQueryList<double>(_param, _parent, _dialog, temp) 48 48 { 49 49 ListQuerySubDialog *subDialog = new ListQuerySubDialog(this); -
src/UIElements/Qt4/Query/ElementsQtQuery.cpp
r12a24c r79ac03 46 46 QtDialog::ElementsQtQuery::ElementsQtQuery(Parameter<std::vector<const element *> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) : 47 47 QtQuery<std::vector<const element *> >(_param, _title), 48 QtQueryList<const element *>(_par ent, _dialog, temp)48 QtQueryList<const element *>(_param, _parent, _dialog, temp) 49 49 { 50 50 ListQuerySubDialog *subDialog = new ListQuerySubDialog(this); -
src/UIElements/Qt4/Query/FilesQtQuery.cpp
r12a24c r79ac03 46 46 QtDialog::FilesQtQuery::FilesQtQuery(Parameter<std::vector<boost::filesystem::path> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) : 47 47 QtQuery<std::vector<boost::filesystem::path> >(_param, _title), 48 QtQueryList<boost::filesystem::path>(_par ent, _dialog, temp)48 QtQueryList<boost::filesystem::path>(_param, _parent, _dialog, temp) 49 49 { 50 50 ListQuerySubDialog *subDialog = new ListQuerySubDialog(this); -
src/UIElements/Qt4/Query/IntsQtQuery.cpp
r12a24c r79ac03 45 45 QtDialog::IntsQtQuery::IntsQtQuery(Parameter<std::vector<int> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) : 46 46 QtQuery<std::vector<int> >(_param, _title), 47 QtQueryList<int>(_par ent, _dialog, temp)47 QtQueryList<int>(_param, _parent, _dialog, temp) 48 48 { 49 49 ListQuerySubDialog *subDialog = new ListQuerySubDialog(this); -
src/UIElements/Qt4/Query/MoleculesQtQuery.cpp
r12a24c r79ac03 45 45 QtDialog::MoleculesQtQuery::MoleculesQtQuery(Parameter<std::vector<const molecule *> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) : 46 46 QtQuery<std::vector<const molecule *> >(_param, _title), 47 QtQueryList<const molecule *>(_par ent, _dialog, temp)47 QtQueryList<const molecule *>(_param, _parent, _dialog, temp) 48 48 { 49 49 ListQuerySubDialog *subDialog = new ListQuerySubDialog(this); -
src/UIElements/Qt4/Query/QtQuery.hpp
r12a24c r79ac03 306 306 public slots: 307 307 void onUpdate(const QString&); 308 void onUpdateCombo(int index); 308 309 309 310 private: … … 312 313 QLabel *titleLabel; 313 314 QLineEdit *inputBox; 315 QComboBox *comboBox; 314 316 Dialog *dialog; 315 317 }; -
src/UIElements/Qt4/Query/QtQueryList.hpp
r12a24c r79ac03 17 17 #include "UIElements/Dialog.hpp" 18 18 #include "Parameters/Parameter.hpp" 19 #include "Parameters/Validators/STLVectorValidator.hpp" 20 #include "Parameters/Validators/Ops_Validator_impl.hpp" 19 21 20 22 class QListWidget; … … 50 52 class QtQueryList : public QtQueryListUntyped { 51 53 public: 52 QtQueryList( QBoxLayout *parent, Dialog *_dialog, std::vector<T> &_temp) : QtQueryListUntyped(parent, _dialog), tempRef(_temp)54 QtQueryList(Parameter<std::vector<T> > &parentParam, QBoxLayout *parent, Dialog *_dialog, std::vector<T> &_temp) : QtQueryListUntyped(parent, _dialog), tempRef(_temp) 53 55 { 54 subParam = new Parameter<T>("sub-param"); 56 // do we have an STLVectorValidator? 57 Validator<std::vector<T> > *val = &parentParam.getValidator(); 58 STLVectorValidator<std::vector<T> > *vector_val = NULL; 59 60 // might be hidden inside an And_Validator 61 And_Validator<std::vector<T> > * and_val = dynamic_cast<And_Validator<std::vector<T> > *>(val); 62 if (and_val){ 63 if (dynamic_cast<STLVectorValidator<std::vector<T> > *>(and_val->getA())) 64 vector_val = dynamic_cast<STLVectorValidator<std::vector<T> > *>(and_val->getA()); 65 else if (dynamic_cast<STLVectorValidator<std::vector<T> > *>(and_val->getB())) 66 vector_val = dynamic_cast<STLVectorValidator<std::vector<T> > *>(and_val->getB()); 67 }else{ 68 vector_val = dynamic_cast<STLVectorValidator<std::vector<T> > *>(val); 69 } 70 71 if (vector_val){ 72 // if so, try to use its ElementwiseValidator 73 subParam = new Parameter<T>("sub-param", *(vector_val->getElementwiseValidator())); 74 }else{ 75 subParam = new Parameter<T>("sub-param"); 76 } 55 77 } 56 78 virtual ~QtQueryList() -
src/UIElements/Qt4/Query/StringQtQuery.cpp
r12a24c r79ac03 36 36 #include <Qt/qlabel.h> 37 37 #include <Qt/qlineedit.h> 38 #include <Qt/qcombobox.h> 38 39 39 40 #include "CodePatterns/MemDebug.hpp" … … 52 53 thisLayout = new QHBoxLayout(); 53 54 titleLabel = new QLabel(QString(getTitle().c_str())); 54 inputBox = new QLineEdit();55 55 parent->addLayout(thisLayout); 56 56 thisLayout->addWidget(titleLabel); 57 thisLayout->addWidget(inputBox);58 57 59 onUpdate(inputBox->text()); 60 connect(inputBox,SIGNAL(textChanged(const QString&)),this,SLOT(onUpdate(const QString&))); 58 59 60 if (dynamic_cast<DiscreteValidator<std::string>*>(&_param.getValidator()) != NULL){ 61 // Discrete set of valid string -> use a ComboBox. 62 63 const std::vector<std::string> &strings = dynamic_cast<DiscreteValidator<std::string>*>(&_param.getValidator())->getValidValues(); 64 comboBox = new QComboBox(); 65 for(vector<std::string>::const_iterator iter = strings.begin(); 66 iter != strings.end(); 67 ++iter) { 68 comboBox->addItem(QString((*iter).c_str())); 69 } 70 thisLayout->addWidget(comboBox); 71 72 connect(comboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(onUpdateCombo(int))); 73 onUpdateCombo(0); 74 }else{ 75 // Use a LineEdit. 76 inputBox = new QLineEdit(); 77 thisLayout->addWidget(inputBox); 78 79 onUpdate(inputBox->text()); 80 connect(inputBox,SIGNAL(textChanged(const QString&)),this,SLOT(onUpdate(const QString&))); 81 } 61 82 } 62 83 … … 70 91 } 71 92 93 void QtDialog::StringQtQuery::onUpdateCombo(int newIndex) { 94 temp = comboBox->itemText(newIndex).toStdString(); 95 dialog->update(); 96 } 97 -
src/UIElements/Qt4/Query/StringsQtQuery.cpp
r12a24c r79ac03 45 45 QtDialog::StringsQtQuery::StringsQtQuery(Parameter<std::vector<std::string> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) : 46 46 QtQuery<std::vector<std::string> >(_param, _title), 47 QtQueryList<std::string>(_par ent, _dialog, temp)47 QtQueryList<std::string>(_param, _parent, _dialog, temp) 48 48 { 49 49 ListQuerySubDialog *subDialog = new ListQuerySubDialog(this); -
src/UIElements/Qt4/Query/UnsignedIntQtQuery.cpp
r12a24c r79ac03 54 54 inputBox = new QSpinBox(); 55 55 inputBox->setValue(temp); 56 inputBox->setMaximum(std::numeric_limits<int>::max()); // parameter is only int, so don't use std::numeric_limits<int>::max()! 56 57 parent->addLayout(thisLayout); 57 58 thisLayout->addWidget(titleLabel); -
src/UIElements/Qt4/Query/UnsignedIntsQtQuery.cpp
r12a24c r79ac03 45 45 QtDialog::UnsignedIntsQtQuery::UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) : 46 46 QtQuery<std::vector<unsigned int> >(_param, _title), 47 QtQueryList<unsigned int>(_par ent, _dialog, temp)47 QtQueryList<unsigned int>(_param, _parent, _dialog, temp) 48 48 { 49 49 ListQuerySubDialog *subDialog = new ListQuerySubDialog(this); -
src/UIElements/Qt4/Query/VectorsQtQuery.cpp
r12a24c r79ac03 46 46 QtDialog::VectorsQtQuery::VectorsQtQuery(Parameter<std::vector<Vector> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) : 47 47 QtQuery<std::vector<Vector> >(_param, _title), 48 QtQueryList<Vector>(_par ent, _dialog, temp)48 QtQueryList<Vector>(_param, _parent, _dialog, temp) 49 49 { 50 50 ListQuerySubDialog *subDialog = new ListQuerySubDialog(this); -
src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject.cpp
r12a24c r79ac03 81 81 } 82 82 83 GLMoleculeObject::GLMoleculeObject(QGLSceneNode *mesh, QObject *parent) 84 : QObject(parent) 85 { 86 //mesh->setParent(this); 87 for (int i=0;i<DETAILTYPES_MAX;i++) 88 m_mesh[i] = mesh; 89 m_scale = 1.0f; 90 m_scaleZ = 1.0f; 91 m_rotationAngle = 0.0f; 92 m_effect = 0; 93 m_objectId = -1; 94 m_hovering = false; 95 m_selected = false; 96 m_material = 0; 97 initStaticMaterials(); 98 } 99 83 100 GLMoleculeObject::GLMoleculeObject(QGLAbstractScene *scene, QObject *parent) 84 101 : QObject(parent) 85 102 { 86 103 scene->setParent(this); 87 m_mesh[0] = scene->mainNode(); 88 m_mesh[1] = scene->mainNode(); 89 m_mesh[2] = scene->mainNode(); 104 for (int i=0;i<DETAILTYPES_MAX;i++) 105 m_mesh[i] = scene->mainNode(); 90 106 m_scale = 1.0f; 91 107 m_scaleZ = 1.0f; -
src/UIElements/Views/Qt4/Qt3D/GLMoleculeObject.hpp
r12a24c r79ac03 38 38 public: 39 39 explicit GLMoleculeObject(QGLSceneNode *mesh[], QObject *parent=0); 40 explicit GLMoleculeObject(QGLSceneNode *mesh, QObject *parent=0); 40 41 explicit GLMoleculeObject(QGLAbstractScene *scene, QObject *parent=0); 41 42 virtual ~GLMoleculeObject(); … … 70 71 void initStaticMaterials(); 71 72 void initialize(QGLView *view, QGLPainter *painter); 72 v oid draw(QGLPainter *painter, const QVector4D &cameraPlane);73 virtual void draw(QGLPainter *painter, const QVector4D &cameraPlane); 73 74 void drawSelectionBox(QGLPainter *painter); 74 75 … … 94 95 enum{DETAIL_HIGHEST, DETAIL_HIGH, DETAIL_MEDIUM, DETAIL_LOW, DETAILTYPES_MAX} DetailType; 95 96 96 pr ivate:97 protected: 97 98 98 99 static double detailMinDistance[DETAILTYPES_MAX]; -
src/UIElements/Views/Qt4/Qt3D/GLWorldScene.cpp
r12a24c r79ac03 46 46 #include "GLMoleculeObject_bond.hpp" 47 47 #include "GLMoleculeObject_molecule.hpp" 48 #include "GLMoleculeObject_shape.hpp" 48 49 49 50 #include "CodePatterns/MemDebug.hpp" … … 59 60 #include "Descriptors/AtomIdDescriptor.hpp" 60 61 #include "Helpers/helpers.hpp" 62 #include "Shapes/ShapeRegistry.hpp" 61 63 #include "molecule.hpp" 62 64 #include "World.hpp" … … 293 295 294 296 emit changeOccured(); 297 } 298 299 /** Adds a shape to the scene. 300 * 301 * @param shape shape to be added 302 */ 303 void GLWorldScene::addShape(Shape &shape) 304 { 305 GLMoleculeObject_shape *shapeObject = new GLMoleculeObject_shape(shape, this); 306 ShapeNodeMap::iterator iter = ShapesinSceneMap.find(shape.getName()); 307 ASSERT(iter == ShapesinSceneMap.end(), 308 "GLWorldScene::addShape() - same shape "+shape.getName()+" added again."); 309 ShapesinSceneMap.insert( make_pair(shape.getName(), shapeObject) ); 310 } 311 312 void GLWorldScene::removeShape(Shape &shape) 313 { 314 ShapeNodeMap::iterator iter = ShapesinSceneMap.find(shape.getName()); 315 ASSERT(iter == ShapesinSceneMap.end(), 316 "GLWorldScene::removeShape() - shape "+shape.getName()+" not in scene."); 317 delete(iter->second); 318 } 319 320 void GLWorldScene::updateSelectedShapes() 321 { 322 foreach (QObject *obj, children()) { 323 GLMoleculeObject_shape *shapeobj = qobject_cast<GLMoleculeObject_shape *>(obj); 324 if (shapeobj){ 325 shapeobj->enable(ShapeRegistry::getInstance().isSelected(shapeobj->getShape())); 326 } 327 } 295 328 } 296 329 -
src/UIElements/Views/Qt4/Qt3D/GLWorldScene.hpp
r12a24c r79ac03 26 26 class atom; 27 27 class molecule; 28 class Shape; 28 29 29 30 class QGLPainter; … … 34 35 class GLMoleculeObject_atom; 35 36 class GLMoleculeObject_molecule; 37 class GLMoleculeObject_shape; 36 38 37 39 /** This class contains a list of all molecules in the world. … … 86 88 void changeAtomId(GLMoleculeObject_atom *ob, int oldId, int newOd); 87 89 90 public: 91 void addShape(Shape &shape); 92 void removeShape(Shape &shape); 93 void updateSelectedShapes(); 94 88 95 private: 89 96 void init(); … … 96 103 typedef std::map< BondIds , GLMoleculeObject_bond* > BondNodeMap; 97 104 typedef std::map< moleculeId_t , GLMoleculeObject_molecule* > MoleculeNodeMap; 105 typedef std::map< std::string , GLMoleculeObject_shape* > ShapeNodeMap; 98 106 AtomNodeMap AtomsinSceneMap; 99 107 BondNodeMap BondsinSceneMap; 100 108 MoleculeNodeMap MoleculesinSceneMap; 109 ShapeNodeMap ShapesinSceneMap; 101 110 102 111 QGLSceneNode *meshEmpty[GLMoleculeObject::DETAILTYPES_MAX]; -
src/UIElements/Views/Qt4/Qt3D/GLWorldView.cpp
r12a24c r79ac03 57 57 #include "CodePatterns/Observer/Notification.hpp" 58 58 #include "CodePatterns/Observer/ObserverLog.hpp" 59 #include "Shapes/ShapeRegistry.hpp" 59 60 #include "World.hpp" 60 61 #include "Box.hpp" … … 94 95 AtomObserver::getInstance().signOn(this, AtomObservable::PositionChanged); 95 96 97 ShapeRegistry::getInstance().signOn(this); 98 ShapeRegistry::getInstance().signOn(this, ShapeRegistry::ShapeInserted); 99 ShapeRegistry::getInstance().signOn(this, ShapeRegistry::ShapeRemoved); 100 ShapeRegistry::getInstance().signOn(this, ShapeRegistry::SelectionChanged); 101 96 102 redrawTimer = new QTimer(this); 97 103 } … … 106 112 World::getInstance().signOff(this, World::SelectionChanged); 107 113 AtomObserver::getInstance().signOff(this, AtomObservable::PositionChanged); 114 ShapeRegistry::getInstance().signOff(this); 115 ShapeRegistry::getInstance().signOff(this, ShapeRegistry::ShapeInserted); 116 ShapeRegistry::getInstance().signOff(this, ShapeRegistry::ShapeRemoved); 117 ShapeRegistry::getInstance().signOff(this, ShapeRegistry::SelectionChanged); 108 118 delete worldscene; 109 119 … … 158 168 stereoMenu->addAction(stereoAnaglyphAction); 159 169 stereoButton->setMenu(stereoMenu); 160 stereoButton->setIcon(QIcon ::fromTheme("find"));170 stereoButton->setIcon(QIcon(QPixmap(":/icon_view_stereo.png"))); 161 171 stereoButton->setPopupMode(QToolButton::InstantPopup); 162 172 toolbar->addWidget(stereoButton); … … 164 174 // selection mode 165 175 toolbar->addSeparator(); 166 QAction *selAtomAction = new QAction(QIcon ::fromTheme("edit-select-all"), tr("select atom by clicking"), this);176 QAction *selAtomAction = new QAction(QIcon(QPixmap(":/icon_select_atom.png")), tr("select atom by clicking"), this); 167 177 connect(selAtomAction, SIGNAL(triggered()), worldscene, SLOT(setSelectionModeAtom())); 168 178 toolbar->addAction(selAtomAction); 169 QAction *selMolAction = new QAction(QIcon ::fromTheme("edit-select-all"), tr("select molecule by clicking"), this);179 QAction *selMolAction = new QAction(QIcon(QPixmap(":/icon_select_molecule.png")), tr("select molecule by clicking"), this); 170 180 connect(selMolAction, SIGNAL(triggered()), worldscene, SLOT(setSelectionModeMolecule())); 171 181 toolbar->addAction(selMolAction); … … 351 361 #endif 352 362 emit changed(); 363 break; 364 } 365 default: 366 ASSERT(0, "GLWorldView::recieveNotification() - we cannot get here."); 367 break; 368 } 369 } else if (static_cast<ShapeRegistry*>(publisher) == ShapeRegistry::getPointer()) { 370 switch (notification->getChannelNo()) { 371 case ShapeRegistry::ShapeInserted: 372 { 373 worldscene->addShape(*ShapeRegistry::getInstance().lastChanged()); 374 break; 375 } 376 case ShapeRegistry::ShapeRemoved: 377 { 378 worldscene->removeShape(*ShapeRegistry::getInstance().lastChanged()); 379 break; 380 } 381 case ShapeRegistry::SelectionChanged: 382 { 383 worldscene->updateSelectedShapes(); 353 384 break; 354 385 } -
src/UIElements/Views/Qt4/Qt3D/GLWorldView.hpp
r12a24c r79ac03 98 98 99 99 private: 100 100 101 GLWorldScene *worldscene; 101 102 -
src/UIElements/Views/Qt4/QtInfoBox.cpp
r12a24c r79ac03 56 56 57 57 setMinimumWidth(200); 58 setMinimumHeight(200); 58 59 currentPage = 0; 59 60 -
src/cleanUp.cpp
r12a24c r79ac03 59 59 #include "Parser/XmlParser.hpp" 60 60 61 #include "Shapes/ShapeFactory.hpp" 62 #include "Shapes/ShapeRegistry.hpp" 63 61 64 #include "UIElements/CommandLineUI/CommandLineParser.hpp" 62 65 #include "UIElements/Menu/MenuDescription.hpp" … … 93 96 RandomNumberEngineFactory::purgeInstance(); 94 97 RandomNumberGeneratorFactory::purgeInstance(); 98 ShapeFactory::purgeInstance(); 99 ShapeRegistry::purgeInstance(); 95 100 FormatParserStorage::purgeInstance(); 96 101 ChangeTracker::purgeInstance(); -
src/controller_MPQCCommandJob.cpp
r12a24c r79ac03 66 66 67 67 #include "Jobs/MPQCCommandJob.hpp" 68 #include "Jobs/MPQC CommandJob_MPQCData.hpp"68 #include "Jobs/MPQCData.hpp" 69 69 70 70 #include "LinearAlgebra/defs.hpp" … … 167 167 MatrixContainer::MatrixArray matrix; 168 168 matrix.resize(1); 169 matrix[0].resize(1, extractedData.energ y);169 matrix[0].resize(1, extractedData.energies.total); 170 170 if (!Energy.AddMatrix( 171 171 std::string("MPQCJob ")+toString((*iter)->getId()), … … 217 217 if (!Force.ParseIndices(KeySetFilename.c_str())) return false; 218 218 219 if (!KeySet.ParseKeySets(KeySetFilename.c_str(), Force.RowCounter, Force.MatrixCounter)) return false; 219 { 220 std::stringstream filename; 221 filename << FRAGMENTPREFIX << KEYSETFILE; 222 if (!KeySet.ParseKeySets(KeySetFilename.c_str(), filename.str(), Force.MatrixCounter)) return 1; 223 } 220 224 221 225 if (!KeySet.ParseManyBodyTerms()) return false; -
src/unittests/Makefile.am
r12a24c r79ac03 15 15 include ../../src/Fragmentation/unittests/Makefile.am 16 16 include ../../src/Fragmentation/Homology/unittests/Makefile.am 17 include ../../src/Fragmentation/Summation/unittests/Makefile.am 18 include ../../src/Fragmentation/SetValues/unittests/Makefile.am 17 19 include ../../src/Graph/unittests/Makefile.am 18 20 19 21 if CONDJOBMARKET 20 22 include ../../src/Jobs/unittests/Makefile.am 23 include ../../src/Jobs/Grid/unittests/Makefile.am 21 24 endif 22 25 -
tests/JobMarket/testsuite-jobmarket-molecuilderrun.at
r12a24c r79ac03 46 46 47 47 # use molecuilder to add jobs, wait for their completion and obtain results 48 AT_CHECK([../../molecuilder - v 3 --fragment-automation --fragment-executable "../../mpqc" --fragment-path "${abs_top_srcdir}/tests/JobMarket/pre/" --fragment-jobs Job??.in --server-address 127.0.0.1 --server-port $CONTROLLERPORT], 0, [stdout], [ignore])48 AT_CHECK([../../molecuilder -i ${abs_top_srcdir}/tests/JobMarket/pre/heptan.xyz -v 3 --fragment-automation --fragment-executable "../../mpqc" --fragment-path "${abs_top_srcdir}/tests/JobMarket/pre/" --fragment-jobs Job??.in --server-address 127.0.0.1 --server-port $CONTROLLERPORT], 0, [stdout], [ignore], [kill $server_pid $worker_pid]) 49 49 AT_CHECK([fgrep "There are 7 fragments" stdout], 0, [ignore], [ignore], [kill $server_pid $worker_pid]) 50 50 AT_CHECK([fgrep "There are 23 atoms" stdout], 0, [ignore], [ignore], [kill $server_pid $worker_pid]) 51 AT_XFAIL_IF([/bin/true]) 51 52 AT_CHECK([fgrep "Resulting energy is -279.837" stdout], 0, [ignore], [ignore], [kill $server_pid $worker_pid]) 52 53 AT_CHECK([fgrep "Resulting forces are" stdout], 0, [ignore], [ignore], [kill $server_pid $worker_pid]) 54 AT_XFAIL_IF([/bin/false]) 53 55 54 56 # removeall to remove workers, then shutdown for server itself -
tests/Python/AllActions/options.dat
r12a24c r79ac03 58 58 domain-position "0 0 0" 59 59 domain-position "10. 10. 10." 60 DoLongrange "0" 60 61 DoRotate "0" 61 62 DoSaturate "0" … … 74 75 fragment-molecule "./" 75 76 fragment-path "test/" 77 grid-level "5" 76 78 id-mapping "1" 77 79 input "test.data" 80 interpolation-degree "5" 78 81 interpolation-steps "9" 79 82 keep-fixed-CenterOfMass "0" … … 85 88 min-distance "1." 86 89 molecule-by-id "0" 90 near-field-cells "3" 87 91 nonconvex-envelope "25" 88 92 nonconvex-file "NonConvexEnvelope" … … 164 168 select-molecules-by-formula "H2O" 165 169 select-molecules-by-name "water" 170 select-shape-by-name "sphere2" 166 171 server-address "127.0.0.1" 167 172 server-port "1026" … … 178 183 set-tremolo-atomdata "ATOMDATA type id x=3" 179 184 set-world-time "10" 185 shape-name "sphere1" 186 shape-op "AND" 187 shape-type "sphere" 180 188 skiplines "1" 181 189 skiplines "2" 182 190 start-step "0" 183 191 stretch-bond "1.5" 192 stretch "1. 1. 1." 184 193 suspend-in-water "1.0" 185 194 tesselation-radius "5." 186 195 time-step-zero "0" 187 196 translate-atoms "1. 0. 0." 197 translation "0. 0. 0." 188 198 unselect-atom-by-element "1" 189 199 unselect-atom-by-element "4" … … 205 215 unselect-molecules-by-formula "H2O" 206 216 unselect-molecules-by-name "water" 217 unselect-shape-by-name "cube42" 207 218 verbose "3" 208 219 verlet-integration "forces.dat" -
tests/regression/Analysis/DipoleCorrelation-DiscreteAngles/testsuite-analysis-dipole-correlation-discrete-angles.at
r12a24c r79ac03 51 51 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Analysis/DipoleCorrelation-DiscreteAngles/pre/water.xyz .], 0) 52 52 AT_CHECK([../../molecuilder -i waterbox-mirrored.xyz -o xyz --fill-void water.xyz --distances "3.1,3.1,3.1" --distance-to-boundary "1." --DoRotate 0], 0, [stdout], [stderr]) 53 AT_CHECK([../../molecuilder -i waterbox-mirrored.xyz -I -v 3 --select-atoms-inside-sphere 0.2 --position "5.63,5.71,5.71"--select-atoms-molecules --rotate-around-self 180 --axis "0,1,0"], 0, [stdout], [stderr])53 AT_CHECK([../../molecuilder -i waterbox-mirrored.xyz -I -v 3 --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "5.63,5.71,5.71" --stretch "0.2,0.2,0.2" --select-shape-by-name "sphere1" --select-atoms-inside-volume --select-atoms-molecules --rotate-around-self 180 --axis "0,1,0"], 0, [stdout], [stderr]) 54 54 AT_CHECK([../../molecuilder -i waterbox-mirrored.xyz -o xyz -I --select-all-molecules --dipole-correlation --bin-start -0.5 --bin-width 1. --bin-end 359.5 --output-file waterbox-mirrored_values.dat --bin-output-file waterbox-mirrored_histogram.dat], 0, [stdout], [stderr]) 55 55 AT_CHECK([file=waterbox-mirrored_histogram.dat; diff $file ${abs_top_srcdir}/tests/regression/Analysis/DipoleCorrelation-DiscreteAngles/post/waterbox-mirrored_histogram.dat], 0, [ignore], [ignore]) -
tests/regression/Atoms/RemoveCuboid/testsuite-atoms-remove-cuboid.at
r12a24c r79ac03 41 41 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveCuboid/pre/test.xyz $file], 0) 42 42 AT_CHECK([chmod u+w $file], 0) 43 AT_CHECK([../../molecuilder -i $file -- select-atoms-inside-cuboid "2,2,2" --position "9.78,2.64,2.64" --angle-x 0. --angle-y 0. --angle-z 0.-r], 0, [stdout], [stderr])43 AT_CHECK([../../molecuilder -i $file --create-shape --shape-name "cube1" --shape-type "cube" --translation "9.78,2.64,2.64" --stretch "2,2,2" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "cube1" --select-atoms-inside-volume -r], 0, [stdout], [stderr]) 44 44 AT_CHECK([sort -n $file | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-withoutcuboid.xyz-sorted], 0, [ignore], [ignore]) 45 45 AT_CHECK([file=test-withoutcuboid.xyz-sorted; diff $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveCuboid/post/test-withoutcuboid.xyz-sorted], 0, [ignore], [ignore]) … … 48 48 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveCuboid/pre/test.xyz $file], 0) 49 49 AT_CHECK([chmod u+w $file], 0) 50 AT_CHECK([../../molecuilder -i $file --select-all-atoms -- unselect-atoms-inside-cuboid "2,2,2" --position "9.78,2.64,2.64" --angle-x 0. --angle-y 0. --angle-z 0.-r], 0, [stdout], [stderr])50 AT_CHECK([../../molecuilder -i $file --select-all-atoms --create-shape --shape-name "cube1" --shape-type "cube" --translation "9.78,2.64,2.64" --stretch "2,2,2" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "cube1" --unselect-atoms-inside-volume -r], 0, [stdout], [stderr]) 51 51 AT_CHECK([sort -n $file | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-cuboid.xyz-sorted], 0, [ignore], [ignore]) 52 52 AT_CHECK([file=test-cuboid.xyz-sorted; diff $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveCuboid/post/test-cuboid.xyz-sorted], 0, [ignore], [ignore]) … … 63 63 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveCuboid/pre/test.xyz $file], 0) 64 64 AT_CHECK([chmod u+w $file], 0) 65 AT_CHECK([../../molecuilder -i $file --select-all-atoms -- unselect-atoms-inside-cuboid "2,2,2" --position "9.78,2.64,2.64" --angle-x 0. --angle-y 0. --angle-z 0.-r --undo], 0, [stdout], [stderr])65 AT_CHECK([../../molecuilder -i $file --select-all-atoms --create-shape --shape-name "cube1" --shape-type "cube" --translation "9.78,2.64,2.64" --stretch "2,2,2" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "cube1" --unselect-atoms-inside-volume -r --undo], 0, [stdout], [stderr]) 66 66 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveCuboid/pre/$file], 0, [ignore], [ignore]) 67 67 … … 69 69 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveCuboid/pre/test.xyz $file], 0) 70 70 AT_CHECK([chmod u+w $file], 0) 71 AT_CHECK([../../molecuilder -i $file -- select-atoms-inside-cuboid "2,2,2" --position "9.78,2.64,2.64" --angle-x 0. --angle-y 0. --angle-z 0.-r --undo], 0, [stdout], [stderr])71 AT_CHECK([../../molecuilder -i $file --create-shape --shape-name "cube1" --shape-type "cube" --translation "9.78,2.64,2.64" --stretch "2,2,2" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "cube1" --select-atoms-inside-volume -r --undo], 0, [stdout], [stderr]) 72 72 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveCuboid/pre/$file], 0, [ignore], [ignore]) 73 73 … … 81 81 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveCuboid/pre/test.xyz $file], 0) 82 82 AT_CHECK([chmod u+w $file], 0) 83 AT_CHECK([../../molecuilder -i $file -- select-atoms-inside-cuboid "2,2,2" --position "9.78,2.64,2.64" --angle-x 0. --angle-y 0. --angle-z 0.-r --undo --redo], 0, [stdout], [stderr])83 AT_CHECK([../../molecuilder -i $file --create-shape --shape-name "cube1" --shape-type "cube" --translation "9.78,2.64,2.64" --stretch "2,2,2" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "cube1" --select-atoms-inside-volume -r --undo --redo], 0, [stdout], [stderr]) 84 84 AT_CHECK([sort -n $file | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-withoutcuboid.xyz-sorted], 0, [ignore], [ignore]) 85 85 AT_CHECK([file=test-withoutcuboid.xyz-sorted; diff $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveCuboid/post/test-withoutcuboid.xyz-sorted], 0, [ignore], [ignore]) … … 88 88 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveCuboid/pre/test.xyz $file], 0) 89 89 AT_CHECK([chmod u+w $file], 0) 90 AT_CHECK([../../molecuilder -i $file --select-all-atoms -- unselect-atoms-inside-cuboid "2,2,2" --position "9.78,2.64,2.64" --angle-x 0. --angle-y 0. --angle-z 0.-r --undo --redo], 0, [stdout], [stderr])90 AT_CHECK([../../molecuilder -i $file --select-all-atoms --create-shape --shape-name "cube1" --shape-type "cube" --translation "9.78,2.64,2.64" --stretch "2,2,2" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "cube1" --unselect-atoms-inside-volume -r --undo --redo], 0, [stdout], [stderr]) 91 91 AT_CHECK([sort -n $file | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-cuboid.xyz-sorted], 0, [ignore], [ignore]) 92 92 AT_CHECK([file=test-cuboid.xyz-sorted; diff $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveCuboid/post/test-cuboid.xyz-sorted], 0, [ignore], [ignore]) -
tests/regression/Atoms/RemoveSphere/testsuite-atoms-remove-sphere.at
r12a24c r79ac03 41 41 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/pre/test.xyz $file], 0) 42 42 AT_CHECK([chmod u+w $file], 0) 43 AT_CHECK([../../molecuilder -i $file -- select-atoms-inside-sphere 7. --position "7.283585982, 3.275186040, 3.535886037" --angle-x 0. --angle-y 0. --angle-z 0.-r], 0, [stdout], [stderr])43 AT_CHECK([../../molecuilder -i $file --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "7.283585982, 3.275186040, 3.535886037" --stretch "7., 7., 7." --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --select-atoms-inside-volume -r], 0, [stdout], [stderr]) 44 44 AT_CHECK([sort -n $file | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-withoutsphere.xyz-sorted], 0, [ignore], [ignore]) 45 45 AT_CHECK([file=test-withoutsphere.xyz-sorted; diff $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/post/test-withoutsphere.xyz-sorted], 0, [ignore], [ignore]) … … 48 48 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/pre/test.xyz $file], 0) 49 49 AT_CHECK([chmod u+w $file], 0) 50 AT_CHECK([../../molecuilder -i $file --select-all-atoms -- unselect-atoms-inside-sphere 7. --position "7.283585982, 3.275186040, 3.535886037" --angle-x 0. --angle-y 0. --angle-z 0.-r], 0, [stdout], [stderr])50 AT_CHECK([../../molecuilder -i $file --select-all-atoms --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "7.283585982, 3.275186040, 3.535886037" --stretch "7., 7., 7." --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --unselect-atoms-inside-volume -r], 0, [stdout], [stderr]) 51 51 AT_CHECK([sort -n $file | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-sphere.xyz-sorted], 0, [ignore], [ignore]) 52 52 AT_CHECK([file=test-sphere.xyz-sorted; diff $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/post/test-sphere.xyz-sorted], 0, [ignore], [ignore]) … … 63 63 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/pre/test.xyz $file], 0) 64 64 AT_CHECK([chmod u+w $file], 0) 65 AT_CHECK([../../molecuilder -i $file -- select-atoms-inside-sphere 7. --position "7.283585982, 3.275186040, 3.535886037" --angle-x 0. --angle-y 0. --angle-z 0.-r --undo], 0, [stdout], [stderr])65 AT_CHECK([../../molecuilder -i $file --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "7.283585982, 3.275186040, 3.535886037" --stretch "7., 7., 7." --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --select-atoms-inside-volume -r --undo], 0, [stdout], [stderr]) 66 66 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/pre/$file], 0, [ignore], [ignore]) 67 67 … … 69 69 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/pre/test.xyz $file], 0) 70 70 AT_CHECK([chmod u+w $file], 0) 71 AT_CHECK([../../molecuilder -i $file --select-all-atoms -- unselect-atoms-inside-sphere 7. --position "7.283585982, 3.275186040, 3.535886037" --angle-x 0. --angle-y 0. --angle-z 0.-r --undo], 0, [stdout], [stderr])71 AT_CHECK([../../molecuilder -i $file --select-all-atoms --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "7.283585982, 3.275186040, 3.535886037" --stretch "7., 7., 7." --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --unselect-atoms-inside-volume -r --undo], 0, [stdout], [stderr]) 72 72 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/pre/$file], 0, [ignore], [ignore]) 73 73 … … 81 81 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/pre/test.xyz $file], 0) 82 82 AT_CHECK([chmod u+w $file], 0) 83 AT_CHECK([../../molecuilder -i $file -- select-atoms-inside-sphere 7. --position "7.283585982, 3.275186040, 3.535886037" --angle-x 0. --angle-y 0. --angle-z 0.-r --undo --redo], 0, [stdout], [stderr])83 AT_CHECK([../../molecuilder -i $file --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "7.283585982, 3.275186040, 3.535886037" --stretch "7., 7., 7." --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --select-atoms-inside-volume -r --undo --redo], 0, [stdout], [stderr]) 84 84 AT_CHECK([sort -n $file | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-withoutsphere.xyz-sorted], 0, [ignore], [ignore]) 85 85 AT_CHECK([file=test-withoutsphere.xyz-sorted; diff $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/post/test-withoutsphere.xyz-sorted], 0, [ignore], [ignore]) … … 88 88 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/pre/test.xyz $file], 0) 89 89 AT_CHECK([chmod u+w $file], 0) 90 AT_CHECK([../../molecuilder -i $file --select-all-atoms -- unselect-atoms-inside-sphere 7. --position "7.283585982, 3.275186040, 3.535886037" --angle-x 0. --angle-y 0. --angle-z 0.-r --undo --redo], 0, [stdout], [stderr])90 AT_CHECK([../../molecuilder -i $file --select-all-atoms --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "7.283585982, 3.275186040, 3.535886037" --stretch "7., 7., 7." --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --unselect-atoms-inside-volume -r --undo --redo], 0, [stdout], [stderr]) 91 91 AT_CHECK([sort -n $file | grep -v -E "^[[[:digit:]]]+" | grep -v "Created by" >test-sphere.xyz-sorted], 0, [ignore], [ignore]) 92 92 AT_CHECK([file=test-sphere.xyz-sorted; diff $file ${abs_top_srcdir}/tests/regression/Atoms/RemoveSphere/post/test-sphere.xyz-sorted], 0, [ignore], [ignore]) -
tests/regression/Filling/SphericalSurface/testsuite-molecules-fill-spherical-surface.at
r12a24c r79ac03 42 42 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Filling/SphericalSurface/pre/tensid.potentials .], 0) 43 43 AT_CHECK([chmod u+w $file], 0) 44 AT_CHECK([../../molecuilder --parse-tremolo-potentials tensid.potentials -i $file --select-all-molecules --rotate-to-principal-axis-system "0,0,-1" -- fill-spherical-surface --center "0,0,0" --radius 20.--count 200 --min-distance 3.1 --Alignment-Axis "0,0,1"], 0, [stdout], [stderr])44 AT_CHECK([../../molecuilder --parse-tremolo-potentials tensid.potentials -i $file --select-all-molecules --rotate-to-principal-axis-system "0,0,-1" --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "0,0,0" --stretch "20.,20.,20." --select-shape-by-name "sphere1" --fill-surface --count 200 --min-distance 3.1 --Alignment-Axis "0,0,1"], 0, [stdout], [stderr]) 45 45 AT_CHECK([grep "200 out of 200 returned true from predicate" stdout], 0, [ignore], [ignore]) 46 46 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Filling/SphericalSurface/post/tensid.data], 0, [ignore], [ignore]) … … 56 56 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Filling/SphericalSurface/pre/tensid.potentials .], 0) 57 57 AT_CHECK([chmod u+w $file], 0) 58 AT_CHECK([../../molecuilder --parse-tremolo-potentials tensid.potentials -i $file --select-all-molecules --rotate-to-principal-axis-system "0,0,-1" -- fill-spherical-surface --center "0,0,0" --radius 20.--count 200 --min-distance 3.1 --Alignment-Axis "0,0,1" --undo], 0, [stdout], [stderr])58 AT_CHECK([../../molecuilder --parse-tremolo-potentials tensid.potentials -i $file --select-all-molecules --rotate-to-principal-axis-system "0,0,-1" --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "0,0,0" --stretch "20.,20.,20." --select-shape-by-name "sphere1" --fill-surface --count 200 --min-distance 3.1 --Alignment-Axis "0,0,1" --undo], 0, [stdout], [stderr]) 59 59 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Filling/SphericalSurface/post/$file], 0, [ignore], [ignore]) 60 60 … … 69 69 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Filling/SphericalSurface/pre/tensid.potentials .], 0) 70 70 AT_CHECK([chmod u+w $file], 0) 71 AT_CHECK([../../molecuilder --parse-tremolo-potentials tensid.potentials -i $file --select-all-molecules --rotate-to-principal-axis-system "0,0,-1" -- fill-spherical-surface --center "0,0,0" --radius 20.--count 200 --min-distance 3.1 --Alignment-Axis "0,0,1" --undo --redo], 0, [stdout], [stderr])71 AT_CHECK([../../molecuilder --parse-tremolo-potentials tensid.potentials -i $file --select-all-molecules --rotate-to-principal-axis-system "0,0,-1" --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "0,0,0" --stretch "20.,20.,20." --select-shape-by-name "sphere1" --fill-surface --count 200 --min-distance 3.1 --Alignment-Axis "0,0,1" --undo --redo], 0, [stdout], [stderr]) 72 72 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Filling/SphericalSurface/post/tensid.data], 0, [ignore], [ignore]) 73 73 -
tests/regression/Selection/Atoms/AtomsInsideCuboid/testsuite-selection-select-atoms-inside-cuboid-with-defaults.at
r12a24c r79ac03 42 42 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0) 43 43 AT_CHECK([chmod u+w $file], 0) 44 AT_CHECK([../../molecuilder -i $file -v 5 -- select-atoms-inside-cuboid "10,10,10" --position "0,0,0"-r], 0, [stdout], [stderr])44 AT_CHECK([../../molecuilder -i $file -v 5 --create-shape --shape-name "cube1" --shape-type "cube" --translation "0,0,0" --stretch "10, 10, 10" --select-shape-by-name "cube1" --select-atoms-inside-volume -r], 0, [stdout], [stderr]) 45 45 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/post/allatomsoutsidecuboid.xyz], 0, [ignore], [ignore]) 46 46 … … 63 63 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0) 64 64 AT_CHECK([chmod u+w $file], 0) 65 AT_CHECK([../../molecuilder -i $file -v 5 -- select-atoms-inside-cuboid "10,10,10" --position "0,0,0"--undo -r], 0, [stdout], [stderr])65 AT_CHECK([../../molecuilder -i $file -v 5 --create-shape --shape-name "cube1" --shape-type "cube" --translation "0,0,0" --stretch "10, 10, 10" --select-shape-by-name "cube1" --select-atoms-inside-volume --undo -r], 0, [stdout], [stderr]) 66 66 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz], 0, [ignore], [ignore]) 67 67 … … 75 75 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0) 76 76 AT_CHECK([chmod u+w $file], 0) 77 AT_CHECK([../../molecuilder -i $file -v 5 -- select-atoms-inside-cuboid "10,10,10" --position "0,0,0"--undo --redo -r], 0, [stdout], [stderr])77 AT_CHECK([../../molecuilder -i $file -v 5 --create-shape --shape-name "cube1" --shape-type "cube" --translation "0,0,0" --stretch "10, 10, 10" --select-shape-by-name "cube1" --select-atoms-inside-volume --undo --redo -r], 0, [stdout], [stderr]) 78 78 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/post/allatomsoutsidecuboid.xyz], 0, [ignore], [ignore]) 79 79 -
tests/regression/Selection/Atoms/AtomsInsideCuboid/testsuite-selection-select-atoms-inside-cuboid.at
r12a24c r79ac03 41 41 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0) 42 42 AT_CHECK([chmod u+w $file], 0) 43 AT_CHECK([../../molecuilder -i $file -v 5 -- select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0-r], 0, [stdout], [stderr])43 AT_CHECK([../../molecuilder -i $file -v 5 --create-shape --shape-name "cube1" --shape-type "cube" --translation "0,0,0" --stretch "10, 10, 10" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "cube1" --select-atoms-inside-volume -r], 0, [stdout], [stderr]) 44 44 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/post/allatomsoutsidecuboid.xyz], 0, [ignore], [ignore]) 45 45 … … 62 62 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0) 63 63 AT_CHECK([chmod u+w $file], 0) 64 AT_CHECK([../../molecuilder -i $file -v 5 -- select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0--undo -r], 0, [stdout], [stderr])64 AT_CHECK([../../molecuilder -i $file -v 5 --create-shape --shape-name "cube1" --shape-type "cube" --translation "0,0,0" --stretch "10, 10, 10" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "cube1" --select-atoms-inside-volume --undo -r], 0, [stdout], [stderr]) 65 65 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz], 0, [ignore], [ignore]) 66 66 … … 74 74 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0) 75 75 AT_CHECK([chmod u+w $file], 0) 76 AT_CHECK([../../molecuilder -i $file -v 5 -- select-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0--undo --redo -r], 0, [stdout], [stderr])76 AT_CHECK([../../molecuilder -i $file -v 5 --create-shape --shape-name "cube1" --shape-type "cube" --translation "0,0,0" --stretch "10, 10, 10" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "cube1" --select-atoms-inside-volume --undo --redo -r], 0, [stdout], [stderr]) 77 77 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/post/allatomsoutsidecuboid.xyz], 0, [ignore], [ignore]) 78 78 -
tests/regression/Selection/Atoms/AtomsInsideCuboid/testsuite-selection-unselect-atoms-inside-cuboid.at
r12a24c r79ac03 42 42 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0) 43 43 AT_CHECK([chmod u+w $file], 0) 44 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms -- unselect-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z0 -r], 0, [stdout], [stderr])44 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --create-shape --shape-name "cube1" --shape-type "cube" --translation "0,0,0" --stretch "10, 10, 10" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "cube1" --unselect-atoms-inside-volume 0 -r], 0, [stdout], [stderr]) 45 45 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/post/allatomsinsidecuboid.xyz], 0, [ignore], [ignore]) 46 46 … … 63 63 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0) 64 64 AT_CHECK([chmod u+w $file], 0) 65 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms -- unselect-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0--undo -r], 0, [stdout], [stderr])65 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --create-shape --shape-name "cube1" --shape-type "cube" --translation "0,0,0" --stretch "10, 10, 10" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "cube1" --unselect-atoms-inside-volume --undo -r], 0, [stdout], [stderr]) 66 66 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/post/empty.xyz], 0, [ignore], [ignore]) 67 67 … … 75 75 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/pre/box.xyz $file], 0) 76 76 AT_CHECK([chmod u+w $file], 0) 77 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms -- unselect-atoms-inside-cuboid "10,10,10" --position "0,0,0" --angle-x 0 --angle-y 0 --angle-z 0--undo --redo -r], 0, [stdout], [stderr])77 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --create-shape --shape-name "cube1" --shape-type "cube" --translation "0,0,0" --stretch "10, 10, 10" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "cube1" --unselect-atoms-inside-volume --undo --redo -r], 0, [stdout], [stderr]) 78 78 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideCuboid/post/allatomsinsidecuboid.xyz], 0, [ignore], [ignore]) 79 79 -
tests/regression/Selection/Atoms/AtomsInsideSphere/testsuite-selection-select-atoms-inside-sphere.at
r12a24c r79ac03 41 41 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0) 42 42 AT_CHECK([chmod u+w $file], 0) 43 AT_CHECK([../../molecuilder -i $file -v 5 -- select-atoms-inside-sphere 10 --position "10,10,10"-r], 0, [stdout], [stderr])43 AT_CHECK([../../molecuilder -i $file -v 5 --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "10,10,10" --stretch "10., 10., 10." --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --select-atoms-inside-volume -r], 0, [stdout], [stderr]) 44 44 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/post/allatomsoutsidesphere.xyz], 0, [ignore], [ignore]) 45 45 … … 62 62 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0) 63 63 AT_CHECK([chmod u+w $file], 0) 64 AT_CHECK([../../molecuilder -i $file -v 5 -- select-atoms-inside-sphere 10 --position "10,10,10"--undo -r], 0, [stdout], [stderr])64 AT_CHECK([../../molecuilder -i $file -v 5 --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "10,10,10" --stretch "10., 10., 10." --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --select-atoms-inside-volume --undo -r], 0, [stdout], [stderr]) 65 65 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz], 0, [ignore], [ignore]) 66 66 … … 74 74 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0) 75 75 AT_CHECK([chmod u+w $file], 0) 76 AT_CHECK([../../molecuilder -i $file -v 5 -- select-atoms-inside-sphere 10 --position "10,10,10"--undo --redo -r], 0, [stdout], [stderr])76 AT_CHECK([../../molecuilder -i $file -v 5 --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "10,10,10" --stretch "10., 10., 10." --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --select-atoms-inside-volume --undo --redo -r], 0, [stdout], [stderr]) 77 77 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/post/allatomsoutsidesphere.xyz], 0, [ignore], [ignore]) 78 78 -
tests/regression/Selection/Atoms/AtomsInsideSphere/testsuite-selection-select-atoms-inside-tiny-sphere.at
r12a24c r79ac03 41 41 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0) 42 42 AT_CHECK([chmod u+w $file], 0) 43 AT_CHECK([../../molecuilder -i $file -v 5 -- select-atoms-inside-sphere 1.65 --position "10,10,10"-r], 0, [stdout], [stderr])43 AT_CHECK([../../molecuilder -i $file -v 5 --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "10,10,10" --stretch "1.65, 1.65, 1.65" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --select-atoms-inside-volume -r], 0, [stdout], [stderr]) 44 44 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/post/allatomsoutsidetinysphere.xyz], 0, [ignore], [ignore]) 45 45 … … 62 62 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0) 63 63 AT_CHECK([chmod u+w $file], 0) 64 AT_CHECK([../../molecuilder -i $file -v 5 -- select-atoms-inside-sphere 1.65 --position "10,10,10"--undo -r], 0, [stdout], [stderr])64 AT_CHECK([../../molecuilder -i $file -v 5 --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "10,10,10" --stretch "1.65, 1.65, 1.65" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --select-atoms-inside-volume --undo -r], 0, [stdout], [stderr]) 65 65 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz], 0, [ignore], [ignore]) 66 66 … … 74 74 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0) 75 75 AT_CHECK([chmod u+w $file], 0) 76 AT_CHECK([../../molecuilder -i $file -v 5 -- select-atoms-inside-sphere 1.65 --position "10,10,10"--undo --redo -r], 0, [stdout], [stderr])76 AT_CHECK([../../molecuilder -i $file -v 5 --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "10,10,10" --stretch "1.65, 1.65, 1.65" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --select-atoms-inside-volume --undo --redo -r], 0, [stdout], [stderr]) 77 77 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/post/allatomsoutsidetinysphere.xyz], 0, [ignore], [ignore]) 78 78 -
tests/regression/Selection/Atoms/AtomsInsideSphere/testsuite-selection-unselect-atoms-inside-sphere.at
r12a24c r79ac03 42 42 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0) 43 43 AT_CHECK([chmod u+w $file], 0) 44 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms -- unselect-atoms-inside-sphere 10 --position "10,10,10"-r], 0, [stdout], [stderr])44 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "10,10,10" --stretch "10,10,10" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --unselect-atoms-inside-volume -r], 0, [stdout], [stderr]) 45 45 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/post/allatomsinsidesphere.xyz], 0, [ignore], [ignore]) 46 46 … … 63 63 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0) 64 64 AT_CHECK([chmod u+w $file], 0) 65 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms -- unselect-atoms-inside-sphere 10 --position "10,10,10"--undo -r], 0, [stdout], [stderr])65 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "10,10,10" --stretch "10,10,10" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --unselect-atoms-inside-volume --undo -r], 0, [stdout], [stderr]) 66 66 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/post/empty.xyz], 0, [ignore], [ignore]) 67 67 … … 75 75 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0) 76 76 AT_CHECK([chmod u+w $file], 0) 77 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms -- unselect-atoms-inside-sphere 10 --position "10,10,10"--undo --redo -r], 0, [stdout], [stderr])77 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "10,10,10" --stretch "10,10,10" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --unselect-atoms-inside-volume --undo --redo -r], 0, [stdout], [stderr]) 78 78 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/post/allatomsinsidesphere.xyz], 0, [ignore], [ignore]) 79 79 -
tests/regression/Selection/Atoms/AtomsInsideSphere/testsuite-selection-unselect-atoms-inside-tiny-sphere.at
r12a24c r79ac03 41 41 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0) 42 42 AT_CHECK([chmod u+w $file], 0) 43 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms -- unselect-atoms-inside-sphere 1.65 --position "10,10,10"-r], 0, [stdout], [stderr])43 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "10,10,10" --stretch "1.65, 1.65, 1.65" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --unselect-atoms-inside-volume -r], 0, [stdout], [stderr]) 44 44 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/post/allatomsinsidetinysphere.xyz], 0, [ignore], [ignore]) 45 45 … … 62 62 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0) 63 63 AT_CHECK([chmod u+w $file], 0) 64 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms -- unselect-atoms-inside-sphere 1.65 --position "10,10,10"--undo -r], 0, [stdout], [stderr])64 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "10,10,10" --stretch "1.65, 1.65, 1.65" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --unselect-atoms-inside-volume --undo -r], 0, [stdout], [stderr]) 65 65 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/post/empty.xyz], 0, [ignore], [ignore]) 66 66 … … 74 74 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/pre/box.xyz $file], 0) 75 75 AT_CHECK([chmod u+w $file], 0) 76 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms -- unselect-atoms-inside-sphere 1.65 --position "10,10,10"--undo --redo -r], 0, [stdout], [stderr])76 AT_CHECK([../../molecuilder -i $file -v 5 --select-all-atoms --create-shape --shape-name "sphere1" --shape-type "sphere" --translation "10,10,10" --stretch "1.65, 1.65, 1.65" --angle-x 0. --angle-y 0. --angle-z 0. --select-shape-by-name "sphere1" --unselect-atoms-inside-volume --undo --redo -r], 0, [stdout], [stderr]) 77 77 AT_CHECK([diff -I '.*Created by molecuilder.*' $file ${abs_top_srcdir}/tests/regression/Selection/Atoms/AtomsInsideSphere/post/allatomsinsidetinysphere.xyz], 0, [ignore], [ignore]) 78 78
Note:
See TracChangeset
for help on using the changeset viewer.