IMP logo
IMP Reference Guide  2.6.2
The Integrative Modeling Platform
CHARMMStereochemistryRestraint.h
Go to the documentation of this file.
1 /**
2  * \file IMP/atom/CHARMMStereochemistryRestraint.h
3  * \brief Class to maintain CHARMM stereochemistry.
4  *
5  * Copyright 2007-2016 IMP Inventors. All rights reserved.
6  *
7  */
8 
9 #ifndef IMPATOM_CHARMM_STEREOCHEMISTRY_RESTRAINT_H
10 #define IMPATOM_CHARMM_STEREOCHEMISTRY_RESTRAINT_H
11 
12 #include <IMP/atom/atom_config.h>
13 #include <IMP/Pointer.h>
14 #include <IMP/Restraint.h>
16 #include "Hierarchy.h"
18 #include "angle_decorators.h"
19 #include "bond_decorators.h"
20 #include "BondSingletonScore.h"
21 #include "AngleSingletonScore.h"
22 #include "DihedralSingletonScore.h"
23 #include "ImproperSingletonScore.h"
24 #include "Selection.h"
25 
26 IMPATOM_BEGIN_NAMESPACE
27 
28 //! Enforce CHARMM stereochemistry on the given Hierarchy.
29 /** It is assumed that the Hierarchy has already had CHARMM atom types
30  assigned and conforms with the CHARMM topology information
31  (for example, by calling CHARMMTopology::setup_hierarchy() first).
32 
33  \note This is a convenient high-level wrapper; the bonds, angles,
34  dihedrals and impropers can also be created manually and
35  evaluated using standard IMP building blocks - for example,
36  angles can be created using CHARMMParameters::create_angles()
37  and then evaluated using an AngleSingletonScore in combination
38  with a container::SingletonsRestraint.
39  */
40 class IMPATOMEXPORT CHARMMStereochemistryRestraint : public Restraint {
41  Particles bonds_, angles_, dihedrals_, impropers_;
42  Particles full_bonds_, full_angles_, full_dihedrals_, full_impropers_;
47 #ifndef IMP_DOXYGEN
48  void init(Hierarchy h, CHARMMTopology *topology);
49 #endif
50  public:
52 
53  //! Initialize the restraint and limit to a set of particles
54  /** Will only create restraints where every particle in the restraint
55  is in the provided list.
56  */
58  ParticlesTemp limit_to_these_particles);
59 
60  //! Get a PairFilter that excludes all stereochemical pairs.
61  /** \return a StereochemistryPairFilter that excludes all 1-2 (bond),
62  1-3 (angle) and 1-4 (dihedral) pairs.
63  */
64  StereochemistryPairFilter *get_pair_filter();
65 
66  //! Get a PairFilter including everything from original topology
67  /** \return a StereochemistryPairFilter that excludes all 1-2 (bond),
68  1-3 (angle) and 1-4 (dihedral) pairs before limiting to selection.
69  */
70  StereochemistryPairFilter *get_full_pair_filter();
71 
72  virtual double unprotected_evaluate(IMP::DerivativeAccumulator *accum)
73  const IMP_OVERRIDE;
76 };
77 
78 IMPATOM_END_NAMESPACE
79 
80 #endif /* IMPATOM_CHARMM_STEREOCHEMISTRY_RESTRAINT_H */
Enforce CHARMM stereochemistry on the given Hierarchy.
#define IMP_OBJECT_METHODS(Name)
Define the basic things needed by any Object.
Definition: object_macros.h:25
A score on the deviation of an angle from ideality.
A Score on the distance between a the two particles in a bond.
Contains decorators for a bond.
Decorator for helping deal with a hierarchy of molecules.
A filter that excludes bonds, angles and dihedrals.
The standard decorator for manipulating molecular structures.
A score on the deviation of an improper angle from ideality.
A smart pointer to a ref-counted Object that is a class member.
Definition: Pointer.h:146
A score on a dihedral angle.
Classes for handling CHARMM-style topology of segments.
A nullptr-initialized pointer to an IMP Object.
A filter that excludes bonds, angles and dihedrals.
Decorators for angles.
Abstract base class for all restraints.
The topology of a complete CHARMM model.
Select a subset of a hierarchy.
virtual ModelObjectsTemp do_get_inputs() const =0
#define IMP_OVERRIDE
Cause a compile error if this method does not override a parent method.
Class for adding derivatives from restraints to the model.
A restraint is a term in an IMP ScoringFunction.
Definition: Restraint.h:52