Changeset f66195 for src/molecule.hpp


Ignore:
Timestamp:
Oct 9, 2009, 10:54:52 AM (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:
49f802c
Parents:
e41951
Message:

forward declarations used to untangle interdependet classes.

  • basically, everywhere in header files we removed '#include' lines were only pointer to the respective classes were used and the include line was moved to the implementation file.
  • as a sidenote, lots of funny errors happened because headers were included via a nesting over three other includes. Now, all should be declared directly as needed, as only very little include lines remain in header files.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/molecule.hpp

    re41951 rf66195  
    88
    99using namespace std;
     10
     11/*********************************************** includes ***********************************/
    1012
    1113// GSL headers
     
    2527#include <vector>
    2628
    27 #include "atom.hpp"
    28 #include "bond.hpp"
    29 #include "element.hpp"
    30 #include "leastsquaremin.hpp"
    31 #include "linkedcell.hpp"
    32 #include "parser.hpp"
    33 #include "periodentafel.hpp"
     29#include "graph.hpp"
    3430#include "stackclass.hpp"
    3531#include "tesselation.hpp"
    36 #include "vector.hpp"
    37 
     32
     33/****************************************** forward declarations *****************************/
     34
     35class atom;
     36class bond;
     37class element;
     38class ForceMatrix;
     39class LinkedCell;
    3840class molecule;
    3941class MoleculeLeafClass;
    4042class MoleculeListClass;
     43class periodentafel;
     44class Vector;
    4145
    4246/******************************** Some definitions for easier reading **********************************/
    43 
    44 #define KeyStack deque<int>
    45 #define KeySet set<int>
    46 #define NumberValuePair pair<int, double>
    47 #define Graph map <KeySet, NumberValuePair, KeyCompare >
    48 #define GraphPair pair <KeySet, NumberValuePair >
    49 #define KeySetTestPair pair<KeySet::iterator, bool>
    50 #define GraphTestPair pair<Graph::iterator, bool>
    5147
    5248#define MoleculeList list <molecule *>
     
    5652#define DistanceMap multimap < double, atom* >
    5753#define DistanceTestPair pair < DistanceMap::iterator, bool>
    58 
    59 
    60 //#define LinkedAtoms list <atom *>
    61 
    62 /******************************** Some small functions and/or structures **********************************/
    63 
    64 struct KeyCompare
    65 {
    66   bool operator() (const KeySet SubgraphA, const KeySet SubgraphB) const;
    67 };
    68 
    69 //bool operator < (KeySet SubgraphA, KeySet SubgraphB);   //note: this declaration is important, otherwise normal < is used (producing wrong order)
    70 inline void InsertFragmentIntoGraph(ofstream *out, struct UniqueFragments *Fragment); // Insert a KeySet into a Graph
    71 inline void InsertGraphIntoGraph(ofstream *out, Graph &graph1, Graph &graph2, int *counter);  // Insert all KeySet's in a Graph into another Graph
    72 int CompareDoubles (const void * a, const void * b);
    7354
    7455
     
    214195  void SetNameFromFilename(const char *filename);
    215196  void SetBoxDimension(Vector *dim);
    216   double * ReturnFullMatrixforSymmetric(double *cell_size);
    217197  void ScanForPeriodicCorrection(ofstream *out);
    218198  bool VerletForceIntegration(ofstream *out, char *file, config &configuration);
Note: See TracChangeset for help on using the changeset viewer.