Changeset 790807


Ignore:
Timestamp:
Jan 30, 2010, 7:00:47 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:
1f1b23, 271e17
Parents:
d6eb80
Message:

Output....Correlation() don't prepend header line with '#', BinData() changed to just calculate BinEnd by itself.

  • BinData(): If BinEnd < BinStart, BinStart is taken over and just BinEnd calculate by GetMinMax().
  • this is needed for many histograms to be added on top of one another, there we need to have the same bins in each.
  • in all Output..Correlation() functions the '#' was eliminiated as pgfplots does not like it.
Location:
src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/analysis_correlation.cpp

    rd6eb80 r790807  
    370370{
    371371  Info FunctionInfo(__func__);
    372   *file << "# BinStart\tCount" << endl;
     372  *file << "BinStart\tCount" << endl;
    373373  for (BinPairMap::const_iterator runner = map->begin(); runner != map->end(); ++runner) {
    374374    *file << runner->first << "\t" << runner->second << endl;
     
    383383{
    384384  Info FunctionInfo(__func__);
    385   *file << "# BinStart\tAtom1\tAtom2" << endl;
     385  *file << "BinStart\tAtom1\tAtom2" << endl;
    386386  for (PairCorrelationMap::const_iterator runner = map->begin(); runner != map->end(); ++runner) {
    387387    *file << runner->first << "\t" << *(runner->second.first) << "\t" << *(runner->second.second) << endl;
     
    396396{
    397397  Info FunctionInfo(__func__);
    398   *file << "# BinStart\tAtom::x[i]-point.x[i]" << endl;
     398  *file << "BinStart\tAtom::x[i]-point.x[i]" << endl;
    399399  for (CorrelationToPointMap::const_iterator runner = map->begin(); runner != map->end(); ++runner) {
    400400    *file << runner->first;
     
    412412{
    413413  Info FunctionInfo(__func__);
    414   *file << "# BinStart\tTriangle" << endl;
     414  *file << "BinStart\tTriangle" << endl;
    415415  for (CorrelationToSurfaceMap::const_iterator runner = map->begin(); runner != map->end(); ++runner) {
    416416    *file << runner->first << "\t" << *(runner->second.first) << "\t" << *(runner->second.second) << endl;
  • src/analysis_correlation.hpp

    rd6eb80 r790807  
    9090/** Puts given correlation data into bins of given size (histogramming).
    9191 * Note that BinStart and BinEnd are desired to fill the complete range, even where Bins are zero. If this is
    92  * not desired, give equal BinStart and BinEnd and the map will contain only Bins where the count is one or greater.
     92 * not desired, give equal BinStart and BinEnd and the map will contain only Bins where the count is one or greater. If a
     93 * certain start value is desired, give BinStart and a BinEnd that is smaller than BinStart, then only BinEnd will be
     94 * calculated automatically, i.e. BinStart = 0. and BinEnd = -1. .
    9395 * Also note that the range is given inclusive, i.e. [ BinStart, BinEnd ].
    9496 * \param *map map of doubles to count
     
    114116  if (BinStart == BinEnd) { // if same, find range ourselves
    115117    GetMinMax( map, start, end);
    116   } else { // if not, initialise range to zero
     118  } else if (BinEnd < BinStart) { // if BinEnd smaller, just look for new max
     119    GetMinMax( map, start, end);
     120    start = BinStart;
     121  } else { // else take both values
    117122    start = BinStart;
    118123    end = BinEnd;
Note: See TracChangeset for help on using the changeset viewer.