OpenStructure
Loading...
Searching...
No Matches
settings.hh
Go to the documentation of this file.
1//------------------------------------------------------------------------------
2// This file is part of the OpenStructure project <www.openstructure.org>
3//
4// Copyright (C) 2008-2020 by the OpenStructure authors
5//
6// This library is free software; you can redistribute it and/or modify it under
7// the terms of the GNU Lesser General Public License as published by the Free
8// Software Foundation; either version 3.0 of the License, or (at your option)
9// any later version.
10// This library is distributed in the hope that it will be useful, but WITHOUT
11// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13// details.
14//
15// You should have received a copy of the GNU Lesser General Public License
16// along with this library; if not, write to the Free Software Foundation, Inc.,
17// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18//------------------------------------------------------------------------------
19
20#ifndef OST_MM_SETTINGS_HH
21#define OST_MM_SETTINGS_HH
22
23/*
24 DO NOT EDIT, automatically generated by CMake
25*/
26
27#include <vector>
28
29#include <boost/shared_ptr.hpp>
30#include <limits>
33#include <ost/platform.hh>
34#include <boost/filesystem/path.hpp>
35#include <ost/log.hh>
36
37namespace OpenMM{
38 class Integrator;//hacky way of telling the Integrator us around
39 //will be included in source file to avoid
40 //dependencies on external libraries
41}
42
43namespace ost { namespace mol{ namespace mm{
44
45struct Settings;
46class TerminiExceptions;
47typedef boost::shared_ptr<Settings> SettingsPtr;
48typedef boost::shared_ptr<TerminiExceptions> TerminiExceptionsPtr;
49
56
64
66
67public:
68
70
71 void SetException(const ost::mol::ResidueHandle& res, const String& exception_name){
72 exceptions_[res.GetHashCode()] = exception_name;
73 }
74
75 bool HasException(const ost::mol::ResidueHandle& res) const{
76 return exceptions_.find(res.GetHashCode()) != exceptions_.end();
77 }
78
80 if(!this->HasException(res)){
81 std::stringstream ss;
82 ss<<"Tried to get termini exceptions of res "<<res<<" without defined exception!";
83 throw ost::Error(ss.str());
84 }
85 std::map<unsigned long, String>::const_iterator i = exceptions_.find(res.GetHashCode());
86 return i->second;
87 }
88private:
89 std::map<unsigned long, String> exceptions_;
90
91};
92
93typedef std::map<String,String> PropertyMap;
94
95struct Settings{
96
98 add_angles(true),
99 add_dihedrals(true),
100 add_impropers(true),
101 add_cmaps(true),
102 add_exclusions(true),
103 add_nonbonded(true),
104 add_gbsa(false),
105 constrain_hbonds(false),
106 constrain_bonds(false),
107 rigid_water(false),
110 fix_heavy_atoms(false),
111 kill_electrostatics(false),
114 nonbonded_cutoff(10.0),
115 remove_cmm_motion(true),
116 cmm_frequency(1),
118 init_temperature(0.0),
119 forcefield(), //note, that we don't create an empty forcefield at this point =>force the user
120 //to assign a forcefield
127 add_thermostat(false),
128 thermostat_temperature(std::numeric_limits<Real>::quiet_NaN()),
129 thermostat_collision_frequency(std::numeric_limits<Real>::quiet_NaN()),
130 add_barostat(false),
131 barostat_temperature(std::numeric_limits<Real>::quiet_NaN()),
132 barostat_pressure(std::numeric_limits<Real>::quiet_NaN()),
134 integrator(),
135 solvent_dielectric(78.3), //this is for GBSA
136 solute_dielectric(1.0), //this is for GBSA
140 openmm_plugin_directory("/scicore/soft/easybuild/apps/OpenMM/8.0.0-foss-2023b/lib/plugins") {
141
142 try {
143 // try to guess custom_plugin_directory
144 boost::filesystem::path shared_path(GetSharedDataPath());
145 custom_plugin_directory = (shared_path / "openmm_plugins").string();
146 } catch (std::runtime_error& e) {
147 // fallback to OpenMM path (used to be default in OST before 1.7)
148 LOG_WARNING("Failed to find shared data path for openmm_plugins. "
149 "Please set custom_plugin_directory of Settings object "
150 "manually or ensure that OST_ROOT is set properly. "
151 "Caught exception: " << e.what());
153 }
154
155 }
156
157 //
172 //set all charges to zero
174 //automatically generate disulfid bonds
176 //see export_openmm.cc for all possibilities
181 //currently only boxes defined by base vectors are supported
183 //at the beginning of the simulation, the initial velociities are
184 //randomly set according to a boltzmann distribution
200 boost::shared_ptr<OpenMM::Integrator> integrator;
208};
209
210}}} //namespace
211
212#endif
Three dimensional vector class, using Real precision.
Definition vec3.hh:48
unsigned long GetHashCode() const
String GetException(const ost::mol::ResidueHandle &res) const
Definition settings.hh:79
void SetException(const ost::mol::ResidueHandle &res, const String &exception_name)
Definition settings.hh:71
bool HasException(const ost::mol::ResidueHandle &res) const
Definition settings.hh:75
#define LOG_WARNING(m)
Definition log.hh:85
float Real
Definition base.hh:44
std::string String
Definition base.hh:54
boost::shared_ptr< TerminiExceptions > TerminiExceptionsPtr
Definition settings.hh:48
std::map< String, String > PropertyMap
Definition settings.hh:93
boost::shared_ptr< ost::mol::mm::Forcefield > ForcefieldPtr
Definition forcefield.hh:42
boost::shared_ptr< Settings > SettingsPtr
Definition settings.hh:47
@ CutoffNonPeriodic
Definition settings.hh:59
Definition base.dox:1
String DLLEXPORT_OST_BASE GetSharedDataPath()
TerminiExceptionsPtr termini_exceptions
Definition settings.hh:187
PropertyMap reference_properties
Definition settings.hh:189
ForcefieldPtr forcefield
Definition settings.hh:186
PropertyMap opencl_properties
Definition settings.hh:191
boost::shared_ptr< OpenMM::Integrator > integrator
Definition settings.hh:200
PropertyMap cpu_properties
Definition settings.hh:190
PropertyMap cuda_properties
Definition settings.hh:192
NonbondedMethod nonbonded_method
Definition settings.hh:177
Real thermostat_collision_frequency
Definition settings.hh:195
geom::Vec3 periodic_box_extents
Definition settings.hh:182