Changeset 3c4f04 for src


Ignore:
Timestamp:
Jul 27, 2009, 2:22:20 PM (15 years ago)
Author:
Frederik Heber <heber@…>
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:
fcc9b0
Parents:
b6d8a9
git-author:
Frederik Heber <heber@…> (07/27/09 14:19:12)
git-committer:
Frederik Heber <heber@…> (07/27/09 14:22:20)
Message:

BUGFIX: config::Load() added atoms in wrong order, hence resulting in wrong names.

  • config::Load() - int in LinearList should have been mapped not original one
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/config.cpp

    rb6d8a9 r3c4f04  
    936936    map<int, atom *> AtomList[config::MaxTypes];
    937937    map<int, atom *> LinearList;
     938    atom *neues = NULL;
    938939    if (!FastParsing) {
    939940      // parse in trajectories
    940941      bool status = true;
    941       atom *neues = NULL;
    942942      while (status) {
    943943        cout << "Currently parsing MD step " << repetition << "." << endl;
     
    949949              neues = new atom();
    950950              AtomList[i][j] = neues;
    951               LinearList[FileBuffer->CurrentLine] = neues;
     951              LinearList[ FileBuffer->LineMapping[FileBuffer->CurrentLine] ] = neues;
    952952              neues->type = elementhash[i]; // find element type
    953953            } else
     
    10051005        }
    10061006        repetition++;
    1007       }
    1008       // put atoms into the molecule in their original order
    1009       for(map<int, atom*>::iterator runner = LinearList.begin(); runner != LinearList.end(); ++runner) {
    1010         mol->AddAtom(runner->second);
    10111007      }
    10121008      repetition--;
     
    10261022        for(int j=0;j<No[i];j++) {
    10271023          sprintf(keyword,"%s_%i",name, j+1);
    1028           atom *neues = new atom();
     1024          if (repetition == 0) {
     1025            neues = new atom();
     1026            AtomList[i][j] = neues;
     1027            LinearList[ FileBuffer->LineMapping[FileBuffer->CurrentLine] ] = neues;
     1028            neues->type = elementhash[i]; // find element type
     1029          } else
     1030            neues = AtomList[i][j];
    10291031          // then parse for each atom the coordinates as often as present
    10301032          ParseForParameter(verbose,FileBuffer, keyword, 0, 1, 1, double_type, &neues->x.x[0], repetition,critical);
     
    10431045        }
    10441046      }
     1047    }
     1048    // put atoms into the molecule in their original order
     1049    for(map<int, atom*>::iterator runner = LinearList.begin(); runner != LinearList.end(); ++runner) {
     1050      mol->AddAtom(runner->second);
    10451051    }
    10461052  }
Note: See TracChangeset for help on using the changeset viewer.