Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

element_types.h

Go to the documentation of this file.
00001 // -*- mode: c++; -*-
00002 //
00003 //The Biomolecule Toolkit (BTK) is a C++ library for use in the
00004 //modeling, analysis, and design of biological macromolecules.
00005 //Copyright (C) 2004, Christopher Saunders (ctsa@users.sourceforge.net)
00006 //
00007 //This program is free software; you can redistribute it and/or modify
00008 //it under the terms of the GNU Lesser General Public License as published
00009 //by the Free Software Foundation; either version 2.1 of the License, or (at
00010 //your option) any later version.
00011 //
00012 //This program is distributed in the hope that it will be useful,  but
00013 //WITHOUT ANY WARRANTY; without even the implied warranty of
00014 //MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015 //Lesser General Public License for more details. 
00016 //
00017 //You should have received a copy of the GNU Lesser General Public License 
00018 //along with this program; if not, write to the Free Software Foundation, 
00019 //Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00020 
00025 #ifndef ELEMENT_TYPES_H
00026 #define ELEMENT_TYPES_H
00027  
00028 #include <cassert>
00029 
00030 #include <string>
00031 
00032 
00033 namespace BTK {
00034 
00035   const double WATER_RADIUS = 1.4;
00036 
00037   namespace ELEMENT {
00038 
00039     enum index_t {UNKNOWN=-1,C,H,N,O,P,S,Se,SIZE};
00040 
00041     inline std::string name(index_t e){
00042       switch(e){
00043       case C: return "C";
00044       case H: return "H";
00045       case N: return "N";
00046       case O: return "O";
00047       case P: return "P";
00048       case S: return "S";
00049       case Se: return "Se";
00050       default: return "UNKNOWN";
00051       }
00052     }
00053 
00054 
00055     inline double sasa_radius(index_t e) {
00056       switch(e){
00057       case C: return WATER_RADIUS+1.8;
00058       case H: return WATER_RADIUS+1.42;
00059       case N: return WATER_RADIUS+1.65;
00060       case O: return WATER_RADIUS+1.4;
00061       case P: return WATER_RADIUS+1.85;
00062       case S: return WATER_RADIUS+1.85;
00063       default: assert(0); return 0;
00064       }
00065     }
00066   }
00067   
00068 } // namespace BTK
00069 
00070 
00071 
00072 #endif

Generated on Wed Apr 14 00:43:17 2004 for BTK by doxygen 1.3.6