RxDock 0.1.0
A fast, versatile, and open-source program for docking ligands to proteins and nucleic acids
Loading...
Searching...
No Matches
PseudoAtom.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// Derived class for pseudo-atoms.
14
15#ifndef _RBTPSEUDOATOM_H_
16#define _RBTPSEUDOATOM_H_
17
18#include "rxdock/Atom.h"
19
20#include <nlohmann/json.hpp>
21
22using json = nlohmann::json;
23
24namespace rxdock {
25
26class PseudoAtom : public Atom {
27public:
29 // Constructors / destructors
30
31 // Constructor supplying atom list of constituent atoms
32 PseudoAtom(const AtomList &atomList, int nAtomId = -1,
33 std::string strAtomName = "PSEUDO");
34
35 friend void to_json(json &j, const PseudoAtom &pseudoAtom);
36 friend void from_json(const json &j, PseudoAtom &pseudoAtom);
37
38 // Default destructor
39 virtual ~PseudoAtom();
40
42 // Public accessor functions
43 // Virtual function for dumping pseudoatom details to an output stream
44 virtual std::ostream &Print(std::ostream &s) const;
45
47 // Public accessor functions
48 // 2-D attributes
49
50 // Derived class methods for returning the constituent atom list
51 unsigned int GetNumAtoms() const { return m_atomList.size(); }
52 AtomList GetAtomList() const { return m_atomList; }
53
55 // Public accessor functions
56 // 3-D attributes
57
58 // Coords
59 // DM 8 Dec 1998 - override base Atom methods
60 // virtual Coord GetCoords() const;
61 // virtual Double GetX() const;
62 // virtual Double GetY() const;
63 // virtual Double GetZ() const;
64 //
65 // DM 11 Jul 2000 - base GetCoords method is now non-virtual again
66 // Pseudoatoms must update their mean coords by calling UpdateCoords
67 // each time the underlying atoms are moved
68 void UpdateCoords();
69
71
72 // Other public methods
73
74protected:
75private:
76 // Private methods
77 PseudoAtom(); // Disable default constructor
78 PseudoAtom(const PseudoAtom &pseudoAtom); // Disable copy constructor
80 operator=(const PseudoAtom &pseudoAtom); // Disable copy assignment
81
82private:
83 // Private data
84 AtomList m_atomList; // List of smart pointers to constituent atoms
85};
86
87void to_json(json &j, const PseudoAtom &pseudoAtom);
88void from_json(const json &j, PseudoAtom &pseudoAtom);
89
90// Useful typedefs
91typedef SmartPtr<PseudoAtom> PseudoAtomPtr; // Smart pointer
92typedef std::vector<PseudoAtomPtr> PseudoAtomList; // Vector of smart pointers
93typedef PseudoAtomList::iterator PseudoAtomListIter;
94typedef PseudoAtomList::const_iterator PseudoAtomListConstIter;
95
96} // namespace rxdock
97
98#endif //_RBTPSEUDOATOM_H_
Definition Atom.h:49
Definition PseudoAtom.h:26
Definition SmartPointer.h:48