Changeset 0ad4781


Ignore:
Timestamp:
Apr 23, 2021, 8:31:23 PM (5 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Candidate_v1.7.0, stable
Children:
addb51
Parents:
3f5b0a
git-author:
Frederik Heber <frederik.heber@…> (09/11/20 08:54:54)
git-committer:
Frederik Heber <frederik.heber@…> (04/23/21 20:31:23)
Message:

Added action to randomly select a set of atoms.

  • needed to make new action friend of RandomNumberDistributionFactory to allow setting of distribution parameters.
  • DOCU: added new selection action to userguide.
  • TESTS: added regression test cases, not working yet.
Files:
7 added
6 edited

Legend:

Unmodified
Added
Removed
  • doc/userguide/userguide.xml

    r3f5b0a r0ad4781  
    590590              </listitem>
    591591              <listitem>
     592                <para>By Random Number of Atoms (e.g., 5 random atoms) </para>
     593                <programlisting>
     594                ... --select-atom-by-random 5
     595                </programlisting>
     596              </listitem>
     597              <listitem>
    592598                <para id="selections.select-atom-inside-volume">By Shape (all
    593599                atoms inside the volume specified by the currently selected
  • src/Actions/GlobalListOfActions.hpp

    r3f5b0a r0ad4781  
    123123  (SelectionAtomByName) \
    124124  (SelectionAtomByOrder) \
     125  (SelectionAtomByRandom) \
    125126  (SelectionClearAllAtoms) \
    126127  (SelectionClearAllMolecules) \
  • src/Actions/Makefile.am

    r3f5b0a r0ad4781  
    471471  Actions/SelectionAction/Atoms/AtomByNameAction.cpp \
    472472  Actions/SelectionAction/Atoms/AtomByOrderAction.cpp \
     473  Actions/SelectionAction/Atoms/AtomByRandomAction.cpp \
    473474  Actions/SelectionAction/Atoms/ClearAllAtomsAction.cpp \
    474475  Actions/SelectionAction/Atoms/InvertAtomsAction.cpp \
     
    490491  Actions/SelectionAction/Atoms/AtomByNameAction.hpp \
    491492  Actions/SelectionAction/Atoms/AtomByOrderAction.hpp \
     493  Actions/SelectionAction/Atoms/AtomByRandomAction.hpp \
    492494  Actions/SelectionAction/Atoms/ClearAllAtomsAction.hpp \
    493495  Actions/SelectionAction/Atoms/InvertAtomsAction.hpp \
     
    509511  Actions/SelectionAction/Atoms/AtomByNameAction.def \
    510512  Actions/SelectionAction/Atoms/AtomByOrderAction.def \
     513  Actions/SelectionAction/Atoms/AtomByRandomAction.def \
    511514  Actions/SelectionAction/Atoms/ClearAllAtomsAction.def \
    512515  Actions/SelectionAction/Atoms/InvertAtomsAction.def \
  • src/RandomNumbers/RandomNumberDistributionFactory.hpp

    r3f5b0a r0ad4781  
    3232namespace MoleCuilder {
    3333  class CommandSetRandomNumbersDistributionAction;
     34  class SelectionAtomByRandomAction;
    3435}
    3536
     
    5152  friend class RandomNumberDistributionNameValidator;
    5253  friend class MoleCuilder::CommandSetRandomNumbersDistributionAction;
     54  friend class MoleCuilder::SelectionAtomByRandomAction;
    5355
    5456protected:
  • tests/regression/Makefile.am

    r3f5b0a r0ad4781  
    252252        $(srcdir)/Selection/Atoms/AtomByOrder/testsuite-selection-select-atom-by-order.at \
    253253        $(srcdir)/Selection/Atoms/AtomByOrder/testsuite-selection-unselect-atom-by-order.at \
     254        $(srcdir)/Selection/Atoms/AtomByRandom/testsuite-selection-select-atom-by-random.at \
    254255        $(srcdir)/Selection/Atoms/AtomsInsideCuboid/testsuite-selection-select-atoms-inside-cuboid.at \
    255256        $(srcdir)/Selection/Atoms/AtomsInsideCuboid/testsuite-selection-select-atoms-inside-cuboid-with-defaults.at \
  • tests/regression/Selection/Atoms/testsuite-selection-atoms.at

    r3f5b0a r0ad4781  
    4646m4_include(Selection/Atoms/AtomByOrder/testsuite-selection-unselect-atom-by-order.at)
    4747
     48# select atom by random number
     49m4_include(Selection/Atoms/AtomByRandom/testsuite-selection-select-atom-by-random.at)
     50
    4851# (un)select atoms inside cuboid
    4952m4_include(Selection/Atoms/AtomsInsideCuboid/testsuite-selection-select-atoms-inside-cuboid.at)
Note: See TracChangeset for help on using the changeset viewer.