LOOS  v2.3.2
Geometry.hpp
1 /*
2  This file is part of LOOS.
3 
4  LOOS (Lightweight Object-Oriented Structure library)
5  Copyright (c) 2008, 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 #if !defined(LOOS_GEOM_HPP)
26 #define LOOS_GEOM_HPP
27 
28 #include <loos_defs.hpp>
29 #include <cmath>
30 
31 namespace loos {
33  namespace Math {
34 
35  const double DEGREES = 180 / M_PI ;
36 
38  greal angle(const GCoord&, const GCoord&, const GCoord&, const GCoord* =NULL);
39 
41  greal angle(const pAtom& a, const pAtom& b, const pAtom& c, const GCoord * =NULL);
42 
44  greal torsion(const GCoord& a, const GCoord& b, const GCoord& c,
45  const GCoord& d, const GCoord* =NULL);
46 
48  greal torsion(const pAtom& a, const pAtom& b, const pAtom& c,
49  const pAtom& d, const GCoord* =NULL);
50 
51  }
52 }
53 
54 #endif
greal angle(const GCoord &, const GCoord &, const GCoord &, const GCoord *=NULL)
Compute the angle in degrees assuming the middle is the vertex.
Definition: Geometry.cpp:36
greal torsion(const GCoord &a, const GCoord &b, const GCoord &c, const GCoord &d, const GCoord *=NULL)
Compute the torsion in degrees.
Definition: Geometry.cpp:61
Namespace for most things not already encapsulated within a class.