Ignore:
Timestamp:
Apr 27, 2010, 2:25:42 PM (16 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, 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:
632bc3
Parents:
13d5a9 (diff), c695c9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'Analysis_PairCorrelation' into StructureRefactoring

Conflicts:

molecuilder/src/Makefile.am
molecuilder/src/World.cpp
molecuilder/src/World.hpp
molecuilder/src/boundary.cpp
molecuilder/src/builder.cpp
molecuilder/src/log.cpp
molecuilder/src/moleculelist.cpp
molecuilder/src/periodentafel.cpp
molecuilder/src/tesselation.cpp
molecuilder/src/unittests/AnalysisCorrelationToSurfaceUnitTest.cpp
molecuilder/src/unittests/Makefile.am
molecuilder/src/unittests/bondgraphunittest.cpp
molecuilder/src/unittests/gslvectorunittest.cpp
molecuilder/src/unittests/logunittest.cpp
molecuilder/src/unittests/tesselation_boundarytriangleunittest.hpp
molecuilder/src/vector.cpp
molecuilder/tests/Tesselations/defs.in

Conflicts have been many and too numerous to listen here, just the few general cases

  • new molecule() replaced by World::getInstance().createMolecule()
  • new atom() replaced by World::getInstance().createAtom() where appropriate.
  • Some DoLog()s added interfered with changes to the message produced by Log() << Verbose(.) << ...
  • DoLog() has been erroneously added to TestRunner.cpp as well, there cout is appropriate
  • ...

Additionally, there was a bug in atom::clone(), sort was set to atom::nr of the atom to clone not of the clone itself. This caused a failure of the fragmentation.

This merge has been fully checked from a clean build directory with subsequent configure,make all install and make check.
It configures, compiles and runs all test cases and the test suite without errors.

Signed-off-by: Frederik Heber <heber@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/molecule_dynamics.cpp

    r13d5a9 r5f612ee  
    208208    doubles++;
    209209  if (doubles >0)
    210     Log() << Verbose(2) << "Found " << doubles << " Doubles." << endl;
     210    DoLog(2) && (Log() << Verbose(2) << "Found " << doubles << " Doubles." << endl);
    211211  Free(&DoubleList);
    212212//  Log() << Verbose(2) << zeile1.str() << endl << zeile2.str() << endl;
     
    250250    Params.DoubleList[Params.DistanceList[Walker->nr]->begin()->second->nr]++;            // increase this target's source count (>1? not injective)
    251251    Params.DistanceIterators[Walker->nr] = Params.DistanceList[Walker->nr]->begin();    // and remember which one we picked
    252     Log() << Verbose(2) << *Walker << " starts with distance " << Params.DistanceList[Walker->nr]->begin()->first << "." << endl;
     252    DoLog(2) && (Log() << Verbose(2) << *Walker << " starts with distance " << Params.DistanceList[Walker->nr]->begin()->first << "." << endl);
    253253  }
    254254};
     
    278278      Params.DistanceIterators[Walker->nr] = NewBase;
    279279      OldPotential = Potential;
    280       Log() << Verbose(3) << "Found a new permutation, new potential is " << OldPotential << "." << endl;
     280      DoLog(3) && (Log() << Verbose(3) << "Found a new permutation, new potential is " << OldPotential << "." << endl);
    281281    }
    282282  }
     
    307307  for (int i=mol->AtomCount; i--;) // now each single entry in the DoubleList should be <=1
    308308    if (Params.DoubleList[i] > 1) {
    309       eLog() << Verbose(0) << "Failed to create an injective PermutationMap!" << endl;
     309      DoeLog(0) && (eLog()<< Verbose(0) << "Failed to create an injective PermutationMap!" << endl);
    310310      performCriticalExit();
    311311    }
    312   Log() << Verbose(1) << "done." << endl;
     312  DoLog(1) && (Log() << Verbose(1) << "done." << endl);
    313313};
    314314
     
    359359  Params.PenaltyConstants[2] = 1e+7;    // just a huge penalty
    360360  // generate the distance list
    361   Log() << Verbose(1) << "Allocating, initializting and filling the distance list ... " << endl;
     361  DoLog(1) && (Log() << Verbose(1) << "Allocating, initializting and filling the distance list ... " << endl);
    362362  FillDistanceList(this, Params);
    363363
     
    366366
    367367  // make the PermutationMap injective by checking whether we have a non-zero constants[2] term in it
    368   Log() << Verbose(1) << "Making the PermutationMap injective ... " << endl;
     368  DoLog(1) && (Log() << Verbose(1) << "Making the PermutationMap injective ... " << endl);
    369369  MakeInjectivePermutation(this, Params);
    370370  Free(&Params.DoubleList);
    371371
    372372  // argument minimise the constrained potential in this injective PermutationMap
    373   Log() << Verbose(1) << "Argument minimising the PermutationMap." << endl;
     373  DoLog(1) && (Log() << Verbose(1) << "Argument minimising the PermutationMap." << endl);
    374374  OldPotential = 1e+10;
    375375  round = 0;
    376376  do {
    377     Log() << Verbose(2) << "Starting round " << ++round << ", at current potential " << OldPotential << " ... " << endl;
     377    DoLog(2) && (Log() << Verbose(2) << "Starting round " << ++round << ", at current potential " << OldPotential << " ... " << endl);
    378378    OlderPotential = OldPotential;
    379379    do {
     
    425425            } else {
    426426              Params.DistanceIterators[Runner->nr] = Rider;  // if successful also move the pointer in the iterator list
    427               Log() << Verbose(3) << "Found a better permutation, new potential is " << Potential << " vs." << OldPotential << "." << endl;
     427              DoLog(3) && (Log() << Verbose(3) << "Found a better permutation, new potential is " << Potential << " vs." << OldPotential << "." << endl);
    428428              OldPotential = Potential;
    429429            }
    430430            if (Potential > Params.PenaltyConstants[2]) {
    431               eLog() << Verbose(1) << "The two-step permutation procedure did not maintain injectivity!" << endl;
     431              DoeLog(1) && (eLog()<< Verbose(1) << "The two-step permutation procedure did not maintain injectivity!" << endl);
    432432              exit(255);
    433433            }
    434434            //Log() << Verbose(0) << endl;
    435435          } else {
    436             eLog() << Verbose(1) << *Runner << " was not the owner of " << *Sprinter << "!" << endl;
     436            DoeLog(1) && (eLog()<< Verbose(1) << *Runner << " was not the owner of " << *Sprinter << "!" << endl);
    437437            exit(255);
    438438          }
     
    444444    } while (Walker->next != end);
    445445  } while ((OlderPotential - OldPotential) > 1e-3);
    446   Log() << Verbose(1) << "done." << endl;
     446  DoLog(1) && (Log() << Verbose(1) << "done." << endl);
    447447
    448448
     
    467467{
    468468  /// evaluate forces (only the distance to target dependent part) with the final PermutationMap
    469   Log() << Verbose(1) << "Calculating forces and adding onto ForceMatrix ... " << endl;
     469  DoLog(1) && (Log() << Verbose(1) << "Calculating forces and adding onto ForceMatrix ... " << endl);
    470470  ActOnAllAtoms( &atom::EvaluateConstrainedForce, startstep, endstep, PermutationMap, Force );
    471   Log() << Verbose(1) << "done." << endl;
     471  DoLog(1) && (Log() << Verbose(1) << "done." << endl);
    472472};
    473473
     
    504504
    505505  // go through all steps and add the molecular configuration to the list and to the Trajectories of \a this molecule
    506   Log() << Verbose(1) << "Filling intermediate " << MaxSteps << " steps with MDSteps of " << MDSteps << "." << endl;
     506  DoLog(1) && (Log() << Verbose(1) << "Filling intermediate " << MaxSteps << " steps with MDSteps of " << MDSteps << "." << endl);
    507507  for (int step = 0; step <= MaxSteps; step++) {
    508508    mol = World::getInstance().createMolecule();
     
    569569    // parse file into ForceMatrix
    570570    if (!Force.ParseMatrix(file, 0,0,0)) {
    571       eLog() << Verbose(0) << "Could not parse Force Matrix file " << file << "." << endl;
     571      DoeLog(0) && (eLog()<< Verbose(0) << "Could not parse Force Matrix file " << file << "." << endl);
    572572      performCriticalExit();
    573573      return false;
    574574    }
    575575    if (Force.RowCounter[0] != AtomCount) {
    576       eLog() << Verbose(0) << "Mismatch between number of atoms in file " << Force.RowCounter[0] << " and in molecule " << AtomCount << "." << endl;
     576      DoeLog(0) && (eLog()<< Verbose(0) << "Mismatch between number of atoms in file " << Force.RowCounter[0] << " and in molecule " << AtomCount << "." << endl);
    577577      performCriticalExit();
    578578      return false;
     
    653653  switch(Thermostat) {
    654654     case None:
    655       Log() << Verbose(2) <<  "Applying no thermostat..." << endl;
     655      DoLog(2) && (Log() << Verbose(2) <<  "Applying no thermostat..." << endl);
    656656      break;
    657657     case Woodcock:
    658658      if ((configuration.ScaleTempStep > 0) && ((MDSteps-1) % configuration.ScaleTempStep == 0)) {
    659         Log() << Verbose(2) <<  "Applying Woodcock thermostat..." << endl;
     659        DoLog(2) && (Log() << Verbose(2) <<  "Applying Woodcock thermostat..." << endl);
    660660        ActOnAllAtoms( &atom::Thermostat_Woodcock, sqrt(ScaleTempFactor), MDSteps, &ekin );
    661661      }
    662662      break;
    663663     case Gaussian:
    664       Log() << Verbose(2) <<  "Applying Gaussian thermostat..." << endl;
     664      DoLog(2) && (Log() << Verbose(2) <<  "Applying Gaussian thermostat..." << endl);
    665665      ActOnAllAtoms( &atom::Thermostat_Gaussian_init, MDSteps, &G, &E );
    666666
    667       Log() << Verbose(1) << "Gaussian Least Constraint constant is " << G/E << "." << endl;
     667      DoLog(1) && (Log() << Verbose(1) << "Gaussian Least Constraint constant is " << G/E << "." << endl);
    668668      ActOnAllAtoms( &atom::Thermostat_Gaussian_least_constraint, MDSteps, G/E, &ekin, &configuration);
    669669
    670670      break;
    671671     case Langevin:
    672       Log() << Verbose(2) <<  "Applying Langevin thermostat..." << endl;
     672      DoLog(2) && (Log() << Verbose(2) <<  "Applying Langevin thermostat..." << endl);
    673673      // init random number generator
    674674      gsl_rng_env_setup();
     
    680680
    681681     case Berendsen:
    682       Log() << Verbose(2) <<  "Applying Berendsen-VanGunsteren thermostat..." << endl;
     682      DoLog(2) && (Log() << Verbose(2) <<  "Applying Berendsen-VanGunsteren thermostat..." << endl);
    683683      ActOnAllAtoms( &atom::Thermostat_Berendsen, MDSteps, ScaleTempFactor, &ekin, &configuration );
    684684      break;
    685685
    686686     case NoseHoover:
    687       Log() << Verbose(2) <<  "Applying Nose-Hoover thermostat..." << endl;
     687      DoLog(2) && (Log() << Verbose(2) <<  "Applying Nose-Hoover thermostat..." << endl);
    688688      // dynamically evolve alpha (the additional degree of freedom)
    689689      delta_alpha = 0.;
     
    691691      delta_alpha = (delta_alpha - (3.*AtomCount+1.) * configuration.TargetTemp)/(configuration.HooverMass*Units2Electronmass);
    692692      configuration.alpha += delta_alpha*configuration.Deltat;
    693       Log() << Verbose(3) << "alpha = " << delta_alpha << " * " << configuration.Deltat << " = " << configuration.alpha << "." << endl;
     693      DoLog(3) && (Log() << Verbose(3) << "alpha = " << delta_alpha << " * " << configuration.Deltat << " = " << configuration.alpha << "." << endl);
    694694      // apply updated alpha as additional force
    695695      ActOnAllAtoms( &atom::Thermostat_NoseHoover_scale, MDSteps, &ekin, &configuration );
    696696      break;
    697697  }
    698   Log() << Verbose(1) << "Kinetic energy is " << ekin << "." << endl;
    699 };
     698  DoLog(1) && (Log() << Verbose(1) << "Kinetic energy is " << ekin << "." << endl);
     699};
Note: See TracChangeset for help on using the changeset viewer.