source: src/bondgraph.hpp@ 4092c5

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 4092c5 was 4092c5, checked in by Frederik Heber <heber@…>, 14 years ago

Changed BondGraph::...MinMaxDistance()'s parameters to const BondedParticle * const.

  • Property mode set to 100644
File size: 4.3 KB
Line 
1/*
2 * bondgraph.hpp
3 *
4 * Created on: Oct 29, 2009
5 * Author: heber
6 */
7
8#ifndef BONDGRAPH_HPP_
9#define BONDGRAPH_HPP_
10
11using namespace std;
12
13/*********************************************** includes ***********************************/
14
15// include config.h
16#ifdef HAVE_CONFIG_H
17#include <config.h>
18#endif
19
20#include <iosfwd>
21
22
23/****************************************** forward declarations *****************************/
24
25class molecule;
26class BondedParticle;
27class MatrixContainer;
28
29/********************************************** definitions *********************************/
30
31/********************************************** declarations *******************************/
32
33
34class BondGraph {
35public:
36 /** Constructor of class BondGraph.
37 * This classes contains typical bond lengths and thus may be used to construct a bond graph for a given molecule.
38 */
39 BondGraph(bool IsA);
40
41 /** Destructor of class BondGraph.
42 */
43 ~BondGraph();
44
45 /** Parses the bond lengths in a given file and puts them int a matrix form.
46 * Allocates \a MatrixContainer for BondGraph::BondLengthMatrix, using MatrixContainer::ParseMatrix(),
47 * but only if parsing is successful. Otherwise variable is left as NULL.
48 * \param &input input stream to parse table from
49 * \return true - success in parsing file, false - failed to parse the file
50 */
51 bool LoadBondLengthTable(std::istream &input);
52
53 /** Creates the bond list for all atoms in a given molecule.
54 * \param *mol molecule with atoms
55 * \return true - success, false - failed to construct bond structure
56 */
57 bool CreateAdjacencyForMolecule(molecule * const mol);
58
59 /** Returns the entry for a given index pair.
60 * \param firstelement index/atom number of first element (row index)
61 * \param secondelement index/atom number of second element (column index)
62 * \note matrix is of course symmetric.
63 */
64 double GetBondLength(int firstelement, int secondelement);
65
66 /** Determines the maximum of all element::CovalentRadius for elements present in \a *mol.
67 * \param *out output stream for debugging
68 * \param *mol molecule with all atoms and their respective elements.
69 */
70 double SetMaxDistanceToMaxOfCovalentRadii(const molecule * const mol);
71
72 /** Returns bond criterion for given pair based on a bond length matrix.
73 * This calls either the covalent or the bond matrix criterion.
74 * \param *Walker first BondedParticle
75 * \param *OtherWalker second BondedParticle
76 * \param &MinDistance lower bond bound on return
77 * \param &MaxDistance upper bond bound on return
78 * \param IsAngstroem whether units are in angstroem or bohr radii
79 */
80 void getMinMaxDistance(const BondedParticle * const Walker, const BondedParticle * const OtherWalker, double &MinDistance, double &MaxDistance, bool IsAngstroem);
81
82 /** Returns the maximum distance (e.g. necessary for LinkedCell).
83 * \return BondGraph::max_distance
84 */
85 double getMaxDistance() const;
86
87private:
88 static const double BondThreshold;
89
90 /** Returns bond criterion for given pair based on a bond length matrix.
91 * The matrix should be contained in \a this BondGraph and contain an element-
92 * to-element length.
93 * \param *Walker first BondedParticle
94 * \param *OtherWalker second BondedParticle
95 * \param &MinDistance lower bond bound on return
96 * \param &MaxDistance upper bond bound on return
97 * \param IsAngstroem whether units are in angstroem or bohr radii
98 */
99 void BondLengthMatrixMinMaxDistance(const BondedParticle * const Walker, const BondedParticle * const OtherWalker, double &MinDistance, double &MaxDistance, bool IsAngstroem);
100
101 /** Returns bond criterion for given pair based on covalent radius.
102 * \param *Walker first BondedParticle
103 * \param *OtherWalker second BondedParticle
104 * \param &MinDistance lower bond bound on return
105 * \param &MaxDistance upper bond bound on return
106 * \param IsAngstroem whether units are in angstroem or bohr radii
107 */
108 void CovalentMinMaxDistance(const BondedParticle * const Walker, const BondedParticle * const OtherWalker, double &MinDistance, double &MaxDistance, bool IsAngstroem);
109
110 //!> Matrix with bond lenth per two elements
111 MatrixContainer *BondLengthMatrix;
112 //!> maximum distance over all bonds possible
113 double max_distance;
114 //!> distance units are angstroem (true), bohr radii (false)
115 bool IsAngstroem;
116};
117
118#endif /* BONDGRAPH_HPP_ */
Note: See TracBrowser for help on using the repository browser.