/usr/include/BALL/MOLMEC/MMFF94/MMFF94Parameters.h is in libball1.4-dev 1.4.3~beta1-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 | // -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: MMFF94Parameters.h,v 1.1.8.1 2007/03/25 21:25:17 oliver Exp $
//
// Molecular Mechanics: MMFF94 force field class
#ifndef BALL_MOLMEC_MMFF94_MMFF94PARAMETERS_H
#define BALL_MOLMEC_MMFF94_MMFF94PARAMETERS_H
#ifndef BALL_COMMON_H
# include <BALL/common.h>
#endif
#ifndef BALL_DATATYPE_HASHMAP_H
# include <BALL/DATATYPE/hashMap.h>
#endif
namespace BALL
{
class Atom;
class Parameters;
Position getMMFF94Index(Position atom_type1, Position atom_type2);
/// hold the maximum number of MMFF94 atom types + 1 (wildcard)
extern Size MMFF94_number_atom_types;
class MMFF94AtomTypeEquivalences;
#define MMFF94_INVALID_VALUE 99.0
/////////////////////////////////////////////////////////////////////////////
/** MMFF94 component parameters base class
\ingroup MMFF94
*/
class BALL_EXPORT MMFF94ParametersBase
{
public:
BALL_CREATE(MMFF94ParametersBase)
/// Default constructor.
MMFF94ParametersBase();
/// Destructor.
virtual ~MMFF94ParametersBase() {};
/// Assignment operator
const MMFF94ParametersBase& operator = (const MMFF94ParametersBase&)
{return *this;};
/// Clear method
virtual void clear()
;
///
bool isInitialized() { return is_initialized_;}
///
bool readParameters(Parameters& p, const String& section)
throw(Exception::FileNotFound);
///
void setEquivalences(const MMFF94AtomTypeEquivalences& equi) { equiv_ = &equi;}
protected:
virtual bool setup_(const std::vector<std::vector<String> >&) { return true;};
bool is_initialized_;
// nr of needed fields in parameter files
Size number_expected_fields_;
const MMFF94AtomTypeEquivalences* equiv_;
};
/** MMFF94 equivalences for atom types (see MMFFDEF.PAR)
\ingroup MMFF94
*/
class BALL_EXPORT MMFF94AtomTypeEquivalences:
public MMFF94ParametersBase
{
public:
///
MMFF94AtomTypeEquivalences();
///
MMFF94AtomTypeEquivalences(const MMFF94AtomTypeEquivalences& to_copy);
///
~MMFF94AtomTypeEquivalences();
///
void clear()
;
/** Get an equivalence atom type for the given atom type.
@param number between 1 and 4, 4 is the most general equivalence
@return Index -1 if no equivalence found
*/
Index getEquivalence(Position original, Position number) const;
protected:
virtual bool setup_(const std::vector<std::vector<String> >&);
std::vector<std::vector<Position> > equivalences_;
std::vector<String> names_;
std::vector<bool> exists_;
};
/// Class to store the values of an atom type from MMFFPROP.PAR
struct BALL_EXPORT MMFF94AtomType
{
///
MMFF94AtomType();
/// atomic number;
Position aspec;
/// necessary number of bonded neighbours
Position crd;
/// number of bonds made to this atom type
Position val;
/// has pi lone pair electrons
bool pilp;
/** double(2) or triple(3) bonds are expected
1 cases with intermediate hypridization
*/
Position mltb;
/// is aromatic
bool arom;
/// has linear bond
bool lin;
/// can have a delocalized single bond
bool sbmb;
/// Is this a valid MMFF94 atom type?
bool valid;
};
///////////////////////////////////////////////////////////////////////////
/** MMFF94 parameters for atom types (see MMFFPROP.PAR)
\ingroup MMFF94
*/
class BALL_EXPORT MMFF94AtomTypes:
public MMFF94ParametersBase
{
public:
///
MMFF94AtomTypes();
///
MMFF94AtomTypes(const MMFF94AtomTypes& to_copy);
///
~MMFF94AtomTypes() {};
///
const std::vector<MMFF94AtomType>& getAtomTypes() const { return data_;}
protected:
virtual bool setup_(const std::vector<std::vector<String> >&);
std::vector<MMFF94AtomType> data_;
};
///////////////////////////////////////////////////////////////////////////
/** MMFF94 parameters for bond stretching (see MMFFBOND.PAR)
\ingroup MMFF94
*/
class BALL_EXPORT MMFF94StretchParameters:
public MMFF94ParametersBase
{
public:
///
struct BondData
{
BondData();
double kb_normal;
double r0_normal;
bool standard_bond_exists;
/// parameters for optinal single-bond--multiple bond cases (see MMFFPROP.PAR)
double kb_sbmb;
double r0_sbmb;
bool sbmb_exists;
bool empirical;
};
///
struct EmpiricalBondData
{
double kb;
double r0;
};
///
typedef HashMap<Position, BondData> StretchMap;
typedef HashMap<Position, EmpiricalBondData> EmpiricalStretchMap;
BALL_CREATE(MMFF94StretchParameters)
/// Default constructor.
MMFF94StretchParameters();
/// Destructor.
virtual ~MMFF94StretchParameters();
/// Assignment operator
const MMFF94StretchParameters& operator = (const MMFF94StretchParameters& param)
;
/// Clear method
virtual void clear()
;
///
bool assignParameters(Position type1, Position type2, BondData& data) const;
///
bool readEmpiricalParameters(Parameters& p, const String& section);
///
const StretchMap& getBondParameters() const { return parameters_;}
///
const EmpiricalStretchMap& getEmpiricalParameters() const { return empirical_parameters_;}
static double radii[];
static double electronegatives[];
protected:
virtual bool setup_(const std::vector<std::vector<String> >&);
/// standard parameters
StretchMap parameters_;
mutable StretchMap buffered_parameters_;
EmpiricalStretchMap empirical_parameters_;
};
///////////////////////////////////////////////////////////////////////////
/** MMFF94 parameters for bond bending (see MMFFANG.PAR)
\ingroup MMFF94
*/
class BALL_EXPORT MMFF94BendParameters
: public MMFF94ParametersBase
{
public:
/// Map with the force constant and reference angle
typedef HashMap<Position, std::pair<double, double> > BendMap;
BALL_CREATE(MMFF94BendParameters)
/// Default constructor.
MMFF94BendParameters();
/// Destructor.
virtual ~MMFF94BendParameters();
/// Assignment operator
const MMFF94BendParameters& operator = (const MMFF94BendParameters& param)
;
/// Clear method
virtual void clear()
;
///
bool assignParameters(Position bend_type,
Position atom_type1, Position atom_type2, Position atom_type3,
double& ka, double& angle) const;
protected:
virtual bool setup_(const std::vector<std::vector<String> >&);
Position getIndex_(Position bend_type, Position atom_type1, Position atom_type2, Position atom_type3) const;
/// parameters
BendMap parameters_;
mutable BendMap buffered_parameters_;
};
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
/** MMFF94 parameters for stretch-bend interactions (see MMFFSTBN.PAR)
\ingroup MMFF94
*/
class BALL_EXPORT MMFF94StretchBendParameters
: public MMFF94ParametersBase
{
public:
/// Map with the force constant and reference angle
typedef HashMap<Position, std::pair<double, double> > StretchBendMap;
BALL_CREATE(MMFF94StretchBendParameters)
/// Default constructor.
MMFF94StretchBendParameters();
/// Destructor.
virtual ~MMFF94StretchBendParameters();
/// Assignment operator
const MMFF94StretchBendParameters& operator = (const MMFF94StretchBendParameters& param)
;
/// Clear method
virtual void clear()
;
///
bool assignParameters(Position stretch_bend_type, const Atom& atom1, const Atom& atom2, const Atom& atom3,
double& kba_ijk, double& kba_kji) const;
/// read parameters for stretch-bends and for assignment by periodic table row
bool readEmpiricalParameters(Parameters& p, const String& section)
throw(Exception::FileNotFound);
//@}
protected:
virtual bool setup_(const std::vector<std::vector<String> >&);
Position getIndex_(Position stretch_bend_type,
Position atom_type1, Position atom_type2, Position atom_type3) const;
Position getIndexByRow_(Position r1, Position r2, Position r3) const;
/// parameters
StretchBendMap parameters_;
mutable StretchBendMap buffered_parameters_;
StretchBendMap parameters_by_row_;
};
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
/** MMFF94 parameters for torsions (see MMFFTOR.PAR)
\ingroup MMFF94
*/
class BALL_EXPORT MMFF94TorsionParameters
: public MMFF94ParametersBase
{
public:
/// Map with the force constant and reference angle
typedef HashMap<String, std::vector<double> > TorsionsMap;
BALL_CREATE(MMFF94TorsionParameters)
/// Default constructor.
MMFF94TorsionParameters();
/// Destructor.
virtual ~MMFF94TorsionParameters();
/// Assignment operator
const MMFF94TorsionParameters& operator = (const MMFF94TorsionParameters& param)
;
/// Clear method
virtual void clear()
;
///
bool assignParameters(Position type_index,
Index at1, Index at2, Index at3, Index at4,
double& v1, double& v2, double& v3) const;
protected:
virtual bool setup_(const std::vector<std::vector<String> >&);
String getIndex_(Position type, Position atom_type1, Position atom_type2, Position atom_type3, Position atom_type4) const;
/// parameters
TorsionsMap parameters_;
mutable TorsionsMap buffered_parameters_;
static Position ic_[5];
static Position lc_[5];
};
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
/** MMFF94 parameters for out of plane bending (see MMFFOOR.PAR)
\ingroup MMFF94
*/
class BALL_EXPORT MMFF94PlaneParameters
: public MMFF94ParametersBase
{
public:
/// Map with the force constant
typedef HashMap<String, double> PlaneMap;
BALL_CREATE(MMFF94PlaneParameters)
/// Default constructor.
MMFF94PlaneParameters();
/// Destructor.
virtual ~MMFF94PlaneParameters();
/// Assignment operator
const MMFF94PlaneParameters& operator = (const MMFF94PlaneParameters& param)
;
/// Clear method
virtual void clear()
;
///
bool assignParameters(Index at1, Index at2, Index at3, Index at4, double& v) const;
protected:
virtual bool setup_(const std::vector<std::vector<String> >&);
String getIndex_(Position atom_type1, Position atom_type2, Position atom_type3, Position atom_type4) const;
/// parameters
PlaneMap parameters_;
mutable PlaneMap buffered_parameters_;
};
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
/** MMFF94 parameters for VDW (see MMFFVDW.PAR)
\ingroup MMFF94
*/
class BALL_EXPORT MMFF94VDWParameters
: public MMFF94ParametersBase
{
public:
struct VDWEntry
{
double alpha_i;
double ni;
double ai;
double gi;
short donor_acceptor;
bool valid;
};
BALL_CREATE(MMFF94VDWParameters)
/// Default constructor.
MMFF94VDWParameters();
/// Destructor.
virtual ~MMFF94VDWParameters();
/// Assignment operator
const MMFF94VDWParameters& operator = (const MMFF94VDWParameters& param)
;
/// Clear method
virtual void clear()
;
///
double getR(Position atom_type) const;
/// Retrieve vdW parameters for a single atom type
const VDWEntry& getParameters(Index at) const;
///
bool assignParameters(Position at1, Position at2, double& rij, double& rij_7_, double& eij) const;
protected:
virtual bool setup_(const std::vector<std::vector<String> >&);
/// parameters
std::vector<VDWEntry> parameters_;
// R star ii for all individual atom types
mutable std::vector<double> rs_;
// R star ij for pairs of atom types
mutable std::vector<double> rij_;
// R star ij ^ 7 for pairs of atom types
mutable std::vector<double> rij_7_;
// R star ij and for pairs of atom types
mutable std::vector<double> eij_;
// bools if indivual value was already calculated
mutable std::vector<bool> calculated_;
};
////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////
/** MMFF94 parameters for partial charges for electrostatics (see MMFFCHG.PAR MMFFPBCI.PAR)
\ingroup MMFF94
*/
class BALL_EXPORT MMFF94ESParameters
: public MMFF94ParametersBase
{
public:
BALL_CREATE(MMFF94ESParameters)
/// Default constructor.
MMFF94ESParameters();
/// Destructor.
virtual ~MMFF94ESParameters();
/// Assignment operator
const MMFF94ESParameters& operator = (const MMFF94ESParameters& param)
;
/// Clear method
virtual void clear()
;
/** Get the partial charge increment for the two atom types and the bond type.
The increment is for the atom with atom type at1.
99 is return if no increment could be calculated.
*/
double getPartialCharge(Position at1, Position at2, Position bt) const;
///
bool readEmpiricalParameters(Parameters& p, const String& section)
throw(Exception::FileNotFound);
///
double getPhi(Index atom_type) const;
///
double getPBCI(Index atom_type) const;
protected:
virtual bool setup_(const std::vector<std::vector<String> >&);
Position getIndex_(Position at1, Position at2, Position bt) const;
/// parameters
std::vector<double> parameters_, phis_, pbcis_;
};
} // namespace BALL
#endif // BALL_MOLMEC_MMFF94_MMFF94PARAMETERS_H
|