Changeset d3347e


Ignore:
Timestamp:
Mar 5, 2010, 11:40:30 AM (15 years ago)
Author:
Tillmann Crueger <crueger@…>
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:
75ac0c
Parents:
9879f6
git-author:
Tillmann Crueger <crueger@…> (03/05/10 11:40:05)
git-committer:
Tillmann Crueger <crueger@…> (03/05/10 11:40:30)
Message:

FIX: repaired compiler problems for latest refactoring

Location:
src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • src/lists.hpp

    r9879f6 rd3347e  
    88#ifndef LISTS_HPP_
    99#define LISTS_HPP_
     10
     11class atom;
    1012
    1113/******************************** Some templates for list management ***********************************/
  • src/memoryallocator.hpp

    r9879f6 rd3347e  
    115115template <typename X> void Free(X** buffer, const char *msg = NULL)
    116116{
     117  std::cout << "!!!!!!!!!!!!!!!!!removing pointer to buffer !!!!!!!!!!!!" << std::endl;
    117118  if ((buffer == NULL) || (*buffer == NULL))
    118119    return;
     
    130131template <typename X> void Free(X* const buffer, const char *msg = NULL)
    131132{
     133  std::cout << "!!!!!!!!!!!!!!!!!removing direct buffer !!!!!!!!!!!!" << std::endl;
    132134  if ((buffer == NULL))
    133135    return;
  • src/molecule.cpp

    r9879f6 rd3347e  
    3131 * Initialises molecule list with correctly referenced start and end, and sets molecule::last_atom to zero.
    3232 */
    33 molecule::molecule(const periodentafel * const teil) : elemente(teil)
     33molecule::molecule(const periodentafel * const teil) : elemente(teil),
    3434  first(new bond(0, 0, 1, -1)), last(new bond(0, 0, 1, -1)), MDSteps(0), AtomCount(0),
    3535  BondCount(0), ElementCount(0), NoNonHydrogen(0), NoNonBonds(0), NoCyclicBonds(0), BondDistance(0.),
     
    166166pair<molecule::iterator,bool> molecule::insert ( atom * const key )
    167167{
    168   return atoms.insert(key);
     168  pair<atomSet::iterator,bool> res = atoms.insert(key);
     169  return pair<iterator,bool>(iterator(res.first,this),res.second);
    169170}
    170171
     
    937938void molecule::CountAtoms()
    938939{
     940  cout << "!!!!!!!!!!! Assigning Numbers to atoms " << endl;
    939941  int i = size();
    940942  if ((AtomCount == 0) || (i != AtomCount)) {
     943    cout << "!!!!!!!!! Counting needed" << endl;
    941944    Log() << Verbose(3) << "Mismatch in AtomCount " << AtomCount << " and recounted number " << i << ", renaming all." << endl;
    942945    AtomCount = i;
     
    958961    } else
    959962      Log() << Verbose(3) << "AtomCount is still " << AtomCount << ", thus counting nothing." << endl;
     963  }
     964  else {
     965    cout << "!!!!!!!!! Nothing changed while counting" << endl;
    960966  }
    961967};
  • src/molecule.hpp

    r9879f6 rd3347e  
    9494    typedef ObservedIterator<atomSet> iterator;
    9595    typedef atomSet::const_iterator const_iterator;
     96
    9697    double cell_size[6];//!< cell size
    9798    const periodentafel * const elemente; //!< periodic table with each element
     
    120121    atomSet atoms; //<!set of atoms
    121122  protected:
     123    /**
     124     * this iterator type should be used for internal variables, \
     125     * since it will not lock
     126     */
     127    typedef atomSet::iterator internal_iterator;
     128
     129
    122130    molecule(const periodentafel * const teil);
    123131    virtual ~molecule();
     
    149157  Vector *GetCenter() const ;
    150158  TesselPoint *GetPoint() const ;
    151   int GetMaxId() const;
     159  //int GetMaxId() const;
    152160  void GoToNext() const ;
    153161  void GoToFirst() const ;
     
    342350  private:
    343351  int last_atom;      //!< number given to last atom
    344   mutable iterator InternalPointer;  //!< internal pointer for PointCloud
     352  mutable internal_iterator InternalPointer;  //!< internal pointer for PointCloud
    345353};
    346354
  • src/molecule_graph.cpp

    r9879f6 rd3347e  
    136136    AtomMap = Calloc<atom *> (AtomCount, "molecule::CreateAdjacencyList - **AtomCount");
    137137    for (molecule::const_iterator iter = begin(); iter != end(); ++iter) {
     138      std::cout << "!!!!!!!!!!!!Copying pointer to Atom number: " << (*iter)->nr << std::endl;
    138139      AtomMap[(*iter)->nr] = (*iter);
    139140    }
     
    177178          }
    178179        }
     180    std::cout << "trying to remove Pointer to buffer " << std::endl;
    179181    Free(&AtomMap);
    180182    delete (LC);
  • src/molecule_pointcloud.cpp

    r9879f6 rd3347e  
    4848{
    4949  Info FunctionInfo(__func__);
    50   if (InternalPointer != end())
     50  if (InternalPointer != atoms.end())
    5151    InternalPointer++;
    5252};
     
    5858{
    5959  Info FunctionInfo(__func__);
    60   InternalPointer = begin();
     60  InternalPointer = atoms.begin();
    6161};
    6262
     
    7676{
    7777  Info FunctionInfo(__func__);
    78   return (InternalPointer == end());
     78  return (InternalPointer == atoms.end());
    7979};
Note: See TracChangeset for help on using the changeset viewer.