LOOS 4.1.0
The Lightweight Object Oriented Structural analysis library/toolkit
Loading...
Searching...
No Matches
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)
51typedef unsigned int uint;
52#endif
53
54#if defined(REQUIRES_ULONG)
55typedef unsigned long ulong;
56#endif
57
58#if defined(__linux__) || defined(__CYGWIN__) || defined(__FreeBSD__)
59
60extern "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 void dgels_(char*, int*, int*, int*, double*, int*, double*, int*, double*, int*, int*);
78 double dlamch_(const char*);
79}
80
81
82typedef int f77int;
83
84#elif defined(__APPLE__)
85
86
87// MacOS 10.9 requires this to appear before Accelerate
88#include <boost/random.hpp>
89
90#include <Accelerate/Accelerate.h>
91
92
93typedef __CLPK_integer f77int;
94
95#else
96
97#error You are building in an unsupported environment. You will need to specify how to access ATLAS.
98
99#endif
100
101
102
103
104
105#include <boost/shared_ptr.hpp>
106#include <boost/tuple/tuple.hpp>
107
108
109
110
111namespace loos {
112
113 typedef double greal;
114 typedef long gint;
115
116 typedef float dcd_real;
117 typedef double dcd_double;
118
119 template<typename T> class Coord;
120
121
122 typedef Coord<double> GCoord;
123 typedef boost::shared_ptr<GCoord> pGCoord;
124
125 // Writers
126 class TrajectoryWriter;
127 class DCDWriter;
128 class XTCWriter;
129
130 // Trajectory and subclasses...
131 class Atom;
132 class Trajectory;
133 class DCD;
134 class AmberTraj;
135 class AmberNetcdf;
136 class CCPDB;
137 class TinkerArc;
138 class PDBTraj;
139 class XTC;
140 class TRR;
141
142
143 typedef boost::shared_ptr<Atom> pAtom;
144 typedef boost::shared_ptr<Trajectory> pTraj;
145 typedef boost::shared_ptr<DCD> pDCD;
146 typedef boost::shared_ptr<AmberTraj> pAmberTraj;
147 typedef boost::shared_ptr<AmberNetcdf> pAmberNetcdf;
148 typedef boost::shared_ptr<CCPDB> pCCPDB;
149 typedef boost::shared_ptr<TinkerArc> pTinkerArc;
150 typedef boost::shared_ptr<PDBTraj> pPDBTraj;
151 typedef boost::shared_ptr<XTC> pXTC;
152 typedef boost::shared_ptr<TRR> pTRR;
153 typedef boost::shared_ptr<TrajectoryWriter> pTrajectoryWriter;
154
155 // AtomicGroup and subclasses (i.e. systems formats)
156 class AtomicGroup;
157 class PDB;
158 class PSF;
159 class Amber;
160 class AmberRst;
161 class TinkerXYZ;
162 class Gromacs;
163 class CHARMM;
164 class MDTraj;
165 class MMCIF;
166
167 typedef boost::shared_ptr<AtomicGroup> pAtomicGroup;
168 typedef boost::shared_ptr<PDB> pPDB;
169 typedef boost::shared_ptr<PSF> pPSF;
170 typedef boost::shared_ptr<Amber> pAmber;
171 typedef boost::shared_ptr<AmberRst> pAmberRst;
172 typedef boost::shared_ptr<TinkerXYZ> pTinkerXYZ;
173 typedef boost::shared_ptr<Gromacs> pGromacs;
174 typedef boost::shared_ptr<CHARMM> pCHARMM;
175 typedef boost::shared_ptr<MMCIF> pMMCIF;
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.
Definition version.cpp:3