Changeset 999eaf for src/Fragmentation


Ignore:
Timestamp:
Apr 28, 2021, 10:02:49 PM (5 years ago)
Author:
Frederik Heber <frederik.heber@…>
Branches:
Candidate_v1.7.0, 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.
Location:
src/Fragmentation
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • 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 \
Note: See TracChangeset for help on using the changeset viewer.