Cloudy
Spectral Synthesis Code for Astrophysics
Loading...
Searching...
No Matches
species.h
Go to the documentation of this file.
1/* This file is part of Cloudy and is copyright (C)1978-2025 by Gary J. Ferland and
2 * others. For conditions of distribution and use see copyright notice in license.txt */
3
4#ifndef SPECIES_H_
5#define SPECIES_H_
6
7/*The species structure is used to hold information about a particular atom,ion or molecule
8mentioned in the species.ini file.The name of the atom/ion/molecule is used to obtain the density
9of molecules in the case of the Leiden Database and along with atomic number and ion stage the
10density of atoms/ions in the case of the CHIANTI database */
12{
13public:
15 {
16 chLabel = NULL;
17 database = "";
18 dataset = "";
19 index = INT_MAX;
20 numLevels_max = -INT_MAX;
21 setLevels = -1;
22 numLevels_local = -INT_MAX;
24 fmolweight = realnum(0.);
25 lgMolecular = false;
26 fracType = realnum(0.);
28 CoolTotal = 0.;
29 lgActive = false;
30 maxWN = 0.;
31 lgLTE = false;
32 lgPrtMatrix = false;
33 lgImgMatrix = false;
34 }
36 {
37 delete[] chLabel;
38 }
39 /*Name of the atom/ion/ molecule*/
40 char *chLabel;
41 /* Database origin */
42 string database;
43 /* nickname of alternate dataset, empty string for default set */
44 string dataset;
45 // index in chemistry
46 long index;
47 /*Actual Number of energy levels in the data file*/
49 /*Number of levels defined in "species" command */
51 /*Number of energy levels used locally*/
57 /*Molecular weight*/
59 /* is molecular? */
61 /* fraction in this "type" (e.g. para, ortho) */
63 /* chemical fractionation */
66 double CoolTotal;
69 /* maximum wavenumber in chianti */
70 double maxWN;
72 bool lgLTE;
77};
78
85
87
95void db_basename_to_spectral( const string& chBasename, string &chElement,
96 char *chSpecLabel );
97
98void parsespect(const char* chLabel, long& nelem, long& IonStg);
99string makeChemical(long nelem, long ion);
100void makeChemical(char* chLabelChemical, long nelem, long ion);
101
108void spectral_to_chemical( char *chLabelSpec, const char* chLabelChem );
109
116void spectral_to_chemical( string &chLabelSpec, const char* chLabelChem );
117
127bool parse_chemical( const string &chLabelChem,
128 string &chElemMol, long &spCharge );
129
136void chemical_to_spectral( const string &chLabelChem, string &chLabelSpec );
137
150bool isSpeciesActive( const string &chSpecLabel );
151
160bool isAtomicIonValid( const long element_index, const long spCharge );
161
169bool isBareNucleus( const long element_index, const long spCharge );
170
171#endif /* SPECIES_ */
#define NULL
Definition cddefines.h:115
float realnum
Definition cddefines.h:127
realnum fmolweight
Definition species.h:58
double maxWN
Definition species.h:70
bool lgPrtMatrix
Definition species.h:74
string dataset
Definition species.h:44
species()
Definition species.h:14
double CoolTotal
Definition species.h:66
long index
Definition species.h:46
bool lgActive
Definition species.h:68
~species()
Definition species.h:35
long numLevels_local
Definition species.h:52
realnum fracIsotopologue
Definition species.h:64
long numLevels_masterlist
Definition species.h:56
bool lgMolecular
Definition species.h:60
bool lgLTE
Definition species.h:72
string database
Definition species.h:42
long numLevels_max
Definition species.h:48
long setLevels
Definition species.h:50
realnum fracType
Definition species.h:62
bool lgImgMatrix
Definition species.h:76
char * chLabel
Definition species.h:40
bool isAtomicIonValid(const long element_index, const long spCharge)
Definition species.cpp:720
void chemical_to_spectral(const string &chLabelChem, string &chLabelSpec)
Definition species.cpp:857
bool parse_chemical(const string &chLabelChem, string &chElemMol, long &spCharge)
Definition species.cpp:813
bool isBareNucleus(const long element_index, const long spCharge)
Definition species.cpp:734
string makeChemical(long nelem, long ion)
Definition species.cpp:748
void parsespect(const char *chLabel, long &nelem, long &IonStg)
Definition species.cpp:691
void spectral_to_chemical(char *chLabelSpec, const char *chLabelChem)
Definition species.cpp:796
bool isSpeciesActive(const string &chSpecLabel)
Definition species.cpp:920
t_pseudo_cont pseudoContDef
Definition species_pseudo_cont.cpp:17
void db_basename_to_spectral(const string &chBasename, string &chElement, char *chSpecLabel)
Definition species.cpp:45
Definition species.h:80
long nBins
Definition species.h:83
realnum wlLo
Definition species.h:81
realnum wlHi
Definition species.h:82