RxDock 0.1.0
A fast, versatile, and open-source program for docking ligands to proteins and nucleic acids
Loading...
Searching...
No Matches
ModelMutator.h
1/***********************************************************************
2 * The rDock program was developed from 1998 - 2006 by the software team
3 * at RiboTargets (subsequently Vernalis (R&D) Ltd).
4 * In 2006, the software was licensed to the University of York for
5 * maintenance and distribution.
6 * In 2012, Vernalis and the University of York agreed to release the
7 * program as Open Source software.
8 * This version is licensed under GNU-LGPL version 3.0 with support from
9 * the University of Barcelona.
10 * http://rdock.sourceforge.net/
11 ***********************************************************************/
12
13// Legacy class, largely replaced by ChromElement subclasses
14// The only remaining purpose of ModelMutator is to generate lists
15// of flexible intramolecular interactions.
16// i.e. intramolecular atom pairs across rotatable bonds
17#ifndef _RBTMODELMUTATOR_H_
18#define _RBTMODELMUTATOR_H_
19
20#include "rxdock/Atom.h"
21#include "rxdock/Bond.h"
22#include "rxdock/PrincipalAxes.h"
23
24#include <nlohmann/json.hpp>
25
26using json = nlohmann::json;
27
28namespace rxdock {
29
30class Model; // forward declaration
31
32// Only check request assertions in debug build
33#ifdef _NDEBUG
34const Bool MUT_CHECK = true;
35#else
36const bool MUT_CHECK = true;
37#endif //_NDEBUG
38
40public:
42 // Constructors/destructors
43 ModelMutator(Model *pModel, const BondList &rotBonds,
44 const AtomList &tetheredAtoms);
45
46 friend void to_json(json &j, const ModelMutator &modelMutator);
47 friend void from_json(const json &j, ModelMutator &modelMutator);
48
49 virtual ~ModelMutator(); // Default destructor
50
52 // Public methods
54 const AtomRListList &GetFlexIntns() const;
55 const AtomRListList &GetFlexAtoms() const;
56 BondList GetFlexBonds() const;
57
58protected:
60 // Protected methods
62
63private:
65 // Private methods
67
68 ModelMutator(const ModelMutator &); // Copy constructor disabled by default
70 operator=(const ModelMutator &); // Copy assignment disabled by default
71
72 void Setup();
73
74protected:
76 // Protected data
78
79private:
81 // Private data
83 Model *m_pModel; // Parent model
84 BondList m_rotBonds; // A record of the defined rotatable bonds passed to
85 // the constructor
86 AtomRList m_dih1Atoms; // Atom 1 in each rotable bond dihedral definition
87 AtomRList m_dih2Atoms; // Atom 2 in each rotable bond dihedral definition
88 AtomRList m_dih3Atoms; // Atom 3 in each rotable bond dihedral definition
89 AtomRList m_dih4Atoms; // Atom 4 in each rotable bond dihedral definition
90 AtomRListList
91 m_rotAtoms; // List of atom lists on smallest side of each rotable bond
92 // DM 25 Apr 2002
93 // m_flexIntns is a vector of size N(atoms)
94 // Each element is an AtomList (i.e. std::vector<AtomPtr>)
95 //
96 //*** The vector is indexed by AtomId
97 //*** We assume all atom IDs in the molecule are assigned sequentially from 1
98 //***
99 //*** For molecules read from MdlFileSource and PsfFileSource this is
100 // guaranteed
101 //
102 // m_flexIntns[i-1] is a vector of all the atoms which can interact with atom
103 // i across at least one rotable bond: (these interaction distances are
104 // conformation dependent) This is a symmetric matrix - For a flexible
105 // interaction i,j, atom j will appear in the AtomList for atom i, and vice
106 // versa. Atoms which are NOT in this list are therefore in the same rigid
107 // fragment as atom i: (these interaction distances are fixed and can
108 // therefore
109 // be ignored by any scoring function)
110 AtomRListList m_flexIntns;
111
112 // DM 2 Jul 2002 - if model has tethered atoms we need to modify the behaviour
113 // of ModelMutator Could be subclassed if necessary
114 AtomList m_tetheredAtoms;
115};
116
117void to_json(json &j, const ModelMutator &modelMutator);
118void from_json(const json &j, ModelMutator &modelMutator);
119
120// Useful typedefs
121typedef SmartPtr<ModelMutator> ModelMutatorPtr; // Smart pointer
122
123} // namespace rxdock
124
125#endif //_RBTMODELMUTATOR_H_
Definition ModelMutator.h:39
Definition Model.h:34
Definition SmartPointer.h:48