Changeset 9d37ac
- Timestamp:
- Mar 1, 2011, 10:16:38 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:
- 9b8387
- Parents:
- 4afa46
- git-author:
- Frederik Heber <heber@…> (02/24/11 14:39:14)
- git-committer:
- Frederik Heber <heber@…> (03/01/11 10:16:38)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/molecule_graph.cpp
r4afa46 r9d37ac 110 110 } 111 111 } 112 ;113 112 114 113 /** Creates an adjacency list of the molecule. … … 125 124 * -# correct the bond degree iteratively (single->double->triple bond) 126 125 * -# finally print the bond list to \a *out if desired 127 * \param *out out stream for printing the matrix, NULL if no output128 126 * \param bonddistance length of linked cells (i.e. maximum minimal length checked) 129 127 * \param IsAngstroem whether coordinate system is gauged to Angstroem or Bohr radii … … 269 267 270 268 /** Prints a list of all bonds to \a *out. 271 * \param output stream272 269 */ 273 270 void molecule::OutputBondsList() const … … 292 289 * preferred over carbon bonds). Beforehand, we had picked the first mismatching partner, which lead to oxygenes with single instead of 293 290 * double bonds as was expected. 294 * \param *out output stream for debugging295 291 * \return number of bonds that could not be corrected 296 292 */ … … 316 312 return (No); 317 313 } 318 ; 314 319 315 320 316 /** Counts all cyclic bonds and returns their number. 321 317 * \note Hydrogen bonds can never by cyclic, thus no check for that 322 * \param *out output stream for debugging 323 * \return number opf cyclic bonds 318 * \return number of cyclic bonds 324 319 */ 325 320 int molecule::CountCyclicBonds() … … 384 379 385 380 /** Sets atom::GraphNr and atom::LowpointNr to BFSAccounting::CurrentGraphNr. 386 * \param *out output stream for debugging387 381 * \param *Walker current node 388 382 * \param &BFS structure with accounting data for BFS … … 405 399 * -# TreeEgde: set atom::Ancestor and continue with Walker along this edge 406 400 * Continue until molecule::FindNextUnused() finds no more unused bonds. 407 * \param *out output stream for debugging408 401 * \param *mol molecule with atoms and finding unused bonds 409 402 * \param *&Binder current edge … … 448 441 * Meaning that if we touch upon a node who suddenly has a smaller atom::LowpointNr than its ancestor, then we 449 442 * have a found a new branch in the graph tree. 450 * \param *out output stream for debugging451 443 * \param *mol molecule with atoms and finding unused bonds 452 444 * \param *&Walker current node … … 495 487 * If we are not DFSAccounting::BackStepping, then we clear the root stack by putting everything into a 496 488 * component down till we meet DFSAccounting::Root. 497 * \param *out output stream for debugging498 489 * \param *mol molecule with atoms and finding unused bonds 499 490 * \param *&Walker current node … … 535 526 536 527 /** Initializes DFSAccounting structure. 537 * \param *out output stream for debugging538 528 * \param &DFS accounting structure to allocate 539 529 * \param *mol molecule with AtomCount, BondCount and all atoms … … 551 541 552 542 /** Free's DFSAccounting structure. 553 * \param *out output stream for debugging554 543 * \param &DFS accounting structure to free 555 544 */ … … 571 560 * articulations points, ... 572 561 * We use the algorithm from [Even, Graph Algorithms, p.62]. 573 * \param *out output stream for debugging574 562 * \param *&BackEdgeStack NULL pointer to std::deque<bond *> with all the found back edges, allocated and filled on return 575 563 * \return list of each disconnected subgraph as an individual molecule class structure … … 672 660 673 661 /** Output graph information per atom. 674 * \param *out output stream675 662 */ 676 663 void molecule::OutputGraphInfoPerAtom() const … … 682 669 683 670 /** Output graph information per bond. 684 * \param *out output stream685 671 */ 686 672 void molecule::OutputGraphInfoPerBond() const … … 712 698 713 699 /** Initialise each vertex as white with no predecessor, empty queue, color Root lightgray. 714 * \param *out output stream for debugging715 700 * \param &BFS accounting structure 716 701 * \param AtomCount number of entries in the array to allocate … … 733 718 734 719 /** Free's accounting structure. 735 * \param *out output stream for debugging736 720 * \param &BFS accounting structure 737 721 */ … … 747 731 748 732 /** Clean the accounting structure. 749 * \param *out output stream for debugging750 733 * \param &BFS accounting structure 751 734 */ … … 763 746 764 747 /** Resets shortest path list and BFSStack. 765 * \param *out output stream for debugging766 748 * \param *&Walker current node, pushed onto BFSAccounting::BFSStack and BFSAccounting::TouchedStack 767 749 * \param &BFS accounting structure … … 776 758 777 759 /** Performs a BFS from \a *Root, trying to find the same node and hence a cycle. 778 * \param *out output stream for debugging779 760 * \param *&BackEdge the edge from root that we don't want to move along 780 761 * \param &BFS accounting structure … … 864 845 865 846 /** Climb back the BFSAccounting::PredecessorList and find cycle members. 866 * \param *out output stream for debugging867 847 * \param *&OtherAtom 868 848 * \param *&BackEdge denotes the edge we did not want to travel along when doing CyclicBFSFromRootToRoot() … … 907 887 908 888 /** From a given node performs a BFS to touch the next cycle, for whose nodes \a *&MinimumRingSize is set and set it accordingly. 909 * \param *out output stream for debugging910 889 * \param *&Root node to look for closest cycle from, i.e. \a *&MinimumRingSize is set for this node 911 890 * \param *&MinimumRingSize minimum distance from this node possible without encountering oneself, set on return for each atom … … 962 941 963 942 /** All nodes that are not in cycles get assigned a \a *&MinimumRingSizeby BFS to next cycle. 964 * \param *out output stream for debugging965 943 * \param *&MinimumRingSize array with minimum distance without encountering onself for each atom 966 944 * \param &MinRingSize global minium distance … … 997 975 * we have found the Root via BFS, we may climb back the closed cycle via the Predecessors. Thereby we mark atoms and bonds 998 976 * as cyclic and print out the cycles. 999 * \param *out output stream for debugging1000 977 * \param *BackEdgeStack stack with all back edges found during DFS scan. Beware: This stack contains the bonds from the total molecule, not from the subgraph! 1001 978 * \param *&MinimumRingSize contains smallest ring size in molecular structure on return or -1 if no rings were found, if set is maximum search distance 1002 979 * \todo BFS from the not-same-LP to find back to starting point of tributary cycle over more than one bond 1003 980 */ 1004 void molecule::CyclicStructureAnalysis(std::deque<bond *> * BackEdgeStack, int *&MinimumRingSize) const 981 void molecule::CyclicStructureAnalysis( 982 std::deque<bond *> * BackEdgeStack, 983 int *&MinimumRingSize 984 ) const 1005 985 { 1006 986 struct BFSAccounting BFS; … … 1102 1082 1103 1083 /** Output a list of flags, stating whether the bond was visited or not. 1104 * \param *out output stream for debugging 1105 * \param *list 1084 * \param *list list to print 1106 1085 */ 1107 1086 void OutputAlreadyVisited(int *list) … … 1236 1215 1237 1216 /** Checks contents of adjacency file against bond structure in structure molecule. 1238 * \param *out output stream for debugging1239 1217 * \param *path path to file 1240 1218 * \param **ListOfAtoms allocated (molecule::AtomCount) and filled lookup table for ids (Atom::nr) to *Atom … … 1294 1272 1295 1273 /** Picks from a global stack with all back edges the ones in the fragment. 1296 * \param *out output stream for debugging1297 1274 * \param **ListOfLocalAtoms array of father atom::nr to local atom::nr (reverse of atom::father) 1298 1275 * \param *ReferenceStack stack with all the back egdes … … 1442 1419 * Gray vertices are always enqueued in an std::deque<atom *> FIFO queue, the rest is usual BFS with adding vertices found was 1443 1420 * white and putting into queue. 1444 * \param *out output stream for debugging1445 1421 * \param *Mol Molecule class to add atoms to 1446 1422 * \param **AddedAtomList list with added atom pointers, index is atom father's number … … 1568 1544 * with end points present in this molecule, bond is created in this molecule. 1569 1545 * Special care was taken to ensure that this is of complexity O(N), where N is the \a Father's molecule::AtomCount. 1570 * \param *out output stream for debugging1571 1546 * \param *Father father molecule 1572 1547 * \return true - is induced subgraph, false - there are atoms with fathers not in \a Father 1573 1548 * \todo not checked, not fully working probably 1574 1549 */ 1575 bool molecule::BuildInducedSubgraph(const molecule *Father) 1576 { 1550 bool molecule::BuildInducedSubgraph(const molecule *Father){ 1577 1551 bool status = true; 1578 1552 atom **ParentList = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.