amber.h

Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 // $Id: amber.h,v 1.26 2005/12/23 17:01:49 amoll Exp $ 
00005 //
00006 
00007 // Molecular Mechanics: Amber force field class
00008 
00009 #ifndef BALL_MOLMEC_AMBER_AMBER_H
00010 #define BALL_MOLMEC_AMBER_AMBER_H
00011 
00012 #ifndef BALL_COMMON_H
00013 # include <BALL/common.h>
00014 #endif
00015 
00016 #ifndef BALL_MOLMEC_COMMON_FORCEFIELD_H
00017 # include <BALL/MOLMEC/COMMON/forceField.h>
00018 #endif
00019 
00020 #ifndef BALL_KERNEL_SYSTEM_H
00021 # include <BALL/KERNEL/system.h>
00022 #endif
00023 
00024 #ifndef BALL_COMMON_EXCEPTION_H
00025 # include <BALL/COMMON/exception.h>
00026 #endif
00027 
00028 namespace BALL 
00029 {
00034   class BALL_EXPORT AmberFF 
00035     : public ForceField
00036   {
00037     public:
00038 
00042 
00045     struct BALL_EXPORT Option
00046     {
00049       static const char* FILENAME;
00050 
00055       static const char* NONBONDED_CUTOFF;
00056 
00059       static const char* VDW_CUTOFF;
00060 
00063       static const char* VDW_CUTON;
00064 
00067       static const char* ELECTROSTATIC_CUTOFF;
00068 
00071       static const char* ELECTROSTATIC_CUTON;
00072 
00075       static const char* SCALING_VDW_1_4;
00076 
00079       static const char* SCALING_ELECTROSTATIC_1_4;
00080 
00083       static const char* DISTANCE_DEPENDENT_DIELECTRIC; 
00084 
00087       static const char* ASSIGN_CHARGES;
00088 
00091       static const char* ASSIGN_TYPENAMES;
00092 
00095       static const char* ASSIGN_TYPES;
00096 
00099       static const char* OVERWRITE_CHARGES;
00100 
00103       static const char* OVERWRITE_TYPENAMES;
00104     };
00105 
00108     struct BALL_EXPORT Default
00109     {
00112       static const char* FILENAME;
00113 
00116       static const float NONBONDED_CUTOFF;
00117 
00120       static const float VDW_CUTOFF;
00121 
00124       static const float VDW_CUTON;
00125 
00128       static const float ELECTROSTATIC_CUTOFF;
00129 
00132       static const float ELECTROSTATIC_CUTON;
00133 
00137       static const float SCALING_ELECTROSTATIC_1_4; 
00138 
00141       static const float SCALING_VDW_1_4; 
00142 
00146       static const bool DISTANCE_DEPENDENT_DIELECTRIC; 
00147 
00150       static const bool ASSIGN_CHARGES;
00151 
00154       static const bool ASSIGN_TYPENAMES;
00155 
00158       static const bool ASSIGN_TYPES;
00159 
00162       static const bool OVERWRITE_CHARGES;
00163 
00166       static const bool OVERWRITE_TYPENAMES;
00167     };
00168 
00170 
00173 
00174 
00175     BALL_CREATE(AmberFF)
00176 
00177     
00179     AmberFF();
00180 
00183     AmberFF(System& system);
00184 
00187     AmberFF(System& system, const Options& options);
00188  
00191     AmberFF(const AmberFF& force_field);
00192 
00195     virtual ~AmberFF();
00196 
00198 
00201 
00204     const AmberFF& operator = (const AmberFF& force_field)
00205       ;
00206 
00209     virtual void clear()
00210       ;
00211     
00213 
00216 
00219     virtual bool specificSetup()
00220       throw(Exception::TooManyErrors);
00221 
00223 
00226 
00229     double getStretchEnergy() const;
00230 
00233     double getBendEnergy() const;
00234 
00238     double getTorsionEnergy() const;
00239 
00243     double getNonbondedEnergy() const;
00244 
00247     double getESEnergy() const;
00248 
00251     double getVdWEnergy() const;
00252 
00255     bool hasInitializedParameters() const;
00256 
00260     Size getUpdateFrequency() const;
00261 
00263     virtual String getResults() const
00264       ;
00265 
00267 
00268     protected:
00269       
00270     String  filename_;
00271 
00272     bool    parameters_initialized_;
00273 
00274   };
00275 } // namespace BALL
00276 
00277 #endif // BALL_MOLMEC_AMBER_H