Changeset e4b5de for src/Actions
- Timestamp:
- Jun 8, 2010, 1:49:27 PM (15 years ago)
- Branches:
- 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
- Children:
- 8540f0
- Parents:
- 48ab70a
- Location:
- src/Actions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/FragmentationAction/FragmentationAction.cpp
r48ab70a re4b5de 25 25 #include "Actions/MapOfActions.hpp" 26 26 27 const char FragmentationFragmentationAction::NAME[] = " subspace-dissect";27 const char FragmentationFragmentationAction::NAME[] = "fragment-mol"; 28 28 29 29 FragmentationFragmentationAction::FragmentationFragmentationAction() : … … 36 36 Action::state_ptr FragmentationFragmentationAction::performCall() { 37 37 Dialog *dialog = UIFactory::getInstance().makeDialog(); 38 clock_t start,end; 39 molecule *mol = NULL; 40 double distance = -1.; 41 int order = 0; 42 config *configuration = World::getInstance().getConfig(); 43 int ExitFlag = 0; 38 44 39 dialog->queryEmpty(NAME, MapOfActions::getInstance().getDescription(NAME)); 45 cout << "pre-dialog"<< endl; 46 dialog->queryMolecule(NAME, &mol, MapOfActions::getInstance().getDescription(NAME)); 47 dialog->queryDouble("distance", &distance, MapOfActions::getInstance().getDescription("distance")); 48 dialog->queryInt("order", &order, MapOfActions::getInstance().getDescription("order")); 40 49 41 50 if(dialog->display()) { 51 cout << "POST-dialog"<< endl; 52 ASSERT(mol != NULL, "No molecule has been picked for fragmentation."); 53 DoLog(0) && (Log() << Verbose(0) << "Fragmenting molecule with bond distance " << distance << " angstroem, order of " << order << "." << endl); 54 DoLog(0) && (Log() << Verbose(0) << "Creating connection matrix..." << endl); 55 start = clock(); 56 mol->CreateAdjacencyList(distance, configuration->GetIsAngstroem(), &BondGraph::CovalentMinMaxDistance, NULL); 57 DoLog(0) && (Log() << Verbose(0) << "Fragmenting molecule with current connection matrix ..." << endl); 58 if (mol->hasBondStructure()) { 59 ExitFlag = mol->FragmentMolecule(order, configuration); 60 } 61 World::getInstance().setExitFlag(ExitFlag); 62 end = clock(); 63 DoLog(0) && (Log() << Verbose(0) << "Clocks for this operation: " << (end-start) << ", time: " << ((double)(end-start)/CLOCKS_PER_SEC) << "s." << endl); 42 64 delete dialog; 43 65 return Action::success; -
src/Actions/MapOfActions.cpp
r48ab70a re4b5de 120 120 DescriptionMap["MaxDistance"] = "maximum distance in space"; 121 121 DescriptionMap["molecule-by-id"] = "index of a molecule"; 122 DescriptionMap["order"] = "order of a discretization, dissection, ..."; 122 123 DescriptionMap["output-file"] = "name of the output file"; 123 124 DescriptionMap["periodic"] = "system is constraint to periodic boundary conditions (y/n)"; … … 216 217 TypeMap["MaxDistance"] = Double; 217 218 TypeMap["molecule-by-id"] = Molecule; 219 TypeMap["order"] = Integer; 218 220 TypeMap["output-file"] = String; 219 221 TypeMap["periodic"] = Boolean; … … 241 243 // generic.insert("fastparsing"); 242 244 generic.insert("fill-molecule"); 243 //generic.insert("fragment-mol");245 generic.insert("fragment-mol"); 244 246 generic.insert("help"); 245 247 // generic.insert("linear-interpolate"); … … 285 287 286 288 // hidden arguments 287 // generic.insert("distance"); 288 generic.insert("DoRotate"); 289 generic.insert("distances"); 290 generic.insert("lengths"); 291 generic.insert("MaxDistance"); 292 generic.insert("molecule-by-id"); 289 generic.insert("distance"); 290 generic.insert("DoRotate"); 291 generic.insert("distances"); 292 generic.insert("lengths"); 293 generic.insert("MaxDistance"); 294 generic.insert("molecule-by-id"); 295 generic.insert("order"); 293 296 } 294 297
Note:
See TracChangeset
for help on using the changeset viewer.