RxDock 0.1.0
A fast, versatile, and open-source program for docking ligands to proteins and nucleic acids
Loading...
Searching...
No Matches
FlexAtomFactory.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// FlexDataVisitor class to generate lists of fixed, tethered and free atoms
14// from a model or list of models
15#ifndef _RBTFLEXATOMFACTORY_H_
16#define _RBTFLEXATOMFACTORY_H_
17
18#include "rxdock/FlexDataVisitor.h"
19#include "rxdock/Model.h"
20
21#include <nlohmann/json.hpp>
22
23using json = nlohmann::json;
24
25namespace rxdock {
26
27// The main use of FlexAtomFactory is to aid with scoring function
28// performance enhancements by partitioning model atoms into subsets that are:
29// - fixed (never move)
30// - tethered (move, but within a predictable radius)
31// - free (move freely)
32//
33// For receptor models, the majority of atoms are FIXED
34// The flexible OH/NH3+ terminal atoms are defined as TETHERED
35//
36// Two categorisations are defined for ligands and solvent
37// depending on the internal flexibility of the model
38//
39// A) If model is flexible (Model::isFlexible()), all atoms are defined as
40// FREE as it is too difficult to take the impact of internal dihedral motion
41// into account
42//
43// B) If model is not flexible (e.g. explicit solvent), the mapping is:
44// transMode == FIXED && rotMode == FIXED => atoms are FIXED
45// transMode == FREE => atoms are FREE
46// else atoms are TETHERED
47//
48// On exit:
49// User2Value of each tethered atom is set to the maximum displacement
50// possible for translational and rotational moves. The value is a
51// conservative overestimate as the allowed volume mapped on by each tethered
52// atom can be complex. Here we define the sphere radius that includes all
53// allowed coordinates.
54// The User2Value for fixed and free atoms is set to zero.
55class RBTDLL_EXPORT FlexAtomFactory : public FlexDataVisitor {
56public:
58 // Constructor accepting a single model
60 // Constructor accepting a list of models
61 FlexAtomFactory(ModelList);
62 // Helper method to visit a single model
63 void Visit(Model *);
64 // Clears the partitioned atom lists
65 void Clear();
66 // Implement the base class abstract methods
67 virtual void VisitReceptorFlexData(ReceptorFlexData *);
68 virtual void VisitLigandFlexData(LigandFlexData *);
69 virtual void VisitSolventFlexData(SolventFlexData *);
70 // Get methods for the partitioned atom lists
71 AtomRList GetFixedAtomList() const { return m_fixedAtomList; }
72 AtomRList GetTetheredAtomList() const { return m_tetheredAtomList; }
73 AtomRList GetFreeAtomList() const { return m_freeAtomList; }
74
75 friend void to_json(json &j, const FlexAtomFactory &flexAtomFactory);
76 friend void from_json(const json &j, FlexAtomFactory &flexAtomFactory);
77
78private:
79 AtomRList m_fixedAtomList;
80 AtomRList m_tetheredAtomList;
81 AtomRList m_freeAtomList;
82};
83
84void to_json(json &j, const FlexAtomFactory &flexAtomFactory);
85void from_json(const json &j, FlexAtomFactory &flexAtomFactory);
86
87} // namespace rxdock
88
89#endif //_RBTFLEXATOMFACTORY_H_
Definition FlexAtomFactory.h:55
Definition FlexDataVisitor.h:23
Definition LigandFlexData.h:21
Definition Model.h:34
Definition ReceptorFlexData.h:21
Definition SolventFlexData.h:21