- Timestamp:
- Feb 4, 2011, 6:56:38 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:
- 00b59d5
- Parents:
- 17f3cd
- git-author:
- Frederik Heber <heber@…> (01/17/11 11:21:17)
- git-committer:
- Frederik Heber <heber@…> (02/04/11 18:56:38)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/molecule_graph.cpp
r17f3cd r1d5afa5 26 26 #include "bondgraph.hpp" 27 27 #include "config.hpp" 28 #include "element.hpp" 28 29 #include "Helpers/defs.hpp" 29 #include " element.hpp"30 #include "Helpers/fast_functions.hpp" 30 31 #include "Helpers/helpers.hpp" 31 #include " CodePatterns/Info.hpp"32 #include "LinearAlgebra/RealSpaceMatrix.hpp" 32 33 #include "linkedcell.hpp" 33 34 #include "lists.hpp" 34 #include "CodePatterns/Verbose.hpp"35 #include "CodePatterns/Log.hpp"36 35 #include "molecule.hpp" 37 36 #include "World.hpp" 38 #include "Helpers/fast_functions.hpp" 37 #include "Box.hpp" 38 39 39 #include "CodePatterns/Assert.hpp" 40 #include "LinearAlgebra/RealSpaceMatrix.hpp" 41 #include "Box.hpp" 40 #include "CodePatterns/Info.hpp" 41 #include "CodePatterns/Log.hpp" 42 #include "CodePatterns/Verbose.hpp" 43 44 #define MAXBONDS 8 42 45 43 46 struct BFSAccounting … … 1144 1147 1145 1148 // allocate storage structure 1146 CurrentBonds = new int[ 8]; // contains parsed bonds of current atom1147 for(int i=0;i< 8;i++)1149 CurrentBonds = new int[MAXBONDS]; // contains parsed bonds of current atom 1150 for(int i=0;i<MAXBONDS;i++) 1148 1151 CurrentBonds[i] = 0; 1149 1152 return true; … … 1210 1213 1211 1214 char buffer[MAXSTRINGSIZE]; 1215 int tmp; 1212 1216 // Parse the file line by line and count the bonds 1213 1217 while (!File.eof()) { … … 1221 1225 if ((AtomNr >= 0) && (AtomNr < AtomCount)) { 1222 1226 Walker = ListOfAtoms[AtomNr]; 1223 while (!line.eof()) 1224 line >> CurrentBonds[++CurrentBondsOfAtom]; 1227 while (line >> ws >> tmp) { 1228 std::cout << "Recognized bond partner " << tmp << std::endl; 1229 CurrentBonds[++CurrentBondsOfAtom] = tmp; 1230 ASSERT(CurrentBondsOfAtom < MAXBONDS, 1231 "molecule::CheckAdjacencyFileAgainstMolecule() - encountered more bonds than allowed: " 1232 +toString(CurrentBondsOfAtom)+" >= "+toString(MAXBONDS)+"!"); 1233 } 1225 1234 // compare against present bonds 1226 1235 CheckAdjacencyFileAgainstMolecule_CompareBonds(status, NonMatchNumber, Walker, CurrentBondsOfAtom, AtomNr, CurrentBonds, ListOfAtoms);
Note:
See TracChangeset
for help on using the changeset viewer.