00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef OST_MM_SETTINGS_HH
00021 #define OST_MM_SETTINGS_HH
00022
00023
00024
00025
00026
00027 #include <vector>
00028
00029 #include <boost/shared_ptr.hpp>
00030 #include <limits>
00031 #include <ost/mol/residue_handle.hh>
00032 #include <ost/mol/mm/forcefield.hh>
00033
00034 namespace OpenMM{
00035 class Integrator;
00036
00037
00038 }
00039
00040 namespace ost { namespace mol{ namespace mm{
00041
00042 struct Settings;
00043 class TerminiExceptions;
00044 typedef boost::shared_ptr<Settings> SettingsPtr;
00045 typedef boost::shared_ptr<TerminiExceptions> TerminiExceptionsPtr;
00046
00047 enum Platform{
00048 Reference,
00049 OpenCL,
00050 CUDA,
00051 CPU
00052 };
00053
00054 enum NonbondedMethod{
00055 NoCutoff,
00056 CutoffNonPeriodic,
00057 CutoffPeriodic,
00058 Ewald,
00059 PME
00060 };
00061
00062 class TerminiExceptions{
00063
00064 public:
00065
00066 TerminiExceptions(){ }
00067
00068 void SetException(const ost::mol::ResidueHandle& res, const String& exception_name){
00069 exceptions_[res.GetHashCode()] = exception_name;
00070 }
00071
00072 bool HasException(const ost::mol::ResidueHandle& res) const{
00073 return exceptions_.find(res.GetHashCode()) != exceptions_.end();
00074 }
00075
00076 String GetException(const ost::mol::ResidueHandle& res) const {
00077 if(!this->HasException(res)){
00078 std::stringstream ss;
00079 ss<<"Tried to get termini exceptions of res "<<res<<" without defined exception!";
00080 throw ost::Error(ss.str());
00081 }
00082 std::map<unsigned long, String>::const_iterator i = exceptions_.find(res.GetHashCode());
00083 return i->second;
00084 }
00085 private:
00086 std::map<unsigned long, String> exceptions_;
00087
00088 };
00089
00090 typedef std::map<String,String> PropertyMap;
00091
00092 struct Settings{
00093
00094 Settings(): add_bonds(true),
00095 add_angles(true),
00096 add_dihedrals(true),
00097 add_impropers(true),
00098 add_cmaps(true),
00099 add_exclusions(true),
00100 add_nonbonded(true),
00101 add_gbsa(false),
00102 constrain_hbonds(false),
00103 constrain_bonds(false),
00104 rigid_water(false),
00105 strict_interactions(true),
00106 ideal_bond_length_constraints(true),
00107 fix_heavy_atoms(false),
00108 kill_electrostatics(false),
00109 generate_disulfid_bonds(true),
00110 nonbonded_method(NoCutoff),
00111 nonbonded_cutoff(10.0),
00112 remove_cmm_motion(true),
00113 cmm_frequency(1),
00114 periodic_box_extents(0,0,0),
00115 init_temperature(0.0),
00116 forcefield(),
00117
00118 termini_exceptions(new TerminiExceptions),
00119 platform(Reference),
00120 reference_properties(),
00121 cpu_properties(),
00122 opencl_properties(),
00123 cuda_properties(),
00124 add_thermostat(false),
00125 thermostat_temperature(std::numeric_limits<Real>::quiet_NaN()),
00126 thermostat_collision_frequency(std::numeric_limits<Real>::quiet_NaN()),
00127 add_barostat(false),
00128 barostat_temperature(std::numeric_limits<Real>::quiet_NaN()),
00129 barostat_pressure(std::numeric_limits<Real>::quiet_NaN()),
00130 barostat_frequency(25),
00131 integrator(),
00132 solvent_dielectric(78.3),
00133 solute_dielectric(1.0),
00134 reaction_field_dielectric(78.3),
00135 use_dispersion_correction(true),
00136 keep_ff_specific_naming(true),
00137 openmm_plugin_directory("/scicore/soft/apps/OpenMM/6.1-Linux64/lib/plugins"),
00138 custom_plugin_directory("/users/staff/bioz/bienert/Projects/ost-1.6.git/stage/share/openstructure/openmm_plugins")
00139
00140 { }
00141
00142
00143 bool add_bonds;
00144 bool add_angles;
00145 bool add_dihedrals;
00146 bool add_impropers;
00147 bool add_cmaps;
00148 bool add_exclusions;
00149 bool add_nonbonded;
00150 bool add_gbsa;
00151 bool constrain_hbonds;
00152 bool constrain_bonds;
00153 bool rigid_water;
00154 bool strict_interactions;
00155 bool ideal_bond_length_constraints;
00156 bool fix_heavy_atoms;
00157
00158 bool kill_electrostatics;
00159
00160 bool generate_disulfid_bonds;
00161
00162 NonbondedMethod nonbonded_method;
00163 Real nonbonded_cutoff;
00164 bool remove_cmm_motion;
00165 int cmm_frequency;
00166
00167 geom::Vec3 periodic_box_extents;
00168
00169
00170 Real init_temperature;
00171 ForcefieldPtr forcefield;
00172 TerminiExceptionsPtr termini_exceptions;
00173 Platform platform;
00174 PropertyMap reference_properties;
00175 PropertyMap cpu_properties;
00176 PropertyMap opencl_properties;
00177 PropertyMap cuda_properties;
00178 bool add_thermostat;
00179 Real thermostat_temperature;
00180 Real thermostat_collision_frequency;
00181 bool add_barostat;
00182 Real barostat_temperature;
00183 Real barostat_pressure;
00184 int barostat_frequency;
00185 boost::shared_ptr<OpenMM::Integrator> integrator;
00186 Real solvent_dielectric;
00187 Real solute_dielectric;
00188 Real reaction_field_dielectric;
00189 bool use_dispersion_correction;
00190 bool keep_ff_specific_naming;
00191 String openmm_plugin_directory;
00192 String custom_plugin_directory;
00193 };
00194
00195 }}}
00196
00197 #endif