Molassembler  3.0.1
Molecule graph and conformer library
Log.h File Reference

Basic Logging functionality for debugging. More...

#include "Molassembler/Export.h"
#include <unordered_set>
#include <iostream>
Include dependency graph for Log.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Scine::Molassembler
 Central library namespace.
 

Enumerations

enum class  Scine::Molassembler::Log::Level : unsigned {
  Trace , Debug , Info , Warning ,
  Error , Fatal , None
}
 Level of logging.
 
enum class  Scine::Molassembler::Log::Particulars {
  AtomStereopermutatorFit , AtomStereopermutatorStatePropagation , PrototypePropagatorDebugInfo , DgRefinementChiralityNumericalDebugInfo ,
  DgRefinementProgress , DgFinalErrorContributions , DgStructureAcceptanceFailures , gatherDGInformationTrees ,
  DgDebugInfo , RankingTreeDebugInfo
}
 Particular cases of special logging items that may or may not be desired. More...
 

Functions

std::ostream & Scine::Molassembler::Log::log (const Level &decisionLevel)
 Fetch a log handle with a logging level. More...
 
std::ostream & Scine::Molassembler::Log::log (const Particulars &particular)
 Fetch a log handle with a particular. More...
 
bool Scine::Molassembler::Log::isSet (Particulars particular)
 Checks whether a particular is part of the current library particulars.
 

Variables

Level Scine::Molassembler::Log::level
 Library logging level.
 
std::unordered_set< Particulars > Scine::Molassembler::Log::particulars
 Library logging particulars.
 

Detailed Description

Basic Logging functionality for debugging.

Enumeration Type Documentation

◆ Particulars

Particular cases of special logging items that may or may not be desired.

Enumerator
AtomStereopermutatorFit 

In Molecule.cpp, where a fit of AtomStereopermutators against positions is performed when a Molecule is read in, you can have numerical details of the fit logged. Corresponding analysis scripts also exist.

AtomStereopermutatorStatePropagation 

AtomStereopermutator's addSubstituent, removeSubstituent and propagate* functions

PrototypePropagatorDebugInfo 

In generateConformation.cpp, when chiral constraint prototypes are fully determined into chiral constraints, emit some debug information

DgRefinementChiralityNumericalDebugInfo 

In DgRefinementProblem, chiral constraint numerical debug information.

DgRefinementProgress 

In DgRefinementProblem, the callback function can reveal some information on the current status of the optimization

DgFinalErrorContributions 

In ConformerGeneration, explain final contributions to the error function.

DgStructureAcceptanceFailures 

Explain why a structure was not accepted.

gatherDGInformationTrees 

In generateConformation, show the Trees generated from the molecules.

DgDebugInfo 

in debugDistanceGeometry, progress information

RankingTreeDebugInfo 

Ranking debug information.

Function Documentation

◆ log() [1/2]

std::ostream& Scine::Molassembler::Log::log ( const Level decisionLevel)

Fetch a log handle with a logging level.

Parameters
decisionLevellogging level of a message to write to a stream
Returns
std::cout if level is greater or equal to the library logging level, a null-stream otherwise

◆ log() [2/2]

std::ostream& Scine::Molassembler::Log::log ( const Particulars particular)

Fetch a log handle with a particular.

Parameters
particularThe particular to which the message pertains
Returns
std::cout if the particular is part of the current library particulars, a null-stream otherwise