Changeset 3738f0 for src/Actions/FragmentationAction
- Timestamp:
- Mar 1, 2011, 12:49:28 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:
- 0cbad2
- Parents:
- ce5f05
- git-author:
- Frederik Heber <heber@…> (02/26/11 00:10:05)
- git-committer:
- Frederik Heber <heber@…> (03/01/11 12:49:28)
- Location:
- src/Actions/FragmentationAction
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/FragmentationAction/CreateAdjacencyAction.cpp
rce5f05 r3738f0 58 58 BondGraph *BG = World::getInstance().getBondGraph(); 59 59 ASSERT(BG != NULL, "FragmentationCreateAdjacencyAction: BondGraph is NULL."); 60 BG->SetMaxDistanceToMaxOfCovalentRadii(AtomSetMixin<std::vector<atom *> >(World::getInstance().getSelectedAtoms())); 60 61 double BondDistance = BG->getMaxDistance(); 61 62 bool IsAngstroem = configuration->GetIsAngstroem(); -
src/Actions/FragmentationAction/DepthFirstSearchAction.cpp
rce5f05 r3738f0 52 52 std::deque<bond *> *BackEdgeStack = NULL; 53 53 std::deque<bond *> *LocalBackEdgeStack = NULL; 54 BondGraph *BG = World::getInstance().getBondGraph();55 mol->CreateAdjacencyList(params.distance, World::getInstance().getConfig()->GetIsAngstroem(), &BondGraph::getMinMaxDistance, BG);56 54 Subgraphs = mol->DepthFirstSearchAnalysis(BackEdgeStack); 57 55 if (Subgraphs != NULL) { -
src/Actions/FragmentationAction/FragmentationAction.cpp
rce5f05 r3738f0 43 43 clock_t start,end; 44 44 molecule *mol = NULL; 45 config *configuration = World::getInstance().getConfig();46 45 int ExitFlag = 0; 47 46 … … 55 54 DoLog(0) && (Log() << Verbose(0) << "Creating connection matrix..." << endl); 56 55 start = clock(); 57 mol->CreateAdjacencyList(params.distance, configuration->GetIsAngstroem(), &BondGraph::getMinMaxDistance, World::getInstance().getBondGraph());58 56 DoLog(0) && (Log() << Verbose(0) << "Fragmenting molecule with current connection matrix ..." << endl); 59 57 if (mol->hasBondStructure()) { -
src/Actions/FragmentationAction/SubgraphDissectionAction.cpp
rce5f05 r3738f0 50 50 getParametersfromValueStorage(); 51 51 52 DoLog(1) && (Log() << Verbose(1) << "Dissecting molecular system into a set of disconnected subgraphs ... " << endl);53 52 54 53 // first create stuff for undo state 54 LOG(0, "STATUS: Creating undo state."); 55 55 MolAtomList moleculelist; 56 56 vector<molecule *> allmolecules = World::getInstance().getAllMolecules(); … … 66 66 67 67 // 0a. remove all present molecules 68 LOG(0, "STATUS: Removing all present molecules."); 68 69 MoleculeListClass *molecules = World::getInstance().getMolecules(); 69 70 for (vector<molecule *>::iterator MolRunner = allmolecules.begin(); MolRunner != allmolecules.end(); ++MolRunner) { … … 88 89 89 90 // 1. create the bond structure of the single molecule 91 LOG(0, "STATUS: (Re-)constructing adjacency."); 90 92 if (mol->getBondCount() == 0) { 91 93 BondGraph *BG = World::getInstance().getBondGraph(); 92 if (!BG->CreateAdjacencyForMolecule(mol)) { 93 World::getInstance().destroyMolecule(mol); 94 DoeLog(1) && (eLog()<< Verbose(1) << "There are no bonds." << endl); 95 return Action::failure; 96 } 94 molecule::atomVector Set = mol->getAtomSet(); 95 BG->CreateAdjacency(Set); 96 // if (mol->getBondCount() == 0) { 97 // World::getInstance().destroyMolecule(mol); 98 // ELOG(1, "There are no bonds."); 99 // return Action::failure; 100 // } 97 101 } 98 102 99 103 // 2. scan for connected subgraphs 104 LOG(0, "STATUS: Analysing adjacency graph."); 100 105 MoleculeLeafClass *Subgraphs = NULL; // list of subgraphs from DFS analysis 101 106 std::deque<bond *> *BackEdgeStack = NULL; … … 111 116 112 117 // TODO: When DepthFirstSearchAnalysis does not use AddCopyAtom() anymore, we don't need to delete all original atoms 118 LOG(0, "STATUS: Creating molecules as connected subgraphs."); 113 119 { 114 120 { … … 152 158 153 159 // 4. free Leafs 160 LOG(0, "STATUS: Done."); 154 161 MoleculeLeafClass *MolecularWalker = Subgraphs; 155 162 while (MolecularWalker->next != NULL) {
Note:
See TracChangeset
for help on using the changeset viewer.