Loading...
Searching...
No Matches
amberTorsion.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// Molecular Mechanics: Amber force field, bond stretch component
#ifndef BALL_MOLMEC_AMBER_AMBERTORSION_H
#define BALL_MOLMEC_AMBER_AMBERTORSION_H
#ifndef BALL_COMMON_H
# include <BALL/common.h>
#endif
#ifndef BALL_MOLMEC_PARAMETER_COSINETORSION_H
# include <BALL/MOLMEC/PARAMETER/cosineTorsion.h>
#endif
#ifndef BALL_MOLMEC_COMMON_FORCEFIELDCOMPONENT_H
# include <BALL/MOLMEC/COMMON/forceFieldComponent.h>
#endif
#ifndef BALL_MOLMEC_COMMON_FORCEFIELD_H
# include <BALL/MOLMEC/COMMON/forceField.h>
#endif
namespace BALL
{
class BALL_EXPORT AmberTorsion
: public ForceFieldComponent
{
public:
#define AMBER_TORSIONS_ENABLED "enable Torsions"
struct SingleAmberTorsion
{
Atom* atom1;
Atom* atom2;
Atom* atom3;
Atom* atom4;
float V;
unsigned char f;
float phase;
SingleAmberTorsion()
: atom1(0),
atom2(0),
atom3(0),
atom4(0),
V(0),
f(0),
phase(0)
{
}
SingleAmberTorsion(CosineTorsion::SingleData& t)
{
atom1 = t.atom1;
atom2 = t.atom2;
atom3 = t.atom3;
atom4 = t.atom4;
V = t.values.V / t.values.n;
f = (unsigned char)t.values.f;
phase = ((2.0 * BALL::Constants::PI)/360.0) * t.values.phase;
}
};
BALL_CREATE(AmberTorsion)
AmberTorsion();
AmberTorsion(ForceField& force_field);
AmberTorsion(const AmberTorsion& amber_stretch);
virtual ~AmberTorsion();
virtual bool setup();
virtual double updateEnergy();
virtual void updateForces();
private:
/*_ @name Private Attributes
*/
//_@{
/*_ array with the torsions
*/
vector<SingleAmberTorsion> torsion_;
CosineTorsion torsion_parameters_;
CosineTorsion improper_parameters_;
ParameterSection impropers_;
//_@}
};
} // namespace BALL
#endif // BALL_MOLMEC_AMBER_AMBERTORSION_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
BALL::AmberTorsion
Definition amberTorsion.h:33
BALL::AmberTorsion::setup
virtual bool setup()
BALL::AmberTorsion::updateForces
virtual void updateForces()
BALL::AmberTorsion::updateEnergy
virtual double updateEnergy()
BALL::AmberTorsion::AmberTorsion
AmberTorsion()
BALL::Atom
Definition atom.h:90
BALL::CosineTorsion
Definition cosineTorsion.h:27
BALL::ForceFieldComponent::ForceField
friend class ForceField
Definition forceFieldComponent.h:37
BALL::ForceFieldComponent::ForceFieldComponent
ForceFieldComponent()
BALL::ParameterSection
Definition parameterSection.h:40
common.h
cosineTorsion.h
BALL_CREATE
#define BALL_CREATE(name)
Definition create.h:62
forceFieldComponent.h
forceField.h
BALL::Constants::PI
BALL_EXTERN_VARIABLE const double PI
PI.
Definition constants.h:35
BALL
Definition constants.h:13
BALL::AmberTorsion::SingleAmberTorsion
Definition amberTorsion.h:44
BALL::AmberTorsion::SingleAmberTorsion::atom3
Atom * atom3
Definition amberTorsion.h:47
BALL::AmberTorsion::SingleAmberTorsion::SingleAmberTorsion
SingleAmberTorsion(CosineTorsion::SingleData &t)
Definition amberTorsion.h:66
BALL::AmberTorsion::SingleAmberTorsion::f
unsigned char f
Definition amberTorsion.h:51
BALL::AmberTorsion::SingleAmberTorsion::phase
float phase
Definition amberTorsion.h:52
BALL::AmberTorsion::SingleAmberTorsion::atom1
Atom * atom1
Definition amberTorsion.h:45
BALL::AmberTorsion::SingleAmberTorsion::atom2
Atom * atom2
Definition amberTorsion.h:46
BALL::AmberTorsion::SingleAmberTorsion::atom4
Atom * atom4
Definition amberTorsion.h:48
BALL::AmberTorsion::SingleAmberTorsion::V
float V
Definition amberTorsion.h:50
BALL::AmberTorsion::SingleAmberTorsion::SingleAmberTorsion
SingleAmberTorsion()
Definition amberTorsion.h:54
BALL::CosineTorsion::SingleData
Definition cosineTorsion.h:147
BALL::CosineTorsion::SingleData::atom1
Atom * atom1
Definition cosineTorsion.h:148
BALL::CosineTorsion::SingleData::values
SingleValues values
Definition cosineTorsion.h:153
BALL::CosineTorsion::SingleData::atom2
Atom * atom2
Definition cosineTorsion.h:149
BALL::CosineTorsion::SingleData::atom3
Atom * atom3
Definition cosineTorsion.h:150
BALL::CosineTorsion::SingleData::atom4
Atom * atom4
Definition cosineTorsion.h:151
BALL::CosineTorsion::SingleValues::n
float n
Definition cosineTorsion.h:40
BALL::CosineTorsion::SingleValues::f
float f
Definition cosineTorsion.h:39
BALL::CosineTorsion::SingleValues::phase
float phase
Definition cosineTorsion.h:37
BALL::CosineTorsion::SingleValues::V
float V
Definition cosineTorsion.h:38