RxDock 0.1.0
A fast, versatile, and open-source program for docking ligands to proteins and nucleic acids
Loading...
Searching...
No Matches
NmrRestraintFileSource.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 external NMR restraints. Supports NOE distance restraints
14// and STD ligand-receptor contact surface restraints.
15// NOE Syntax:
16//<ATOM_LIST_1> <ATOM_LIST_2> <MAX DISTANCE>
17//
18// STD Syntax:
19// STD <ATOM_LIST_1> <MAX DISTANCE> (this is the literal string "STD")
20//
21// Comment lines are supported (# first character)
22// Atom names in list should be comma-separated, with NO SPACES
23//
24// For both types of restraint, brackets can be used around each atom list to
25// denote various levels of ambiguity:
26//
27//(ATOM_LIST) = apply restraint to mean coords of atoms in list (MEAN)
28//[ATOM_LIST] = apply restraint to all atoms in list simultaneously (AND)
29// ATOM_LIST = restraint can be satisfied by any atom in list (OR)
30//
31// e.g.
32// MOL_1:C3 (_22:C5,_23:N1) 5.0 #MOL_1:C3 within 5A of the MEAN of _22:C5,_23:N1
33// MOL_1:C3 [_22:C5,_23:N1] 5.0 #MOL_1:C3 within 5A of _22:C5 AND 5A of _23:N1
34// MOL_1:C3 _22:C5,_23:N1 5.0 #MOL_1:C3 within 5A of _22:C5 OR 5A of _23:N1
35// STD MOL_1:C3 5.0 #MOL_1:C3 within 5A of any part of the receptor
36
37#ifndef _RBTNMRRESTRAINTFILESOURCE_H_
38#define _RBTNMRRESTRAINTFILESOURCE_H_
39
40#include "rxdock/BaseFileSource.h"
41#include "rxdock/NoeRestraint.h"
42
43#include <nlohmann/json.hpp>
44
45using json = nlohmann::json;
46
47namespace rxdock {
48
50public:
52 // Constructors/destructors
53 NmrRestraintFileSource(const std::string &fileName);
54
55 // Destructor
57
58 friend void to_json(json &j,
59 const NmrRestraintFileSource &nmrRestrainfFileSrc);
60 friend void from_json(const json &j,
61 NmrRestraintFileSource &nmrRestrainfFileSrc);
62
64 // Public methods
66 unsigned int GetNumNoeRestraints(); // Number of NOE restraints in file
67 NoeRestraintNamesList GetNoeRestraintList(); // List of NOE restraints
68 unsigned int GetNumStdRestraints(); // Number of STD restraints in file
69 StdRestraintNamesList GetStdRestraintList(); // List of STD restraints
70
71protected:
73 // Protected methods
75
76private:
78 // Private methods
80
81 NmrRestraintFileSource(); // Disable default constructor
83 const NmrRestraintFileSource &); // Copy constructor disabled by default
84 NmrRestraintFileSource &operator=(
85 const NmrRestraintFileSource &); // Copy assignment disabled by default
86
87 // Pure virtual in BaseFileSource - needs to be defined here
88 virtual void Parse();
89 void ClearRestraintCache();
90
91 // Returns NOE restraint type and modifies the atom name string accordingly
92 // Returns UNDEFINED if the atom name string has bad syntax
93 eNoeType NoeRestraintType(std::string &strAtomNames);
94
95protected:
97 // Protected data
99
100private:
102 // Private data
104 NoeRestraintNamesList m_noeRestraintList;
105 StdRestraintNamesList m_stdRestraintList;
106};
107
108void to_json(json &j, const NmrRestraintFileSource &nmrRestrainfFileSrc);
109void from_json(const json &j, NmrRestraintFileSource &nmrRestrainfFileSrc);
110
111// Useful typedefs
113 NmrRestraintFileSourcePtr; // Smart pointer
114typedef std::vector<NmrRestraintFileSourcePtr>
115 NmrRestraintFileSourceList; // Vector of smart pointers
116typedef NmrRestraintFileSourceList::iterator NmrRestraintFileSourceListIter;
117typedef NmrRestraintFileSourceList::const_iterator
118 NmrRestraintFileSourceListConstIter;
119
120} // namespace rxdock
121
122#endif //_RBTNMRRESTRAINTFILESOURCE_H_
Definition BaseFileSource.h:36
Definition NmrRestraintFileSource.h:49
Definition SmartPointer.h:48