Changeset 34c338


Ignore:
Timestamp:
Aug 9, 2010, 2:13: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:
22c44bf
Parents:
75a80f
Message:

Changed TranslateAction from acting on molecules to acting on selected atoms.

  • removed periodic from TranslateAction, this will be replaced by another action (enforce-boundary-conditions or something like that)
Files:
1 added
1 deleted
3 edited
1 moved

Legend:

Unmodified
Added
Removed
  • src/Actions/AtomAction/TranslateAction.hpp

    r75a80f r34c338  
    1414class MoleculeListClass;
    1515
    16 void MoleculeTranslate(Vector &x, bool periodic);
     16void AtomTranslate(Vector &x, bool periodic);
    1717
    18 class MoleculeTranslateAction : public Action {
    19   friend void MoleculeTranslate(Vector &x, bool periodic);
     18class AtomTranslateAction : public Action {
     19  friend void AtomTranslate(Vector &x);
    2020
    2121public:
    22   MoleculeTranslateAction();
    23   virtual ~MoleculeTranslateAction();
     22  AtomTranslateAction();
     23  virtual ~AtomTranslateAction();
    2424
    2525  bool canUndo();
  • src/Actions/Makefile.am

    r75a80f r34c338  
    5050  AtomAction/AddAction.cpp \
    5151  AtomAction/ChangeElementAction.cpp \
    52   AtomAction/RemoveAction.cpp
     52  AtomAction/RemoveAction.cpp \
     53  AtomAction/TranslateAction.cpp
    5354ATOMACTIONHEADER = \
    5455  AtomAction/AddAction.hpp \
    5556  AtomAction/ChangeElementAction.hpp \
    56   AtomAction/RemoveAction.cpp
     57  AtomAction/RemoveAction.cpp \
     58  AtomAction/TranslateAction.hpp
    5759
    5860CMDACTIONSOURCE = \
     
    9294  MoleculeAction/SaveTemperatureAction.cpp \
    9395  MoleculeAction/SuspendInWaterAction.cpp \
    94   MoleculeAction/TranslateAction.cpp \
    9596  MoleculeAction/VerletIntegrationAction.cpp
    9697MOLECULEACTIONHEADER = \
     
    106107  MoleculeAction/SaveTemperatureAction.hpp \
    107108  MoleculeAction/SuspendInWaterAction.hpp \
    108   MoleculeAction/TranslateAction.hpp \
    109109  MoleculeAction/VerletIntegrationAction.hpp
    110110                 
  • src/Actions/MapOfActions.cpp

    r75a80f r34c338  
    4242#include "Actions/AtomAction/ChangeElementAction.hpp"
    4343#include "Actions/AtomAction/RemoveAction.hpp"
     44#include "Actions/AtomAction/TranslateAction.hpp"
    4445#include "Actions/CmdAction/BondLengthTableAction.hpp"
    4546#include "Actions/CmdAction/ElementDbAction.hpp"
     
    6263#include "Actions/MoleculeAction/SaveTemperatureAction.hpp"
    6364#include "Actions/MoleculeAction/SuspendInWaterAction.hpp"
    64 #include "Actions/MoleculeAction/TranslateAction.hpp"
    6565#include "Actions/MoleculeAction/VerletIntegrationAction.hpp"
    6666#include "Actions/ParserAction/LoadXyzAction.hpp"
     
    232232  DescriptionMap["surface-correlation"] = "pair correlation analysis between element and surface";
    233233  DescriptionMap["suspend-in-water"] = "suspend the given molecule in water such that in the domain the mean density is as specified";
    234   DescriptionMap["translate-mol"] = "translate molecule by given vector";
     234  DescriptionMap["translate-atoms"] = "translate all selected atoms by given vector";
    235235  DescriptionMap["unselect-all-atoms"] = "unselect all atoms";
    236236  DescriptionMap["unselect-all-molecules"] = "unselect all molecules";
     
    302302  ShortFormMap["subgraph-dissect"] = "I";
    303303  ShortFormMap["suspend-in-water"] = "u";
    304   ShortFormMap["translate-mol"] = "t";
     304  ShortFormMap["translate-atoms"] = "t";
    305305  ShortFormMap["verbose"] = "v";
    306306  ShortFormMap["verlet-integrate"] = "P";
     
    355355  TypeMap["surface-correlation"] = &typeid(void);
    356356  TypeMap["suspend-in-water"] = &typeid(double);
    357   TypeMap["translate-mol"] = &typeid(VectorValue);
     357  TypeMap["translate-atoms"] = &typeid(VectorValue);
    358358  TypeMap["unselect-all-atoms"] = &typeid(void);
    359359  TypeMap["unselect-all-molecules"] = &typeid(void);
     
    432432  MenuContainsActionMap.insert( pair<std::string, std::string> ("atom", "change-element") );
    433433  MenuContainsActionMap.insert( pair<std::string, std::string> ("atom", "remove-atom") );
     434  MenuContainsActionMap.insert( pair<std::string, std::string> ("atom", "translate-atoms") );
    434435
    435436  MenuContainsActionMap.insert( pair<std::string, std::string> ("command", "bond-table") );
     
    454455  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "save-temperature") );
    455456  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "suspend-in-water") );
    456   MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "translate-mol") );
    457457  MenuContainsActionMap.insert( pair<std::string, std::string> ("molecule", "verlet-integrate") );
    458458
     
    543543  generic.insert("surface-correlation");
    544544  generic.insert("suspend-in-water");
    545   generic.insert("translate-mol");
     545  generic.insert("translate-atoms");
    546546  generic.insert("unselect-all-atoms");
    547547  generic.insert("unselect-all-molecules");
     
    835835  new AtomChangeElementAction();
    836836  new AtomRemoveAction();
     837  new AtomTranslateAction();
    837838
    838839  new CommandLineBondLengthTableAction();
     
    858859  new MoleculeSaveTemperatureAction();
    859860  new MoleculeSuspendInWaterAction();
    860   new MoleculeTranslateAction();
    861861  new MoleculeVerletIntegrationAction();
    862862
  • tests/regression/testsuite-molecules.at

    r75a80f r34c338  
    4545AT_KEYWORDS([Molecules])
    4646AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/6/pre/test.* .], 0)
    47 AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ --select-molecule-by-id 0 -t "1., 1., 1." --periodic 0], 0, [stdout], [stderr])
     47AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ --select-molecules-atoms 0 -t "1., 1., 1." --periodic 0], 0, [stdout], [stderr])
    4848AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/6/post/$file], 0, [ignore], [ignore])
    4949AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/6/pre/test2.* .], 0)
    50 AT_CHECK([../../molecuilder -i test2.conf -e ${abs_top_srcdir}/src/ --select-molecule-by-id 0 -t "-1., -1., -1." --periodic 0], 0, [stdout], [stderr])
     50AT_CHECK([../../molecuilder -i test2.conf -e ${abs_top_srcdir}/src/ --select-molecules-atoms 0 -t "-1., -1., -1." --periodic 0], 0, [stdout], [stderr])
    5151AT_CHECK([file=test2.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/6/post/$file], 0, [ignore], [ignore])
    52 AT_CLEANUP
    53 
    54 # 7. Periodic translation
    55 AT_SETUP([Molecules - Periodic translation])
    56 AT_KEYWORDS([Molecules])
    57 AT_CHECK([/bin/cp -f ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/7/pre/test.* .], 0)
    58 AT_CHECK([../../molecuilder -i test.conf -e ${abs_top_srcdir}/src/ --select-molecule-by-id 0 -t "12., 12., 12." --periodic 1], 0, [stdout], [stderr])
    59 AT_CHECK([file=test.conf; diff $file ${abs_top_srcdir}/${AUTOTEST_PATH}/Molecules/7/post/$file], 0, [ignore], [ignore])
    6052AT_CLEANUP
    6153
Note: See TracChangeset for help on using the changeset viewer.