Changeset 72d90e
- 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:
- e7350d4
- Parents:
- f71baf
- git-author:
- Frederik Heber <heber@…> (02/18/11 14:24:43)
- git-committer:
- Frederik Heber <heber@…> (03/01/11 10:16:39)
- Location:
- src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/FragmentationAction/ConstructBondGraphAction.cpp
rf71baf r72d90e 135 135 ASSERT(OtherWalker,"TesselPoint that was not an atom retrieved from LinkedNode"); 136 136 //Log() << Verbose(1) << "Checking distance " << OtherWalker->x.PeriodicDistanceSquared(&(Walker->x), cell_size) << " against typical bond length of " << bonddistance*bonddistance << "." << endl; 137 BG-> CovalentMinMaxDistance(Walker, OtherWalker, MinDistance, MaxDistance, IsAngstroem);137 BG->getMinMaxDistance(Walker, OtherWalker, MinDistance, MaxDistance, IsAngstroem); 138 138 const double distance = domain.periodicDistanceSquared(OtherWalker->getPosition(),Walker->getPosition()); 139 139 const bool status = (distance <= MaxDistance * MaxDistance) && (distance >= MinDistance * MinDistance); -
src/Actions/FragmentationAction/DepthFirstSearchAction.cpp
rf71baf r72d90e 53 53 std::deque<bond *> *LocalBackEdgeStack = NULL; 54 54 BondGraph *BG = World::getInstance().getBondGraph(); 55 if (BG != NULL) 56 mol->CreateAdjacencyList(params.distance, World::getInstance().getConfig()->GetIsAngstroem(), &BondGraph::BondLengthMatrixMinMaxDistance, BG); 57 else 58 mol->CreateAdjacencyList(params.distance, World::getInstance().getConfig()->GetIsAngstroem(), &BondGraph::CovalentMinMaxDistance, NULL); 55 mol->CreateAdjacencyList(params.distance, World::getInstance().getConfig()->GetIsAngstroem(), &BondGraph::getMinMaxDistance, BG); 59 56 Subgraphs = mol->DepthFirstSearchAnalysis(BackEdgeStack); 60 57 if (Subgraphs != NULL) { -
src/Actions/FragmentationAction/FragmentationAction.cpp
rf71baf r72d90e 55 55 DoLog(0) && (Log() << Verbose(0) << "Creating connection matrix..." << endl); 56 56 start = clock(); 57 mol->CreateAdjacencyList(params.distance, configuration->GetIsAngstroem(), &BondGraph:: CovalentMinMaxDistance, NULL);57 mol->CreateAdjacencyList(params.distance, configuration->GetIsAngstroem(), &BondGraph::getMinMaxDistance, World::getInstance().getBondGraph()); 58 58 DoLog(0) && (Log() << Verbose(0) << "Fragmenting molecule with current connection matrix ..." << endl); 59 59 if (mol->hasBondStructure()) { -
src/bondgraph.cpp
rf71baf r72d90e 113 113 return false; 114 114 115 if (BondLengthMatrix == NULL) { // no bond length matrix parsed? 116 SetMaxDistanceToMaxOfCovalentRadii(mol); 117 mol->CreateAdjacencyList(max_distance, IsAngstroem, &BondGraph::CovalentMinMaxDistance, this); 118 } else 119 mol->CreateAdjacencyList(max_distance, IsAngstroem, &BondGraph::BondLengthMatrixMinMaxDistance, this); 115 SetMaxDistanceToMaxOfCovalentRadii(mol); 116 mol->CreateAdjacencyList(max_distance, IsAngstroem, &BondGraph::getMinMaxDistance, this); 120 117 121 118 return status; … … 193 190 void BondGraph::BondLengthMatrixMinMaxDistance(BondedParticle * const Walker, BondedParticle * const OtherWalker, double &MinDistance, double &MaxDistance, bool IsAngstroem) 194 191 { 192 ASSERT(BondLengthMatrix != NULL, 193 "BondGraph::BondLengthMatrixMinMaxDistance() called without NULL BondLengthMatrix."); 194 MinDistance = GetBondLength(Walker->getType()->getAtomicNumber()-1, OtherWalker->getType()->getAtomicNumber()-1); 195 MinDistance *= (IsAngstroem) ? 1. : 1. / AtomicLengthToAngstroem; 196 MaxDistance = MinDistance + BondThreshold; 197 MinDistance -= BondThreshold; 198 }; 199 200 void BondGraph::getMinMaxDistance(BondedParticle * const Walker, BondedParticle * const OtherWalker, double &MinDistance, double &MaxDistance, bool IsAngstroem) 201 { 195 202 if (BondLengthMatrix == NULL) {// safety measure if no matrix has been parsed yet 196 DoeLog(2) && (eLog()<< Verbose(2) << "BondLengthMatrixMinMaxDistance() called without having parsed the bond length matrix yet!" << endl);203 LOG(2, "INFO: Using Covalent radii criterion for [min,max] distances."); 197 204 CovalentMinMaxDistance(Walker, OtherWalker, MinDistance, MaxDistance, IsAngstroem); 198 205 } else { 199 MinDistance = GetBondLength(Walker->getType()->getAtomicNumber()-1, OtherWalker->getType()->getAtomicNumber()-1); 200 MinDistance *= (IsAngstroem) ? 1. : 1. / AtomicLengthToAngstroem; 201 MaxDistance = MinDistance + BondThreshold; 202 MinDistance -= BondThreshold; 203 } 204 }; 206 LOG(2, "INFO: Using Covalent radii criterion for [min,max] distances."); 207 BondLengthMatrixMinMaxDistance(Walker, OtherWalker, MinDistance, MaxDistance, IsAngstroem); 208 } 209 } -
src/bondgraph.hpp
rf71baf r72d90e 41 41 double SetMaxDistanceToMaxOfCovalentRadii(const molecule * const mol); 42 42 43 void BondLengthMatrixMinMaxDistance(BondedParticle * const Walker, BondedParticle * const OtherWalker, double &MinDistance, double &MaxDistance, bool IsAngstroem); 44 void CovalentMinMaxDistance(BondedParticle * const Walker, BondedParticle * const OtherWalker, double &MinDistance, double &MaxDistance, bool IsAngstroem); 43 44 /** Returns bond criterion for given pair based on a bond length matrix. 45 * This calls either the covalent or the bond matrix criterion. 46 * \param *Walker first BondedParticle 47 * \param *OtherWalker second BondedParticle 48 * \param &MinDistance lower bond bound on return 49 * \param &MaxDistance upper bond bound on return 50 * \param IsAngstroem whether units are in angstroem or bohr radii 51 */ 52 void getMinMaxDistance(BondedParticle * const Walker, BondedParticle * const OtherWalker, double &MinDistance, double &MaxDistance, bool IsAngstroem); 45 53 46 54 double getMaxDistance() const; … … 48 56 private: 49 57 static const double BondThreshold; 58 59 void BondLengthMatrixMinMaxDistance(BondedParticle * const Walker, BondedParticle * const OtherWalker, double &MinDistance, double &MaxDistance, bool IsAngstroem); 60 61 void CovalentMinMaxDistance(BondedParticle * const Walker, BondedParticle * const OtherWalker, double &MinDistance, double &MaxDistance, bool IsAngstroem); 50 62 51 63 MatrixContainer *BondLengthMatrix;
Note:
See TracChangeset
for help on using the changeset viewer.