Changeset 505d05 for src/Analysis


Ignore:
Timestamp:
Oct 31, 2011, 11:48:46 AM (13 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:
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)
Message:

DipoleAngularCorrelation: output now contains name _and position_ of first atom of dipole molecule.

  • TESTFIX: Had to change _values...dat files accordingly.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Analysis/analysis_correlation.cpp

    r72105a r505d05  
    2222#include <iostream>
    2323#include <iomanip>
     24#include <limits>
    2425
    2526#include "atom.hpp"
     
    103104  // get highest trajectory size
    104105  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();
    107110  BOOST_FOREACH(atom *_atom, atoms) {
    108111    if (_atom->getTrajectorySize() > max_timesteps)
    109112      max_timesteps  = _atom->getTrajectorySize();
    110     if ((_atom->getTrajectorySize() <= max_timesteps) && (min_timesteps == (size_t)-1))
     113    if (_atom->getTrajectorySize() < min_timesteps)
    111114      min_timesteps = _atom->getTrajectorySize();
    112115  }
     
    180183
    181184  // set time step
     185  LOG(0,"STATUS: Stepping onto to time step " << timestep << ".");
    182186  World::getInstance().setTime(timestep);
    183187
    184188  // get all molecules for this time step
    185   LOG(0,"STATUS: Gathering molecules for time step " << timestep << " ...");
     189  LOG(0,"STATUS: Gathering molecules from " << atoms.size() << " atoms for time step " << timestep << " ...");
    186190  std::set<molecule *> molecules;
    187191  BOOST_FOREACH(atom *_atom, atoms)
     
    189193
    190194  // 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 << " ...");
    192196  size_t i=0;
    193197  BOOST_FOREACH(molecule *_mol, molecules) {
    194198    const Vector Dipole = getDipole(_mol->begin(), _mol->end());
    195     LOG(2,"INFO: Dipole vector at time step " << timestep << " for for molecule "
     199    LOG(2,"INFO: Dipole vector at time step " << timestep << " for molecule "
    196200        << _mol->getId() << " is " << Dipole);
    197201    molecule::const_iterator iter = _mol->begin();
     
    649653void OutputDipoleAngularCorrelation_Value( ofstream * const file, DipoleAngularCorrelationMap::const_iterator &runner )
    650654{
    651   *file << runner->second->getName();
     655  *file << *(runner->second);
    652656};
    653657
Note: See TracChangeset for help on using the changeset viewer.