Changeset 77b2d7 for src


Ignore:
Timestamp:
Jun 11, 2010, 3:21:51 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:
aacce8
Parents:
e2b47c
Message:

Cases 't' and 'T' are now handled by CommandLineUI.

  • TESTFIX: both cases have "--molecule-by-id 0 --periodic 0/1" added.
  • ParseCommandLineOptions()- case 'T' removed as is handled by --periodic switch.
  • added missing Action instantiation to CommandLineWindow::populateMoleculeActions().
Location:
src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/MapOfActions.cpp

    re2b47c r77b2d7  
    268268//      generic.insert("subspace-dissect");
    269269  generic.insert("suspend-in-water");
    270 //  generic.insert("translate-mol");
     270  generic.insert("translate-mol");
    271271        generic.insert("verbose");
    272272//  generic.insert("verlet-integrate");
  • src/Actions/MoleculeAction/TranslateAction.cpp

    re2b47c r77b2d7  
    5656  dialog->queryMolecule("molecule-by-id", &mol, MapOfActions::getInstance().getDescription("molecule-by-id"));
    5757  dialog->queryBoolean("periodic", &periodic, MapOfActions::getInstance().getDescription("periodic"));
     58  cout << "pre-dialog" << endl;
    5859
    5960  if(dialog->display()) {
     61    cout << "post-dialog" << endl;
    6062    DoLog(1) && (Log() << Verbose(1) << "Translating all ions by given vector." << endl);
    6163    if (periodic)
  • src/UIElements/CommandLineUI/CommandLineWindow.cpp

    re2b47c r77b2d7  
    3434#include "Actions/MoleculeAction/SaveBondsAction.hpp"
    3535#include "Actions/MoleculeAction/SaveTemperatureAction.hpp"
     36#include "Actions/MoleculeAction/TranslateAction.hpp"
    3637#include "Actions/MoleculeAction/VerletIntegrationAction.hpp"
    3738#include "Actions/ParserAction/LoadXyzAction.hpp"
     
    126127  new MoleculeSaveBondsAction();
    127128  new MoleculeSaveTemperatureAction();
     129  new MoleculeTranslateAction();
    128130  new MoleculeVerletIntegrationAction();
    129131}
  • src/builder.cpp

    re2b47c r77b2d7  
    20162016            case 't':
    20172017              if (ExitFlag == 0) ExitFlag = 1;
    2018               if ((argptr+2 >= argc) || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) ) {
     2018              if ((argptr+4 >= argc) || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) ) {
    20192019                ExitFlag = 255;
    2020                 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for translation: -t <x> <y> <z>" << endl);
     2020                DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for translation: -t <x> <y> <z> --molecule-by-id <molecule_id> --periodic <0/1>" << endl);
    20212021                performCriticalExit();
    20222022              } else {
    2023                 if (ExitFlag == 0) ExitFlag = 1;
    2024                 SaveFlag = true;
    2025                 DoLog(1) && (Log() << Verbose(1) << "Translating all ions by given vector." << endl);
    2026                 for (int i=NDIM;i--;)
    2027                   x[i] = atof(argv[argptr+i]);
    2028                 mol->Translate((const Vector *)&x);
    2029                 argptr+=3;
    2030               }
    2031               break;
    2032             case 'T':
    2033               if (ExitFlag == 0) ExitFlag = 1;
    2034               if ((argptr+2 >= argc) || (!IsValidNumber(argv[argptr])) || (!IsValidNumber(argv[argptr+1])) || (!IsValidNumber(argv[argptr+2])) ) {
    2035                 ExitFlag = 255;
    2036                 DoeLog(0) && (eLog()<< Verbose(0) << "Not enough or invalid arguments given for periodic translation: -T <x> <y> <z>" << endl);
    2037                 performCriticalExit();
    2038               } else {
    2039                 if (ExitFlag == 0) ExitFlag = 1;
    2040                 SaveFlag = true;
    2041                 DoLog(1) && (Log() << Verbose(1) << "Translating all ions periodically by given vector." << endl);
    2042                 for (int i=NDIM;i--;)
    2043                   x[i] = atof(argv[argptr+i]);
    2044                 mol->TranslatePeriodically((const Vector *)&x);
    2045                 argptr+=3;
     2023                ArgcList.insert(argptr-1);
     2024                ArgcList.insert(argptr);
     2025                ArgcList.insert(argptr+1);
     2026                ArgcList.insert(argptr+2);
     2027                ArgcList.insert(argptr+3);
     2028                ArgcList.insert(argptr+4);
     2029                ArgcList.insert(argptr+5);
     2030                ArgcList.insert(argptr+6);
     2031                argptr+=7;
    20462032              }
    20472033              break;
Note: See TracChangeset for help on using the changeset viewer.