source: src/Actions/FragmentationAction/FragmentationAutomationAction.cpp@ dde8ec

Action_Thermostats Add_AtomRandomPerturbation Add_FitFragmentPartialChargesAction Add_RotateAroundBondAction Add_SelectAtomByNameAction Added_ParseSaveFragmentResults AddingActions_SaveParseParticleParameters Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_ParticleName_to_Atom Adding_StructOpt_integration_tests AtomFragments Automaking_mpqc_open AutomationFragmentation_failures Candidate_v1.5.4 Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator CombiningParticlePotentialParsing Combining_Subpackages Debian_Package_split Debian_package_split_molecuildergui_only Disabling_MemDebug Docu_Python_wait EmpiricalPotential_contain_HomologyGraph EmpiricalPotential_contain_HomologyGraph_documentation Enable_parallel_make_install Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph FitPartialCharges_GlobalError Fix_BoundInBox_CenterInBox_MoleculeActions Fix_ChargeSampling_PBC Fix_ChronosMutex Fix_FitPartialCharges Fix_FitPotential_needs_atomicnumbers Fix_ForceAnnealing Fix_IndependentFragmentGrids Fix_ParseParticles Fix_ParseParticles_split_forward_backward_Actions Fix_PopActions Fix_QtFragmentList_sorted_selection Fix_Restrictedkeyset_FragmentMolecule Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns Fix_fitting_potentials Fixes ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion FragmentAction_writes_AtomFragments FragmentMolecule_checks_bonddegrees GeometryObjects Gui_Fixes Gui_displays_atomic_force_velocity ImplicitCharges IndependentFragmentGrids IndependentFragmentGrids_IndividualZeroInstances IndependentFragmentGrids_IntegrationTest IndependentFragmentGrids_Sole_NN_Calculation JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix MoreRobust_FragmentAutomation ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PdbParser_setsAtomName PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks Rewrite_FitPartialCharges RotateToPrincipalAxisSystem_UndoRedo SaturateAtoms_findBestMatching SaturateAtoms_singleDegree StoppableMakroAction Subpackage_CodePatterns Subpackage_JobMarket Subpackage_LinearAlgebra Subpackage_levmar Subpackage_mpqc_open Subpackage_vmg Switchable_LogView ThirdParty_MPQC_rebuilt_buildsystem TrajectoryDependenant_MaxOrder TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps TremoloParser_setsAtomName Ubuntu_1604_changes stable
Last change on this file since dde8ec was dde8ec, checked in by Frederik Heber <heber@…>, 12 years ago

Histograms are now summed up, too.

  • added Histogram cstor that just takes vector<double>.
  • extracted Histogram::getMinMaxFromSamples().
  • aded energy_eigenvalues key to MPQCDataEnergyVector_t.
  • Property mode set to 100644
