- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/FragmentationAction/FragmentationAction.cpp
r112b09 r623e89 6 6 */ 7 7 8 #include "Helpers/MemDebug.hpp"9 10 8 #include "Actions/FragmentationAction/FragmentationAction.hpp" 11 #include "CommandLineParser.hpp"12 9 #include "atom.hpp" 13 10 #include "config.hpp" … … 27 24 #include "Actions/MapOfActions.hpp" 28 25 29 const char FragmentationFragmentationAction::NAME[] = " subspace-dissect";26 const char FragmentationFragmentationAction::NAME[] = "fragment-mol"; 30 27 31 28 FragmentationFragmentationAction::FragmentationFragmentationAction() : … … 38 35 Action::state_ptr FragmentationFragmentationAction::performCall() { 39 36 Dialog *dialog = UIFactory::getInstance().makeDialog(); 37 clock_t start,end; 38 molecule *mol = NULL; 39 double distance = -1.; 40 int order = 0; 41 config *configuration = World::getInstance().getConfig(); 42 int ExitFlag = 0; 40 43 41 dialog->queryEmpty(NAME, MapOfActions::getInstance().getDescription(NAME)); 44 cout << "pre-dialog"<< endl; 45 dialog->queryMolecule(NAME, &mol, MapOfActions::getInstance().getDescription(NAME)); 46 dialog->queryDouble("distance", &distance, MapOfActions::getInstance().getDescription("distance")); 47 dialog->queryInt("order", &order, MapOfActions::getInstance().getDescription("order")); 42 48 43 49 if(dialog->display()) { 50 cout << "POST-dialog"<< endl; 51 ASSERT(mol != NULL, "No molecule has been picked for fragmentation."); 52 DoLog(0) && (Log() << Verbose(0) << "Fragmenting molecule with bond distance " << distance << " angstroem, order of " << order << "." << endl); 53 DoLog(0) && (Log() << Verbose(0) << "Creating connection matrix..." << endl); 54 start = clock(); 55 mol->CreateAdjacencyList(distance, configuration->GetIsAngstroem(), &BondGraph::CovalentMinMaxDistance, NULL); 56 DoLog(0) && (Log() << Verbose(0) << "Fragmenting molecule with current connection matrix ..." << endl); 57 if (mol->hasBondStructure()) { 58 ExitFlag = mol->FragmentMolecule(order, configuration); 59 } 60 World::getInstance().setExitFlag(ExitFlag); 61 end = clock(); 62 DoLog(0) && (Log() << Verbose(0) << "Clocks for this operation: " << (end-start) << ", time: " << ((double)(end-start)/CLOCKS_PER_SEC) << "s." << endl); 44 63 delete dialog; 45 64 return Action::success;
Note:
See TracChangeset
for help on using the changeset viewer.