13#ifndef _RBTMOL2FILESOURCE_H_
14#define _RBTMOL2FILESOURCE_H_
16#include "rxdock/BaseMolecularFileSource.h"
17#include "rxdock/ElementFileSource.h"
18#include "rxdock/ParameterFileSource.h"
20#include <nlohmann/json.hpp>
22using json = nlohmann::json;
31 const std::string &ss)
32 : subst_name(name), root_atom(rr), chain(cc), sub_type(ss) {}
33 std::string GetName()
const {
return subst_name; };
34 int GetRoot()
const {
return root_atom; };
35 std::string GetChain()
const {
return chain; };
36 std::string GetType()
const {
return sub_type; };
42 std::string subst_name;
53typedef std::map<int, MOL2Substructure> MOL2SubstructureMap;
54typedef MOL2SubstructureMap::iterator MOL2SubstructureMapIter;
55typedef MOL2SubstructureMap::const_iterator MOL2SubstructureMapConstIter;
59 static const std::string _CT;
61 static const std::string _TRIPOS_DELIM;
62 static const unsigned int _TRIPOS_DELIM_SIZE;
63 static const std::string _IDS_MOL2_RECDELIM;
65 MOL2FileSource(
const std::string &fileName,
bool bImplHydrogens =
true);
71 bool isTitleListSupported() {
return true; }
72 bool isAtomListSupported() {
return true; }
73 bool isCoordinatesSupported() {
return true; }
74 bool isBondListSupported() {
return true; }
75 bool isDataSupported() {
return false; }
86 void SetupAtomParams();
87 void FixImplicitHydrogenCount();
88 void FixHybridState();
89 void FixTriposTypes();
91 void RemoveNonPolarHydrogens();
94 void GetSSIDandName(
const std::string &subst_name,
int subst_id,
95 std::string &sID, std::string &sName);
98 void ParseRecordMOLECULE(
const std::string &aLine);
99 void ParseRecordATOM(
const std::string &aLine);
100 void ParseRecordBOND(
const std::string &aLine);
101 void ParseRecordSUBSTRUCTURE(
const std::string &aLine);
102 void ParseRecordUNSUPPORTED(
const std::string &aLine);
104 std::string GetMOL2Tag(
const std::string &aLine);
106 void ParseCountFields(
const std::string &aLine);
107 void Tokenize(
const std::string &aString,
108 std::vector<std::string> &aTokensBuf);
114 unsigned int nSubstructures;
115 unsigned int nFeatures;
121 MOL2SubstructureMap m_ssInfo;
122 std::map<int, AtomList> m_ssAtoms;
129 bool m_bImplHydrogens;
Definition BaseMolecularFileSource.h:29
Definition MOL2FileSource.h:57
Definition MOL2FileSource.h:27
Definition TriposAtomType.h:28