Tinker9 70bd052 (Thu Nov 9 12:11:35 2023 -0800)
Loading...
Searching...
No Matches
precision.h
1#pragma once
2#include "tool/macro.h"
3
41#ifndef TINKER_DETERMINISTIC_FORCE
42# if TINKER_DOUBLE_PRECISION
43# define TINKER_DETERMINISTIC_FORCE 0
44# else
45# define TINKER_DETERMINISTIC_FORCE 1
46# endif
47#endif
48
49namespace tinker {
52
68typedef unsigned long long fixed;
69static_assert(sizeof(fixed) == 8, "");
70
71#if TINKER_DOUBLE_PRECISION
72# define TINKER_REAL_SIZE 8
73# define TINKER_MIXED_SIZE 8
74typedef double real;
75typedef double mixed;
76#endif
77#if TINKER_MIXED_PRECISION
78# define TINKER_REAL_SIZE 4
79# define TINKER_MIXED_SIZE 8
80typedef float real;
81typedef double mixed;
82#endif
83#if TINKER_SINGLE_PRECISION
84# define TINKER_REAL_SIZE 4
85# define TINKER_MIXED_SIZE 4
86typedef float real;
87typedef float mixed;
88#endif
89
91typedef mixed T_prec;
92typedef mixed vel_prec;
93typedef mixed pos_prec;
94typedef real e_prec;
95typedef real v_prec;
96typedef real g_prec;
102#if TINKER_DETERMINISTIC_FORCE
104#else
105typedef real grad_prec;
106#endif
108}
real v_prec
Floating-point type for the pairwise virial components.
Definition: precision.h:95
mixed virial_prec
Definition: precision.h:98
mixed T_prec
Floating-point type for temperature.
Definition: precision.h:91
real g_prec
Floating-point type for the pairwise gradient components.
Definition: precision.h:96
mixed pos_prec
Floating-point type for coordinates.
Definition: precision.h:93
mixed time_prec
Floating-point type for time.
Definition: precision.h:90
float real
Definition: precision.h:80
fixed grad_prec
Definition: precision.h:103
mixed energy_prec
Floating-point type for total energies.
Definition: precision.h:97
mixed vel_prec
Floating-point type for velocities.
Definition: precision.h:92
unsigned long long fixed
Definition: precision.h:68
real e_prec
Floating-point type for the pairwise energy components.
Definition: precision.h:94
double mixed
Definition: precision.h:81
Definition: testrt.h:9