Ticket #41335: patch-include-openbabel-reactions.h.diff
File patch-include-openbabel-reactions.h.diff, 1.9 KB (added by gezelter@…, 11 years ago) |
---|
-
include/openbabel/reaction.h
old new 35 35 class OBReaction : public OBBase 36 36 { 37 37 private: 38 std::vector< shared_ptr<OBMol> > _reactants;39 std::vector< shared_ptr<OBMol> > _products;40 shared_ptr<OBMol> _ts;41 shared_ptr<OBMol> _agent;38 std::vector<obsharedptr<OBMol> > _reactants; 39 std::vector<obsharedptr<OBMol> > _products; 40 obsharedptr<OBMol> _ts; 41 obsharedptr<OBMol> _agent; 42 42 std::string _title; 43 43 std::string _comment; 44 44 bool _reversible; … … 52 52 int NumProducts()const 53 53 { return static_cast<int> (_products.size()); } 54 54 55 void AddReactant(const shared_ptr<OBMol> sp)55 void AddReactant(const obsharedptr<OBMol> sp) 56 56 { _reactants.push_back(sp); } 57 57 58 void AddProduct(const shared_ptr<OBMol> sp)58 void AddProduct(const obsharedptr<OBMol> sp) 59 59 { _products.push_back(sp); } 60 60 61 void SetTransitionState(const shared_ptr<OBMol> sp)61 void SetTransitionState(const obsharedptr<OBMol> sp) 62 62 { _ts = sp; } 63 63 64 void AddAgent(const shared_ptr<OBMol> sp)64 void AddAgent(const obsharedptr<OBMol> sp) 65 65 { _agent = sp; } 66 66 67 shared_ptr<OBMol> GetReactant(const unsigned i)67 obsharedptr<OBMol> GetReactant(const unsigned i) 68 68 { 69 shared_ptr<OBMol> sp;69 obsharedptr<OBMol> sp; 70 70 if(i<_reactants.size()) 71 71 sp = _reactants[i]; 72 72 return sp; //returns empty if out of range 73 73 } 74 shared_ptr<OBMol> GetProduct(const unsigned i)74 obsharedptr<OBMol> GetProduct(const unsigned i) 75 75 { 76 shared_ptr<OBMol> sp;76 obsharedptr<OBMol> sp; 77 77 if(i<_products.size()) 78 78 sp = _products[i]; 79 79 return sp; //returns empty if out of range 80 80 } 81 81 82 shared_ptr<OBMol> GetTransitionState()const82 obsharedptr<OBMol> GetTransitionState()const 83 83 { return _ts; } 84 84 85 shared_ptr<OBMol> GetAgent()const85 obsharedptr<OBMol> GetAgent()const 86 86 { return _agent; } 87 87 88 88 std::string GetTitle() const { return _title; }