Changeset cff66c
- Timestamp:
- Mar 1, 2011, 1:17:08 PM (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:
- 607eab
- Parents:
- 111f4a
- git-author:
- Frederik Heber <heber@…> (02/28/11 15:16:58)
- git-committer:
- Frederik Heber <heber@…> (03/01/11 13:17:08)
- Location:
- src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/FragmentationAction/CreateAdjacencyAction.cpp
r111f4a rcff66c 56 56 DoLog(1) && (Log() << Verbose(1) << "Constructing bond graph for selected atoms ... " << endl); 57 57 58 config *configuration = World::getInstance().getConfig();59 58 BondGraph *BG = World::getInstance().getBondGraph(); 60 59 ASSERT(BG != NULL, "FragmentationCreateAdjacencyAction: BondGraph is NULL."); 61 60 double BondDistance = BG->getMaxPossibleBondDistance(AtomSetMixin<std::vector<atom *> >(World::getInstance().getSelectedAtoms())); 62 bool IsAngstroem = configuration->GetIsAngstroem();63 61 64 62 atom *Walker = NULL; … … 136 134 //Log() << Verbose(1) << "Checking distance " << OtherWalker->x.PeriodicDistanceSquared(&(Walker->x), cell_size) << " against typical bond length of " << bonddistance*bonddistance << "." << endl; 137 135 range<double> MinMaxDistanceSquared(0.,0.); 138 BG->getMinMaxDistanceSquared(Walker, OtherWalker, MinMaxDistanceSquared , IsAngstroem);136 BG->getMinMaxDistanceSquared(Walker, OtherWalker, MinMaxDistanceSquared); 139 137 const double distance = domain.periodicDistanceSquared(OtherWalker->getPosition(),Walker->getPosition()); 140 138 const bool status = MinMaxDistanceSquared.isInRange(distance); -
src/bondgraph.cpp
r111f4a rcff66c 100 100 const element * const Walker, 101 101 const element * const OtherWalker, 102 range<double> &MinMaxDistance, 103 bool IsAngstroem) const 102 range<double> &MinMaxDistance) const 104 103 { 105 104 MinMaxDistance.first = OtherWalker->getCovalentRadius() + Walker->getCovalentRadius(); … … 112 111 const element * const Walker, 113 112 const element * const OtherWalker, 114 range<double> &MinMaxDistance, 115 bool IsAngstroem) const 113 range<double> &MinMaxDistance) const 116 114 { 117 115 ASSERT(BondLengthMatrix, "BondGraph::BondLengthMatrixMinMaxDistance() called without NULL BondLengthMatrix."); … … 127 125 const element * const Walker, 128 126 const element * const OtherWalker, 129 range<double> &MinMaxDistance, 130 bool IsAngstroem) const 127 range<double> &MinMaxDistance) const 131 128 { 132 129 if (BondLengthMatrix == NULL) {// safety measure if no matrix has been parsed yet 133 130 LOG(2, "INFO: Using Covalent radii criterion for [min,max) distances."); 134 CovalentMinMaxDistance(Walker, OtherWalker, MinMaxDistance , IsAngstroem);131 CovalentMinMaxDistance(Walker, OtherWalker, MinMaxDistance); 135 132 } else { 136 133 LOG(2, "INFO: Using Covalent radii criterion for [min,max) distances."); 137 BondLengthMatrixMinMaxDistance(Walker, OtherWalker, MinMaxDistance , IsAngstroem);134 BondLengthMatrixMinMaxDistance(Walker, OtherWalker, MinMaxDistance); 138 135 } 139 136 } … … 142 139 const BondedParticle * const Walker, 143 140 const BondedParticle * const OtherWalker, 144 range<double> &MinMaxDistance, 145 bool IsAngstroem) const 146 { 147 getMinMaxDistance(Walker->getType(), OtherWalker->getType(),MinMaxDistance, IsAngstroem); 141 range<double> &MinMaxDistance) const 142 { 143 getMinMaxDistance(Walker->getType(), OtherWalker->getType(),MinMaxDistance); 148 144 } 149 145 … … 151 147 const BondedParticle * const Walker, 152 148 const BondedParticle * const OtherWalker, 153 range<double> &MinMaxDistance, 154 bool IsAngstroem) const 149 range<double> &MinMaxDistance) const 155 150 { 156 151 // use non-squared version 157 getMinMaxDistance(Walker, OtherWalker,MinMaxDistance , IsAngstroem);152 getMinMaxDistance(Walker, OtherWalker,MinMaxDistance); 158 153 // and square 159 154 MinMaxDistance.first *= MinMaxDistance.first; … … 195 190 "BondGraph::CreateAdjacency() - TesselPoint that was not an atom retrieved from LinkedNode"); 196 191 range<double> MinMaxDistanceSquared(0.,0.); 197 getMinMaxDistanceSquared(Walker, OtherWalker, MinMaxDistanceSquared , IsAngstroem);192 getMinMaxDistanceSquared(Walker, OtherWalker, MinMaxDistanceSquared); 198 193 const double distance = domain.periodicDistanceSquared(OtherWalker->getPosition(),Walker->getPosition()); 199 194 LOG(2, "INFO: Checking squared distance " << distance << " against typical bond length of " << MinMaxDistanceSquared << "."); -
src/bondgraph.hpp
r111f4a rcff66c 93 93 ++otheriter) { 94 94 range<double> MinMaxDistance(0.,0.); 95 getMinMaxDistance((*iter),(*otheriter), MinMaxDistance , IsAngstroem);95 getMinMaxDistance((*iter),(*otheriter), MinMaxDistance); 96 96 if (MinMaxDistance.last > max_distance) 97 97 max_distance = MinMaxDistance.last; … … 106 106 * \param *OtherWalker second BondedParticle 107 107 * \param &MinMaxDistance Range for interval on return 108 * \param IsAngstroem whether units are in angstroem or bohr radii109 108 */ 110 109 void getMinMaxDistance( 111 110 const BondedParticle * const Walker, 112 111 const BondedParticle * const OtherWalker, 113 range<double> &MinMaxDistance, 114 bool IsAngstroem) const; 112 range<double> &MinMaxDistance) const; 115 113 116 114 /** Returns SQUARED bond criterion for given pair based on a bond length matrix. … … 120 118 * \param *OtherWalker second BondedParticle 121 119 * \param &MinMaxDistance Range for interval on return 122 * \param IsAngstroem whether units are in angstroem or bohr radii123 120 */ 124 121 void getMinMaxDistanceSquared( 125 122 const BondedParticle * const Walker, 126 123 const BondedParticle * const OtherWalker, 127 range<double> &MinMaxDistance, 128 bool IsAngstroem) const; 124 range<double> &MinMaxDistance) const; 129 125 130 126 /** Creates the adjacency list for a given \a Range of iterable atoms. … … 324 320 * \param *OtherWalker second BondedParticle 325 321 * \param &MinMaxDistance Range for interval on return 326 * \param IsAngstroem whether units are in angstroem or bohr radii327 322 */ 328 323 void getMinMaxDistance( 329 324 const element * const Walker, 330 325 const element * const OtherWalker, 331 range<double> &MinMaxDistance, 332 bool IsAngstroem) const; 326 range<double> &MinMaxDistance) const; 333 327 334 328 /** Returns bond criterion for given pair of elements based on a bond length matrix. … … 338 332 * \param *OtherWalker second element 339 333 * @param MinMaxDistance reference to range type set on return 340 * \param IsAngstroem whether units are in angstroem or bohr radii341 334 */ 342 335 void BondLengthMatrixMinMaxDistance( 343 336 const element * const Walker, 344 337 const element * const OtherWalker, 345 range<double> &DistanceInterval, 346 bool IsAngstroem) const; 338 range<double> &MinMaxDistance) const; 347 339 348 340 /** Returns bond criterion for given pair of elements based on covalent radius. … … 350 342 * \param *OtherWalker second element 351 343 * @param MinMaxDistance reference to range type set on return 352 * \param IsAngstroem whether units are in angstroem or bohr radii353 344 */ 354 345 void CovalentMinMaxDistance( 355 346 const element * const Walker, 356 347 const element * const OtherWalker, 357 range<double> &DistanceInterval, 358 bool IsAngstroem) const; 348 range<double> &MinMaxDistance) const; 359 349 360 350 -
src/molecule.cpp
r111f4a rcff66c 346 346 range<double> MinMaxBondDistance(0.,0.); 347 347 const BondGraph * const BG = World::getInstance().getBondGraph(); 348 BG->getMinMaxDistance(TopOrigin,TopReplacement,MinMaxBondDistance ,IsAngstroem);348 BG->getMinMaxDistance(TopOrigin,TopReplacement,MinMaxBondDistance); 349 349 if (!MinMaxBondDistance.isInRange(bondlength)) { 350 350 // Log() << Verbose(4) << "InBondvector is: "; -
src/molecule_fragmentation.cpp
r111f4a rcff66c 1812 1812 //Log() << Verbose(3) << "Checking " << i << "th distance of " << *Binder->leftatom << " to " << *Binder->rightatom << ": " << tmp << "." << endl; 1813 1813 range<double> MinMaxDistance(0.,0.); 1814 BG->getMinMaxDistance(Binder->leftatom, Binder->rightatom, MinMaxDistance , true);1814 BG->getMinMaxDistance(Binder->leftatom, Binder->rightatom, MinMaxDistance); 1815 1815 if (!MinMaxDistance.isInRange(tmp)) { 1816 1816 DoLog(2) && (Log() << Verbose(2) << "Correcting at bond " << *Binder << "." << endl); … … 1827 1827 tmp = Binder->leftatom->at(i) - Binder->rightatom->at(i); 1828 1828 range<double> MinMaxDistance(0.,0.); 1829 BG->getMinMaxDistance(Binder->leftatom, Binder->rightatom, MinMaxDistance , true);1829 BG->getMinMaxDistance(Binder->leftatom, Binder->rightatom, MinMaxDistance); 1830 1830 if (fabs(tmp) > MinMaxDistance.last) // check against Min is not useful for components 1831 1831 Translationvector[i] = (tmp < 0) ? +1. : -1.; -
src/molecule_geometry.cpp
r111f4a rcff66c 394 394 tmp = (*iter)->at(j) - (*Runner)->GetOtherAtom(*iter)->at(j); 395 395 range<double> MinMaxBondDistance(0.,0.); 396 BG->getMinMaxDistance((*iter), (*Runner)->GetOtherAtom(*iter), MinMaxBondDistance , true);396 BG->getMinMaxDistance((*iter), (*Runner)->GetOtherAtom(*iter), MinMaxBondDistance); 397 397 if (fabs(tmp) > MinMaxBondDistance.last) { // check against Min is not useful for components 398 398 flag = false;
Note:
See TracChangeset
for help on using the changeset viewer.