Changeset 999eaf


Ignore:
Timestamp:
Apr 28, 2021, 10:02:49 PM (5 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Candidate_v1.7.0, Candidate_v1.7.1, stable
Children:
6b7765
Parents:
5aa337
git-author:
Frederik Heber <frederik.heber@…> (04/18/21 08:23:36)
git-committer:
Frederik Heber <frederik.heber@…> (04/28/21 22:02:49)
Message:

Added EvaluateStabilityAction to estimate a molecule's stability.

  • removes every bond and checks the energies of the products against the educt equipped with enough hydrogen molecules to compensate for the cut bond times its degree.
  • outputs a CSV file with entries per bond.
  • extended HomologyGraph to allow direct use of AtomIdSet, i.e. atomic ids coming from a selection in the World or from the molecule.
  • DOCU: Added subsection on this action to section homology.
  • TEST: Added regression test case.
Files:
8 added
10 edited

Legend:

Unmodified
Added
Removed
  • doc/userguide/userguide.xml

    r5aa337 r999eaf  
    22912291        <filename>homologies.dat</filename>.</para>
    22922292      </section>
     2293      <section xml:id="homology.evaluate-stability">
     2294         <title xml:id="homology.evaluate-stability.title">Evaluate Stability</title>
     2295         <para>The homologies can be used to quickly get an approximation on
     2296         the ground state energy of a molecule.
     2297         <warning>This does not accurately take the current geometry into account.</warning>
     2298         In other words, it will produce the equilibrium energy for the given
     2299         molecule.
     2300         Using this, there is an action that evaluates the stability of a molecule
     2301         by removing each bond, saturating the ends and comparing the ground
     2302         state energy of the two products to the educt plus the ground state
     2303         energy of as many hydrogen molecules to match the cut bond's degree.
     2304         <programlisting>... --evaluate-stability output.csv</programlisting>
     2305         This writes a table of educt and product names along with their summed
     2306         energies. The comparison between educt and product energy in each row
     2307         yields whether this molecule is overall stable.
     2308         <note>Be aware that this calculation is based on saturation, i.e. hydrogens
     2309         are added to saturate dangling bonds. These additional atoms need to
     2310         be compensated and for this reason there is an additional educt, a
     2311         number of hydrogen molecules.</note>
     2312         </para>
     2313      </section>
    22932314      <section xml:id="atomfragments">
    22942315        <title xml:id="atomfragments.title">AtomFragments</title>
  • src/Actions/GlobalListOfActions.hpp

    r5aa337 r999eaf  
    6565  (FragmentationClearFragmentationResults) \
    6666  (FragmentationClearFragmentationState) \
     67  (FragmentationEvaluateStability) \
    6768  (FragmentationFragmentation) \
    6869  (FragmentationFragmentationAutomation) \
  • src/Actions/Makefile.am

    r5aa337 r999eaf  
    268268  Actions/FragmentationAction/ClearFragmentationResultsAction.cpp \
    269269  Actions/FragmentationAction/ClearFragmentationStateAction.cpp \
     270  Actions/FragmentationAction/EvaluateStabilityAction.cpp \
    270271  Actions/FragmentationAction/FragmentationAction.cpp \
    271272  Actions/FragmentationAction/FragmentationAutomationAction.cpp \
     
    280281  Actions/FragmentationAction/ClearFragmentationResultsAction.hpp \
    281282  Actions/FragmentationAction/ClearFragmentationStateAction.hpp \
     283  Actions/FragmentationAction/EvaluateStabilityAction.hpp \
    282284  Actions/FragmentationAction/FragmentationAction.hpp \
    283285  Actions/FragmentationAction/FragmentationAutomationAction.hpp \
     
    292294  Actions/FragmentationAction/ClearFragmentationResultsAction.def \
    293295  Actions/FragmentationAction/ClearFragmentationStateAction.def \
     296  Actions/FragmentationAction/EvaluateStabilityAction.def \
    294297  Actions/FragmentationAction/FragmentationAction.def \
    295298  Actions/FragmentationAction/FragmentationAutomationAction.def \
  • src/Fragmentation/Homology/HomologyGraph.cpp

    r5aa337 r999eaf  
    5555  nodes(detail::getNodesFromIndexSet(index)),
    5656  edges(detail::getEdgesFromIndexSet(index))
     57{}
     58
     59HomologyGraph::HomologyGraph(const AtomIdSet::atomIdSet &index) :
     60  nodes(detail::getNodesFromAtomIds(index)),
     61  edges(detail::getEdgesFromAtomIds(index))
    5762{}
    5863
  • src/Fragmentation/Homology/HomologyGraph.hpp

    r5aa337 r999eaf  
    2121#include <iosfwd>
    2222
     23#include "AtomIdSet.hpp"
    2324#include "Fragmentation/Homology/FragmentEdge.hpp"
    2425#include "Fragmentation/Homology/FragmentNode.hpp"
     
    7980  explicit HomologyGraph(const IndexSet &index);
    8081
     82  /** Constructor for class HomologyGraph from a AtomIdSet (i.e. from atoms in the World).
     83   *
     84   * @param index global ids of atoms to pick
     85   */
     86  explicit HomologyGraph(const AtomIdSet::atomIdSet &index);
     87
    8188  /** Destructor for class HomologyGraph.
    8289   *
     
    200207  const HomologyGraph::nodes_t getNodesFromIndexSet(const IndexSet &keyset);
    201208  const HomologyGraph::edges_t getEdgesFromIndexSet(const IndexSet &keyset);
     209  const HomologyGraph::nodes_t getNodesFromAtomIds(const AtomIdSet::atomIdSet &keyset);
     210  const HomologyGraph::edges_t getEdgesFromAtomIds(const AtomIdSet::atomIdSet &keyset);
    202211};
    203212
  • src/Fragmentation/Homology/HomologyGraph_getFromKeyset.cpp

    r5aa337 r999eaf  
    135135    return getNodesFromSet<size_t>(keyset);
    136136  }
     137  const HomologyGraph::nodes_t getNodesFromAtomIds(const AtomIdSet::atomIdSet &keyset) {
     138    return getNodesFromSet<atomId_t>(keyset);
     139  }
    137140  const HomologyGraph::edges_t getEdgesFromKeySet(const KeySet &keyset) {
    138141    return getEdgesFromSet<int>(keyset);
     
    141144    return getEdgesFromSet<size_t>(keyset);
    142145  }
     146  const HomologyGraph::edges_t getEdgesFromAtomIds(const AtomIdSet::atomIdSet &keyset) {
     147    return getEdgesFromSet<atomId_t>(keyset);
     148  }
    143149};  /* namespace detail */
    144150
  • src/Fragmentation/Homology/HomologyGraph_getFromKeysetStub.cpp

    r5aa337 r999eaf  
    6363  }
    6464
     65  const HomologyGraph::nodes_t getNodesFromAtomIds(const AtomIdSet::atomIdSet &keyset)
     66  {
     67    return HomologyGraph::nodes_t();
     68  }
     69
     70  const HomologyGraph::edges_t getEdgesFromAtomIds(const AtomIdSet::atomIdSet &keyset)
     71  {
     72    return HomologyGraph::edges_t();
     73  }
    6574};  /* namespace detail */
  • src/Fragmentation/Makefile.am

    r5aa337 r999eaf  
    33
    44FRAGMENTATIONSOURCE = \
     5        Fragmentation/Evaluation/StabilityEvaluator.cpp \
    56        Fragmentation/Exporters/ExportGraph_ToAtomFragments.cpp \
    67        Fragmentation/Exporters/ExportGraph_ToFiles.cpp \
     
    3637
    3738FRAGMENTATIONHEADER = \
     39        Fragmentation/Evaluation/StabilityEvaluator.hpp \
    3840        Fragmentation/Exporters/ExportGraph_ToAtomFragments.hpp \
    3941        Fragmentation/Exporters/ExportGraph_ToFiles.hpp \
  • tests/regression/Fragmentation/testsuite-fragmentation.at

    r5aa337 r999eaf  
    3939# parse/save state of FragmentationResultsContainer
    4040m4_include([Fragmentation/ParseSaveFragmentResults/testsuite-fragmentation-parse-save-fragment-results.at])
     41
     42# evaluate stability of a molecule from homology graphs
     43m4_include([Fragmentation/EvaluateStability/testsuite-fragmentation-evaluate-stability.at])
  • tests/regression/Makefile.am

    r5aa337 r999eaf  
    124124        $(srcdir)/Fragmentation/AnalyseFragmentationResults/testsuite-fragmentation-analyse-fragment-results.at \
    125125        $(srcdir)/Fragmentation/DiffFragmentResultContainer/testsuite-fragmentation-difffragmenresultcontainer.at \
     126        $(srcdir)/Fragmentation/EvaluateStability/testsuite-fragmentation-evaluate-stability.at \
    126127        $(srcdir)/Fragmentation/FragmentationAutomation/testsuite-fragmentation-fragmentation-automation.at \
    127128        $(srcdir)/Fragmentation/FragmentMolecule/testsuite-fragmentation-fragment-molecule.at \
Note: See TracChangeset for help on using the changeset viewer.