RxDock 0.1.0
A fast, versatile, and open-source program for docking ligands to proteins and nucleic acids
Loading...
Searching...
No Matches
CharmmDataSource.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// Class for providing Charmm force field data
14
15#ifndef _RBTCHARMMDATASOURCE_H_
16#define _RBTCHARMMDATASOURCE_H_
17
18#include "rxdock/Atom.h"
19#include "rxdock/Config.h"
20
21#include <nlohmann/json.hpp>
22
23using json = nlohmann::json;
24
25namespace rxdock {
26
27// Added by DM, 8 Dec 1998 for HybridState lookup method
28typedef std::map<std::string, Atom::eHybridState> StringHybridStateMap;
29typedef StringHybridStateMap::iterator StringHybridStateMapIter;
30typedef StringHybridStateMap::const_iterator StringHybridStateMapConstIter;
31
33public:
35 // Constructors/destructors
36
37 // DM 30 Apr 1999 - pass in masses.rtf file name as parameter
39 const std::string &strMassesFile = GetDataFileName("data", "masses.rtf"));
40
41 ~CharmmDataSource(); // Default destructor
42
43 friend void to_json(json &j, const CharmmDataSource &charDatSrc);
44 friend void from_json(const json &j, CharmmDataSource &charDatSrc);
45
47 // Public methods
49 std::string AtomTypeString(int nAtomType);
50 int ImplicitHydrogens(const std::string &strFFType);
51 int AtomicNumber(const std::string &strFFType);
52 int FormalCharge(const std::string &strFFType); // DM 24 Mar 1999 - changed
53 // from double to int
54 Atom::eHybridState HybridState(const std::string &strFFType); // DM 8 Dec 1998
55
56protected:
58 // Protected methods
60
61private:
63 // Private methods
65
67 const CharmmDataSource &); // Copy constructor disabled by default
68
70 operator=(const CharmmDataSource &); // Copy assignment disabled by default
71
72 // DM 8 Dec 1998 Searches for Hybridisation state string in the masses.rtf
73 // comment field Valid strings are (RBT::SP), (RBT::SP2), (RBT::SP3),
74 // (RBT::AROM), (RBT::TRI) (brackets are important)
75 Atom::eHybridState
76 ConvertCommentStringToHybridState(const std::string &strComment);
77
78protected:
80 // Protected data
82
83private:
85 // Private data
87 std::map<int, std::string> m_atomTypes;
88 std::map<std::string, int> m_implicitHydrogens;
89 std::map<std::string, int> m_atomicNumber;
90 std::map<std::string, int> m_formalCharge;
91 StringHybridStateMap m_hybridState; // DM 8 Dec 1998
92};
93
94void to_json(json &j, const CharmmDataSource &charDatSrc);
95void from_json(const json &j, CharmmDataSource &charDatSrc);
96
97// useful typedefs
98typedef SmartPtr<CharmmDataSource> CharmmDataSourcePtr; // Smart pointer
99
100} // namespace rxdock
101
102#endif //_RBTCHARMMDATASOURCE_H_
Definition CharmmDataSource.h:32
Definition SmartPointer.h:48