Loading...
Searching...
No Matches
charmmTorsion.h
Go to the documentation of this file.
// -*- Mode: C++; tab-width: 2; -*-
// vi: set ts=2:
//
// Molecular Mechanics: CHARMM force field, proper torsion component
#ifndef BALL_MOLMEC_CHARMM_CHARMMTORSION_H
#define BALL_MOLMEC_CHARMM_CHARMMTORSION_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_PARAMETER_RESIDUETORSIONS_H
# include <BALL/MOLMEC/PARAMETER/residueTorsions.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 CharmmTorsion
: public ForceFieldComponent
{
public:
#define CHARMM_TORSIONS_ENABLED "enable Torsions"
struct SingleCharmmTorsion
{
Atom* atom1;
Atom* atom2;
Atom* atom3;
Atom* atom4;
float V;
unsigned char f;
float phase;
SingleCharmmTorsion()
: atom1(0),
atom2(0),
atom3(0),
atom4(0),
V(0),
f(0),
phase(0)
{
}
SingleCharmmTorsion(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;
// convert phase from degrees to radiant
phase = (float)(BALL::Constants::PI / 180.0) * t.values.phase;
}
};
BALL_CREATE(CharmmTorsion)
CharmmTorsion();
CharmmTorsion(ForceField& force_field);
CharmmTorsion(const CharmmTorsion& charmm_stretch);
virtual ~CharmmTorsion();
virtual bool setup();
virtual double updateEnergy();
virtual void updateForces();
private:
/*_ @name Private Attributes
*/
//_@{
/*_ Vector containing the parameters for each torsion.
*/
vector<SingleCharmmTorsion> torsion_;
/*_ Contents of the [Torsions] section of the parameter file.
*/
CosineTorsion torsion_parameters_;
/*_ Contents of the [ResidueTorsions] section of the parameter file.
*/
ResidueTorsions residue_torsions_;
/*_ true, if the torsions are read from the ResidueTorsions section.
*/
bool use_residue_torsion_list_;
//_@}
};
} // namespace BALL
#endif // BALL_MOLMEC_CHARMM_CHARMMTORSION_H
BALL_EXPORT
#define BALL_EXPORT
Definition COMMON/global.h:50
BALL::Atom
Definition atom.h:90
BALL::CharmmTorsion
Definition charmmTorsion.h:38
BALL::CharmmTorsion::updateEnergy
virtual double updateEnergy()
BALL::CharmmTorsion::CharmmTorsion
CharmmTorsion()
BALL::CharmmTorsion::updateForces
virtual void updateForces()
BALL::CharmmTorsion::setup
virtual bool setup()
BALL::CosineTorsion
Definition cosineTorsion.h:27
BALL::ForceFieldComponent::ForceField
friend class ForceField
Definition forceFieldComponent.h:37
BALL::ForceFieldComponent::ForceFieldComponent
ForceFieldComponent()
BALL::ResidueTorsions
Definition residueTorsions.h:34
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
residueTorsions.h
BALL::CharmmTorsion::SingleCharmmTorsion
Definition charmmTorsion.h:49
BALL::CharmmTorsion::SingleCharmmTorsion::atom1
Atom * atom1
Definition charmmTorsion.h:50
BALL::CharmmTorsion::SingleCharmmTorsion::atom2
Atom * atom2
Definition charmmTorsion.h:51
BALL::CharmmTorsion::SingleCharmmTorsion::atom4
Atom * atom4
Definition charmmTorsion.h:53
BALL::CharmmTorsion::SingleCharmmTorsion::SingleCharmmTorsion
SingleCharmmTorsion()
Definition charmmTorsion.h:59
BALL::CharmmTorsion::SingleCharmmTorsion::SingleCharmmTorsion
SingleCharmmTorsion(CosineTorsion::SingleData &t)
Definition charmmTorsion.h:70
BALL::CharmmTorsion::SingleCharmmTorsion::phase
float phase
Definition charmmTorsion.h:57
BALL::CharmmTorsion::SingleCharmmTorsion::atom3
Atom * atom3
Definition charmmTorsion.h:52
BALL::CharmmTorsion::SingleCharmmTorsion::V
float V
Definition charmmTorsion.h:55
BALL::CharmmTorsion::SingleCharmmTorsion::f
unsigned char f
Definition charmmTorsion.h:56
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