Changeset 987145


Ignore:
Timestamp:
Jun 19, 2017, 8:24:16 AM (8 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_SelectAtomByNameAction, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_StructOpt_integration_tests, AutomationFragmentation_failures, Candidate_v1.6.1, ChangeBugEmailaddress, ChemicalSpaceEvaluator, EmpiricalPotential_contain_HomologyGraph_documentation, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, Fix_Verbose_Codepatterns, ForceAnnealing_oldresults, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, GeometryObjects, Gui_displays_atomic_force_velocity, IndependentFragmentGrids_IntegrationTest, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, StoppableMakroAction, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps
Children:
467b2b
Parents:
97c364
git-author:
Frederik Heber <heber@…> (03/28/17 09:33:11)
git-committer:
Frederik Heber <frederik.heber@…> (06/19/17 08:24:16)
Message:

Added four GeometryActions to convert atom positions into vectors.

  • added reverse switch to distance and plane to vector Actions.
  • InputToVector has coordinates to differentiate from position option. This eases use with CommandLineParser where option names need to be unique.
Files:
12 added
7 edited

Legend:

Unmodified
Added
Removed
  • doc/userguide/userguide.xml

    r97c364 r987145  
    100100            spheres, cubes, or cylinders.</para>
    101101          </listitem>
    102           <listitem>World refers to the whole of the molecular system, i.e. all atoms with coordinates and element type (over all time steps), all bonds between pairs of atoms, the size of the simulation domain. This state is also referred to as the state.</listitem>
    103           <listitem>Time step is the current discrete position in time. Molecular dynamics simulations are executed in discrete (but very small) time steps. Each atom has a distinct position per time step. The discrete positions over the discrete time steps samples its trajectory during a simulation.</listitem>
     102          <listitem>World refers to the whole of the molecular system, i.e. all
     103          atoms with coordinates and element type (over all time steps), all
     104          bonds between pairs of atoms, the size of the simulation domain.
     105          This is also referred to as the state.</listitem>
     106          <listitem>Time step is the current discrete position in time. Molecular
     107          dynamics simulations are executed in discrete (but very small) time
     108          steps.  Each atom has a distinct position per time step. The discrete
     109          positions over the discrete time steps samples its trajectory during a
     110          simulation.</listitem>
    104111        </itemizedlist>
    105112      </section>
     
    110117        respect to their functionality, while newer features or actions are
    111118        probably missing. This should be a clear sign to you that these are
    112         probably not safe to use yet. If you nonetheless require them, you         should acquire some familiarity with the code itself. This suggests
    113         changing to the developer documentation which is maintained along with
    114         the source code with <productname>doxygen</productname>.</para>
     119        probably not safe to use yet. If you nonetheless require them, you
     120        should acquire some familiarity with the code itself. This suggests
     121        changing to the developer documentation which is maintained along
     122        with the source code with <productname>doxygen</productname>.
     123        </para>
    115124      </section>
    116125    </section>
     
    313322      </formalpara>
    314323      <note>
    315         <para>Note further that when placing a slew of commands in a script file it is generally recommended to use the above formatting: One command or option per line and each</para>
    316         <para>option receives an extra tab for indentation.</para>
     324        <para>Note further that when placing a slew of commands in a script file
     325         it is generally recommended to use the above formatting: One command
     326         or option per line and each receives an extra tab for indentation.</para>
    317327      </note>
    318328      <section xml:id="preliminaries">
     
    726736          <para>This translates all selected shapes by 5 along the x
    727737          axis.</para>
     738        </section>
     739      </section>
     740      <section xml:id="geometry">
     741        <title xml:id="geometry.title">Geometry Objects</title>
     742        <para>Although we use the term geometry objects in the title, we
     743        actually mean vectors, i.e. a position or direction in the
     744        three-dimensional space. But maybe we have need for the more
     745        general term in the future.</para>
     746        <para>Vectors are required as input to many of the Actions further
     747        below: translating atoms, rotating atoms around a specific axis,
     748        aligning a molecule with a vector, ...</para>
     749        <para>Therefore, vectors can be stored and referenced using a given
     750        name. This allows for a very powerful and handy manipulation of the
     751       molecular system afterwards. And to give a concrete example, let's have
     752       a look at translating a set of selected atoms. </para>
     753       <programlisting>
     754... --translate-atoms &quot;unitVectorX&quot;
     755       </programlisting>
     756       <para>This would use the automatically created reference
     757       &quot;unitVectorX&quot;, i.e. the vector with components (1,0,0) as
     758       the translation vector for the given set of atoms. In other words, all
     759       selected atoms get shifted by 1 unit (e.g. Angstr&ouml;m) in +X
     760       direction.</para>
     761       <para>We have the following automatically created geometry objects
     762       whose names are self-explanatory:</para>
     763       <itemizedlist>
     764        <listitem>zeroVector</listitem>
     765        <listitem>unitVectorX</listitem>
     766        <listitem>unitVectorY</listitem>
     767        <listitem>unitVectorZ</listitem>
     768       </itemizedlist>
     769       <para>However, more vectors can be simply constructed from atomic
     770       positions, such as the position of an atom directly, the distance between
     771       two atoms (in case they are bonded, then this would be the bond vector)
     772       or from three atoms, defining a plane and giving its normal vector.
     773       </para>
     774       <remark>We have refrained from giving automated names to vectors and even
     775       keeping them up-to-date automatically, i.e. the distance between two atoms
     776       O1 and O2 could be named &quot;distance_O1_O2&quot; or similar. However, we want
     777       the user to have full control and maybe come up with more suitable names
     778       such as &quot;rotation_axis&quot; in this case.</remark>
     779       <warning>Note that names have to be unique and the Action will fail if
     780       the name is already used.</warning>
     781        <section xml:id="geometry.distance-to.vector">
     782          <title xml:id="geometry.distance-to-vector.title">Atomic distance to stored vector</title>
     783          <para>The distance between two selected atoms is stored as a vector as follows,</para>
     784          <programlisting>
     785  ... --distance-to-vector &quot;distance_vec&quot; \
     786          </programlisting>
     787          <para>where the distance vector can be referenced by &quot;distance_vec&quot;
     788          from then on in other Actions requiring a vector as input.</para>
     789        </section>
     790        <section xml:id="geometry.input-to.vector">
     791          <title xml:id="geometry.input-to-vector.title">Coordinates to stored vector</title>
     792          <para>We may also create a geometry vector simply by supplying the
     793          three coordinates of a vector.</para>
     794          <programlisting>
     795  ... --input-to-vector &quot;vector&quot; \
     796      --position &quot;1,2,3&quot;
     797          </programlisting>
     798          <para>where the vector with components (1,2,3) can be referenced
     799          by &quot;vector&quot; .</para>
     800        </section>
     801        <section xml:id="geometry.plane-to.vector">
     802          <title xml:id="geometry.plane-to-vector.title">Normal of plane to stored vector</title>
     803          <para>Three positions in space (if they are not linear dependent)
     804          define a plane in three-dimensional space.</para>
     805          <para>Therefore, when exactly three atoms are selected, this Action
     806          will construct the resulting plane and store its normal vector as a
     807          geometry object for later reference.</para>
     808          <programlisting>
     809  ... --plane-to-vector &quot;planenormal&quot; \
     810          </programlisting>
     811          <para>where the plane's normal vector can be referenced by
     812          &quot;planenormal&quot;.</para>
     813        </section>
     814        <section xml:id="geometry.position-to.vector">
     815          <title xml:id="geometry.position-to-vector.title">Atomic position to stored vector</title>
     816          <para>Storing the position of a singly selected atom as a vector is simply done as follows,</para>
     817          <programlisting>
     818  ... --position-to-vector &quot;vector_O1&quot; \
     819          </programlisting>
     820          <para>where the vector can be referenced by &quot;vector_O1&quot;
     821          from then on.</para>
    728822        </section>
    729823      </section>
  • src/Actions/GlobalListOfActions.hpp

    r97c364 r987145  
    6969  (FragmentationStoreSaturatedFragment) \
    7070  (FragmentationStructuralOptimization) \
     71  (GeometryDistanceToVector) \
     72  (GeometryInputToVector) \
     73  (GeometryPlaneToVector) \
     74  (GeometryPositionToVector) \
    7175  (GraphUpdateMolecules) \
    7276  (GraphCorrectBondDegree) \
  • src/Actions/Makefile.am

    r97c364 r987145  
    6464  ${FILLACTIONSOURCE} \
    6565  ${FRAGMENTATIONACTIONSOURCE} \
     66  ${GEOMETRYACTIONSOURCE} \
    6667  ${GRAPHACTIONSOURCE} \
    6768  ${MOLECULEACTIONSOURCE} \
     
    8485  ${FILLACTIONHEADER} \
    8586  ${FRAGMENTATIONACTIONHEADER} \
     87  ${GEOMETRYACTIONHEADER} \
    8688  ${GRAPHACTIONHEADER} \
    8789  ${MOLECULEACTIONHEADER} \
     
    104106  ${FILLACTIONDEFS} \
    105107  ${FRAGMENTATIONACTIONDEFS} \
     108  ${GEOMETRYACTIONDEFS} \
    106109  ${GRAPHACTIONDEFS} \
    107110  ${MOLECULEACTIONDEFS} \
     
    285288  Actions/FragmentationAction/StoreSaturatedFragmentAction.def \
    286289  Actions/FragmentationAction/StructuralOptimizationAction.def
     290
     291GEOMETRYACTIONSOURCE = \
     292        Actions/GeometryAction/GeometryDistanceToVectorAction.cpp \
     293        Actions/GeometryAction/GeometryInputToVectorAction.cpp \
     294        Actions/GeometryAction/GeometryPlaneToVectorAction.cpp \
     295        Actions/GeometryAction/GeometryPositionToVectorAction.cpp
     296GEOMETRYACTIONHEADER = \
     297        Actions/GeometryAction/GeometryDistanceToVectorAction.hpp \
     298        Actions/GeometryAction/GeometryInputToVectorAction.hpp \
     299        Actions/GeometryAction/GeometryPlaneToVectorAction.hpp \
     300        Actions/GeometryAction/GeometryPositionToVectorAction.hpp
     301GEOMETRYACTIONDEFS = \
     302        Actions/GeometryAction/GeometryDistanceToVectorAction.def \
     303        Actions/GeometryAction/GeometryInputToVectorAction.def \
     304        Actions/GeometryAction/GeometryPlaneToVectorAction.def \
     305        Actions/GeometryAction/GeometryPositionToVectorAction.def
    287306
    288307GRAPHACTIONSOURCE = \
  • src/UIElements/CommandLineUI/CommandLineParser.cpp

    r97c364 r987145  
    7272  shape("shape options"),
    7373  fragmentation("Fragmentation options"),
     74  geometry("Geometry options"),
    7475  graph("Graph options"),
    7576  molecule("Molecule options"),
     
    9091  CmdParserLookup["shape"] = &shape;
    9192  CmdParserLookup["fragmentation"] = &fragmentation;
     93  CmdParserLookup["geometry"] = &geometry;
    9294  CmdParserLookup["graph"] = &graph;
    9395  CmdParserLookup["options"] = &options;
  • src/UIElements/CommandLineUI/CommandLineParser.hpp

    r97c364 r987145  
    6262  po::options_description shape;
    6363  po::options_description fragmentation;
     64  po::options_description geometry;
    6465  po::options_description graph;
    6566  po::options_description molecule;
  • src/UIElements/Menu/MenuDescription.cpp

    r97c364 r987145  
    6161  // put each menu into its place, "" means top level
    6262  MenuPositionMap->insert(std::make_pair("analysis",TopPosition("tools",1)));
    63   MenuPositionMap->insert(std::make_pair("atom",TopPosition("edit",1)));
    64   MenuPositionMap->insert(std::make_pair("bond",TopPosition("edit",2)));
     63  MenuPositionMap->insert(std::make_pair("atom",TopPosition("edit",2)));
     64  MenuPositionMap->insert(std::make_pair("bond",TopPosition("edit",3)));
    6565  MenuPositionMap->insert(std::make_pair("command",TopPosition("",3)));
    6666  MenuPositionMap->insert(std::make_pair("edit",TopPosition("",2)));
    6767  MenuPositionMap->insert(std::make_pair("fill",TopPosition("tools",5)));
    6868  MenuPositionMap->insert(std::make_pair("fragmentation",TopPosition("tools",3)));
     69  MenuPositionMap->insert(std::make_pair("geometry",TopPosition("edit",5)));
    6970  MenuPositionMap->insert(std::make_pair("graph",TopPosition("tools",4)));
    70   MenuPositionMap->insert(std::make_pair("molecule",TopPosition("edit",3)));
     71  MenuPositionMap->insert(std::make_pair("molecule",TopPosition("edit",4)));
    7172  MenuPositionMap->insert(std::make_pair("potential",TopPosition("tools",7)));
    72   MenuPositionMap->insert(std::make_pair("parser",TopPosition("edit",4)));
    73   MenuPositionMap->insert(std::make_pair("selection",TopPosition("edit",5)));
     73  MenuPositionMap->insert(std::make_pair("parser",TopPosition("edit",6)));
     74  MenuPositionMap->insert(std::make_pair("selection",TopPosition("edit",1)));
    7475  MenuPositionMap->insert(std::make_pair("tesselation",TopPosition("tools",2)));
    7576  MenuPositionMap->insert(std::make_pair("shape",TopPosition("tools",6)));
     
    8586  MenuDescriptionsMap->insert(std::make_pair("fill","Fill"));
    8687  MenuDescriptionsMap->insert(std::make_pair("fragmentation","Fragmentation"));
     88  MenuDescriptionsMap->insert(std::make_pair("geometry","Geometry"));
    8789  MenuDescriptionsMap->insert(std::make_pair("graph","Graph"));
    8890  MenuDescriptionsMap->insert(std::make_pair("molecule","Parse files into system"));
     
    103105  MenuNameMap->insert(std::make_pair("fill","Fill"));
    104106  MenuNameMap->insert(std::make_pair("fragmentation","Fragmentation"));
     107  MenuNameMap->insert(std::make_pair("geometry","Geometry"));
    105108  MenuNameMap->insert(std::make_pair("graph","Graph"));
    106109  MenuNameMap->insert(std::make_pair("molecule","Molecules"));
  • tests/Python/AllActions/options.dat

    r97c364 r987145  
    4444convex-envelope "50."
    4545convex-file     "convexfile"
     46coordinates     "1,0,0"
    4647copy-molecule   "0"
    4748count   "12"
     
    5859distance-to-molecule    "1.5"
    5960distance-to-molecule    "2.1"
     61distance-to-vector      "named_vector"
    6062domain-position "0.  0. 0."
    6163domain-position "0 0 0"
     
    9294id-mapping      "1"
    9395input   "test.data"
     96input-to-vector "named_vector"
    9497inter-order     "2"
    9598interpolation-degree    "5"
     
    141144periodic        "0"
    142145plane-offset    "5."
     146plane-to-vector "named_vector"
    143147position        "0 0 0"
    144148position        "0 0 1"
     
    150154position        "7.283585982 3.275186040 3.535886037"
    151155position        "9.78 2.64 2.64"
     156position-to-vector      "named_vector"
    152157potential-charges       "1 1"
    153158potential-type  "morse"
     
    159164repeat-box      "1 1 1"
    160165reset   1
     166reverse "0"
    161167rotate-around-origin    "180."
    162168rotate-around-origin    "20."
Note: See TracChangeset for help on using the changeset viewer.