Changeset 0bbfa1 for src/Parser
- Timestamp:
- Dec 16, 2010, 5:32:22 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:
- 92d756
- Parents:
- 93fd43e
- git-author:
- Frederik Heber <heber@…> (12/08/10 01:10:03)
- git-committer:
- Frederik Heber <heber@…> (12/16/10 17:32:22)
- Location:
- src/Parser
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/TremoloAtomInfoContainer.cpp
r93fd43e r0bbfa1 35 35 GrpTypeNo("0"), 36 36 torsion("-"), 37 neighbors(std::vector<int>(0, 5)) 37 neighbors(std::vector<int>(0, 5)), 38 neighbors_processed(false) 38 39 {} 39 40 -
src/Parser/TremoloAtomInfoContainer.hpp
r93fd43e r0bbfa1 39 39 std::string torsion; 40 40 std::vector<int> neighbors; 41 bool neighbors_processed; 41 42 }; 42 43 -
src/Parser/TremoloParser.cpp
r93fd43e r0bbfa1 90 90 string::size_type location; 91 91 92 // reset atomIdMap, for we now get new serials 93 atomIdMap.clear(); 92 94 usedFields.clear(); 95 93 96 molecule *newmol = World::getInstance().createMolecule(); 94 97 newmol->ActiveFlag = true; … … 220 223 ? (*currentBond)->GetOtherAtom(currentAtom)->getId()+1 : 0) << "\t"; 221 224 if (currentBond != currentAtom->ListOfBonds.end()) 222 currentBond++;225 ++currentBond; 223 226 } 224 227 } … … 310 313 * Reads neighbor information for one atom from the input. 311 314 * 312 * \param stream where to read the information from313 * \param number of neighbors to read314 * \param world id of the atom the information belongs to315 * \param line stream where to read the information from 316 * \param numberOfNeighbors number of neighbors to read 317 * \param atomid world id of the atom the information belongs to 315 318 */ 316 319 void TremoloParser::readNeighbors(stringstream* line, int numberOfNeighbors, int atomId) { … … 320 323 // 0 is used to fill empty neighbor positions in the tremolo file. 321 324 if (neighborId > 0) { 325 // std::cout << "Atom with global id " << atomId << " has neighbour with serial " << neighborId << std::endl; 322 326 additionalAtomData[atomId].neighbors.push_back(neighborId); 323 327 } … … 356 360 currentInfo != additionalAtomData.end(); currentInfo++ 357 361 ) { 358 for(vector<int>::iterator neighbor = currentInfo->second.neighbors.begin(); 359 neighbor != currentInfo->second.neighbors.end(); neighbor++ 360 ) { 361 World::getInstance().getAtom(AtomById(currentInfo->first)) 362 ->addBond(World::getInstance().getAtom(AtomById(atomIdMap[*neighbor]))); 362 if (!currentInfo->second.neighbors_processed) { 363 for(vector<int>::iterator neighbor = currentInfo->second.neighbors.begin(); 364 neighbor != currentInfo->second.neighbors.end(); neighbor++ 365 ) { 366 // std::cout << "Creating bond between (" 367 // << currentInfo->first 368 // << ") and (" 369 // << atomIdMap[*neighbor] << "|" << *neighbor << ")" << std::endl; 370 World::getInstance().getAtom(AtomById(currentInfo->first)) 371 ->addBond(World::getInstance().getAtom(AtomById(atomIdMap[*neighbor]))); 372 } 373 currentInfo->second.neighbors_processed = true; 363 374 } 364 375 }
Note:
See TracChangeset
for help on using the changeset viewer.