atomTypes.h

Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 // $Id: atomTypes.h,v 1.17 2005/12/23 17:01:54 amoll Exp $
00005 //
00006 
00007 #ifndef BALL_MOLMEC_PARAMETER_ATOMTYPES_H
00008 #define BALL_MOLMEC_PARAMETER_ATOMTYPES_H
00009 
00010 #ifndef BALL_FORMAT_PARAMETERSECTION_H
00011 # include <BALL/FORMAT/parameterSection.h>
00012 #endif
00013 
00014 #ifndef BALL_KERNEL_ATOM_H
00015 # include <BALL/KERNEL/atom.h>
00016 #endif
00017 
00018 #define BALL_ATOM_WILDCARD_NAME "*"
00019 #define BALL_ATOM_UNKNOWN_NAME "?"
00020 
00021 namespace BALL 
00022 {
00023   class ForceFieldParameters;
00024 
00030   class BALL_EXPORT AtomTypes
00031     : public ParameterSection
00032   {
00033     public:
00034 
00038     
00041     AtomTypes() ;
00042 
00045     AtomTypes(const AtomTypes& atom_types) ;
00046 
00049     virtual ~AtomTypes() ;
00050 
00052 
00055 
00061     virtual bool extractSection(Parameters& parameters, 
00062         const String& section_name = "AtomTypes") ;
00063 
00066     Atom::Type getType(const String& name) const ;
00067 
00070     bool hasType(const String& name) const ;
00071 
00074     String getTypeName(Atom::Type type) const ;
00075 
00078     Size getNumberOfTypes() const ;
00079 
00081 
00084 
00087     virtual void clear() ;
00088 
00092     AtomTypes& operator = (const AtomTypes& atom_types) ;
00093 
00095 
00098 
00101     bool operator == (const AtomTypes& atom_types) const ;
00102 
00104 
00105     protected:
00106     
00107     /*_ Contains the numeric types for each atom type string.
00108     */
00109     StringHashMap<Atom::Type> type_map_;
00110 
00111     /*_ Contains the symbolic names of the atom types.
00112     */
00113     vector<String>            names_;
00114   };
00115 } // namespace BALL
00116 
00117 #endif // BALL_MOLMEC_PARAMETER_ATOMTYPES_H