/* []----------------------------------------[] | Global.h | []----------------------------------------[] | | | AUTHOR: MFSomers 2005. | | USE: Global header including | | all other headers... | | | []----------------------------------------[] */ // Copyright (C) 2005 M.F. Somers, Theoretical Chemistry Department, Leiden University // // This is free software; you can redistribute it and/or modify it under the terms of // the GNU Lesser General Public License as published by the Free Software Foundation. // // http://www.gnu.org/licenses/lgpl.txt #if !defined(__GLOBAL_INCLUDED__) #define __GLOBAL_INCLUDED__ #include // include some handy headers by default... #include #include #include #include #include #include #include #if defined(USE_CRLIBM) // if we want crlibm, we take the *_rn version of them... #include "crlibm.h" #define sin( X ) sin_rn( X ) #define asin( X ) asin_rn( X ) #define sinh( X ) sinh_rn( X ) #define cos( X ) cos_rn( X ) #define acos( X ) acos_rn( X ) #define cosh( X ) cosh_rn( X ) #define tan( X ) tan_rn( X ) #define atan( X ) atan_rn( X ) #define exp( X ) exp_rn( X ) #define log( X ) log_rn( X ) #endif #define MIN(A,B) ( (A) < (B) ? (A) : (B) ) #define MAX(A,B) ( (A) > (B) ? (A) : (B) ) #define RETURN_ERROR( M, R ) { printf( "ERROR in %s at %d: %s\n", __FILE__, __LINE__, M ); return( R ); } using namespace std; // use namespace std by default... /* ----------------------------------------------------------------------- */ /* define macro to get and set a new ID */ #define GET_NEW_ID ++GLOBAL_ID_Counter /* ----------------------------------------------------------------------- */ /* here a list of all known types of particles and interactions */ typedef enum { AGeneralParticle = 0 } ParticleType; typedef enum { AGeneralInteraction = 0, AGeneralPointPairInteraction, AGeneralFiniteDifferenceInteraction, AGeneralFiniteDifferencePointPairInteraction, AGravitationalInteraction, ACoulombInteraction, AHarmonicInteraction, AMorseInteraction, ALennardJonesInteraction, ARydbergInteraction, AGeneralBendingInteraction, AGeneralTorsionalInteraction, AGeneralFiniteDifferenceBendingInteraction, AGeneralFiniteDifferenceTorsionalInteraction, AHarmonicBendingInteraction, APeriodicTorsionalInteraction } InteractionType; typedef enum { AGeneralConstraint = 0, AGeneralDistanceConstraint } ConstraintType; typedef enum { GeneralClassicalStates = 0, GeneralClassicalDynamics, NewtonClassicalDynamics, SteepestDescentMinimizer, LangevinClassicalDynamics } ClassicalDynamicsType; /* ----------------------------------------------------------------------- */ extern unsigned int GLOBAL_ID_Counter; /* ----------------------------------------------------------------------- */ #endif