source: src/Fragmentation/Exporters/SaturatedBond.hpp@ bac32f

Action_Thermostats Add_AtomRandomPerturbation Add_FitFragmentPartialChargesAction Add_RotateAroundBondAction Add_SelectAtomByNameAction Added_ParseSaveFragmentResults AddingActions_SaveParseParticleParameters Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_ParticleName_to_Atom Adding_StructOpt_integration_tests AtomFragments Automaking_mpqc_open AutomationFragmentation_failures Candidate_v1.5.4 Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator CombiningParticlePotentialParsing Combining_Subpackages Debian_Package_split Debian_package_split_molecuildergui_only Disabling_MemDebug Docu_Python_wait EmpiricalPotential_contain_HomologyGraph EmpiricalPotential_contain_HomologyGraph_documentation Enable_parallel_make_install Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph FitPartialCharges_GlobalError Fix_BoundInBox_CenterInBox_MoleculeActions Fix_ChargeSampling_PBC Fix_ChronosMutex Fix_FitPartialCharges Fix_FitPotential_needs_atomicnumbers Fix_ForceAnnealing Fix_IndependentFragmentGrids Fix_ParseParticles Fix_ParseParticles_split_forward_backward_Actions Fix_PopActions Fix_QtFragmentList_sorted_selection Fix_Restrictedkeyset_FragmentMolecule Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns Fix_fitting_potentials Fixes ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion FragmentAction_writes_AtomFragments FragmentMolecule_checks_bonddegrees GeometryObjects Gui_Fixes Gui_displays_atomic_force_velocity ImplicitCharges IndependentFragmentGrids IndependentFragmentGrids_IndividualZeroInstances IndependentFragmentGrids_IntegrationTest IndependentFragmentGrids_Sole_NN_Calculation JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix MoreRobust_FragmentAutomation ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PdbParser_setsAtomName PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks Rewrite_FitPartialCharges RotateToPrincipalAxisSystem_UndoRedo SaturateAtoms_findBestMatching SaturateAtoms_singleDegree StoppableMakroAction Subpackage_CodePatterns Subpackage_JobMarket Subpackage_LinearAlgebra Subpackage_levmar Subpackage_mpqc_open Subpackage_vmg Switchable_LogView ThirdParty_MPQC_rebuilt_buildsystem TrajectoryDependenant_MaxOrder TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps TremoloParser_setsAtomName Ubuntu_1604_changes stable
Last change on this file since bac32f was bac32f, checked in by Frederik Heber <heber@…>, 10 years ago

Added SaturatedBond as container for a "dangling bond" and its saturation hydrogens.

  • most member variables are private, this prints them for debugging.
  • Property mode set to 100644
File size: 2.2 KB
Line 
1/*
2 * SaturatedBond.hpp
3 *
4 * Created on: Jul 27, 2014
5 * Author: heber
6 */
7
8#ifndef SATURATEDBOND_HPP_
9#define SATURATEDBOND_HPP_
10
11// include config.h
12#ifdef HAVE_CONFIG_H
13#include <config.h>
14#endif
15
16#include <vector>
17#include <iosfwd>
18#include <boost/shared_ptr.hpp>
19
20#include "LinearAlgebra/Vector.hpp"
21
22#include "Bond/bond.hpp"
23
24class SaturationDistanceMaximizer;
25class SaturatedBond;
26
27std::ostream &operator<<(std::ostream &ost, const SaturatedBond& _bond);
28
29/** This class contains a dangling bond and information how to saturate it
30 * with hydrogens.
31 *
32 * Hydrogens are place on a cylinder on the sphere around the remaining atom.
33 * The angle \a alpha describes the position along the circle cutting the
34 * sphere. The symmetry axis of the cylinder is the bond direction. The
35 * orthogonal vectors \a vector_a and \a vector_b describe the circle on the
36 * sphere.
37 */
38class SaturatedBond
39{
40 //!> allow output operator const access to private parts
41 friend std::ostream &operator<<(std::ostream &ost, const SaturatedBond& _bond);
42
43public:
44 //!> typedef for a shared pointer of this class
45 typedef boost::shared_ptr<SaturatedBond> ptr;
46
47 /** Cstor of class SaturatedBond, requires a present \a _bond.
48 *
49 * \param _bond bond to saturate
50 * \param _remaining atom that is not cut off
51 */
52 SaturatedBond(const bond &_bond, const atom& _remaining);
53
54 /** Dstor of SaturatedBond.
55 *
56 */
57 ~SaturatedBond() {}
58
59 //!> typedef for a vector of Vectors
60 typedef std::vector<Vector> positions_t;
61
62 /** calculates positions where to place hydrogens to saturate this bond.
63 *
64 * \note Positions are always relative to \a saturated, i.e. to the atom
65 * that is saturated.
66 */
67 positions_t getPositions() const;
68
69private:
70 //!> SaturationDistanceMinimizer needs access to alpha and directional vectors
71 friend class SaturationDistanceMaximizer;
72
73 //!> bond to saturate
74 const bond& saturated_bond;
75 //!> central atom which is saturated
76 const atom& saturated_atom;
77 //!> rotation angle describing position.
78 double alpha;
79 //!> Vector along the bond
80 Vector BondVector;
81 //!> first vector orthogonal to \a _bond
82 Vector vector_a;
83 //!> second vector orthogonal to \a _bond
84 Vector vector_b;
85};
86
87
88
89#endif /* SATURATEDBOND_HPP_ */
Note: See TracBrowser for help on using the repository browser.