- Main Page
- Related Pages
- Classes
- Files

- File List

# AmoebaWcaDispersionForce.h

    00001 #ifndef OPENMM_AMOEBA_WCA_DISPERSION_FORCE_H_
    00002 #define OPENMM_AMOEBA_WCA_DISPERSION_FORCE_H_
    00003
    00004 /* -------------------------------------------------------------------------- *
    00005  *                              OpenMMAmoeba                                  *
    00006  * -------------------------------------------------------------------------- *
    00007  * This is part of the OpenMM molecular simulation toolkit originating from   *
    00008  * Simbios, the NIH National Center for Physics-Based Simulation of           *
    00009  * Biological Structures at Stanford, funded under the NIH Roadmap for        *
    00010  * Medical Research, grant U54 GM072970. See https://simtk.org.               *
    00011  *                                                                            *
    00012  * Portions copyright (c) 2008-2012 Stanford University and the Authors.      *
    00013  * Authors: Mark Friedrichs, Peter Eastman                                    *
    00014  * Contributors:                                                              *
    00015  *                                                                            *
    00016  * Permission is hereby granted, free of charge, to any person obtaining a    *
    00017  * copy of this software and associated documentation files (the "Software"), *
    00018  * to deal in the Software without restriction, including without limitation  *
    00019  * the rights to use, copy, modify, merge, publish, distribute, sublicense,   *
    00020  * and/or sell copies of the Software, and to permit persons to whom the      *
    00021  * Software is furnished to do so, subject to the following conditions:       *
    00022  *                                                                            *
    00023  * The above copyright notice and this permission notice shall be included in *
    00024  * all copies or substantial portions of the Software.                        *
    00025  *                                                                            *
    00026  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
    00027  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,   *
    00028  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL    *
    00029  * THE AUTHORS, CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,    *
    00030  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR      *
    00031  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE  *
    00032  * USE OR OTHER DEALINGS IN THE SOFTWARE.                                     *
    00033  * -------------------------------------------------------------------------- */
    00034
    00035 #include "openmm/Force.h"
    00036 #include "internal/windowsExportAmoeba.h"
    00037 #include <vector>
    00038
    00039 namespace OpenMM {
    00040
    00050 class OPENMM_EXPORT_AMOEBA AmoebaWcaDispersionForce : public Force {
    00051
    00052 public:
    00053
    00057     AmoebaWcaDispersionForce();
    00058
    00062     int getNumParticles() const {
    00063         return parameters.size();
    00064     }
    00065
    00073     void setParticleParameters(int particleIndex, double radius, double epsilon);
    00074
    00082     void getParticleParameters(int particleIndex, double& radius, double& epsilon) const;
    00083
    00091     int addParticle(double radius, double epsilon);
    00101     void updateParametersInContext(Context& context);
    00102
    00103     /*
    00104      * Constants
    00105      */
    00106
    00107     double getEpso() const;
    00108     double getEpsh() const;
    00109     double getRmino() const;
    00110     double getRminh() const;
    00111     double getAwater() const;
    00112     double getShctd() const;
    00113     double getDispoff() const;
    00114     double getSlevy() const;
    00115
    00116     void setEpso(double inputValue);
    00117     void setEpsh(double inputValue);
    00118     void setRmino(double inputValue);
    00119     void setRminh(double inputValue);
    00120     void setAwater(double inputValue);
    00121     void setShctd(double inputValue);
    00122     void setDispoff(double inputValue);
    00123     void setSlevy(double inputValue);
    00124
    00125 protected:
    00126     ForceImpl* createImpl() const;
    00127 private:
    00128     class WcaDispersionInfo;
    00129     double epso;
    00130     double epsh;
    00131     double rmino;
    00132     double rminh;
    00133     double awater;
    00134     double slevy;
    00135     double shctd;
    00136     double dispoff;
    00137     std::vector<WcaDispersionInfo> parameters;
    00138 };
    00139
    00144 class AmoebaWcaDispersionForce::WcaDispersionInfo {
    00145 public:
    00146     double radius, epsilon;
    00147     WcaDispersionInfo() {
    00148         radius              = 1.0;
    00149         epsilon             = 0.0;
    00150     }
    00151     WcaDispersionInfo(double radius, double epsilon) : radius(radius), epsilon(epsilon) {
    00152     }
    00153 };
    00154
    00155 } // namespace OpenMM
    00156
    00157 #endif /*OPENMM_AMOEBA_WCA_DISPERSION_FORCE_H_*/