File size: 18.7 KB
Line 
1/*
2 * Project: MoleCuilder
3 * Description: creates and alters molecular systems
4 * Copyright (C) 2010-2012 University of Bonn. All rights reserved.
5 *
6 *
7 * This file is part of MoleCuilder.
8 *
9 * MoleCuilder is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * MoleCuilder is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with MoleCuilder. If not, see <http://www.gnu.org/licenses/>.
21 */
22
23/*
24 * FragmentationAutomationAction.cpp
25 *
26 * Created on: May 18, 2012
27 * Author: heber
28 */
29
30// include config.h
31#ifdef HAVE_CONFIG_H
32#include <config.h>
33#endif
34
35#include <boost/archive/text_iarchive.hpp>
36// boost asio needs specific operator new
37#include <boost/asio.hpp>
38
39#include "CodePatterns/MemDebug.hpp"
40
41#include <boost/assign.hpp>
42
43#include "CodePatterns/Assert.hpp"
44#include "CodePatterns/Info.hpp"
45#include "CodePatterns/Log.hpp"
46#include "JobMarket/Controller/FragmentController.hpp"
47#include "JobMarket/Jobs/FragmentJob.hpp"
48
49#include "Atom/atom.hpp"
50#include "Fragmentation/EnergyMatrix.hpp"
51#include "Fragmentation/ForceMatrix.hpp"
52#include "Fragmentation/Fragmentation.hpp"
53#include "Fragmentation/Histogram/Histogram.hpp"
54#include "Fragmentation/HydrogenSaturation_enum.hpp"
55#include "Fragmentation/KeySet.hpp"
56#include "Fragmentation/KeySetsContainer.hpp"
57#include "Fragmentation/Summation/printSum.hpp"
58#include "Graph/DepthFirstSearchAnalysis.hpp"
59#include "Jobs/MPQCJob.hpp"
60#include "Jobs/MPQCData.hpp"
61#include "Jobs/MPQCData_printKeyNames.hpp"
62#include "molecule.hpp"
63#include "World.hpp"
64
65#include <iostream>
66#include <string>
67#include <vector>
68
69#include <boost/mpl/for_each.hpp>
70
71#include "Actions/FragmentationAction/FragmentationAutomationAction.hpp"
72
73using namespace MoleCuilder;
74
75using namespace boost::assign;
76
77// and construct the stuff
78#include "FragmentationAutomationAction.def"
79#include "Action_impl_pre.hpp"
80/** =========== define the function ====================== */
81
82class controller_AddOn;
83
84// needs to be defined for using the FragmentController
85controller_AddOn *getAddOn()
86{
87 return NULL;
88}
89
90/** Creates a MPQCCommandJob with argument \a filename.
91 *
92 * @param jobs created job is added to this vector
93 * @param command mpqc command to execute
94 * @param filename filename being argument to job
95 * @param nextid id for this job
96 */
97void parsejob(
98 std::vector<FragmentJob::ptr> &jobs,
99 const std::string &command,
100 const std::string &filename,
101 const JobId_t nextid)
102{
103 std::ifstream file;
104 file.open(filename.c_str());
105 ASSERT( file.good(), "parsejob() - file "+filename+" does not exist.");
106 std::string output((std::istreambuf_iterator<char>(file)),
107 std::istreambuf_iterator<char>());
108 FragmentJob::ptr testJob( new MPQCJob(nextid, output) );
109 jobs.push_back(testJob);
110 file.close();
111 LOG(1, "INFO: Added MPQCCommandJob from file "+filename+".");
112}
113
114/** Helper function to get number of atoms somehow.
115 *
116 * Here, we just parse the number of lines in the adjacency file as
117 * it should correspond to the number of atoms, except when some atoms
118 * are not bonded, but then fragmentation makes no sense.
119 *
120 * @param path path to the adjacency file
121 */
122size_t getNoAtomsFromAdjacencyFile(const std::string &path)
123{
124 size_t NoAtoms = 0;
125
126 // parse in special file to get atom count (from line count)
127 std::string filename(path);
128 filename += FRAGMENTPREFIX;
129 filename += ADJACENCYFILE;
130 std::ifstream adjacency(filename.c_str());
131 if (adjacency.fail()) {
132 LOG(0, endl << "getNoAtomsFromAdjacencyFile() - Unable to open " << filename << ", is the directory correct?");
133 return false;
134 }
135 std::string buffer;
136 while (getline(adjacency, buffer))
137 NoAtoms++;
138 LOG(1, "INFO: There are " << NoAtoms << " atoms.");
139
140 return NoAtoms;
141}
142
143
144/** Print MPQCData from received results.
145 *
146 * @param results received results to extract MPQCData from
147 * @param KeySetFilename filename with keysets to associate forces correctly
148 * @param NoAtoms total number of atoms
149 */
150bool printReceivedMPQCResults(
151 const std::vector<FragmentResult::ptr> &results,
152 const std::string &KeySetFilename,
153 size_t NoAtoms)
154{
155 EnergyMatrix Energy;
156 EnergyMatrix EnergyFragments;
157 ForceMatrix Force;
158 ForceMatrix ForceFragments;
159
160 // align fragments
161 std::map< JobId_t, size_t > MatrixNrLookup;
162 size_t FragmentCounter = 0;
163 {
164 // bring ids in order ...
165 typedef std::map< JobId_t, FragmentResult::ptr> IdResultMap_t;
166 IdResultMap_t IdResultMap;
167 for (std::vector<FragmentResult::ptr>::const_iterator iter = results.begin();
168 iter != results.end(); ++iter) {
169 #ifndef NDEBUG
170 std::pair< IdResultMap_t::iterator, bool> inserter =
171 #endif
172 IdResultMap.insert( make_pair((*iter)->getId(), *iter) );
173 ASSERT( inserter.second,
174 "printReceivedMPQCResults() - two results have same id "
175 +toString((*iter)->getId())+".");
176 }
177 // ... and fill lookup
178 for(IdResultMap_t::const_iterator iter = IdResultMap.begin();
179 iter != IdResultMap.end(); ++iter)
180 MatrixNrLookup.insert( make_pair(iter->first, FragmentCounter++) );
181 }
182 LOG(1, "INFO: There are " << FragmentCounter << " fragments.");
183
184 // extract results
185 std::vector<MPQCData> fragmentData(results.size());
186 MPQCData combinedData;
187
188 LOG(2, "DEBUG: Parsing now through " << results.size() << " results.");
189 for (std::vector<FragmentResult::ptr>::const_iterator iter = results.begin();
190 iter != results.end(); ++iter) {
191 LOG(1, "RESULT: job #"+toString((*iter)->getId())+": "+toString((*iter)->result));
192 MPQCData extractedData;
193 std::stringstream inputstream((*iter)->result);
194 LOG(2, "DEBUG: First 50 characters FragmentResult's string: "+(*iter)->result.substr(0, 50));
195 boost::archive::text_iarchive ia(inputstream);
196 ia >> extractedData;
197 LOG(1, "INFO: extracted data is " << extractedData << ".");
198
199 // place results into EnergyMatrix ...
200 {
201 MatrixContainer::MatrixArray matrix;
202 matrix.resize(1);
203 matrix[0].resize(1, extractedData.energies.total);
204 if (!Energy.AddMatrix(
205 std::string("MPQCJob ")+toString((*iter)->getId()),
206 matrix,
207 MatrixNrLookup[(*iter)->getId()])) {
208 ELOG(1, "Adding energy matrix failed.");
209 return false;
210 }
211 }
212 // ... and ForceMatrix (with two empty columns in front)
213 {
214 MatrixContainer::MatrixArray matrix;
215 const size_t rows = extractedData.forces.size();
216 matrix.resize(rows);
217 for (size_t i=0;i<rows;++i) {
218 const size_t columns = 2+extractedData.forces[i].size();
219 matrix[i].resize(columns, 0.);
220 // for (size_t j=0;j<2;++j)
221 // matrix[i][j] = 0.;
222 for (size_t j=2;j<columns;++j)
223 matrix[i][j] = extractedData.forces[i][j-2];
224 }
225 if (!Force.AddMatrix(
226 std::string("MPQCJob ")+toString((*iter)->getId()),
227 matrix,
228 MatrixNrLookup[(*iter)->getId()])) {
229 ELOG(1, "Adding force matrix failed.");
230 return false;
231 }
232 }
233 }
234 // add one more matrix (not required for energy)
235 MatrixContainer::MatrixArray matrix;
236 matrix.resize(1);
237 matrix[0].resize(1, 0.);
238 if (!Energy.AddMatrix(std::string("MPQCJob total"), matrix, FragmentCounter))
239 return false;
240 // but for energy because we need to know total number of atoms
241 matrix.resize(NoAtoms);
242 for (size_t i = 0; i< NoAtoms; ++i)
243 matrix[i].resize(2+NDIM, 0.);
244 if (!Force.AddMatrix(std::string("MPQCJob total"), matrix, FragmentCounter))
245 return false;
246
247 // initialise indices
248 KeySetsContainer KeySet;
249 if (!Energy.InitialiseIndices()) return false;
250
251 if (!Force.ParseIndices(KeySetFilename.c_str())) return false;
252
253 if (!KeySet.ParseKeySets(KeySetFilename.c_str(), Force.RowCounter, Force.MatrixCounter)) return false;
254
255 /// prepare for OrthogonalSummation
256
257 // gather all present indices in AllIndices
258 IndexSet::ptr AllIndices(new IndexSet);
259 for (KeySetsContainer::ArrayOfIntVectors::const_iterator iter = KeySet.KeySets.begin();
260 iter != KeySet.KeySets.end(); ++iter)
261 for(KeySetsContainer::IntVector::const_iterator keyiter = (*iter).begin();
262 keyiter != (*iter).end(); ++keyiter) {
263 if (*keyiter != -1)
264 (*AllIndices) += *keyiter;
265 }
266 LOG(1, "INFO: AllIndices is " << AllIndices << ".");
267 // create container with all keysets
268 IndexSetContainer::ptr container(new IndexSetContainer(AllIndices));
269 for (KeySetsContainer::ArrayOfIntVectors::const_iterator iter = KeySet.KeySets.begin();
270 iter != KeySet.KeySets.end(); ++iter) {
271 IndexSet tempset;
272 for(KeySetsContainer::IntVector::const_iterator keyiter = (*iter).begin();
273 keyiter != (*iter).end(); ++keyiter)
274 if (*keyiter != -1)
275 tempset += *keyiter;
276 container->insert(tempset);
277 }
278 // create the map of all keysets
279 SubsetMap::ptr subsetmap(new SubsetMap(*container));
280
281 {
282 /// convert all MPQCData to MPQCDataMap_t
283
284 // energy_t
285 std::vector<MPQCDataEnergyMap_t> MPQCData_Energy_fused;
286 MPQCData_Energy_fused.reserve(fragmentData.size());
287 for(std::vector<MPQCData>::const_iterator dataiter = fragmentData.begin();
288 dataiter != fragmentData.end(); ++dataiter) {
289 const MPQCData &extractedData = *dataiter;
290 LOG(2, "DEBUG: Current extracted Data is " << extractedData << ".");
291 MPQCDataEnergyMap_t instance;
292 boost::fusion::at_key<MPQCDataFused::energy_total>(instance) = extractedData.energies.total;
293 boost::fusion::at_key<MPQCDataFused::energy_nuclear_repulsion>(instance) = extractedData.energies.nuclear_repulsion;
294 boost::fusion::at_key<MPQCDataFused::energy_electron_coulomb>(instance) = extractedData.energies.electron_coulomb;
295 boost::fusion::at_key<MPQCDataFused::energy_electron_exchange>(instance) = extractedData.energies.electron_exchange;
296 boost::fusion::at_key<MPQCDataFused::energy_correlation>(instance) = extractedData.energies.correlation;
297 boost::fusion::at_key<MPQCDataFused::energy_overlap>(instance) = extractedData.energies.overlap;
298 boost::fusion::at_key<MPQCDataFused::energy_kinetic>(instance) = extractedData.energies.kinetic;
299 boost::fusion::at_key<MPQCDataFused::energy_hcore>(instance) = extractedData.energies.hcore;
300 boost::fusion::at_key<MPQCDataFused::energy_eigenvalues>(instance) = extractedData.energies.eigenvalues;
301 MPQCData_Energy_fused.push_back(instance);
302 }
303
304 // forces
305 std::vector<MPQCDataForceMap_t> MPQCData_Force_fused;
306 MPQCData_Force_fused.reserve(fragmentData.size());
307 for(std::vector<MPQCData>::const_iterator dataiter = fragmentData.begin();
308 dataiter != fragmentData.end(); ++dataiter) {
309 const MPQCData &extractedData = *dataiter;
310 LOG(2, "DEBUG: Current extracted Data is " << extractedData << ".");
311 MPQCDataForceMap_t instance;
312 boost::fusion::at_key<MPQCDataFused::forces>(instance) = extractedData.forces;
313 MPQCData_Force_fused.push_back(instance);
314 }
315
316 // times
317 std::vector<MPQCDataTimeMap_t> MPQCData_Time_fused;
318 MPQCData_Time_fused.reserve(fragmentData.size());
319 for(std::vector<MPQCData>::const_iterator dataiter = fragmentData.begin();
320 dataiter != fragmentData.end(); ++dataiter) {
321 const MPQCData &extractedData = *dataiter;
322 LOG(2, "DEBUG: Current extracted Data is " << extractedData << ".");
323 MPQCDataTimeMap_t instance;
324 boost::fusion::at_key<MPQCDataFused::times_walltime>(instance) = extractedData.times.walltime;
325 boost::fusion::at_key<MPQCDataFused::times_cputime>(instance) = extractedData.times.cputime;
326 boost::fusion::at_key<MPQCDataFused::times_flops>(instance) = extractedData.times.flops;
327 MPQCData_Time_fused.push_back(instance);
328 }
329
330 // create a vector of all job ids
331 std::vector<JobId_t> jobids(results.size(), JobId::IllegalJob);
332 std::transform(results.begin(), results.end(), jobids.begin(),
333 boost::bind(&FragmentResult::getId,
334 boost::bind(&FragmentResult::ptr::operator->, _1)));
335
336 // sum up and print energies
337 boost::mpl::for_each<MPQCDataEnergyVector_t>(
338 printSum<MPQCDataEnergyMap_t>(
339 subsetmap,
340 MPQCData_Energy_fused,
341 jobids,
342 container->getContainer(),
343 MatrixNrLookup)
344 );
345
346 // TODO: We need to put forces into specific class and implement operators
347// // sum up and print forces
348// boost::mpl::for_each<MPQCDataForceVector_t>(
349// printSum<MPQCDataForceMap_t>(
350// subsetmap,
351// MPQCData_Force_fused,
352// jobids,
353// container->getContainer(),
354// MatrixNrLookup)
355// );
356
357 // TODO: Times should just be summed not orthogonalized
358// // sum up and print times
359// boost::mpl::for_each<MPQCDataTimeVector_t>(
360// printSum<MPQCDataTimeMap_t>(
361// subsetmap,
362// MPQCData_Time_fused,
363// jobids,
364// container->getContainer(),
365// MatrixNrLookup)
366// );
367 }
368
369 // combine all found data
370 if (!KeySet.ParseManyBodyTerms()) return false;
371
372 if (!EnergyFragments.AllocateMatrix(Energy.Header, Energy.MatrixCounter, Energy.RowCounter, Energy.ColumnCounter)) return false;
373 if (!ForceFragments.AllocateMatrix(Force.Header, Force.MatrixCounter, Force.RowCounter, Force.ColumnCounter)) return false;
374
375 if(!Energy.SetLastMatrix(0., 0)) return false;
376 if(!Force.SetLastMatrix(0., 2)) return false;
377
378 for (int BondOrder=0;BondOrder<KeySet.Order;BondOrder++) {
379 // --------- sum up energy --------------------
380 LOG(1, "INFO: Summing energy of order " << BondOrder+1 << " ...");
381 if (!EnergyFragments.SumSubManyBodyTerms(Energy, KeySet, BondOrder)) return false;
382 if (!Energy.SumSubEnergy(EnergyFragments, NULL, KeySet, BondOrder, 1.)) return false;
383
384 // --------- sum up Forces --------------------
385 LOG(1, "INFO: Summing forces of order " << BondOrder+1 << " ...");
386 if (!ForceFragments.SumSubManyBodyTerms(Force, KeySet, BondOrder)) return false;
387 if (!Force.SumSubForces(ForceFragments, KeySet, BondOrder, 1.)) return false;
388 }
389
390 // for debugging print resulting energy and forces
391 LOG(1, "INFO: Resulting energy is " << Energy.Matrix[ FragmentCounter ][0][0]);
392 std::stringstream output;
393 for (int i=0; i< Force.RowCounter[FragmentCounter]; ++i) {
394 for (int j=0; j< Force.ColumnCounter[FragmentCounter]; ++j)
395 output << Force.Matrix[ FragmentCounter ][i][j] << " ";
396 output << "\n";
397 }
398 LOG(1, "INFO: Resulting forces are " << std::endl << output.str());
399
400 return true;
401}
402
403
404void RunService(
405 boost::asio::io_service &io_service,
406 std::string message)
407{
408 message = std::string("io_service: ") + message;
409 io_service.reset();
410 Info info(message.c_str());
411 io_service.run();
412}
413
414void requestIds(
415 FragmentController &controller,
416 const FragmentationFragmentationAutomationAction::FragmentationFragmentationAutomationParameters &params,
417 const size_t numberjobs)
418{
419 controller.requestIds(params.host.get(), params.port.get(), numberjobs);
420}
421
422bool createJobsFromFiles(
423 FragmentController &controller,
424 const FragmentationFragmentationAutomationAction::FragmentationFragmentationAutomationParameters &params,
425 const std::vector< boost::filesystem::path > &jobfiles)
426{
427 std::vector<FragmentJob::ptr> jobs;
428 for (std::vector< boost::filesystem::path >::const_iterator iter = jobfiles.begin();
429 iter != jobfiles .end(); ++iter) {
430 const std::string &filename = (*iter).string();
431 if (boost::filesystem::exists(filename)) {
432 const JobId_t next_id = controller.getAvailableId();
433 LOG(1, "INFO: Creating MPQCCommandJob with filename'"
434 +filename+"', and id "+toString(next_id)+".");
435 parsejob(jobs, params.executable.get().string(), filename, next_id);
436 } else {
437 ELOG(1, "Fragment job "+filename+" does not exist.");
438 return false;
439 }
440 }
441 controller.addJobs(jobs);
442 controller.sendJobs(params.host.get(), params.port.get());
443 return true;
444}
445
446void WaitforResults(
447 boost::asio::io_service &io_service,
448 FragmentController &controller,
449 const FragmentationFragmentationAutomationAction::FragmentationFragmentationAutomationParameters &params,
450 const size_t NoExpectedResults
451 )
452{
453 size_t NoCalculatedResults = 0;
454 while (NoCalculatedResults != NoExpectedResults) {
455 // wait a bit
456 boost::asio::deadline_timer timer(io_service);
457 timer.expires_from_now(boost::posix_time::milliseconds(500));
458 timer.wait();
459 // then request status
460 controller.checkResults(params.host.get(), params.port.get());
461 RunService(io_service, "Checking on results");
462
463 const std::pair<size_t, size_t> JobStatus = controller.getJobStatus();
464 LOG(1, "INFO: #" << JobStatus.first << " are waiting in the queue and #" << JobStatus.second << " jobs are calculated so far.");
465 NoCalculatedResults = JobStatus.second;
466 }
467}
468
469
470Action::state_ptr FragmentationFragmentationAutomationAction::performCall() {
471 boost::asio::io_service io_service;
472 FragmentController controller(io_service);
473
474 // TODO: Have io_service run in second thread and merge with current again eventually
475
476 // Phase One: obtain ids
477 std::vector< boost::filesystem::path > jobfiles = params.jobfiles.get();
478 requestIds(controller, params, jobfiles.size());
479 RunService(io_service, "Requesting ids");
480
481 // Phase Two: create and add jobs
482 if (!createJobsFromFiles(controller, params, jobfiles))
483 return Action::failure;
484 RunService(io_service, "Adding jobs");
485
486 // Phase Three: calculate result
487 WaitforResults(io_service, controller, params, jobfiles.size());
488
489 // Phase Three: get result
490 controller.receiveResults(params.host.get(), params.port.get());
491 RunService(io_service, "Phase Four");
492
493 // Final phase: print result
494 {
495 LOG(1, "INFO: Parsing fragment files from " << params.path.get() << ".");
496 std::vector<FragmentResult::ptr> results = controller.getReceivedResults();
497 printReceivedMPQCResults(
498 results,
499 params.path.get(),
500 getNoAtomsFromAdjacencyFile(params.path.get()));
501 }
502 size_t Exitflag = controller.getExitflag();
503
504 return (Exitflag == 0) ? Action::success : Action::failure;
505}
506
507Action::state_ptr FragmentationFragmentationAutomationAction::performUndo(Action::state_ptr _state) {
508 return Action::success;
509}
510
511Action::state_ptr FragmentationFragmentationAutomationAction::performRedo(Action::state_ptr _state){
512 return Action::success;
513}
514
515bool FragmentationFragmentationAutomationAction::canUndo() {
516 return false;
517}
518
519bool FragmentationFragmentationAutomationAction::shouldUndo() {
520 return false;
521}
522/** =========== end of function ====================== */
Note: See TracBrowser for help on using the repository browser.