Loading...
Searching...
No Matches
MMFF94StretchBend.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// $Id: MMFF94StretchBend.h,v 1.1.8.1 2007/03/25 21:25:18 oliver Exp $
//
#ifndef BALL_MOLMEC_MMFF94_MMFF94STRETCHBEND_H
#define BALL_MOLMEC_MMFF94_MMFF94STRETCHBEND_H
#ifndef BALL_MOLMEC_COMMON_FORCEFIELDCOMPONENT_H
# include <BALL/MOLMEC/COMMON/forceFieldComponent.h>
#endif
#ifndef BALL_MOLMEC_MMFF94_MMFF94PARAMETERS_H
# include <BALL/MOLMEC/MMFF94/MMFF94Parameters.h>
#endif
namespace BALL
{
class MMFF94;
class BALL_EXPORT MMFF94StretchBend
: public ForceFieldComponent
{
public:
struct BALL_EXPORT StretchBend
{
double kba_ijk;
double kba_kji;
double energy; // debug
Index sbtijk;
Index stretch_i_j, stretch_j_k;
Index bend_index;
};
struct BALL_EXPORT Bend
{
Bend();
double theta0;
double delta_theta;
double theta;
double ka;
Atom* atom1;
Atom* atom2;
Atom* atom3;
bool is_linear;
Position ATIJK;
double energy; // debug
bool emperical; // debug
TVector3<double> n1, n2;
};
struct BALL_EXPORT Stretch
{
Stretch()
: atom1(NULL),
atom2(NULL),
kb(0.0),
r0(0.0),
delta_r(0.0),
sbmb(false),
emperical(false)
{
}
Atom* atom1;
Atom* atom2;
double kb;
double r0;
double delta_r;
bool sbmb;
bool emperical;
Vector3 n;
};
#define MMFF94_BENDS_ENABLED "enable Bends"
#define MMFF94_STRETCHES_ENABLED "enable Stretches"
#define MMFF94_STRETCHBENDS_ENABLED "enable StrechBends"
BALL_CREATE(MMFF94StretchBend)
MMFF94StretchBend();
MMFF94StretchBend(ForceField& force_field);
MMFF94StretchBend(const MMFF94StretchBend& to_copy);
virtual ~MMFF94StretchBend();
virtual bool setup();
virtual double updateEnergy();
virtual double updateBendEnergy();
virtual double updateStretchEnergy();
virtual double updateStretchBendEnergy();
double getStretchEnergy() const;
double getBendEnergy() const;
double getStretchBendEnergy() const;
virtual void updateForces();
virtual void updateBendForces();
virtual void updateStretchForces();
virtual void updateStretchBendForces();
const vector<Bend>& getBends() const { return bends_;}
const vector<Stretch>& getStretches() const { return stretches_;}
const vector<StretchBend>& getStretchBends() const { return stretch_bends_;}
Index calculateSBTIJK(Position angle_type,
bool bond_type1,
bool bond_type2);
Position getBendType(const Bond& bond1, const Bond& bond2,
Atom& atom1, Atom& atom2, Atom& atom3) const;
double calculateBendEmpiricalReferenceAngle(Atom& atom1, Atom& atom2, Atom& atom3) const;
double calculateBendEmpiricalForceConstant(Atom& atom1, Atom& atom2, Atom& atom3, double angle_0) const;
double calculateStretchR0(const Bond& bond);
double calculateStretchConstant(const Bond& bond, double r0);
private:
inline void AddDV3_(Vector3& f3, const TVector3<double> d3);
void calculateDeltas_();
bool setupBends_();
bool setupStretches_();
bool setupStretchBends_();
void errorOccurred_(const String& string,
const Atom& a1, const Atom& a2, const Atom& a3);
vector<Bend> bends_;
vector<Stretch> stretches_;
vector<StretchBend> stretch_bends_;
const MMFF94StretchParameters* stretch_parameters_;
MMFF94BendParameters bend_parameters_;
MMFF94StretchBendParameters sb_parameters_;
static double bend_z_[];
static double bend_c_[];
static String bend_elements_[];
double stretch_energy_;
double bend_energy_;
double stretch_bend_energy_;
MMFF94* mmff94_;
bool stretch_enabled_, bend_enabled_, stretchbend_enabled_;
};
} // namespace BALL
#endif // BALL_MOLMEC_MMFF94_MMFF94STRETCHBEND_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
MMFF94Parameters.h
BALL::Atom
Definition atom.h:90
BALL::Bond
Definition bond.h:57
BALL::ForceFieldComponent::ForceField
friend class ForceField
Definition forceFieldComponent.h:37
BALL::ForceFieldComponent::ForceFieldComponent
ForceFieldComponent()
BALL::MMFF94BendParameters
Definition MMFF94Parameters.h:265
BALL::MMFF94StretchBendParameters
Definition MMFF94Parameters.h:312
BALL::MMFF94StretchBend::getStretches
const vector< Stretch > & getStretches() const
Definition MMFF94StretchBend.h:152
BALL::MMFF94StretchBend::updateBendForces
virtual void updateBendForces()
BALL::MMFF94StretchBend::getStretchEnergy
double getStretchEnergy() const
BALL::MMFF94StretchBend::getBendType
Position getBendType(const Bond &bond1, const Bond &bond2, Atom &atom1, Atom &atom2, Atom &atom3) const
BALL::MMFF94StretchBend::getStretchBends
const vector< StretchBend > & getStretchBends() const
Definition MMFF94StretchBend.h:155
BALL::MMFF94StretchBend::calculateBendEmpiricalReferenceAngle
double calculateBendEmpiricalReferenceAngle(Atom &atom1, Atom &atom2, Atom &atom3) const
Bend emperical reference angle.
BALL::MMFF94StretchBend::calculateStretchConstant
double calculateStretchConstant(const Bond &bond, double r0)
BALL::MMFF94StretchBend::updateForces
virtual void updateForces()
Calculates and returns the component's forces.
BALL::MMFF94StretchBend::updateStretchForces
virtual void updateStretchForces()
BALL::MMFF94StretchBend::updateEnergy
virtual double updateEnergy()
Calculates and returns the component's energy.
BALL::MMFF94StretchBend::updateStretchBendEnergy
virtual double updateStretchBendEnergy()
BALL::MMFF94StretchBend::calculateSBTIJK
Index calculateSBTIJK(Position angle_type, bool bond_type1, bool bond_type2)
BALL::MMFF94StretchBend::getBends
const vector< Bend > & getBends() const
Definition MMFF94StretchBend.h:149
BALL::MMFF94StretchBend::updateBendEnergy
virtual double updateBendEnergy()
BALL::MMFF94StretchBend::calculateBendEmpiricalForceConstant
double calculateBendEmpiricalForceConstant(Atom &atom1, Atom &atom2, Atom &atom3, double angle_0) const
Bend emperical force constant.
BALL::MMFF94StretchBend::setup
virtual bool setup()
BALL::MMFF94StretchBend::getBendEnergy
double getBendEnergy() const
BALL::MMFF94StretchBend::updateStretchEnergy
virtual double updateStretchEnergy()
BALL::MMFF94StretchBend::getStretchBendEnergy
double getStretchBendEnergy() const
BALL::MMFF94StretchBend::calculateStretchR0
double calculateStretchR0(const Bond &bond)
Calculate the radius value per Schomaker-Stevenson Rule.
BALL::MMFF94StretchBend::updateStretchBendForces
virtual void updateStretchBendForces()
BALL::MMFF94StretchBend::MMFF94StretchBend
MMFF94StretchBend()
BALL::MMFF94StretchParameters
Definition MMFF94Parameters.h:187
BALL::MMFF94
Definition MMFF94.h:51
BALL::String
Definition string.h:57
BALL::TVector3
Definition vector3.h:71
BALL_CREATE
#define BALL_CREATE(name)
Definition create.h:62
forceFieldComponent.h
BALL
Definition constants.h:13
BALL::Position
BALL_SIZE_TYPE Position
Definition COMMON/global.h:140
BALL::Vector3
TVector3< float > Vector3
Definition vector3.h:1084
BALL::Index
BALL_INDEX_TYPE Index
Definition COMMON/global.h:105
BALL::MMFF94StretchBend::Bend
see MMFFANG.PAR
Definition MMFF94StretchBend.h:42
BALL::MMFF94StretchBend::Bend::theta
double theta
Definition MMFF94StretchBend.h:47
BALL::MMFF94StretchBend::Bend::n1
TVector3< double > n1
Definition MMFF94StretchBend.h:56
BALL::MMFF94StretchBend::Bend::ATIJK
Position ATIJK
Definition MMFF94StretchBend.h:53
BALL::MMFF94StretchBend::Bend::is_linear
bool is_linear
Definition MMFF94StretchBend.h:52
BALL::MMFF94StretchBend::Bend::Bend
Bend()
BALL::MMFF94StretchBend::Bend::theta0
double theta0
Definition MMFF94StretchBend.h:45
BALL::MMFF94StretchBend::Bend::atom2
Atom * atom2
Definition MMFF94StretchBend.h:50
BALL::MMFF94StretchBend::Bend::emperical
bool emperical
Definition MMFF94StretchBend.h:55
BALL::MMFF94StretchBend::Bend::atom1
Atom * atom1
Definition MMFF94StretchBend.h:49
BALL::MMFF94StretchBend::Bend::n2
TVector3< double > n2
Definition MMFF94StretchBend.h:56
BALL::MMFF94StretchBend::Bend::ka
double ka
Definition MMFF94StretchBend.h:48
BALL::MMFF94StretchBend::Bend::delta_theta
double delta_theta
Definition MMFF94StretchBend.h:46
BALL::MMFF94StretchBend::Bend::energy
double energy
Definition MMFF94StretchBend.h:54
BALL::MMFF94StretchBend::Bend::atom3
Atom * atom3
Definition MMFF94StretchBend.h:51
BALL::MMFF94StretchBend::StretchBend
Definition MMFF94StretchBend.h:31
BALL::MMFF94StretchBend::StretchBend::bend_index
Index bend_index
Definition MMFF94StretchBend.h:37
BALL::MMFF94StretchBend::StretchBend::stretch_i_j
Index stretch_i_j
Definition MMFF94StretchBend.h:36
BALL::MMFF94StretchBend::StretchBend::kba_ijk
double kba_ijk
Definition MMFF94StretchBend.h:32
BALL::MMFF94StretchBend::StretchBend::sbtijk
Index sbtijk
Definition MMFF94StretchBend.h:35
BALL::MMFF94StretchBend::StretchBend::energy
double energy
Definition MMFF94StretchBend.h:34
BALL::MMFF94StretchBend::StretchBend::kba_kji
double kba_kji
Definition MMFF94StretchBend.h:33
BALL::MMFF94StretchBend::StretchBend::stretch_j_k
Index stretch_j_k
Definition MMFF94StretchBend.h:36
BALL::MMFF94StretchBend::Stretch::delta_r
double delta_r
Definition MMFF94StretchBend.h:77
BALL::MMFF94StretchBend::Stretch::kb
double kb
Definition MMFF94StretchBend.h:75
BALL::MMFF94StretchBend::Stretch::n
Vector3 n
Definition MMFF94StretchBend.h:80
BALL::MMFF94StretchBend::Stretch::emperical
bool emperical
Definition MMFF94StretchBend.h:79
BALL::MMFF94StretchBend::Stretch::atom2
Atom * atom2
Definition MMFF94StretchBend.h:74
BALL::MMFF94StretchBend::Stretch::sbmb
bool sbmb
Definition MMFF94StretchBend.h:78
BALL::MMFF94StretchBend::Stretch::Stretch
Stretch()
Definition MMFF94StretchBend.h:62
BALL::MMFF94StretchBend::Stretch::r0
double r0
Definition MMFF94StretchBend.h:76
BALL::MMFF94StretchBend::Stretch::atom1
Atom * atom1
Definition MMFF94StretchBend.h:73