- Main Page
- Related Pages
- Classes
- Files

- File List

# GBSAOBCForce.h

    00001 #ifndef OPENMM_GBSAOBCFORCEFIELD_H_
    00002 #define OPENMM_GBSAOBCFORCEFIELD_H_
    00003
    00004 /* -------------------------------------------------------------------------- *
    00005  *                                   OpenMM                                   *
    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-2009 Stanford University and the Authors.      *
    00013  * Authors: 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 "Force.h"
    00036 #include <vector>
    00037 #include "internal/windowsExport.h"
    00038
    00039 namespace OpenMM {
    00040
    00058 class OPENMM_EXPORT GBSAOBCForce : public Force {
    00059 public:
    00063     enum NonbondedMethod {
    00068         NoCutoff = 0,
    00072         CutoffNonPeriodic = 1,
    00077         CutoffPeriodic = 2,
    00078     };
    00082     GBSAOBCForce();
    00086     int getNumParticles() const {
    00087         return particles.size();
    00088     }
    00098     int addParticle(double charge, double radius, double scalingFactor);
    00107     void getParticleParameters(int index, double& charge, double& radius, double& scalingFactor) const;
    00116     void setParticleParameters(int index, double charge, double radius, double scalingFactor);
    00120     double getSolventDielectric() const {
    00121         return solventDielectric;
    00122     }
    00126     void setSolventDielectric(double dielectric) {
    00127         solventDielectric = dielectric;
    00128     }
    00132     double getSoluteDielectric() const {
    00133         return soluteDielectric;
    00134     }
    00138     void setSoluteDielectric(double dielectric) {
    00139         soluteDielectric = dielectric;
    00140     }
    00144     double getSurfaceAreaEnergy() const {
    00145         return surfaceAreaEnergy;
    00146     }
    00150     void setSurfaceAreaEnergy(double energy) {
    00151         surfaceAreaEnergy = energy;
    00152     }
    00156     NonbondedMethod getNonbondedMethod() const;
    00160     void setNonbondedMethod(NonbondedMethod method);
    00167     double getCutoffDistance() const;
    00174     void setCutoffDistance(double distance);
    00186     void updateParametersInContext(Context& context);
    00187 protected:
    00188     ForceImpl* createImpl() const;
    00189 private:
    00190     class ParticleInfo;
    00191     NonbondedMethod nonbondedMethod;
    00192     double cutoffDistance, solventDielectric, soluteDielectric, surfaceAreaEnergy;
    00193     std::vector<ParticleInfo> particles;
    00194 };
    00195
    00200 class GBSAOBCForce::ParticleInfo {
    00201 public:
    00202     double charge, radius, scalingFactor;
    00203     ParticleInfo() {
    00204         charge = radius = scalingFactor = 0.0;
    00205     }
    00206     ParticleInfo(double charge, double radius, double scalingFactor) :
    00207         charge(charge), radius(radius), scalingFactor(scalingFactor) {
    00208     }
    00209 };
    00210
    00211 } // namespace OpenMM
    00212
    00213 #endif /*OPENMM_GBSAOBCFORCEFIELD_H_*/