// -*- Mode: C++; tab-width: 2; -*- // vi: set ts=2: // // Molecular Mechanics: Charmm force field, bond stretch component #ifndef BALL_MOLMEC_CHARMM_CHARMMIMPROPERTORSION_H #define BALL_MOLMEC_CHARMM_CHARMMIMPROPERTORSION_H #ifndef BALL_COMMON_H # include #endif #ifndef BALL_MOLMEC_PARAMETER_QUADRATICIMPROPERTORSION_H # include #endif #ifndef BALL_MOLMEC_PARAMETER_RESIDUETORSIONS_H # include #endif #ifndef BALL_MOLMEC_COMMON_FORCEFIELDCOMPONENT_H # include #endif #ifndef BALL_MOLMEC_COMMON_FORCEFIELD_H # include #endif namespace BALL { /** Charmm improper torsion component. The CHARMM force field employs a harmonic out-of-plane potential for improper torsions. An imporper torsion is defined for four atoms A , B , C , and D where A is the central atom B , C , and D are bound to. \par The out-of-plane-angle phi is defined as the angle between the planes defined by ABC and BCD . The improper torsion energy $E_{imp}$ is then defined as $ E_{imp} = k (\theta - \theta_0)^2 $ where $k$ and $\theta_0$ are constants read from the parameter section and depend on the atom types of A , B , C , and D . \par \ingroup CHARMM */ class BALL_EXPORT CharmmImproperTorsion : public ForceFieldComponent { public: /// flag to enable improper torsions #define CHARMM_IMPROPER_TORSIONS_ENABLED "enable IT" /** @name Constructors and Destructors */ //@{ BALL_CREATE(CharmmImproperTorsion) /** Default constructor. */ CharmmImproperTorsion(); /** Constructor. */ CharmmImproperTorsion(ForceField& force_field); /** Copy constructor */ CharmmImproperTorsion(const CharmmImproperTorsion& charmm_stretch); /** Destructor. */ virtual ~CharmmImproperTorsion(); //@} /** @name Setup Methods */ //@{ /** Setup method. * @throws BALL::Exception::TooManyErrors */ virtual bool setup(); //@} /** @name Accessors */ //@{ /** Calculates and returns the component's energy. */ virtual double updateEnergy(); /** Calculates and returns the component's forces. */ virtual void updateForces(); //@} private: /*_ @name Private Attributes */ //_@{ /*_ array with the torsions */ vector impropers_; QuadraticImproperTorsion improper_parameters_; ResidueTorsions improper_atoms_; //_@} }; } // namespace BALL #endif // BALL_MOLMEC_CHARMM_CHARMMIMPROPERTORSION_H