LOOS  v2.3.2
loos_defs.hpp
1 /*
2  This file is part of LOOS.
3 
4  LOOS (Lightweight Object-Oriented Structure library)
5  Copyright (c) 2008, Tod D. Romo, Alan Grossfield
6  Department of Biochemistry and Biophysics
7  School of Medicine & Dentistry, University of Rochester
8 
9  This package (LOOS) is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation under version 3 of the License.
12 
13  This package is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21 
22 
23 
24 
25 
26 
27 #if !defined(LOOSDEFS_HPP)
28 #define LOOSDEFS_HPP
29 
30 
31 // Requirements check
32 #if __GNUC__ < 4
33 #error LOOS Requires GCC-4.0.1 or higher
34 #endif
35 
36 
37 
38 #if !defined(BOOST_VERSION)
39 #include <boost/version.hpp>
40 #endif
41 
42 #if (((BOOST_VERSION / 100) % 1000) < 36)
43 #error LOOS require Boost 1.36 or higher
44 #endif
45 
46 #include <sys/types.h>
47 
48 
49 
50 #if defined(REQUIRES_UINT)
51 typedef unsigned int uint;
52 #endif
53 
54 #if defined(REQUIRES_ULONG)
55 typedef unsigned long ulong;
56 #endif
57 
58 #if defined(__linux__) || defined(__CYGWIN__) || defined(__FreeBSD__)
59 
60 extern "C" {
61 
62  void dsyev_(char*, char*, int*, double*, int*, double*, double*, int*, int*);
63  void dgesvd_(char*, char*, int*, int*, double*, int*, double*, double*, int*, double*, int*, double*, int*, int*);
64  void dgesvj_(char*, char*, char*, int*, int*, double*, int*, double*, int*, double*, int*, double*, int*, int*);
65  void dgemm_(const char* const, const char* const, const int* const, const int* const, const int* const,
66  const double* const, const double* const, const int* const, const double* const,
67  const int* const, const double* const, double* consnt, const int* const);
68  void dggev_(char*, char*, int*, double*, int*, double*, int*, double*, double*, double*, double*, int*, double*, int*, double*, int*, int*);
69 
70  void sgesvd_(char*, char*, int*, int*, float*, int*, float*, float*, int*, float*, int*, float*, int*, int*);
71  void sgemm_(char*, char*, int*, int*, int*, float*, float*, int*, float*, int*, float*, float*, int*);
72  void sggev_(char*, char*, int*, float*, int*, float*, int*, float*, float*, float*, float*, int*, float*, int*, float*, int*, int*);
73  void ssyev_(char*, char*, int*, float*, int*, float*, float*, int*, int*);
74  void dsyev_(char*, char*, int*, double*, int*, double*, double*, int*, int*);
75  void ssygv_(int*, char*, char*, int*, float*, int*, float*, int*, float*, float*, int*, int*);
76  void ssygvx_(int*, char*, char*, char*, int*, float*, int*, float*, int*, float*, float*, int*, int*, float*, int*, float*, float*, int*, float*, int*, int*, int*, int*);
77  double dlamch_(const char*);
78 }
79 
80 
81 typedef int f77int;
82 
83 #elif defined(__APPLE__)
84 
85 
86 // MacOS 10.9 requires this to appear before Accelerate
87 #include <boost/random.hpp>
88 
89 #include <Accelerate/Accelerate.h>
90 
91 
92 typedef __CLPK_integer f77int;
93 
94 #else
95 
96 #error You are building in an unsupported environment. You will need to specify how to access ATLAS.
97 
98 #endif
99 
100 
101 
102 
103 
104 #include <boost/shared_ptr.hpp>
105 #include <boost/tuple/tuple.hpp>
106 
107 
108 
109 
110 namespace loos {
111 
112  typedef double greal;
113  typedef long gint;
114 
115  typedef float dcd_real;
116  typedef double dcd_double;
117 
118  template<typename T> class Coord;
119 
120 
121  typedef Coord<double> GCoord;
122  typedef boost::shared_ptr<GCoord> pGCoord;
123 
124  // Writers
125  class TrajectoryWriter;
126  class DCDWriter;
127  class XTCWriter;
128 
129  // Trajectory and subclasses...
130  class Atom;
131  class Trajectory;
132  class DCD;
133  class AmberTraj;
134 #if defined(HAS_NETCDF)
135  class AmberNetcdf;
136 #endif
137  class CCPDB;
138  class TinkerArc;
139  class PDBTraj;
140  class XTC;
141  class TRR;
142 
143 
144  typedef boost::shared_ptr<Atom> pAtom;
145  typedef boost::shared_ptr<Trajectory> pTraj;
146  typedef boost::shared_ptr<DCD> pDCD;
147  typedef boost::shared_ptr<AmberTraj> pAmberTraj;
148 #if defined(HAS_NETCDF)
149  typedef boost::shared_ptr<AmberNetcdf> pAmberNetcdf;
150 #endif
151  typedef boost::shared_ptr<CCPDB> pCCPDB;
152  typedef boost::shared_ptr<TinkerArc> pTinkerArc;
153  typedef boost::shared_ptr<PDBTraj> pPDBTraj;
154  typedef boost::shared_ptr<XTC> pXTC;
155  typedef boost::shared_ptr<TRR> pTRR;
156  typedef boost::shared_ptr<TrajectoryWriter> pTrajectoryWriter;
157 
158  // AtomicGroup and subclasses (i.e. systems formats)
159  class AtomicGroup;
160  class PDB;
161  class PSF;
162  class Amber;
163  class AmberRst;
164  class TinkerXYZ;
165  class Gromacs;
166  class CHARMM;
167 
168  typedef boost::shared_ptr<AtomicGroup> pAtomicGroup;
169  typedef boost::shared_ptr<PDB> pPDB;
170  typedef boost::shared_ptr<PSF> pPSF;
171  typedef boost::shared_ptr<Amber> pAmber;
172  typedef boost::shared_ptr<AmberRst> pAmberRst;
173  typedef boost::shared_ptr<TinkerXYZ> pTinkerXYZ;
174  typedef boost::shared_ptr<Gromacs> pGromacs;
175  typedef boost::shared_ptr<CHARMM> pCHARMM;
176 
177 
178  // Misc
179  class Remarks;
180 
181  const uint kilobytes = 1024;
182  const uint megabytes = 1024 * kilobytes;
183  const uint gigabytes = 1024 * megabytes;
184 
185 }
186 
187 #endif
188 
189 
Namespace for most things not already encapsulated within a class.