#include <orbitalthread.h>
It uses increased precision (double, long double) only when needed. They are, however, not implemented yet so the limit for 'n' (the main quantum number) lies somewhere around 15 depending on the values of the other quantum numbers.
Definition at line 40 of file orbitalthread.h.
Public Types | |
enum | Types { IsoProbability = 0, Density, AngularPart, AccumulatedProbability, RadialPart } |
Public Member Functions | |
OrbitalThread (QWidget *parentWidget, QMutex *sharedMutex, std::vector< Point3D< float > > *coordinates, const unsigned int type, const unsigned int atom, const unsigned int n, const unsigned int l, const int m, const float res, const float prob, const unsigned int dots) | |
The default constructor. | |
~OrbitalThread () | |
The default destructor. | |
void | stop () |
Requests the thread to stop. | |
double | boundingSphereRadius () |
Returns the radius of the sphere encompassing the calculated orbital. | |
Private Types | |
enum | Precision { PRECISION_UNKNOWN, PRECISION_FLOAT, PRECISION_DOUBLE, PRECISION_LONG_DOUBLE } |
Private Member Functions | |
virtual void | run () |
Dispatches the work to the proper calculating routine. | |
void | calcIsoProbability () |
Calculates the points having the given probability ( |psi|^2 ). | |
void | calcAccumulatedProbability () |
Calculates the points having the given accumulated probability ( |psi|^2 ). | |
void | calcRandomDots () |
Calculates random points according to the probability at a random point. | |
void | calcRadialPart () |
Draws the radial part of the orbital. | |
void | calcAngularPart () |
Calculates the angular part of the orbital. | |
void | updateList (std::vector< Point3D< float > > &newCoords, bool final=false) |
Updates the shared coordinate list with a set of newly calculated points. | |
float | associatedLegendre (const float x, const int m, const unsigned int l) |
Calculates the associated Legendre polynomial P ^m _l (x). | |
float | associatedLaguerre (const float x, const int m, const unsigned int n) |
Calculates the associated Laguerre polynomial L ^m _n (x). | |
template<class T> | |
T | factorial (const unsigned int number) |
Calculates the factorial function of the given number. | |
float | random (const float min, const float max) |
Returns a random floating point number between min and max. | |
template<class T> | |
T | largestResult (const unsigned int n, const unsigned int l, const int m, const unsigned int Z) |
Returns an approximation to the largest possible result for the given quantum numbers. | |
Private Attributes | |
QWidget * | receiver |
The widget that receives any sent events. | |
QMutex * | mutex |
A mutex to lock the access to the vector of calculated points. | |
std::vector< Point3D< float > > * | coords |
Coordinates of calculated probability points. | |
unsigned int | atomNumber |
The atom type for which the orbital is to be shown. | |
unsigned int | qnPrincipal |
Principal quantum number (n) (1 - x). | |
unsigned int | qnOrbital |
Orbital quantum number (l) (0 - n-1). | |
int | qnMomentum |
Angular momentum quantum number (m) (-l - +l). | |
unsigned int | calculationType |
The type of calculation to be done. | |
float | probability |
The iso or accumulated probability. | |
float | resolution |
The desired resolution. | |
unsigned int | numDots |
The number of dots to calculate for random dots. | |
bool | stopRequested |
Is set to true if the thread should be stopped. | |
float | maximumRadius |
Holds the maximum encountered value of r during the calculation. | |
unsigned int | progress |
Holds the progress of the calculation. | |
Static Private Attributes | |
static const float | abohr = 1.0f |
The Bohr radius. | |
static const unsigned int | updateSize = 1000 |
|
Definition at line 48 of file orbitalthread.h. |
|
Definition at line 56 of file orbitalthread.h. |
|
The default constructor. All needed parameters are passed upon creation of the thread as it is one-shot. Using multiple threads is easily accomplished by further providing start and end values for the angle Phi. Definition at line 49 of file orbitalthread.cpp. |
|
The default destructor.
Definition at line 89 of file orbitalthread.cpp. |
|
Requests the thread to stop.
Definition at line 96 of file orbitalthread.cpp. |
|
Returns the radius of the sphere encompassing the calculated orbital.
Definition at line 103 of file orbitalthread.cpp. |
|
Dispatches the work to the proper calculating routine. It is run with a call to start(). Definition at line 114 of file orbitalthread.cpp. |
|
Calculates the points having the given probability ( |psi|^2 ). (between 0.0 and 1.0 by definition) Definition at line 190 of file orbitalthread.cpp. |
|
Calculates the points having the given accumulated probability ( |psi|^2 ). (between 0.0 and 1.0 by definition); Definition at line 337 of file orbitalthread.cpp. |
|
Calculates random points according to the probability at a random point.
Definition at line 440 of file orbitalthread.cpp. |
|
Draws the radial part of the orbital.
Definition at line 559 of file orbitalthread.cpp. |
|
Calculates the angular part of the orbital.
Definition at line 626 of file orbitalthread.cpp. |
|
Updates the shared coordinate list with a set of newly calculated points. If final is true, the update is forces, even if less than updateSize values are present. Definition at line 703 of file orbitalthread.cpp. |
|
Calculates the associated Legendre polynomial P ^m _l (x).
Definition at line 718 of file orbitalthread.cpp. |
|
Calculates the associated Laguerre polynomial L ^m _n (x).
Definition at line 740 of file orbitalthread.cpp. |
|
Calculates the factorial function of the given number. Not too efficient but does the job. Converted to template because the limits of unsigned int's are reached for n+l=13 (for unsigned long int's it's n+l=21). Definition at line 753 of file orbitalthread.cpp. |
|
Returns a random floating point number between min and max.
Definition at line 772 of file orbitalthread.cpp. |
|
Returns an approximation to the largest possible result for the given quantum numbers.
Definition at line 779 of file orbitalthread.cpp. |
|
The widget that receives any sent events.
Definition at line 73 of file orbitalthread.h. |
|
A mutex to lock the access to the vector of calculated points.
Definition at line 74 of file orbitalthread.h. |
|
Coordinates of calculated probability points.
Definition at line 75 of file orbitalthread.h. |
|
The atom type for which the orbital is to be shown.
Definition at line 76 of file orbitalthread.h. |
|
Principal quantum number (n) (1 - x).
Definition at line 77 of file orbitalthread.h. |
|
Orbital quantum number (l) (0 - n-1).
Definition at line 78 of file orbitalthread.h. |
|
Angular momentum quantum number (m) (-l - +l).
Definition at line 79 of file orbitalthread.h. |
|
The type of calculation to be done.
Definition at line 80 of file orbitalthread.h. |
|
The iso or accumulated probability.
Definition at line 81 of file orbitalthread.h. |
|
The desired resolution.
Definition at line 82 of file orbitalthread.h. |
|
The number of dots to calculate for random dots.
Definition at line 83 of file orbitalthread.h. |
|
Is set to true if the thread should be stopped.
Definition at line 84 of file orbitalthread.h. |
|
Holds the maximum encountered value of r during the calculation.
Definition at line 85 of file orbitalthread.h. |
|
Holds the progress of the calculation.
Definition at line 86 of file orbitalthread.h. |
|
The Bohr radius.
Definition at line 89 of file orbitalthread.h. |
|
Definition at line 90 of file orbitalthread.h. |