Changeset 505d05 for src/Analysis
- Timestamp:
- Oct 31, 2011, 11:48:46 AM (13 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:
- e65878
- Parents:
- 72105a
- git-author:
- Frederik Heber <heber@…> (05/11/11 16:14:56)
- git-committer:
- Frederik Heber <heber@…> (10/31/11 11:48:46)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Analysis/analysis_correlation.cpp
r72105a r505d05 22 22 #include <iostream> 23 23 #include <iomanip> 24 #include <limits> 24 25 25 26 #include "atom.hpp" … … 103 104 // get highest trajectory size 104 105 LOG(0,"STATUS: Retrieving maximum amount of time steps ..."); 105 size_t max_timesteps = 0; 106 size_t min_timesteps = -1; 106 if (atoms.size() == 0) 107 return range<size_t>(0,0); 108 size_t max_timesteps = std::numeric_limits<size_t>::min(); 109 size_t min_timesteps = std::numeric_limits<size_t>::max(); 107 110 BOOST_FOREACH(atom *_atom, atoms) { 108 111 if (_atom->getTrajectorySize() > max_timesteps) 109 112 max_timesteps = _atom->getTrajectorySize(); 110 if ( (_atom->getTrajectorySize() <= max_timesteps) && (min_timesteps == (size_t)-1))113 if (_atom->getTrajectorySize() < min_timesteps) 111 114 min_timesteps = _atom->getTrajectorySize(); 112 115 } … … 180 183 181 184 // set time step 185 LOG(0,"STATUS: Stepping onto to time step " << timestep << "."); 182 186 World::getInstance().setTime(timestep); 183 187 184 188 // get all molecules for this time step 185 LOG(0,"STATUS: Gathering molecules f or time step " << timestep << " ...");189 LOG(0,"STATUS: Gathering molecules from " << atoms.size() << " atoms for time step " << timestep << " ..."); 186 190 std::set<molecule *> molecules; 187 191 BOOST_FOREACH(atom *_atom, atoms) … … 189 193 190 194 // calculate dipoles for each 191 LOG(0,"STATUS: Calculating dipoles for time step " << timestep << " ...");195 LOG(0,"STATUS: Calculating dipoles for " << molecules.size() << " molecules for time step " << timestep << " ..."); 192 196 size_t i=0; 193 197 BOOST_FOREACH(molecule *_mol, molecules) { 194 198 const Vector Dipole = getDipole(_mol->begin(), _mol->end()); 195 LOG(2,"INFO: Dipole vector at time step " << timestep << " for formolecule "199 LOG(2,"INFO: Dipole vector at time step " << timestep << " for molecule " 196 200 << _mol->getId() << " is " << Dipole); 197 201 molecule::const_iterator iter = _mol->begin(); … … 649 653 void OutputDipoleAngularCorrelation_Value( ofstream * const file, DipoleAngularCorrelationMap::const_iterator &runner ) 650 654 { 651 *file << runner->second->getName();655 *file << *(runner->second); 652 656 }; 653 657
Note:
See TracChangeset
for help on using the changeset viewer.