Changeset e7350d4
- Timestamp:
- Mar 1, 2011, 10:16:39 AM (14 years ago)
- Branches:
- 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
- Children:
- 7adf0f
- Parents:
- 72d90e
- git-author:
- Frederik Heber <heber@…> (02/18/11 14:27:56)
- git-committer:
- Frederik Heber <heber@…> (03/01/11 10:16:39)
- Location:
- src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/bondgraph.cpp
r72d90e re7350d4 36 36 const double BondGraph::BondThreshold = 0.4; //!< CSD threshold in bond check which is the width of the interval whose center is the sum of the covalent radii 37 37 38 /** Constructor of class BondGraph.39 * This classes contains typical bond lengths and thus may be used to construct a bond graph for a given molecule.40 */41 38 BondGraph::BondGraph(bool IsA) : 42 39 BondLengthMatrix(NULL), … … 45 42 {}; 46 43 47 /** Destructor of class BondGraph.48 */49 44 BondGraph::~BondGraph() 50 45 { … … 54 49 }; 55 50 56 /** Parses the bond lengths in a given file and puts them int a matrix form.57 * Allocates \a MatrixContainer for BondGraph::BondLengthMatrix, using MatrixContainer::ParseMatrix(),58 * but only if parsing is successful. Otherwise variable is left as NULL.59 * \param &input input stream to parse table from60 * \return true - success in parsing file, false - failed to parse the file61 */62 51 bool BondGraph::LoadBondLengthTable(std::istream &input) 63 52 { … … 100 89 }; 101 90 102 /** Parses the bond lengths in a given file and puts them int a matrix form.103 * \param *out output stream for debugging104 * \param *mol molecule with atoms105 * \return true - success, false - failed to construct bond structure106 */107 91 bool BondGraph::ConstructBondGraph(molecule * const mol) 108 92 { … … 119 103 }; 120 104 121 /** Returns the entry for a given index pair.122 * \param firstelement index/atom number of first element (row index)123 * \param secondelement index/atom number of second element (column index)124 * \note matrix is of course symmetric.125 */126 105 double BondGraph::GetBondLength(int firstZ, int secondZ) 127 106 { … … 136 115 }; 137 116 138 /** Determines the maximum of all element::CovalentRadius for elements present in \a *mol.139 * \param *out output stream for debugging140 * \param *mol molecule with all atoms and their respective elements.141 */142 117 double BondGraph::SetMaxDistanceToMaxOfCovalentRadii(const molecule * const mol) 143 118 { … … 155 130 }; 156 131 157 /** Returns the maximum distance (e.g. necessary for LinkedCell).158 * \return BondGraph::max_distance159 */160 132 double BondGraph::getMaxDistance() const 161 133 { … … 164 136 165 137 166 /** Returns bond criterion for given pair based on covalent radius.167 * \param *Walker first BondedParticle168 * \param *OtherWalker second BondedParticle169 * \param &MinDistance lower bond bound on return170 * \param &MaxDistance upper bond bound on return171 * \param IsAngstroem whether units are in angstroem or bohr radii172 */173 138 void BondGraph::CovalentMinMaxDistance(BondedParticle * const Walker, BondedParticle * const OtherWalker, double &MinDistance, double &MaxDistance, bool IsAngstroem) 174 139 { … … 179 144 }; 180 145 181 /** Returns bond criterion for given pair based on a bond length matrix.182 * The matrix should be contained in \a this BondGraph and contain an element-183 * to-element length.184 * \param *Walker first BondedParticle185 * \param *OtherWalker second BondedParticle186 * \param &MinDistance lower bond bound on return187 * \param &MaxDistance upper bond bound on return188 * \param IsAngstroem whether units are in angstroem or bohr radii189 */190 146 void BondGraph::BondLengthMatrixMinMaxDistance(BondedParticle * const Walker, BondedParticle * const OtherWalker, double &MinDistance, double &MaxDistance, bool IsAngstroem) 191 147 { -
src/bondgraph.hpp
r72d90e re7350d4 34 34 class BondGraph { 35 35 public: 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 */ 36 39 BondGraph(bool IsA); 40 41 /** Destructor of class BondGraph. 42 */ 37 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 */ 38 51 bool LoadBondLengthTable(std::istream &input); 52 53 /** Parses the bond lengths in a given file and puts them int a matrix form. 54 * \param *out output stream for debugging 55 * \param *mol molecule with atoms 56 * \return true - success, false - failed to construct bond structure 57 */ 39 58 bool ConstructBondGraph(molecule * const mol); 59 60 /** Returns the entry for a given index pair. 61 * \param firstelement index/atom number of first element (row index) 62 * \param secondelement index/atom number of second element (column index) 63 * \note matrix is of course symmetric. 64 */ 40 65 double GetBondLength(int firstelement, int secondelement); 66 67 /** Determines the maximum of all element::CovalentRadius for elements present in \a *mol. 68 * \param *out output stream for debugging 69 * \param *mol molecule with all atoms and their respective elements. 70 */ 41 71 double SetMaxDistanceToMaxOfCovalentRadii(const molecule * const mol); 42 43 72 44 73 /** Returns bond criterion for given pair based on a bond length matrix. … … 52 81 void getMinMaxDistance(BondedParticle * const Walker, BondedParticle * const OtherWalker, double &MinDistance, double &MaxDistance, bool IsAngstroem); 53 82 83 /** Returns the maximum distance (e.g. necessary for LinkedCell). 84 * \return BondGraph::max_distance 85 */ 54 86 double getMaxDistance() const; 55 87 … … 57 89 static const double BondThreshold; 58 90 91 /** Returns bond criterion for given pair based on a bond length matrix. 92 * The matrix should be contained in \a this BondGraph and contain an element- 93 * to-element length. 94 * \param *Walker first BondedParticle 95 * \param *OtherWalker second BondedParticle 96 * \param &MinDistance lower bond bound on return 97 * \param &MaxDistance upper bond bound on return 98 * \param IsAngstroem whether units are in angstroem or bohr radii 99 */ 59 100 void BondLengthMatrixMinMaxDistance(BondedParticle * const Walker, BondedParticle * const OtherWalker, double &MinDistance, double &MaxDistance, bool IsAngstroem); 60 101 102 /** Returns bond criterion for given pair based on covalent radius. 103 * \param *Walker first BondedParticle 104 * \param *OtherWalker second BondedParticle 105 * \param &MinDistance lower bond bound on return 106 * \param &MaxDistance upper bond bound on return 107 * \param IsAngstroem whether units are in angstroem or bohr radii 108 */ 61 109 void CovalentMinMaxDistance(BondedParticle * const Walker, BondedParticle * const OtherWalker, double &MinDistance, double &MaxDistance, bool IsAngstroem); 62 110 111 //!> Matrix with bond lenth per two elements 63 112 MatrixContainer *BondLengthMatrix; 113 //!> maximum distance over all bonds possible 64 114 double max_distance; 115 //!> distance units are angstroem (true), bohr radii (false) 65 116 bool IsAngstroem; 66 117 };
Note:
See TracChangeset
for help on using the changeset viewer.