Changeset e138de for src/molecule.hpp


Ignore:
Timestamp:
Nov 4, 2009, 7:56:04 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:
1614174, e5ad5c
Parents:
7326b2
Message:

Huge change from ofstream * (const) out --> Log().

  • first shift was done via regular expressions
  • then via error messages from the code
  • note that class atom, class element and class molecule kept in parts their output stream, was they print to file.
  • make check runs fine
  • MISSING: Verbosity is not fixed for everything (i.e. if no endl; is present and next has Verbose(0) ...)

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/molecule.hpp

    r7326b2 re138de  
    106106
    107107  // re-definition of virtual functions from PointCloud
    108   Vector *GetCenter(ofstream *out) const ;
     108  Vector *GetCenter() const ;
    109109  TesselPoint *GetPoint() const ;
    110110  TesselPoint *GetTerminalPoint() const ;
     
    195195  atom * AddCopyAtom(atom *pointer);
    196196  bool AddXYZFile(string filename);
    197   bool AddHydrogenReplacementAtom(ofstream *out, bond *Bond, atom *BottomOrigin, atom *TopOrigin, atom *TopReplacement, bool IsAngstroem);
     197  bool AddHydrogenReplacementAtom(bond *Bond, atom *BottomOrigin, atom *TopOrigin, atom *TopReplacement, bool IsAngstroem);
    198198  bond * AddBond(atom *first, atom *second, int degree = 1);
    199199  bool RemoveBond(bond *pointer);
     
    205205
    206206  /// Count and change present atoms' coordination.
    207   void CountAtoms(ofstream *out);
     207  void CountAtoms();
    208208  void CountElements();
    209209  void CalculateOrbitals(class config &configuration);
    210   bool CenterInBox(ofstream *out);
    211   bool BoundInBox(ofstream *out);
    212   void CenterEdge(ofstream *out, Vector *max);
    213   void CenterOrigin(ofstream *out);
    214   void CenterPeriodic(ofstream *out);
    215   void CenterAtVector(ofstream *out, Vector *newcenter);
     210  bool CenterInBox();
     211  bool BoundInBox();
     212  void CenterEdge(Vector *max);
     213  void CenterOrigin();
     214  void CenterPeriodic();
     215  void CenterAtVector(Vector *newcenter);
    216216  void Translate(const Vector *x);
    217217  void TranslatePeriodically(const Vector *trans);
     
    220220  void Scale(const double ** const factor);
    221221  void DeterminePeriodicCenter(Vector &center);
    222   Vector * DetermineCenterOfGravity(ofstream *out);
    223   Vector * DetermineCenterOfAll(ofstream *out) const;
     222  Vector * DetermineCenterOfGravity();
     223  Vector * DetermineCenterOfAll() const;
    224224  void SetNameFromFilename(const char *filename);
    225225  void SetBoxDimension(Vector *dim);
    226   void ScanForPeriodicCorrection(ofstream *out);
    227   bool VerletForceIntegration(ofstream *out, char *file, config &configuration);
     226  void ScanForPeriodicCorrection();
     227  bool VerletForceIntegration(char *file, config &configuration);
    228228  void Thermostats(config &configuration, double ActualTemp, int Thermostat);
    229   void PrincipalAxisSystem(ofstream *out, bool DoRotate);
    230   double VolumeOfConvexEnvelope(ofstream *out, bool IsAngstroem);
    231 
    232   double ConstrainedPotential(ofstream *out, struct EvaluatePotential &Params);
    233   double MinimiseConstrainedPotential(ofstream *out, atom **&permutation, int startstep, int endstep, bool IsAngstroem);
    234   void EvaluateConstrainedForces(ofstream *out, int startstep, int endstep, atom **PermutationMap, ForceMatrix *Force);
    235   bool LinearInterpolationBetweenConfiguration(ofstream *out, int startstep, int endstep, const char *prefix, config &configuration, bool MapByIdentity);
     229  void PrincipalAxisSystem(bool DoRotate);
     230  double VolumeOfConvexEnvelope(bool IsAngstroem);
     231
     232  double ConstrainedPotential(struct EvaluatePotential &Params);
     233  double MinimiseConstrainedPotential(atom **&permutation, int startstep, int endstep, bool IsAngstroem);
     234  void EvaluateConstrainedForces(int startstep, int endstep, atom **PermutationMap, ForceMatrix *Force);
     235  bool LinearInterpolationBetweenConfiguration(int startstep, int endstep, const char *prefix, config &configuration, bool MapByIdentity);
    236236       
    237237  bool CheckBounds(const Vector *x) const;
     
    239239
    240240  /// Initialising routines in fragmentation
    241   void CreateAdjacencyListFromDbondFile(ofstream *out, ifstream *output);
    242   void CreateAdjacencyList(ofstream *out, double bonddistance, bool IsAngstroem, void (BondGraph::*f)(BondedParticle * const , BondedParticle * const , double &, double &, bool), BondGraph *BG = NULL);
    243   int CorrectBondDegree(ofstream *out) const;
    244   void OutputBondsList(ofstream *out) const;
     241  void CreateAdjacencyListFromDbondFile(ifstream *output);
     242  void CreateAdjacencyList(double bonddistance, bool IsAngstroem, void (BondGraph::*f)(BondedParticle * const , BondedParticle * const , double &, double &, bool), BondGraph *BG = NULL);
     243  int CorrectBondDegree() const;
     244  void OutputBondsList() const;
    245245  void CyclicBondAnalysis() const;
    246   void OutputGraphInfoPerAtom(ofstream *out) const;
    247   void OutputGraphInfoPerBond(ofstream *out) const;
     246  void OutputGraphInfoPerAtom() const;
     247  void OutputGraphInfoPerBond() const;
    248248
    249249
    250250  // Graph analysis
    251   MoleculeLeafClass * DepthFirstSearchAnalysis(ofstream *out, class StackClass<bond *> *&BackEdgeStack) const;
    252   void CyclicStructureAnalysis(ofstream *out, class StackClass<bond *> *BackEdgeStack, int *&MinimumRingSize) const;
    253   bool PickLocalBackEdges(ofstream *out, atom **ListOfLocalAtoms, class StackClass<bond *> *&ReferenceStack, class StackClass<bond *> *&LocalStack) const;
     251  MoleculeLeafClass * DepthFirstSearchAnalysis(class StackClass<bond *> *&BackEdgeStack) const;
     252  void CyclicStructureAnalysis(class StackClass<bond *> *BackEdgeStack, int *&MinimumRingSize) const;
     253  bool PickLocalBackEdges(atom **ListOfLocalAtoms, class StackClass<bond *> *&ReferenceStack, class StackClass<bond *> *&LocalStack) const;
    254254  bond * FindNextUnused(atom *vertex) const;
    255255  void SetNextComponentNumber(atom *vertex, int nr) const;
    256256  void ResetAllBondsToUnused() const;
    257   int CountCyclicBonds(ofstream *out);
    258   bool CheckForConnectedSubgraph(ofstream *out, KeySet *Fragment);
     257  int CountCyclicBonds();
     258  bool CheckForConnectedSubgraph(KeySet *Fragment);
    259259  string GetColor(enum Shading color) const;
    260260  bond * CopyBond(atom *left, atom *right, bond *CopyBond);
     
    265265
    266266  /// Fragment molecule by two different approaches:
    267   int FragmentMolecule(ofstream *out, int Order, config *configuration);
    268   bool CheckOrderAtSite(ofstream *out, bool *AtomMask, Graph *GlobalKeySetList, int Order, int *MinimumRingSize, char *path = NULL);
    269   bool StoreAdjacencyToFile(ofstream *out, char *path);
    270   bool CheckAdjacencyFileAgainstMolecule(ofstream *out, char *path, atom **ListOfAtoms);
    271   bool ParseOrderAtSiteFromFile(ofstream *out, char *path);
    272   bool StoreOrderAtSiteFile(ofstream *out, char *path);
    273   bool StoreForcesFile(ofstream *out, MoleculeListClass *BondFragments, char *path, int *SortIndex);
    274   bool CreateMappingLabelsToConfigSequence(ofstream *out, int *&SortIndex);
    275   void BreadthFirstSearchAdd(ofstream *out, molecule *Mol, atom **&AddedAtomList, bond **&AddedBondList, atom *Root, bond *Bond, int BondOrder, bool IsAngstroem);
     267  int FragmentMolecule(int Order, config *configuration);
     268  bool CheckOrderAtSite(bool *AtomMask, Graph *GlobalKeySetList, int Order, int *MinimumRingSize, char *path = NULL);
     269  bool StoreAdjacencyToFile(char *path);
     270  bool CheckAdjacencyFileAgainstMolecule(char *path, atom **ListOfAtoms);
     271  bool ParseOrderAtSiteFromFile(char *path);
     272  bool StoreOrderAtSiteFile(char *path);
     273  bool StoreForcesFile(MoleculeListClass *BondFragments, char *path, int *SortIndex);
     274  bool CreateMappingLabelsToConfigSequence(int *&SortIndex);
     275  void BreadthFirstSearchAdd(molecule *Mol, atom **&AddedAtomList, bond **&AddedBondList, atom *Root, bond *Bond, int BondOrder, bool IsAngstroem);
    276276  /// -# BOSSANOVA
    277   void FragmentBOSSANOVA(ofstream *out, Graph *&FragmentList, KeyStack &RootStack, int *MinimumRingSize);
    278   int PowerSetGenerator(ofstream *out, int Order, struct UniqueFragments &FragmentSearch, KeySet RestrictedKeySet);
    279   bool BuildInducedSubgraph(ofstream *out, const molecule *Father);
    280   molecule * StoreFragmentFromKeySet(ofstream *out, KeySet &Leaflet, bool IsAngstroem);
    281   void SPFragmentGenerator(ofstream *out, struct UniqueFragments *FragmentSearch, int RootDistance, bond **BondsSet, int SetDimension, int SubOrder);
    282   int LookForRemovalCandidate(ofstream *&out, KeySet *&Leaf, int *&ShortestPathList);
    283   int GuesstimateFragmentCount(ofstream *out, int order);
     277  void FragmentBOSSANOVA(Graph *&FragmentList, KeyStack &RootStack, int *MinimumRingSize);
     278  int PowerSetGenerator(int Order, struct UniqueFragments &FragmentSearch, KeySet RestrictedKeySet);
     279  bool BuildInducedSubgraph(const molecule *Father);
     280  molecule * StoreFragmentFromKeySet(KeySet &Leaflet, bool IsAngstroem);
     281  void SPFragmentGenerator(struct UniqueFragments *FragmentSearch, int RootDistance, bond **BondsSet, int SetDimension, int SubOrder);
     282  int LookForRemovalCandidate(KeySet *&Leaf, int *&ShortestPathList);
     283  int GuesstimateFragmentCount(int order);
    284284
    285285  // Recognize doubly appearing molecules in a list of them
    286   int * IsEqualToWithinThreshold(ofstream *out, molecule *OtherMolecule, double threshold);
    287   int * GetFatherSonAtomicMap(ofstream *out, molecule *OtherMolecule);
     286  int * IsEqualToWithinThreshold(molecule *OtherMolecule, double threshold);
     287  int * GetFatherSonAtomicMap(molecule *OtherMolecule);
    288288
    289289  // Output routines.
    290   bool Output(ofstream *out);
    291   bool OutputTrajectories(ofstream *out);
    292   void OutputListOfBonds(ofstream *out) const;
    293   bool OutputXYZ(ofstream *out) const;
    294   bool OutputTrajectoriesXYZ(ofstream *out);
    295   bool Checkout(ofstream *out) const;
    296   bool OutputTemperatureFromTrajectories(ofstream *out, int startstep, int endstep, ofstream *output);
     290  bool Output(ofstream * const output);
     291  bool OutputTrajectories(ofstream * const output);
     292  void OutputListOfBonds() const;
     293  bool OutputXYZ(ofstream * const output) const;
     294  bool OutputTrajectoriesXYZ(ofstream * const output);
     295  bool Checkout(ofstream * const output) const;
     296  bool OutputTemperatureFromTrajectories(ofstream * const output, int startstep, int endstep);
    297297
    298298  private:
     
    313313  ~MoleculeListClass();
    314314
    315   bool AddHydrogenCorrection(ofstream *out, char *path);
    316   bool StoreForcesFile(ofstream *out, char *path, int *SortIndex);
     315  bool AddHydrogenCorrection(char *path);
     316  bool StoreForcesFile(char *path, int *SortIndex);
    317317  void insert(molecule *mol);
    318318  molecule * ReturnIndex(int index);
    319   bool OutputConfigForListOfFragments(ofstream *out, config *configuration, int *SortIndex);
     319  bool OutputConfigForListOfFragments(config *configuration, int *SortIndex);
    320320  int NumberOfActiveMolecules();
    321321  void Enumerate(ofstream *out);
    322322  void Output(ofstream *out);
    323   void DissectMoleculeIntoConnectedSubgraphs(ofstream * const out, molecule * const mol, config * const configuration);
     323  void DissectMoleculeIntoConnectedSubgraphs(molecule * const mol, config * const configuration);
    324324
    325325  // merging of molecules
     
    351351
    352352  bool AddLeaf(molecule *ptr, MoleculeLeafClass *Previous);
    353   bool FillBondStructureFromReference(ofstream *out, const molecule * const reference, int &FragmentCounter, atom ***&ListOfLocalAtoms, bool FreeList = false);
    354   bool FillRootStackForSubgraphs(ofstream *out, KeyStack *&RootStack, bool *AtomMask, int &FragmentCounter);
    355   bool AssignKeySetsToFragment(ofstream *out, molecule *reference, Graph *KeySetList, atom ***&ListOfLocalAtoms, Graph **&FragmentList, int &FragmentCounter, bool FreeList = false);
    356   bool FillListOfLocalAtoms(ofstream *out, atom ***&ListOfLocalAtoms, const int FragmentCounter, const int GlobalAtomCount, bool &FreeList);
    357   void TranslateIndicesToGlobalIDs(ofstream *out, Graph **FragmentList, int &FragmentCounter, int &TotalNumberOfKeySets, Graph &TotalGraph);
     353  bool FillBondStructureFromReference(const molecule * const reference, int &FragmentCounter, atom ***&ListOfLocalAtoms, bool FreeList = false);
     354  bool FillRootStackForSubgraphs(KeyStack *&RootStack, bool *AtomMask, int &FragmentCounter);
     355  bool AssignKeySetsToFragment(molecule *reference, Graph *KeySetList, atom ***&ListOfLocalAtoms, Graph **&FragmentList, int &FragmentCounter, bool FreeList = false);
     356  bool FillListOfLocalAtoms(atom ***&ListOfLocalAtoms, const int FragmentCounter, const int GlobalAtomCount, bool &FreeList);
     357  void TranslateIndicesToGlobalIDs(Graph **FragmentList, int &FragmentCounter, int &TotalNumberOfKeySets, Graph &TotalGraph);
    358358  int Count() const;
    359359};
Note: See TracChangeset for help on using the changeset viewer.