Changeset 42127c


Ignore:
Timestamp:
Oct 25, 2011, 12:08:03 PM (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:
75363b
Parents:
f7fd17
git-author:
Frederik Heber <heber@…> (10/20/11 09:58:57)
git-committer:
Frederik Heber <heber@…> (10/25/11 12:08:03)
Message:

Extracted definition of MoleculeListClass and put into own header module.

Location:
src
Files:
1 added
29 edited

Legend:

Unmodified
Added
Removed
  • src/Actions/GraphAction/SubgraphDissectionAction.cpp

    rf7fd17 r42127c  
    3131#include "Graph/DepthFirstSearchAnalysis.hpp"
    3232#include "molecule.hpp"
     33#include "MoleculeListClass.hpp"
    3334#include "World.hpp"
    3435
  • src/Actions/MoleculeAction/CreateMicelleAction.cpp

    rf7fd17 r42127c  
    3333#include "LinearAlgebra/Line.hpp"
    3434#include "molecule.hpp"
     35#include "MoleculeListClass.hpp"
    3536#include "World.hpp"
    3637
  • src/Actions/MoleculeAction/FillVoidWithMoleculeAction.cpp

    rf7fd17 r42127c  
    2828#include "Descriptors/MoleculeOrderDescriptor.hpp"
    2929#include "molecule.hpp"
     30#include "MoleculeListClass.hpp"
    3031#include "Parser/FormatParserInterface.hpp"
    3132#include "Parser/FormatParserStorage.hpp"
  • src/Actions/MoleculeAction/FillWithMoleculeAction.cpp

    rf7fd17 r42127c  
    2828#include "Descriptors/MoleculeOrderDescriptor.hpp"
    2929#include "molecule.hpp"
     30#include "MoleculeListClass.hpp"
    3031#include "Parser/FormatParserInterface.hpp"
    3132#include "Parser/FormatParserStorage.hpp"
  • src/Actions/MoleculeAction/LoadAction.cpp

    rf7fd17 r42127c  
    2727#include "Parser/FormatParser_Parameters.hpp"
    2828#include "molecule.hpp"
     29#include "MoleculeListClass.hpp"
    2930#include "World.hpp"
    3031
  • src/Actions/WorldAction/InputAction.cpp

    rf7fd17 r42127c  
    2222#include "CodePatterns/Log.hpp"
    2323#include "molecule.hpp"
     24#include "MoleculeListClass.hpp"
    2425#include "Parser/FormatParserStorage.hpp"
    2526#include "CodePatterns/Verbose.hpp"
  • src/Actions/WorldAction/RepeatBoxAction.cpp

    rf7fd17 r42127c  
    2424#include "CodePatterns/Log.hpp"
    2525#include "molecule.hpp"
     26#include "MoleculeListClass.hpp"
    2627#include "LinearAlgebra/Vector.hpp"
    2728#include "LinearAlgebra/RealSpaceMatrix.hpp"
  • src/Analysis/analysis_bonds.cpp

    rf7fd17 r42127c  
    2828#include "CodePatterns/Log.hpp"
    2929#include "molecule.hpp"
     30#include "MoleculeListClass.hpp"
    3031
    3132/** Calculates the min, mean and maximum bond counts for the given molecule.
  • src/Analysis/unittests/AnalysisCorrelationToPointUnitTest.cpp

    rf7fd17 r42127c  
    3333#include "Element/element.hpp"
    3434#include "molecule.hpp"
     35#include "MoleculeListClass.hpp"
    3536#include "linkedcell.hpp"
    3637#include "Element/periodentafel.hpp"
  • src/Analysis/unittests/AnalysisCorrelationToSurfaceUnitTest.cpp

    rf7fd17 r42127c  
    3333#include "Element/element.hpp"
    3434#include "molecule.hpp"
     35#include "MoleculeListClass.hpp"
    3536#include "linkedcell.hpp"
    3637#include "Element/periodentafel.hpp"
  • src/Analysis/unittests/AnalysisPairCorrelationUnitTest.cpp

    rf7fd17 r42127c  
    3131#include "World.hpp"
    3232#include "atom.hpp"
     33#include "Element/element.hpp"
     34#include "Element/periodentafel.hpp"
     35#include "molecule.hpp"
     36#include "MoleculeListClass.hpp"
     37#include "linkedcell.hpp"
    3338#include "Tesselation/boundary.hpp"
    34 #include "Element/element.hpp"
    35 #include "molecule.hpp"
    36 #include "linkedcell.hpp"
    37 #include "Element/periodentafel.hpp"
    3839#include "Tesselation/tesselation.hpp"
    3940#include "World.hpp"
  • src/Analysis/unittests/CountBondsUnitTest.cpp

    rf7fd17 r42127c  
    3434#include "Bond/bond.hpp"
    3535#include "Element/element.hpp"
     36#include "Element/periodentafel.hpp"
    3637#include "Graph/BondGraph.hpp"
    3738#include "molecule.hpp"
    38 #include "Element/periodentafel.hpp"
     39#include "MoleculeListClass.hpp"
    3940#include "World.hpp"
    4041
  • src/Fragmentation/Fragmentation.cpp

    rf7fd17 r42127c  
    3737#include "molecule.hpp"
    3838#include "MoleculeLeafClass.hpp"
     39#include "MoleculeListClass.hpp"
    3940#include "World.hpp"
    4041
  • src/Graph/ConnectedSubgraph.cpp

    rf7fd17 r42127c  
    2929#include "CodePatterns/Verbose.hpp"
    3030#include "molecule.hpp"
     31#include "MoleculeListClass.hpp"
    3132#include "World.hpp"
    3233
  • src/Graph/DepthFirstSearchAnalysis.cpp

    rf7fd17 r42127c  
    3434#include "molecule.hpp"
    3535#include "MoleculeLeafClass.hpp"
     36#include "MoleculeListClass.hpp"
    3637#include "World.hpp"
    3738
  • src/Parser/MpqcParser.cpp

    rf7fd17 r42127c  
    3131#include "Element/element.hpp"
    3232#include "molecule.hpp"
     33#include "MoleculeListClass.hpp"
    3334#include "CodePatterns/Log.hpp"
    3435#include "CodePatterns/toString.hpp"
  • src/Parser/PcpParser.cpp

    rf7fd17 r42127c  
    3333#include "LinearAlgebra/RealSpaceMatrix.hpp"
    3434#include "molecule.hpp"
     35#include "MoleculeListClass.hpp"
    3536#include "PcpParser.hpp"
    3637#include "Element/periodentafel.hpp"
  • src/Parser/PdbParser.cpp

    rf7fd17 r42127c  
    2424#include "CodePatterns/toString.hpp"
    2525#include "CodePatterns/Verbose.hpp"
    26 #include "Descriptors/AtomIdDescriptor.hpp"
    27 #include "World.hpp"
     26
    2827#include "atom.hpp"
    2928#include "Bond/bond.hpp"
     29#include "Descriptors/AtomIdDescriptor.hpp"
    3030#include "Element/element.hpp"
     31#include "Element/periodentafel.hpp"
    3132#include "molecule.hpp"
    32 #include "Element/periodentafel.hpp"
    33 #include "Descriptors/AtomIdDescriptor.hpp"
     33#include "MoleculeListClass.hpp"
    3434#include "Parser/PdbParser.hpp"
    3535#include "World.hpp"
  • src/Parser/Psi3Parser.cpp

    rf7fd17 r42127c  
    3232#include "Element/periodentafel.hpp"
    3333#include "molecule.hpp"
     34#include "MoleculeListClass.hpp"
    3435#include "CodePatterns/Log.hpp"
    3536#include "CodePatterns/toString.hpp"
  • src/Parser/TremoloParser.cpp

    rf7fd17 r42127c  
    2424#include "CodePatterns/toString.hpp"
    2525#include "CodePatterns/Verbose.hpp"
     26
    2627#include "TremoloParser.hpp"
     28
     29#include "atom.hpp"
     30#include "Bond/bond.hpp"
     31#include "Descriptors/AtomIdDescriptor.hpp"
     32#include "Element/element.hpp"
     33#include "Element/periodentafel.hpp"
     34#include "molecule.hpp"
     35#include "MoleculeListClass.hpp"
    2736#include "World.hpp"
    2837#include "WorldTime.hpp"
    29 #include "atom.hpp"
    30 #include "Bond/bond.hpp"
    31 #include "Element/element.hpp"
    32 #include "molecule.hpp"
    33 #include "Element/periodentafel.hpp"
    34 #include "Descriptors/AtomIdDescriptor.hpp"
     38
    3539#include <map>
    3640#include <vector>
  • src/Parser/XyzParser.cpp

    rf7fd17 r42127c  
    2424#include "CodePatterns/Log.hpp"
    2525#include "CodePatterns/Verbose.hpp"
     26
    2627#include "XyzParser.hpp"
    27 #include "World.hpp"
     28
    2829#include "atom.hpp"
    29 #include "molecule.hpp"
    3030#include "Element/element.hpp"
    3131#include "Element/periodentafel.hpp"
     32#include "molecule.hpp"
     33#include "MoleculeListClass.hpp"
     34#include "World.hpp"
    3235
    3336using namespace std;
  • src/Tesselation/boundary.cpp

    rf7fd17 r42127c  
    3535#include "linkedcell.hpp"
    3636#include "molecule.hpp"
     37#include "MoleculeListClass.hpp"
    3738#include "PointCloudAdaptor.hpp"
    3839#include "RandomNumbers/RandomNumberGeneratorFactory.hpp"
  • src/UIElements/MainWindow.hpp

    rf7fd17 r42127c  
    1515
    1616
    17 class MoleculeListClass;
    18 class config;
    19 class periodentafel;
    20 
    21 class Menu;
    22 
    2317class MainWindow
    2418{
  • src/UIElements/TextUI/TextWindow.cpp

    rf7fd17 r42127c  
    4747#include "Element/periodentafel.hpp"
    4848
    49 // config::SaveAll() and enumerate()
    50 #include "molecule.hpp"
     49// needed due to Enumerate()
     50#include "MoleculeListClass.hpp"
    5151
    5252#include <iostream>
  • src/UIElements/Views/Qt4/QtWorldView.cpp

    rf7fd17 r42127c  
    2727#include "Formula.hpp"
    2828#include "molecule.hpp"
     29#include "MoleculeListClass.hpp"
    2930
    3031using namespace std;
  • src/World.cpp

    rf7fd17 r42127c  
    3737#include "Descriptors/MoleculeDescriptor_impl.hpp"
    3838#include "Descriptors/SelectiveIterator_impl.hpp"
     39#include "Element/periodentafel.hpp"
    3940#include "Helpers/defs.hpp"
    4041#include "LinearAlgebra/RealSpaceMatrix.hpp"
    4142#include "molecule.hpp"
    42 #include "Element/periodentafel.hpp"
     43#include "MoleculeListClass.hpp"
    4344#include "ThermoStatContainer.hpp"
    4445#include "WorldTime.hpp"
  • src/config.cpp

    rf7fd17 r42127c  
    3535#include "ConfigFileBuffer.hpp"
    3636#include "Element/element.hpp"
     37#include "Element/periodentafel.hpp"
    3738#include "Graph/BondGraph.hpp"
    3839#include "Helpers/helpers.hpp"
    3940#include "LinearAlgebra/RealSpaceMatrix.hpp"
    4041#include "molecule.hpp"
    41 #include "molecule.hpp"
    42 #include "Element/periodentafel.hpp"
     42#include "MoleculeListClass.hpp"
    4343#include "ThermoStatContainer.hpp"
    4444#include "World.hpp"
  • src/molecule.hpp

    rf7fd17 r42127c  
    5353
    5454/******************************** Some definitions for easier reading **********************************/
    55 
    56 #define MoleculeList list <molecule *>
    57 #define MoleculeListTest pair <MoleculeList::iterator, bool>
    5855
    5956/************************************* Class definitions ****************************************/
     
    239236void DeleteMolecule(molecule* mol);
    240237
    241 /** A list of \a molecule classes.
    242  */
    243 class MoleculeListClass : public Observable
    244 {
    245 public:
    246   MoleculeList ListOfMolecules; //!< List of the contained molecules
    247   int MaxIndex;
    248 
    249   MoleculeListClass(World *world);
    250   ~MoleculeListClass();
    251 
    252   bool AddHydrogenCorrection(std::string &path);
    253   bool StoreForcesFile(std::string &path, int *SortIndex);
    254   void insert(molecule *mol);
    255   void erase(molecule *mol);
    256   molecule * ReturnIndex(int index);
    257   bool OutputConfigForListOfFragments(std::string &prefix, int *SortIndex);
    258   int NumberOfActiveMolecules();
    259   void Enumerate(ostream *out);
    260   void Output(ofstream *out);
    261   int CountAllAtoms() const;
    262 
    263   // Methods moved here from the menus
    264   // TODO: more refactoring needed on these methods
    265   void createNewMolecule(periodentafel *periode);
    266   void loadFromXYZ(periodentafel *periode);
    267   void setMoleculeFilename();
    268   void parseXYZIntoMolecule();
    269   void eraseMolecule();
    270 
    271 private:
    272   World *world; //!< The world this List belongs to. Needed to avoid deadlocks in the destructor
    273 };
    274238
    275239
  • src/moleculelist.cpp

    rf7fd17 r42127c  
    1919#include "CodePatterns/MemDebug.hpp"
    2020
    21 //#include <cstring>
     21#include <iostream>
    2222
    2323//#include <gsl/gsl_inline.h>
    2424#include <gsl/gsl_heapsort.h>
    2525
    26 #include "molecule.hpp"
     26#include "MoleculeListClass.hpp"
    2727
    2828#include "CodePatterns/Log.hpp"
     
    3838#include "Graph/BondGraph.hpp"
    3939#include "Helpers/helpers.hpp"
     40#include "molecule.hpp"
    4041#include "LinearAlgebra/RealSpaceMatrix.hpp"
    4142#include "Parser/FormatParserStorage.hpp"
     
    181182 * \param *out output stream
    182183 */
    183 void MoleculeListClass::Enumerate(ostream *out)
     184void MoleculeListClass::Enumerate(std::ostream *out)
    184185{
    185186  periodentafel *periode = World::getInstance().getPeriode();
     
    235236 * \param *out output stream
    236237 */
    237 void MoleculeListClass::Output(ofstream *out)
     238void MoleculeListClass::Output(std::ostream *out)
    238239{
    239240  DoLog(1) && (Log() << Verbose(1) << "MoleculeList: ");
Note: See TracChangeset for help on using the changeset viewer.