#ifndef REAX_DEFS_H
#define REAX_DEFS_H
#if defined(__IBMC__)
#define inline __inline__
#endif
#ifndef SUCCESS
#define SUCCESS 1
#endif
#ifndef FAILURE
#define FAILURE 0
#endif
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#define SQR(x) ((x)*(x))
#define CUBE(x) ((x)*(x)*(x))
#define DEG2RAD(a) ((a)*constPI/180.0)
#define RAD2DEG(a) ((a)*180.0/constPI)
#define MAX3(x,y,z) MAX( MAX(x,y), z)
#define constPI 3.14159265
#define C_ele 332.06371
#define K_B 0.831687
#define F_CONV 1e6 / 48.88821291 / 48.88821291
#define E_CONV 0.002391
#define EV_to_KCALpMOL 14.400000
#define KCALpMOL_to_EV 23.02
#define ECxA_to_DEBYE 4.803204
#define CAL_to_JOULES 4.184000
#define JOULES_to_CAL 1/4.184000
#define AMU_to_GRAM 1.6605e-24
#define ANG_to_CM 1e-8
#define AVOGNR 6.0221367e23
#define P_CONV 1e-24 * AVOGNR * JOULES_to_CAL
#define MAX_STR 1024
#define MAX_LINE 1024
#define MAX_TOKENS 1024
#define MAX_TOKEN_LEN 1024
#define MAX_ATOM_ID 100000
#define MAX_RESTRICT 15
#define MAX_MOLECULE_SIZE 20
#define MAX_ATOM_TYPES 25
#define NUM_INTRS 10
#define ALMOST_ZERO 1e-10
#define NEG_INF -1e10
#define NO_BOND 1e-3
#define HB_THRESHOLD 1e-2
#define MIN_CAP 50
#define MIN_NBRS 100
#define MIN_HENTRIES 100
#define MAX_BONDS 30
#define MIN_BONDS 25
#define MIN_HBONDS 25
#define MIN_3BODIES 1000
#define MIN_GCELL_POPL 50
#define MIN_SEND 100
#define SAFE_ZONE 1.2
#define SAFER_ZONE 1.4
#define DANGER_ZONE 0.90
#define LOOSE_ZONE 0.75
#define MAX_3BODY_PARAM 5
#define MAX_4BODY_PARAM 5
#define MAX_dV 1.01
#define MIN_dV 0.99
#define MAX_dT 4.00
#define MIN_dT 0.00
#define MASTER_NODE 0
#define MAX_NBRS 6
#define MYSELF 13
#define MAX_ITR 10
#define RESTART 30
#define MAX_BOND 20
#define MAXREAXBOND 24
#define MAXSPECBOND 24
enum geo_formats { CUSTOM, PDB, ASCII_RESTART, BINARY_RESTART, GF_N };
enum restart_formats { WRITE_ASCII, WRITE_BINARY, RF_N };
enum ensembles { NVE, bNVT, nhNVT, sNPT, iNPT, NPT, ens_N };
enum lists { BONDS, OLD_BONDS, THREE_BODIES,
HBONDS, FAR_NBRS, DBOS, DDELTAS, LIST_N };
enum interactions { TYP_VOID, TYP_BOND, TYP_THREE_BODY,
TYP_HBOND, TYP_FAR_NEIGHBOR, TYP_DBO, TYP_DDELTA, TYP_N };
enum message_tags { INIT, UPDATE, BNDRY, UPDATE_BNDRY,
EXC_VEC1, EXC_VEC2, DIST_RVEC2, COLL_RVEC2,
DIST_RVECS, COLL_RVECS, INIT_DESCS, ATOM_LINES,
BOND_LINES, ANGLE_LINES, RESTART_ATOMS, TAGS_N };
enum errors { FILE_NOT_FOUND = -10, UNKNOWN_ATOM_TYPE = -11,
CANNOT_OPEN_FILE = -12, CANNOT_INITIALIZE = -13,
INSUFFICIENT_MEMORY = -14, UNKNOWN_OPTION = -15,
INVALID_INPUT = -16, INVALID_GEO = -17 };
enum exchanges { NONE, NEAR_EXCH, FULL_EXCH };
enum gcell_types { NO_NBRS=0, NEAR_ONLY=1, HBOND_ONLY=2, FAR_ONLY=4,
NEAR_HBOND=3, NEAR_FAR=5, HBOND_FAR=6, FULL_NBRS=7,
NATIVE=8 };
enum atoms { C_ATOM = 0, H_ATOM = 1, O_ATOM = 2, N_ATOM = 3,
S_ATOM = 4, SI_ATOM = 5, GE_ATOM = 6, X_ATOM = 7 };
enum traj_methods { REG_TRAJ, MPI_TRAJ, TF_N };
enum molecules { UNKNOWN, WATER };
#endif