-
Notifications
You must be signed in to change notification settings - Fork 0
/
unitconverter.h
83 lines (63 loc) · 2.05 KB
/
unitconverter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#ifndef UNITCONVERTER_H
#define UNITCONVERTER_H
#include <string>
#include <vector>
#include "math/vec3.h"
using std::vector;
enum Units {SIUnits = 0, MDUnits = 1};
class UnitConverter
{
public:
static double m0;
static double q0;
static double hbar0;
static double electricConstant0;
static double a0;
static double a0_angstrom;
static double E0;
static double E0ev;
static double kb;
static double t0;
static double F0;
static double T0;
static double P0;
static double v0;
static double visc0;
static double diff0;
static std::string currentUnits;
static void makeSureInitialized();
static void initialize(Units type);
static bool initialized;
static double pressureToSI(double P);
static double pressureFromSI(double P);
static double temperatureToSI(double T);
static double temperatureFromSI(double T);
static double massToSI(double m);
static double massFromSI(double m);
static double lengthToSI(double L);
static double lengthFromSI(double L);
static vec3 lengthToSI(vec3 position);
static vec3 lengthFromSI(vec3 position);
static vec3 velocityToSI(vec3 position);
static vec3 velocityFromSI(vec3 position);
static vec3 lengthToAngstroms(vec3 position);
static vec3 lengthFromAngstroms(vec3 position);
static double lengthToAngstroms(double L);
static double lengthFromAngstroms(double L);
static double forceToSI(double F);
static double forceFromSI(double F);
static double energyToSI(double E);
static double energyFromSI(double E);
static double timeToSI(double t);
static double timeFromSI(double t);
static double velocityToSI(double v);
static double velocityFromSI(double v);
static double diffusionToSI(double d);
static double diffusionFromSI(double d);
static double energyToEv(double E);
static double energyFromEv(double E);
static double degreesToRadians(double v);
static double radiansToDegrees(double v);
static void initializeMDUnits();
};
#endif