source: src/Actions/FragmentationAction/FragmentationAutomationAction.cpp@ 376a3b

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 376a3b was 376a3b, checked in by Frederik Heber <heber@…>, 12 years ago

Added FragmentationResults as a container to hold final fragmentation results.

  • 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/mpl/remove.hpp>
42#include <boost/lambda/lambda.hpp>
43
44#include "CodePatterns/Assert.hpp"
45#include "CodePatterns/Info.hpp"
46#include "CodePatterns/Log.hpp"
47#include "JobMarket/Jobs/FragmentJob.hpp"
48
49#include "Fragmentation/Automation/createMatrixNrLookup.hpp"
50#include "Fragmentation/Automation/extractJobIds.hpp"
51#include "Fragmentation/Automation/FragmentationResults.hpp"
52#include "Fragmentation/Automation/MPQCFragmentController.hpp"
53#include "Fragmentation/Automation/VMGDebugGridFragmentController.hpp"
54#include "Fragmentation/Automation/VMGFragmentController.hpp"
55#include "Fragmentation/EnergyMatrix.hpp"
56#include "Fragmentation/ForceMatrix.hpp"
57#include "Fragmentation/Fragmentation.hpp"
58#include "Fragmentation/SetValues/Fragment.hpp"
59#include "Fragmentation/SetValues/Histogram.hpp"
60#include "Fragmentation/SetValues/IndexedVectors.hpp"
61#include "Fragmentation/HydrogenSaturation_enum.hpp"
62#include "Fragmentation/KeySet.hpp"
63#include "Fragmentation/KeySetsContainer.hpp"
64#include "Fragmentation/Summation/OrthogonalSumUpPerLevel.hpp"
65#include "Fragmentation/Summation/writeTable.hpp"
66#include "Graph/DepthFirstSearchAnalysis.hpp"
67#include "Helpers/defs.hpp"
68#include "Jobs/MPQCJob.hpp"
69#include "Jobs/MPQCData.hpp"
70#include "Jobs/MPQCData_printKeyNames.hpp"
71#include "Jobs/Grid/SamplingGrid.hpp"
72#ifdef HAVE_VMG
73#include "Jobs/VMGDebugGridJob.hpp"
74#include "Jobs/VMGJob.hpp"
75#include "Jobs/VMGData.hpp"
76#include "Jobs/VMGDataFused.hpp"
77#include "Jobs/VMGDataMap.hpp"
78#include "Jobs/VMGData_printKeyNames.hpp"
79#endif
80#include "World.hpp"
81
82#include <iostream>
83#include <string>
84#include <vector>
85
86#include <boost/mpl/for_each.hpp>
87
88#include "Actions/FragmentationAction/FragmentationAutomationAction.hpp"
89
90using namespace MoleCuilder;
91
92// and construct the stuff
93#include "FragmentationAutomationAction.def"
94#include "Action_impl_pre.hpp"
95/** =========== define the function ====================== */
96
97class controller_AddOn;
98
99// needs to be defined for using the FragmentController
100controller_AddOn *getAddOn()
101{
102 return NULL;
103}
104
105/** Helper function to get number of atoms somehow.
106 *
107 * Here, we just parse the number of lines in the adjacency file as
108 * it should correspond to the number of atoms, except when some atoms
109 * are not bonded, but then fragmentation makes no sense.
110 *
111 * @param path path to the adjacency file
112 */
113size_t getNoAtomsFromAdjacencyFile(const std::string &path)
114{
115 size_t NoAtoms = 0;
116
117 // parse in special file to get atom count (from line count)
118 std::string filename(path);
119 filename += FRAGMENTPREFIX;
120 filename += ADJACENCYFILE;
121 std::ifstream adjacency(filename.c_str());
122 if (adjacency.fail()) {
123 LOG(0, endl << "getNoAtomsFromAdjacencyFile() - Unable to open " << filename << ", is the directory correct?");
124 return false;
125 }
126 std::string buffer;
127 while (getline(adjacency, buffer))
128 NoAtoms++;
129 LOG(1, "INFO: There are " << NoAtoms << " atoms.");
130
131 return NoAtoms;
132}
133
134
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
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
145 */
146bool 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)
153{
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)+".");
162 // place results into EnergyMatrix ...
163 {
164 MatrixContainer::MatrixArray matrix;
165 matrix.resize(1);
166 matrix[0].resize(1, extractedData.energies.total);
167 if (!Energy.AddMatrix(
168 std::string("MPQCJob ")+toString(jobid),
169 matrix,
170 nriter->second)) {
171 ELOG(1, "Adding energy matrix failed.");
172 return false;
173 }
174 }
175 // ... and ForceMatrix (with two empty columns in front)
176 {
177 MatrixContainer::MatrixArray matrix;
178 const size_t rows = extractedData.forces.size();
179 matrix.resize(rows);
180 for (size_t i=0;i<rows;++i) {
181 const size_t columns = 2+extractedData.forces[i].size();
182 matrix[i].resize(columns, 0.);
183 // for (size_t j=0;j<2;++j)
184 // matrix[i][j] = 0.;
185 for (size_t j=2;j<columns;++j)
186 matrix[i][j] = extractedData.forces[i][j-2];
187 }
188 if (!Force.AddMatrix(
189 std::string("MPQCJob ")+toString(jobid),
190 matrix,
191 nriter->second)) {
192 ELOG(1, "Adding force matrix failed.");
193 return false;
194 }
195 }
196 }
197 // add one more matrix (not required for energy)
198 MatrixContainer::MatrixArray matrix;
199 matrix.resize(1);
200 matrix[0].resize(1, 0.);
201 if (!Energy.AddMatrix(std::string("MPQCJob total"), matrix, FragmentCounter))
202 return false;
203 // but for energy because we need to know total number of atoms
204 matrix.resize(NoAtoms);
205 for (size_t i = 0; i< NoAtoms; ++i)
206 matrix[i].resize(2+NDIM, 0.);
207 if (!Force.AddMatrix(std::string("MPQCJob total"), matrix, FragmentCounter))
208 return false;
209
210 return true;
211}
212/** Print MPQCData from received results.
213 *
214 * @param fragmentData MPQCData resulting from the jobs, each associated to a job
215 * @param KeySetFilename filename with keysets to associate forces correctly
216 * @param NoAtoms total number of atoms
217 * @param full_sample summed up charge density of electrons from fragments on return
218 * @param full_fragment summed up positions and charges of nuclei from fragments on return
219 */
220bool sumUpChargeDensity(
221 const std::map<JobId_t,MPQCData> &fragmentData,
222 const std::string &KeySetFilename,
223 std::vector<SamplingGrid> &full_sample,
224 Fragment &full_fragment)
225{
226 // create a vector of all job ids
227 std::vector<JobId_t> jobids;
228 std::transform(fragmentData.begin(),fragmentData.end(),
229 std::back_inserter(jobids),
230 boost::bind( &std::map<JobId_t,MPQCData>::value_type::first, boost::lambda::_1 )
231 );
232
233 // create lookup from job nr to fragment number
234 size_t FragmentCounter = 0;
235 const std::map< JobId_t, size_t > MatrixNrLookup =
236 createMatrixNrLookup(jobids, FragmentCounter);
237
238 // initialise keysets
239 KeySetsContainer KeySet;
240 {
241 // else needs keysets without hydrogens
242 std::stringstream filename;
243 filename << FRAGMENTPREFIX << KEYSETFILE;
244 if (!KeySet.ParseKeySets(KeySetFilename, filename.str(), FragmentCounter)) return false;
245 }
246
247 /// prepare for OrthogonalSummation
248
249 // convert KeySetContainer to IndexSetContainer
250 IndexSetContainer::ptr container(new IndexSetContainer(KeySet));
251 // create the map of all keysets
252 SubsetMap::ptr subsetmap(new SubsetMap(*container));
253
254 /// convert all MPQCData to MPQCDataMap_t
255 std::vector<MPQCDataGridMap_t> Result_Grid_fused(
256 OrthogonalSumUpPerLevel<MPQCDataGridMap_t, MPQCData, MPQCDataGridVector_t>(
257 fragmentData, MatrixNrLookup, container, subsetmap));
258 std::vector<MPQCDataFragmentMap_t> Result_Fragment_fused(
259 OrthogonalSumUpPerLevel<MPQCDataFragmentMap_t, MPQCData, MPQCDataFragmentVector_t>(
260 fragmentData, MatrixNrLookup, container, subsetmap));
261 // obtain full grid
262 full_sample.clear();
263 full_sample.reserve(Result_Grid_fused.size());
264 for (std::vector<MPQCDataGridMap_t>::const_iterator iter = ++Result_Grid_fused.begin();
265 iter !=Result_Grid_fused.end();
266 ++iter)
267 full_sample.push_back(boost::fusion::at_key<MPQCDataFused::sampled_grid>((*iter)));
268 full_fragment = boost::fusion::at_key<MPQCDataFused::fragment>(Result_Fragment_fused.back());
269
270 return true;
271}
272
273/** Print MPQCData from received results.
274 *
275 * @param fragmentData MPQCData resulting from the jobs, associated to job id
276 * @param KeySetFilename filename with keysets to associate forces correctly
277 * @param NoAtoms total number of atoms
278 * @param full_sample summed up charge from fragments on return
279 */
280bool printReceivedMPQCResults(
281 const std::map<JobId_t, MPQCData> &fragmentData,
282 const std::string &KeySetFilename,
283 size_t NoAtoms)
284{
285 // create a vector of all job ids
286 std::vector<JobId_t> jobids;
287 std::transform(fragmentData.begin(),fragmentData.end(),
288 std::back_inserter(jobids),
289 boost::bind( &std::map<JobId_t,MPQCData>::value_type::first, boost::lambda::_1 )
290 );
291
292 // create lookup from job nr to fragment number
293 size_t FragmentCounter = 0;
294 const std::map< JobId_t, size_t > MatrixNrLookup=
295 createMatrixNrLookup(jobids, FragmentCounter);
296
297
298 // place results into maps
299 EnergyMatrix Energy;
300 ForceMatrix Force;
301 if (!putResultsintoMatrices(fragmentData, MatrixNrLookup, FragmentCounter, NoAtoms, Energy, Force))
302 return false;
303
304 // initialise keysets
305 KeySetsContainer KeySet;
306 KeySetsContainer ForceKeySet;
307 if (!Energy.InitialiseIndices()) return false;
308
309 if (!Force.ParseIndices(KeySetFilename.c_str())) return false;
310
311 {
312 // else needs keysets without hydrogens
313 std::stringstream filename;
314 filename << FRAGMENTPREFIX << KEYSETFILE;
315 if (!KeySet.ParseKeySets(KeySetFilename, filename.str(), FragmentCounter)) return false;
316 }
317
318 {
319 // forces need keysets including hydrogens
320 std::stringstream filename;
321 filename << FRAGMENTPREFIX << FORCESFILE;
322 if (!ForceKeySet.ParseKeySets(KeySetFilename, filename.str(), FragmentCounter)) return false;
323 }
324
325 // combine all found data
326 if (!KeySet.ParseManyBodyTerms()) return false;
327
328 EnergyMatrix EnergyFragments;
329 ForceMatrix ForceFragments;
330 if (!EnergyFragments.AllocateMatrix(Energy.Header, Energy.MatrixCounter, Energy.RowCounter, Energy.ColumnCounter)) return false;
331 if (!ForceFragments.AllocateMatrix(Force.Header, Force.MatrixCounter, Force.RowCounter, Force.ColumnCounter)) return false;
332
333 if(!Energy.SetLastMatrix(0., 0)) return false;
334 if(!Force.SetLastMatrix(0., 2)) return false;
335
336 for (int BondOrder=0;BondOrder<KeySet.Order;BondOrder++) {
337 // --------- sum up energy --------------------
338 LOG(1, "INFO: Summing energy of order " << BondOrder+1 << " ...");
339 if (!EnergyFragments.SumSubManyBodyTerms(Energy, KeySet, BondOrder)) return false;
340 if (!Energy.SumSubEnergy(EnergyFragments, NULL, KeySet, BondOrder, 1.)) return false;
341
342 // --------- sum up Forces --------------------
343 LOG(1, "INFO: Summing forces of order " << BondOrder+1 << " ...");
344 if (!ForceFragments.SumSubManyBodyTerms(Force, KeySet, BondOrder)) return false;
345 if (!Force.SumSubForces(ForceFragments, KeySet, BondOrder, 1.)) return false;
346 }
347
348 // for debugging print resulting energy and forces
349 LOG(1, "INFO: Resulting energy is " << Energy.Matrix[ FragmentCounter ][0][0]);
350 std::stringstream output;
351 for (int i=0; i< Force.RowCounter[FragmentCounter]; ++i) {
352 for (int j=0; j< Force.ColumnCounter[FragmentCounter]; ++j)
353 output << Force.Matrix[ FragmentCounter ][i][j] << " ";
354 output << "\n";
355 }
356 LOG(1, "INFO: Resulting forces are " << std::endl << output.str());
357
358 return true;
359}
360
361/** Print MPQCData from received results.
362 *
363 * @param results summed up results container
364 */
365void printReceivedFullResults(
366 const FragmentationResults &results)
367{
368 // print tables (without eigenvalues, they go extra)
369typedef boost::mpl::remove<MPQCDataEnergyVector_t, MPQCDataFused::energy_eigenvalues>::type
370 MPQCDataEnergyVector_noeigenvalues_t;
371 const std::string energyresult =
372 writeTable<MPQCDataEnergyMap_t, MPQCDataEnergyVector_noeigenvalues_t >()(
373 results.Result_Energy_fused, results.getMaxLevel());
374 LOG(0, "Energy table is \n" << energyresult);
375
376 const std::string gridresult =
377 writeTable<VMGDataLongRangeMap_t, VMGDataLongRangeVector_t >()(
378 results.Result_LongRangeIntegrated_fused, results.getMaxLevel());
379 LOG(0, "LongRange table is \n" << gridresult);
380
381 const std::string eigenvalueresult;
382 LOG(0, "Eigenvalue table is \n" << eigenvalueresult);
383
384 const std::string forceresult =
385 writeTable<MPQCDataForceMap_t, MPQCDataForceVector_t>()(
386 results.Result_Force_fused, results.getMaxLevel());
387 LOG(0, "Force table is \n" << forceresult);
388 // we don't want to print grid to a table
389 // print times (without flops for now)
390 typedef boost::mpl::remove<
391 boost::mpl::remove<MPQCDataTimeVector_t, MPQCDataFused::times_total_flops>::type,
392 MPQCDataFused::times_gather_flops>::type
393 MPQCDataTimeVector_noflops_t;
394 const std::string timesresult =
395 writeTable<MPQCDataTimeMap_t, MPQCDataTimeVector_noflops_t >()(
396 results.Result_Time_fused, results.getMaxLevel());
397 LOG(0, "Times table is \n" << timesresult);
398}
399
400
401Action::state_ptr FragmentationFragmentationAutomationAction::performCall() {
402 boost::asio::io_service io_service;
403 MPQCFragmentController mpqccontroller(io_service);
404 mpqccontroller.setHost(params.host.get());
405 mpqccontroller.setPort(params.port.get());
406 mpqccontroller.setLevel(params.level.get());
407 VMGFragmentController vmgcontroller(io_service);
408 vmgcontroller.setHost(params.host.get());
409 vmgcontroller.setPort(params.port.get());
410 VMGDebugGridFragmentController debugcontroller(io_service);
411 debugcontroller.setHost(params.host.get());
412 debugcontroller.setPort(params.port.get());
413
414 // TODO: Have io_service run in second thread and merge with current again eventually
415
416 // Phase One: obtain ids
417 std::vector< boost::filesystem::path > jobfiles = params.jobfiles.get();
418 mpqccontroller.requestIds(jobfiles.size());
419
420 // Phase Two: create and add MPQCJobs
421 if (!mpqccontroller.addJobsFromFiles(params.executable.get().string(), jobfiles))
422 return Action::failure;
423
424 // Phase Three: calculate result
425 mpqccontroller.waitforResults(jobfiles.size());
426 std::map<JobId_t, MPQCData> fragmentData;
427 mpqccontroller.getResults(fragmentData);
428
429#ifdef HAVE_VMG
430 if (params.DoLongrange.get()) {
431 ASSERT( World::getInstance().getAllAtoms().size() != 0,
432 "FragmentationFragmentationAutomationAction::performCall() - please load the full molecule into the World before.");
433
434 // obtain combined charge density
435 LOG(1, "INFO: Parsing fragment files from " << params.path.get() << ".");
436 std::vector<SamplingGrid> full_sample; // have charges from level 2 onward summed up
437 Fragment full_fragment;
438 sumUpChargeDensity(
439 fragmentData,
440 params.path.get(),
441 full_sample,
442 full_fragment);
443
444 // Phase Four: obtain more ids
445 vmgcontroller.requestIds(fragmentData.size()+full_sample.size());
446
447 // Phase Five: create VMGJobs
448 const size_t near_field_cells = params.near_field_cells.get();
449 if (!vmgcontroller.createLongRangeJobs(fragmentData, full_sample, full_fragment, near_field_cells))
450 return Action::failure;
451
452 // Phase Six: calculate result
453 vmgcontroller.waitforResults(fragmentData.size()+full_sample.size());
454 std::map<JobId_t, VMGData> longrangeData;
455 vmgcontroller.getResults(longrangeData);
456 ASSERT( fragmentData.size()+full_sample.size() == longrangeData.size(),
457 "FragmentationFragmentationAutomationAction::performCall() - number of MPQCresults+"
458 +toString(full_sample.size())+" "+toString(fragmentData.size()+full_sample.size())
459 +" and VMGresults "+toString(longrangeData.size())+" don't match.");
460
461 // remove full solution corresponding to full_sample from map (must be highest ids), has to be treated extra
462 std::map<JobId_t, VMGData>::iterator iter = longrangeData.end();
463 for (size_t i=0;i<full_sample.size();++i)
464 --iter;
465 std::map<JobId_t, VMGData>::iterator remove_iter = iter;
466 std::vector<VMGData> fullsolutionData;
467 for (; iter != longrangeData.end(); ++iter)
468 fullsolutionData.push_back(iter->second);
469 longrangeData.erase(remove_iter, longrangeData.end());
470
471 // Final phase: sum up and print result
472 {
473 FragmentationResults results(
474 fragmentData,
475 longrangeData,
476 fullsolutionData,
477 params.path.get(),
478 getNoAtomsFromAdjacencyFile(params.path.get()),
479 full_sample);
480
481 LOG(1, "INFO: Parsing fragment files from " << params.path.get() << ".");
482 printReceivedFullResults(results);
483
484 if (!full_sample.empty()) {
485 // create debug jobs for each level to print the summed-up potential to vtk files
486 debugcontroller.requestIds(full_sample.size());
487 if (!debugcontroller.createDebugJobs(full_sample))
488 return Action::failure;
489 debugcontroller.waitforResults(full_sample.size());
490 std::map<JobId_t, std::string> debugData;
491 debugcontroller.getResults(debugData);
492 }
493 }
494 }
495#else
496 // Final phase: print result
497 {
498 LOG(1, "INFO: Parsing fragment files from " << params.path.get() << ".");
499 printReceivedMPQCResults(
500 fragmentData,
501 params.path.get(),
502 getNoAtomsFromAdjacencyFile(params.path.get()));
503 }
504#endif
505 size_t Exitflag = vmgcontroller.getExitflag() + mpqccontroller.getExitflag();
506
507 return (Exitflag == 0) ? Action::success : Action::failure;
508}
509
510Action::state_ptr FragmentationFragmentationAutomationAction::performUndo(Action::state_ptr _state) {
511 return Action::success;
512}
513
514Action::state_ptr FragmentationFragmentationAutomationAction::performRedo(Action::state_ptr _state){
515 return Action::success;
516}
517
518bool FragmentationFragmentationAutomationAction::canUndo() {
519 return false;
520}
521
522bool FragmentationFragmentationAutomationAction::shouldUndo() {
523 return false;
524}
525/** =========== end of function ====================== */
Note: See TracBrowser for help on using the repository browser.