File indexing completed on 2025-01-18 09:58:41
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045 #ifndef G4MOLECULETABLE_HH_
0046 #define G4MOLECULETABLE_HH_
0047
0048 #include "globals.hh"
0049 #include "G4MoleculeIterator.hh"
0050 #include "G4ElectronOccupancy.hh"
0051
0052 #include <memory>
0053
0054 class G4MoleculeDefinition;
0055 class G4MolecularConfiguration;
0056 class G4MoleculeTableMessenger;
0057
0058 using G4MoleculeDefinitionIterator = G4MoleculeIterator<G4MoleculeDefinition>;
0059 using G4ConfigurationIterator = G4MoleculeIterator<G4MolecularConfiguration>;
0060
0061 class G4MoleculeTable
0062 {
0063 public:
0064 static G4MoleculeTable* Instance();
0065 static G4MoleculeTable* GetMoleculeTable();
0066 virtual ~G4MoleculeTable();
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076 G4MoleculeDefinition* CreateMoleculeDefinition(const G4String& userIdentifier,
0077 double diffusion_coefficient);
0078
0079
0080
0081 G4MolecularConfiguration*
0082 CreateConfiguration(const G4String& userIdentifier,
0083 const G4MoleculeDefinition* molDef,
0084 const G4String& configurationLabel,
0085 const G4ElectronOccupancy& eOcc);
0086
0087 G4MolecularConfiguration*
0088 CreateConfiguration(const G4String& userIdentifier,
0089 G4MoleculeDefinition*,
0090 int charge,
0091 double diffusion_coefficient = -1);
0092
0093 G4MolecularConfiguration*
0094 CreateConfiguration(const G4String& userIdentifier,
0095 G4MoleculeDefinition*);
0096
0097 G4MolecularConfiguration*
0098 CreateConfiguration(const G4String& userIdentifier,
0099 G4MoleculeDefinition*,
0100 const G4String& configurationLabel,
0101 int charge = 0);
0102
0103
0104
0105 G4MoleculeDefinition* GetMoleculeDefinition(const G4String&,
0106 bool mustExist = true);
0107
0108 G4MolecularConfiguration* GetConfiguration(const G4String&,
0109 bool mustExist = true);
0110 G4MolecularConfiguration* GetConfiguration(G4int id);
0111
0112
0113
0114 void Insert(G4MoleculeDefinition*);
0115 void Finalize(G4MoleculeDefinition*){}
0116 void Finalize();
0117
0118
0119 G4MoleculeDefinitionIterator GetDefintionIterator()
0120 {
0121 return G4MoleculeDefinitionIterator(this->fMoleculeDefTable);
0122 }
0123
0124 G4ConfigurationIterator GetConfigurationIterator();
0125
0126 void PrepareMolecularConfiguration();
0127
0128 int GetNumberOfDefinedSpecies();
0129
0130 protected:
0131 G4MoleculeTable();
0132
0133 static G4MoleculeTable* fpgMoleculeTable;
0134 using MoleculeDefTable = std::map<G4String, G4MoleculeDefinition *>;
0135
0136 MoleculeDefTable fMoleculeDefTable;
0137 std::unique_ptr<G4MoleculeTableMessenger> fMoleculeDefTableMessenger;
0138
0139 };
0140
0141 #endif