RxDock 0.1.0
A fast, versatile, and open-source program for docking ligands to proteins and nucleic acids
Loading...
Searching...
No Matches
CharmmTypesFileSource.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// File reader for Charmm MASSES.RTF atom type file
14// Provides the atom type list as a vector of structs
15
16#ifndef _RBTCHARMMTYPESFILESOURCE_H_
17#define _RBTCHARMMTYPESFILESOURCE_H_
18
19#include "rxdock/BaseFileSource.h"
20
21#include <nlohmann/json.hpp>
22
23using json = nlohmann::json;
24
25namespace rxdock {
26
27// Simple struct for holding the type info in masses.rtf
29public:
31 : nAtomType(0), strAtomType(""), mass(0.0), element(""), comment("") {}
32 int nAtomType;
33 std::string strAtomType;
34 double mass;
35 std::string element;
36 std::string comment;
37};
38
39void to_json(json &j, const CharmmType &charmmType);
40void from_json(const json &j, CharmmType &charmmType);
41
42typedef std::vector<CharmmType> CharmmTypeList;
43typedef CharmmTypeList::iterator CharmmTypeListIter;
44
46public:
47 // Constructors
48 CharmmTypesFileSource(const char *fileName);
49 CharmmTypesFileSource(const std::string fileName);
50
51 // Destructor
52 virtual ~CharmmTypesFileSource();
53
54 friend void to_json(json &j,
55 const CharmmTypesFileSource &charmmTypesFileSource);
56 friend void from_json(const json &j,
57 CharmmTypesFileSource &charmmTypesFileSource);
58
60 // Public methods
61 int GetNumTypes();
62 CharmmTypeList GetTypeList();
63
64protected:
65 // Protected methods
66
67private:
68 // Private methods
69 CharmmTypesFileSource(); // Disable default constructor
71 const CharmmTypesFileSource &); // Copy constructor disabled by default
72 CharmmTypesFileSource &operator=(
73 const CharmmTypesFileSource &); // Copy assignment disabled by default
74
75 // Pure virtual in BaseFileSource - needs to be defined here
76 virtual void Parse();
77 void ClearTypesCache();
78
79protected:
80 // Protected data
81
82private:
83 // Private data
84 CharmmTypeList m_typesList;
85};
86
87void to_json(json &j, const CharmmTypesFileSource &charmmTypesFileSource);
88void from_json(const json &j, CharmmTypesFileSource &charmmTypesFileSource);
89
90// useful typedefs
92 CharmmTypesFileSourcePtr; // Smart pointer
93
94} // namespace rxdock
95
96#endif //_RBTCHARMMTYPESFILESOURCE_H_
Definition BaseFileSource.h:36
Definition CharmmTypesFileSource.h:28
Definition CharmmTypesFileSource.h:45
Definition SmartPointer.h:48