Changeset e4b5de for src/Actions


Ignore:
Timestamp:
Jun 8, 2010, 1:49:27 PM (15 years ago)
Author:
Frederik Heber <heber@…>
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
Message:

Case 'f' is now handled by CommandLineUI.

  • FragmentationFragmentationAction::handle() has not been implemented, copied from ParseCommandLineOptions()
  • FIX: FragmentationFragmentationAction had wrong NAME.
  • World has new ExitFlag variable and getter and setter functions.
  • TESTFIX: Fragmentation/3 does not copy all BondFragment* files from pre but runs Fragmentation twice and tests the ExitFlag. This makes the test more independent and closer to what it's suppose to test (i.e. iterative fragmentation with increasing order).
  • TESTFIX: removed all Fragmentation/3/pre/BondFragment* files
  • FIX: CommandLineWindow::populateFragmentationActions() was missing two of its three actions still.
Location:
src/Actions
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/FragmentationAction/FragmentationAction.cpp

    r48ab70a re4b5de  
    2525#include "Actions/MapOfActions.hpp"
    2626
    27 const char FragmentationFragmentationAction::NAME[] = "subspace-dissect";
     27const char FragmentationFragmentationAction::NAME[] = "fragment-mol";
    2828
    2929FragmentationFragmentationAction::FragmentationFragmentationAction() :
     
    3636Action::state_ptr FragmentationFragmentationAction::performCall() {
    3737  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;
    3844
    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"));
    4049
    4150  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);
    4264    delete dialog;
    4365    return Action::success;
  • src/Actions/MapOfActions.cpp

    r48ab70a re4b5de  
    120120  DescriptionMap["MaxDistance"] = "maximum distance in space";
    121121  DescriptionMap["molecule-by-id"] = "index of a molecule";
     122  DescriptionMap["order"] = "order of a discretization, dissection, ...";
    122123  DescriptionMap["output-file"] = "name of the output file";
    123124  DescriptionMap["periodic"] = "system is constraint to periodic boundary conditions (y/n)";
     
    216217  TypeMap["MaxDistance"] = Double;
    217218  TypeMap["molecule-by-id"] = Molecule;
     219  TypeMap["order"] = Integer;
    218220  TypeMap["output-file"] = String;
    219221  TypeMap["periodic"] = Boolean;
     
    241243//      generic.insert("fastparsing");
    242244  generic.insert("fill-molecule");
    243 //  generic.insert("fragment-mol");
     245  generic.insert("fragment-mol");
    244246  generic.insert("help");
    245247//      generic.insert("linear-interpolate");
     
    285287
    286288    // 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");
    293296}
    294297
Note: See TracChangeset for help on using the changeset viewer.