Changeset c0e28c for src/Parser/TremoloParser.cpp
- Timestamp:
- Jan 6, 2012, 2:02:08 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, Candidate_v1.7.0, 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:
- d08ab3
- Parents:
- fbbcde
- git-author:
- Frederik Heber <heber@…> (01/04/12 18:34:22)
- git-committer:
- Frederik Heber <heber@…> (01/06/12 14:02:08)
- File:
-
- 1 edited
-
src/Parser/TremoloParser.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/Parser/TremoloParser.cpp
rfbbcde rc0e28c 103 103 usedFields.clear(); 104 104 additionalAtomData.clear(); 105 atomIdMap.clear();106 105 knownKeys.clear(); 107 106 } … … 116 115 string::size_type location; 117 116 118 // reset atomIdMap, for we now get new serials 119 atomIdMap.clear(); 117 // reset the id maps 118 resetIdAssociations(); 119 120 120 LOG(1, "INFO: Clearing usedFields."); 121 121 usedFields.clear(); … … 444 444 ASSERT(tok_iter != tokens.end(), "FormatParser< tremolo >::readAtomDataLine() - no value for "+keyName+"!"); 445 445 LOG(4, "INFO: Parsing key " << keyName << " with next token " << *tok_iter); 446 a tomIdMap[toInt(*tok_iter)] = atomid;446 associateLocaltoGlobalId(toInt(*tok_iter), atomid); 447 447 tok_iter++; 448 448 break; … … 525 525 neighbor != currentInfo->second.neighbors.end(); neighbor++ 526 526 ) { 527 // LOG(1, "INFO: Creating bond between (" 528 // << currentInfo->first 529 // << ") and (" 530 // << atomIdMap[*neighbor] << "|" << *neighbor << ")"); 527 LOG(3, "INFO: Creating bond between (" 528 << currentInfo->first 529 << ") and (" 530 << getGlobalId(*neighbor) << "|" << *neighbor << ")"); 531 ASSERT(getGlobalId(*neighbor) != -1, 532 "FormatParser< tremolo >::processNeighborInformation() - global id to local id " 533 +toString(*neighbor)+" is unknown."); 531 534 World::getInstance().getAtom(AtomById(currentInfo->first)) 532 ->addBond(WorldTime::getTime(), World::getInstance().getAtom(AtomById( atomIdMap[*neighbor])));535 ->addBond(WorldTime::getTime(), World::getInstance().getAtom(AtomById(getGlobalId(*neighbor)))); 533 536 } 534 537 currentInfo->second.neighbors_processed = true; … … 558 561 559 562 line >> id; 560 result << atomIdMap[id];563 result << getGlobalId(id); 561 564 while (line.good()) { 562 565 line >> separator >> id; 563 result << separator << atomIdMap[id];566 result << separator << getGlobalId(id); 564 567 } 565 568
Note:
See TracChangeset
for help on using the changeset viewer.
