Ignore:
Timestamp:
Aug 20, 2014, 1:06:47 PM (11 years ago)
Author:
Frederik Heber <heber@…>
Children:
d635829
Parents:
ce0ca4
git-author:
Frederik Heber <heber@…> (07/18/14 17:08:09)
git-committer:
Frederik Heber <heber@…> (08/20/14 13:06:47)
Message:

SaturatedFragment can deal with a global saturation position map.

  • so far, we create an empty one in FragmentationAction such that nothing's changed for the moment.
  • similarly in StoreSaturatedFragmentAction. However, there this is intended as only local information is required (it's only a single fragment).
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Fragmentation/Exporters/SaturatedFragment.hpp

    rce0ca4 rf5fa48  
    2323#include "Parser/FormatParserStorage.hpp"
    2424
     25#include "LinearAlgebra/Vector.hpp"
     26
    2527class atom;
    2628class HydrogenPool;
    27 class Vector;
    2829
    2930/** The SaturatedFragment class acts as a wrapper to a KeySet by adding a list
     
    4344  typedef std::set<KeySet> KeySetsInUse_t;
    4445
     46  //!> List of points giving saturation positions for a single bond neighbor
     47  typedef std::list<Vector> SaturationsPositions_t;
     48  //!> map for one atom, containing the saturation points for all its neighbors
     49  typedef std::map<int, SaturationsPositions_t> SaturationsPositionsPerNeighbor_t;
     50  //!> containing the saturation points over all desired atoms required
     51  typedef std::map<int, SaturationsPositionsPerNeighbor_t> GlobalSaturationPositions_t;
     52
    4553  /** Constructor of SaturatedFragment requires \a set which we are tightly
    4654   * associated.
     
    4957   * \param _container container to add KeySet as in-use
    5058   * \param _hydrogens pool with hydrogens for saturation
     59   * \param _globalsaturationpositions saturation positions to be used
    5160   */
    5261  SaturatedFragment(
     
    5564      HydrogenPool &_hydrogens,
    5665      const enum HydrogenTreatment _treatment,
    57       const enum HydrogenSaturation saturation);
     66      const enum HydrogenSaturation saturation,
     67      const GlobalSaturationPositions_t &_globalsaturationpositions);
    5868
    5969  /** Destructor of class SaturatedFragment.
     
    101111  /** Helper function to lease and bring in place saturation hydrogens.
    102112   *
     113   * Here, we use local information to calculate saturation positions.
     114   *
    103115   */
    104116  void saturate();
     117
     118  /** Helper function to lease and bring in place saturation hydrogens.
     119   *
     120   * Here, saturation positions have to be calculated before and are fully
     121   * stored in \a _globalsaturationpositions.
     122   *
     123   * \param_globalsaturationpositions
     124   */
     125  void saturate(const GlobalSaturationPositions_t &_globalsaturationpositions);
     126
     127  /** Replaces all cut bonds with respect to the given atom by hydrogens.
     128   *
     129   * \param _atom atom whose cut bonds to saturate
     130   * \param _cutbonds list of cut bonds for \a _atom
     131   * \return true - bonds saturated, false - something went wrong
     132   */
     133  bool saturateAtom(atom * const _atom, const BondList &_cutbonds);
    105134
    106135  /** Helper function to get a hydrogen replacement for a given \a replacement.
Note: See TracChangeset for help on using the changeset viewer.