RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
MarvinDefs.h
Go to the documentation of this file.
1//
2// Copyright (C) 2022-2023 Tad Hurst, Greg Landrum and other RDKit contributors
3//
4// @@ All Rights Reserved @@
5// This file is part of the RDKit.
6// The contents are covered by the terms of the BSD license
7// which is included in the file license.txt, found at the root
8// of the RDKit source tree.
9//
10
11// This software is based on the Chemaxon documentation for the MRV format:P
12// https://docs.chemaxon.com/display/docs/marvin-documents-mrv.md
13// and this implmentation is tested against the parsing and generation in the
14// Marvin JS sketcher: https://marvinjs-demo.chemaxon.com/latest/demo.html
15
16#ifndef RD_MARVINDEFS_H
17#define RD_MARVINDEFS_H
18
19#include <GraphMol/RDKitBase.h>
20
22#include <boost/property_tree/xml_parser.hpp>
24
25#include <float.h> // Needed for DBL_MAX on Clang
26
27using boost::property_tree::ptree;
28
29namespace RDKit {
30
31const std::vector<std::string> sruSgroupConnectChoices{"hh", "ht", "eu"};
32const std::vector<std::string> marvinBondOrders{"1", "2", "3", "A"};
33const std::vector<std::string> marvinQueryBondsTypes{"SD", "SA", "DA", "Any"};
34const std::vector<std::string> marvinConventionTypes{"cxn:coord"};
35const std::vector<std::string> marvinStereoDictRefTypes{"cml:W", "cml:H"};
36const std::vector<std::string> marvinStereoConventionTypes{"1", "3", "4", "6"};
37
38const std::vector<std::string> marvinRadicalVals{
39 "monovalent", "divalent", "divalent1", "divalent3",
40 "trivalent", "trivalent2", "trivalent4", "4"};
41const std::map<std::string, int> marvinRadicalToRadicalElectrons{
42 {"monovalent", 1}, {"divalent", 2}, {"divalent1", 2}, {"divalent3", 2},
43 {"trivalent", 3}, {"trivalent2", 3}, {"trivalent4", 3}, {"4", 4}};
44
45const std::map<int, std::string> radicalElectronsToMarvinRadical{
46 {1, "monovalent"}, {2, "divalent"}, {3, "trivalent4"}, {4, "4"}};
47
53
54class MarvinWriterException : public std::runtime_error {
55 public:
56 explicit MarvinWriterException(std::string message)
57 : std::runtime_error(message) {};
58};
59
61 public:
62 std::string type;
63 double x1;
64 double y1;
65 double x2;
66 double y2;
67
68 std::string toString() const;
69 ptree toPtree() const;
70};
71
73 public:
74 std::string id;
75 double x1;
76 double y1;
77 double x2;
78 double y2;
79
80 std::string toString() const;
81 ptree toPtree() const;
82};
83
85 public:
86 std::string id;
87 std::string text;
88 double x;
89 double y;
90 double fontScale = 0.0;
91
92 std::string halign;
93 std::string valign;
94
95 std::string toString() const;
96 ptree toPtree() const;
97};
98
100 public:
101 // <attachmentPoint atom="a7" order="1" bond="b6"/>
102 std::string atom;
103 std::string bond;
104 std::string order;
105
106 std::string toString() const;
107 ptree toPtree() const;
108};
109
111 public:
112 std::string id;
113 std::string elementType;
114 double x2;
115 double y2;
116 double x3;
117 double y3;
118 double z3;
119
121 std::string radical;
125 std::string mrvAlias;
126 std::string mrvStereoGroup;
128 std::string sgroupRef;
129 bool sGroupRefIsSuperatom; // if set, we will not change the sgroupRef - the
130 // superatom really needs it
133
135 MarvinAtom(const MarvinAtom &atomToCopy, std::string newId);
136
137 bool operator==(const MarvinAtom &rhs) const;
138
139 bool operator==(const MarvinAtom *rhs) const;
140
141 bool isElement() const;
142
143 std::string toString() const;
144 ptree toPtree(unsigned int coordinatePrecision = 6) const;
145};
146
148 public:
149 std::string value;
150 std::string convention;
151 std::string conventionValue;
152 std::string dictRef;
153
154 std::string toString() const;
155 ptree toPtree() const;
156};
157
159 public:
160 std::string id;
161 std::string atomRefs2[2];
162 std::string order;
164 std::string queryType;
165 std::string convention;
166
168
170 std::string atomRef1, std::string atomRef2);
171
172 bool isEqual(const MarvinAtom &other) const;
173
174 bool operator==(const MarvinAtom &rhs) const;
175
176 const std::string getBondType() const;
177
178 std::string toString() const;
179 ptree toPtree() const;
180};
181
210
211template <typename T>
212typename std::vector<std::unique_ptr<T>>::iterator findUniquePtr(
213 std::vector<std ::unique_ptr<T>> &vector, T *itemToFind) {
214 auto foundUniqIter = find_if(vector.begin(), vector.end(),
215 [itemToFind](std::unique_ptr<T> &uniquePtr) {
216 return uniquePtr.get() == itemToFind;
217 });
218
219 if (foundUniqIter == vector.end()) {
220 throw FileParseException("Unexpected error - item to find not found");
221 }
222
223 return foundUniqIter;
224}
225
226template <typename T>
227void eraseUniquePtr(std::vector<std ::unique_ptr<T>> &vector, T *itemToErase) {
229
230 if (removeUniqIter == vector.end()) {
231 throw FileParseException("Unexpected error - item to remove not found");
232 }
233
234 vector.erase(removeUniqIter);
235}
236
238 public:
239 std::string molID;
240 std::string id; // used in all sGroups
241 unsigned int coordinatePrecision = 6;
242 std::vector<MarvinAtom *> atoms; // owned by parent MarvinMol
243 std::vector<MarvinBond *> bonds; // owned by parent MarvinMol
244 std::vector<std::unique_ptr<MarvinMolBase>> sgroups;
246
247 virtual std::string role() const = 0;
248 virtual bool hasAtomBondBlocks() const = 0;
249 virtual std::string toString() const = 0;
250 virtual ptree toPtree() const;
251 void addSgroupsToPtree(ptree &pt) const;
252
253 virtual MarvinMolBase *copyMol(const std::string &idAppend) const = 0;
254 virtual void pushOwnedAtom(MarvinAtom *atom);
255 virtual void pushOwnedBond(MarvinBond *bond);
256
257 virtual void removeOwnedAtom(MarvinAtom *atom);
258 virtual void removeOwnedBond(MarvinBond *bond);
259
260 void setPrecision(unsigned int precision);
261
263
265
266 virtual ~MarvinMolBase();
267
268 int getAtomIndex(std::string id) const;
269 int getBondIndex(std::string id) const;
270
271 const std::vector<std::string> getBondList() const;
272 const std::vector<std::string> getAtomList() const;
274
276 int &molCount // this is the starting mol count, and receives the ending
277 // mol count - THis is used when
278 // MarvinMol->convertToSuperAtoms is called multiple times
279 // from a RXN
280 ,
281 int &atomCount // starting and ending atom count
282 ,
283 int &bondCount // starting and ending bond count
284 ,
285 int &sgCount // starting and ending sq count
286 ,
287 std::map<std::string, std::string>
288 &sgMap // map from old sg number to new sg number
289 ,
290 std::map<std::string, std::string>
291 &atomMap // map from old atom number to new atom number
292 ,
293 std::map<std::string, std::string>
294 &bondMap // map from old bond number to new bond number
295 );
296
297 // the following is virtual because some derived classes need to do more than
298 // just call the base class. Currently, only MarvinSuperatomSgroup does this
299 public:
301 int &molCount, // this is the starting mol count, and receives the ending
302 // mol count - THis is used when
303 // MarvinMol->convertToSuperAtoms is called multiple
304 // times from a RXN
305 int &atomCount, // starting and ending atom count
306 int &bondCount, // starting and ending bond count
307 std::map<std::string, std::string> &sgMap,
308 std::map<std::string, std::string> &atomMap,
309 std::map<std::string, std::string> &bondMap);
310
312 std::map<std::string, std::string> &sgMap);
313
314 // the following is virtual because some derived classes need to do more than
315 // just call the base class. Currently, only MarvinSuperatomSgroup does this
316
318 const std::vector<MarvinAtom *> &setOfAtoms) const;
319
320 public:
321 static bool atomRefInAtoms(MarvinAtom *a, std::string b);
322 static bool bondRefInBonds(MarvinBond *a, std::string b);
323 static bool molIDInSgroups(std::string a, std::string b);
326
329
330 virtual bool isPassiveRoleForExpansion() const;
331 virtual bool isPassiveRoleForContraction() const;
332 virtual void processSpecialSgroups();
334 std::unique_ptr<SubstanceGroup> &sgroup,
335 int sequenceId);
336
337 bool has2dCoords() const;
338 bool has3dCoords() const;
339 bool hasAny3dCoords() const;
340 bool hasAny2dCoords() const;
341 bool hasCoords() const;
343
345};
346
348 private:
349 std::string roleName; // could be MarvinSruSgroup, MarvinCopolymerSgroup or
350 // MarvinModificationSgroup
351 public:
352 MarvinMolBase *copyMol(const std::string &idAppend) const override;
355
356 std::string title;
357 std::string connect;
358 std::string correspondence;
359
360 std::string toString() const override;
361 ptree toPtree() const override;
362
363 std::string role() const override;
364 bool hasAtomBondBlocks() const override;
366 std::unique_ptr<SubstanceGroup> &sgroup,
367 int sequenceId) override;
368};
369
371 public:
374
375 MarvinMolBase *copyMol(const std::string &idAppend) const override;
376
377 std::string context;
378 std::string fieldName;
379 std::string placement;
380 std::string unitsDisplayed;
381 std::string queryType;
382 std::string queryOp;
383 std::string fieldData;
384 std::string units;
385 double x;
386 double y;
387
388 std::string toString() const override;
389 ptree toPtree() const override;
390
391 std::string role() const override;
392 bool hasAtomBondBlocks() const override;
394 std::unique_ptr<SubstanceGroup> &sgroup,
395 int sequenceId) override;
396};
397
399 public:
400 std::string title;
401
404
405 MarvinMolBase *copyMol(const std::string &idAppend) const override;
406
408
410
411 std::string toString() const override;
412 ptree toPtree() const override;
413
414 std::string role() const override;
415 bool hasAtomBondBlocks() const override;
416 bool isPassiveRoleForContraction() const override;
417
419 std::unique_ptr<SubstanceGroup> &sgroup,
420 int sequenceId) override;
421};
422
424 public:
427
428 MarvinMolBase *copyMol(const std::string &idAppend) const override;
429
430 std::string title;
431 bool isExpanded = false;
432 std::vector<MarvinAtom *> parentAtoms;
433 std::vector<MarvinBond *>
434 bondsToAtomsNotInExpandedGroup; // only when expanded
435
439 std::vector<MarvinBond *> &bondsToTry,
440 std::vector<MarvinBond *> &orphanedBonds) const;
441
442 std::string toString() const override;
443 ptree toPtree() const override;
444
445 std::string role() const override;
446 bool hasAtomBondBlocks() const override;
447 bool isPassiveRoleForExpansion() const override;
448 bool isPassiveRoleForContraction() const override;
449 void processSpecialSgroups() override;
450
452 std::unique_ptr<SubstanceGroup> &sgroup,
453 int sequenceId) override;
454};
455
457 // <molecule molID="m2" id="sg1" role="MulticenterSgroup" atomRefs="a2 a6 a5
458 // a4 a3" center="a18"/>sgroup->
459 public:
462
463 MarvinMolBase *copyMol(const std::string &idAppend) const override;
464
466
467 std::string toString() const override;
468 ptree toPtree() const override;
469
471 std::string role() const override;
472 bool hasAtomBondBlocks() const override;
473 void processSpecialSgroups() override;
475 std::unique_ptr<SubstanceGroup> &sgroup,
476 int sequenceId) override;
477};
478
480 // <molecule molID="m2" id="sg1" role="GenericSgroup" atomRefs="a1 a2 a3 a4 a5
481 // a6 a7 a8 a9 a13 a10 a11 a12" charge="onAtoms"/></molecule>
482 public:
485
486 MarvinMolBase *copyMol(const std::string &idAppend) const override;
487
488 std::string charge; // onAtoms or onBrackets
489 std::string toString() const override;
490 ptree toPtree() const override;
491
492 std::string role() const override;
493 bool hasAtomBondBlocks() const override;
495 std::unique_ptr<SubstanceGroup> &sgroup,
496 int sequenceId) override;
497};
498
500 // <molecule id="sg1" role="MonomerSgroup" title="mon" charge="onAtoms"
501 // molID="m2" atomRefs="a2 a1 a3 a4">
502 // </molecule>
503 public:
506
507 MarvinMolBase *copyMol(const std::string &idAppend) const override;
508
509 std::string title;
510 std::string charge; // onAtoms or onBrackets
511 std::string toString() const override;
512 ptree toPtree() const override;
513
514 std::string role() const override;
515 bool hasAtomBondBlocks() const override;
517 std::unique_ptr<SubstanceGroup> &sgroup,
518 int sequenceId) override;
519};
520
522 public:
523 std::string title;
524 std::vector<std::unique_ptr<MarvinAttachmentPoint>> attachmentPoints;
525
528
529 MarvinMolBase *copyMol(const std::string &idAppend) const override;
530
532
534
535 std::string role() const override;
536 bool hasAtomBondBlocks() const override;
537 bool isPassiveRoleForExpansion() const override;
538
539 std::string toString() const override;
540 ptree toPtree() const override;
541
543 int &molCount, // this is the starting mol count, and receives the ending
544 // mol count - THis is used when
545 // MarvinMol->convertToSuperAtoms is called multiple
546 // times from a RXN
547 int &atomCount, // starting and ending atom count
548 int &bondCount, // starting and ending bond count
549 std::map<std::string, std::string> &sgMap,
550 std::map<std::string, std::string> &atomMap,
551 std::map<std::string, std::string> &bondMap) override;
552
554 const std::vector<MarvinAtom *> &setOfAtoms) const override;
555
556 void processSpecialSgroups() override;
557};
558
559class MarvinMol : public MarvinMolBase {
560 public:
563
564 MarvinMolBase *copyMol(const std::string &idAppend) const override;
565
566 ~MarvinMol() override;
567
568 std::vector<std::unique_ptr<MarvinAtom>> ownedAtoms;
569 std::vector<std::unique_ptr<MarvinBond>> ownedBonds;
570
571 void pushOwnedAtom(MarvinAtom *atom) override;
572 void pushOwnedBond(MarvinBond *bond) override;
573
574 void removeOwnedAtom(MarvinAtom *atom) override;
575 void removeOwnedBond(MarvinBond *bond) override;
576
577 std::string role() const override;
578 bool hasAtomBondBlocks() const override;
579 bool isPassiveRoleForContraction() const override;
580
581 std::string toString() const override;
582 ptree toPtree() const override;
583
584 std::string generateMolString();
585 ptree toMolPtree() const;
586};
587
589 public:
590 std::vector<std::unique_ptr<MarvinMol>> reactants;
591 std::vector<std::unique_ptr<MarvinMol>> agents;
592 std::vector<std::unique_ptr<MarvinMol>> products;
593
595 std::vector<std::unique_ptr<MarvinPlus>> pluses;
596 std::vector<std::unique_ptr<MarvinCondition>> conditions;
597
599
601
602 std::string toString();
603 ptree toPtree() const;
604};
605
607 public:
608 StereoGroupType groupType; // one of ABS AND OR
610 std::vector<unsigned int> atoms;
611
613};
614
615template <typename T>
616bool getCleanNumber(std::string strToParse, T &outInt);
617} // namespace RDKit
618
619#endif // RD_MARVINDEFS_H
pulls in the core RDKit functionality
used by various file parsing classes to indicate a parse error
ptree toPtree() const
std::string toString() const
std::string type
Definition MarvinDefs.h:62
std::string mrvStereoGroup
Definition MarvinDefs.h:126
bool isElement() const
std::string id
Definition MarvinDefs.h:112
std::string elementType
Definition MarvinDefs.h:113
std::string toString() const
ptree toPtree(unsigned int coordinatePrecision=6) const
std::string sgroupRef
Definition MarvinDefs.h:128
std::string radical
Definition MarvinDefs.h:121
std::string sgroupAttachmentPoint
Definition MarvinDefs.h:131
MarvinAtom(const MarvinAtom &atomToCopy, std::string newId)
bool operator==(const MarvinAtom &rhs) const
bool operator==(const MarvinAtom *rhs) const
std::string mrvAlias
Definition MarvinDefs.h:125
std::string toString() const
std::string conventionValue
Definition MarvinDefs.h:151
std::string toString() const
std::string convention
Definition MarvinDefs.h:165
ptree toPtree() const
std::string queryType
Definition MarvinDefs.h:164
MarvinBond(const MarvinBond &bondToCopy, std::string newId, std::string atomRef1, std::string atomRef2)
std::string atomRefs2[2]
Definition MarvinDefs.h:161
std::string id
Definition MarvinDefs.h:160
std::string order
Definition MarvinDefs.h:162
MarvinBondStereo bondStereo
Definition MarvinDefs.h:163
bool operator==(const MarvinAtom &rhs) const
const std::string getBondType() const
bool isEqual(const MarvinAtom &other) const
std::string toString() const
std::string toString() const
ptree toPtree() const
bool hasAtomBondBlocks() const override
MarvinDataSgroup(MarvinMolBase *parent)
std::string unitsDisplayed
Definition MarvinDefs.h:380
MarvinDataSgroup(MarvinMolBase *parent, ptree &molTree)
MarvinMolBase * copyMol(const std::string &idAppend) const override
void parseMoleculeSpecific(RDKit::RWMol *mol, std::unique_ptr< SubstanceGroup > &sgroup, int sequenceId) override
std::string role() const override
ptree toPtree() const override
std::string toString() const override
bool hasAtomBondBlocks() const override
ptree toPtree() const override
MarvinGenericSgroup(MarvinMolBase *parent, ptree &molTree)
std::string toString() const override
MarvinMolBase * copyMol(const std::string &idAppend) const override
std::string role() const override
void parseMoleculeSpecific(RDKit::RWMol *mol, std::unique_ptr< SubstanceGroup > &sgroup, int sequenceId) override
MarvinGenericSgroup(MarvinMolBase *parent)
unsigned int coordinatePrecision
Definition MarvinDefs.h:241
bool AnyOverLappingAtoms(const MarvinMolBase *otherMol) const
void cleanUpNumbering(int &molCount, int &atomCount, int &bondCount, int &sgCount, std::map< std::string, std::string > &sgMap, std::map< std::string, std::string > &atomMap, std::map< std::string, std::string > &bondMap)
void cleanUpSgNumbering(int &sgCount, std::map< std::string, std::string > &sgMap)
void setPrecision(unsigned int precision)
virtual std::string role() const =0
const std::vector< std::string > getAtomList() const
virtual MarvinMolBase * copyMol(const std::string &idAppend) const =0
virtual void processSpecialSgroups()
virtual ~MarvinMolBase()
const std::vector< std::string > getBondList() const
static bool atomRefInAtoms(MarvinAtom *a, std::string b)
int getBondIndex(std::string id) const
std::vector< MarvinBond * > bonds
Definition MarvinDefs.h:243
bool hasAny2dCoords() const
virtual std::string toString() const =0
virtual void pushOwnedBond(MarvinBond *bond)
virtual bool isPassiveRoleForExpansion() const
bool has3dCoords() const
virtual bool hasAtomBondBlocks() const =0
virtual void removeOwnedBond(MarvinBond *bond)
void addSgroupsToPtree(ptree &pt) const
virtual void parseMoleculeSpecific(RDKit::RWMol *mol, std::unique_ptr< SubstanceGroup > &sgroup, int sequenceId)
std::vector< std::unique_ptr< MarvinMolBase > > sgroups
Definition MarvinDefs.h:244
virtual ptree toPtree() const
virtual bool isPassiveRoleForContraction() const
int getAtomIndex(std::string id) const
MarvinAtom * findAtomByRef(std::string atomId)
virtual IsSgroupInAtomSetResult isSgroupInSetOfAtoms(const std::vector< MarvinAtom * > &setOfAtoms) const
void parseAtomsAndBonds(ptree &molTree)
MarvinBond * findBondByRef(std::string atomId)
MarvinMolBase * parent
Definition MarvinDefs.h:245
virtual void pushOwnedAtom(MarvinAtom *atom)
static bool molIDInSgroups(std::string a, std::string b)
std::vector< MarvinAtom * > atoms
Definition MarvinDefs.h:242
bool hasAny3dCoords() const
void processSgroupsFromRDKit()
static bool bondRefInBonds(MarvinBond *a, std::string b)
int getExplicitValence(const MarvinAtom &marvinAtom) const
virtual void removeOwnedAtom(MarvinAtom *atom)
bool has2dCoords() const
virtual void cleanUpNumberingMolsAtomsBonds(int &molCount, int &atomCount, int &bondCount, std::map< std::string, std::string > &sgMap, std::map< std::string, std::string > &atomMap, std::map< std::string, std::string > &bondMap)
bool hasCoords() const
bool isPassiveRoleForContraction() const override
bool hasAtomBondBlocks() const override
std::vector< std::unique_ptr< MarvinAtom > > ownedAtoms
Definition MarvinDefs.h:568
void removeOwnedBond(MarvinBond *bond) override
MarvinMol(ptree &molTree)
std::string generateMolString()
void pushOwnedBond(MarvinBond *bond) override
std::string role() const override
MarvinMolBase * copyMol(const std::string &idAppend) const override
ptree toPtree() const override
ptree toMolPtree() const
void pushOwnedAtom(MarvinAtom *atom) override
std::vector< std::unique_ptr< MarvinBond > > ownedBonds
Definition MarvinDefs.h:569
~MarvinMol() override
void removeOwnedAtom(MarvinAtom *atom) override
std::string toString() const override
bool hasAtomBondBlocks() const override
ptree toPtree() const override
std::string toString() const override
void parseMoleculeSpecific(RDKit::RWMol *mol, std::unique_ptr< SubstanceGroup > &sgroup, int sequenceId) override
MarvinMonomerSgroup(MarvinMolBase *parent, ptree &molTree)
MarvinMonomerSgroup(MarvinMolBase *parent)
std::string role() const override
MarvinMolBase * copyMol(const std::string &idAppend) const override
std::string role() const override
void processSpecialSgroups() override
bool hasAtomBondBlocks() const override
MarvinMolBase * copyMol(const std::string &idAppend) const override
std::string toString() const override
MarvinMulticenterSgroup(MarvinMolBase *parent, ptree &molTree)
MarvinMulticenterSgroup(MarvinMolBase *parent)
ptree toPtree() const override
void parseMoleculeSpecific(RDKit::RWMol *mol, std::unique_ptr< SubstanceGroup > &sgroup, int sequenceId) override
int getMatchedOrphanBondIndex(std::string atomIdToCheck, std::vector< MarvinBond * > &bondsToTry, std::vector< MarvinBond * > &orphanedBonds) const
MarvinMultipleSgroup(MarvinMolBase *parent)
std::string role() const override
std::string toString() const override
bool isPassiveRoleForContraction() const override
MarvinMolBase * copyMol(const std::string &idAppend) const override
std::vector< MarvinAtom * > parentAtoms
Definition MarvinDefs.h:432
ptree toPtree() const override
void processSpecialSgroups() override
MarvinMultipleSgroup(MarvinMolBase *parent, ptree &molTree)
void parseMoleculeSpecific(RDKit::RWMol *mol, std::unique_ptr< SubstanceGroup > &sgroup, int sequenceId) override
bool hasAtomBondBlocks() const override
bool isPassiveRoleForExpansion() const override
std::vector< MarvinBond * > bondsToAtomsNotInExpandedGroup
Definition MarvinDefs.h:434
std::string toString() const
ptree toPtree() const
std::string id
Definition MarvinDefs.h:74
std::vector< std::unique_ptr< MarvinMol > > products
Definition MarvinDefs.h:592
ptree toPtree() const
std::vector< std::unique_ptr< MarvinCondition > > conditions
Definition MarvinDefs.h:596
std::string toString()
std::vector< std::unique_ptr< MarvinPlus > > pluses
Definition MarvinDefs.h:595
std::vector< std::unique_ptr< MarvinMol > > reactants
Definition MarvinDefs.h:590
std::vector< std::unique_ptr< MarvinMol > > agents
Definition MarvinDefs.h:591
MarvinRectangle(const std::vector< MarvinAtom * > &atoms)
bool overlapsVertically(const MarvinRectangle &otherRectangle) const
static bool compareRectanglesByYReverse(MarvinRectangle &r1, MarvinRectangle &r2)
MarvinRectangle(const RDGeom::Point3D &upperLeftInit, const RDGeom::Point3D &lowerRightInit)
RDGeom::Point3D & getCenter()
bool overlapsVHorizontally(const MarvinRectangle &otherRectangle) const
RDGeom::Point3D center
Definition MarvinDefs.h:184
static bool compareRectanglesByX(MarvinRectangle &r1, MarvinRectangle &r2)
RDGeom::Point3D upperLeft
Definition MarvinDefs.h:188
RDGeom::Point3D lowerRight
Definition MarvinDefs.h:189
MarvinRectangle(double left, double right, double top, double bottom)
MarvinRectangle(const std::vector< MarvinRectangle > &rects)
void extend(const MarvinRectangle &otherRectangle)
std::string role() const override
ptree toPtree() const override
bool hasAtomBondBlocks() const override
void parseMoleculeSpecific(RDKit::RWMol *mol, std::unique_ptr< SubstanceGroup > &sgroup, int sequenceId) override
MarvinSruCoModSgroup(std::string type, MarvinMolBase *parent)
std::string toString() const override
MarvinMolBase * copyMol(const std::string &idAppend) const override
MarvinSruCoModSgroup(MarvinMolBase *parent, std::string role, ptree &molTree)
StereoGroupType groupType
Definition MarvinDefs.h:608
std::vector< unsigned int > atoms
Definition MarvinDefs.h:610
MarvinStereoGroup(StereoGroupType grouptypeInit, int groupNumberInit)
bool isPassiveRoleForContraction() const override
std::string toString() const override
MarvinMolBase * copyMol(const std::string &idAppend) const override
MarvinSuperatomSgroupExpanded(MarvinMolBase *parent, ptree &molTree)
ptree toPtree() const override
MarvinSuperatomSgroupExpanded(MarvinMolBase *parent)
void parseMoleculeSpecific(RDKit::RWMol *mol, std::unique_ptr< SubstanceGroup > &sgroup, int sequenceId) override
bool hasAtomBondBlocks() const override
std::string role() const override
MarvinMolBase * copyMol(const std::string &idAppend) const override
std::string toString() const override
bool isPassiveRoleForExpansion() const override
void cleanUpNumberingMolsAtomsBonds(int &molCount, int &atomCount, int &bondCount, std::map< std::string, std::string > &sgMap, std::map< std::string, std::string > &atomMap, std::map< std::string, std::string > &bondMap) override
void processSpecialSgroups() override
ptree toPtree() const override
MarvinSuperatomSgroup(MarvinMolBase *parent, ptree &molTree)
std::string role() const override
MarvinSuperatomSgroup(MarvinMolBase *parent)
std::vector< std::unique_ptr< MarvinAttachmentPoint > > attachmentPoints
Definition MarvinDefs.h:524
bool hasAtomBondBlocks() const override
IsSgroupInAtomSetResult isSgroupInSetOfAtoms(const std::vector< MarvinAtom * > &setOfAtoms) const override
MarvinWriterException(std::string message)
Definition MarvinDefs.h:56
RWMol is a molecule class that is intended to be edited.
Definition RWMol.h:32
Std stuff.
const std::vector< std::string > marvinStereoConventionTypes
Definition MarvinDefs.h:36
const std::vector< std::string > marvinBondOrders
Definition MarvinDefs.h:32
StereoGroupType
Definition StereoGroup.h:31
bool rdvalue_is(const RDValue_cast_t)
const std::vector< std::string > sruSgroupConnectChoices
Definition MarvinDefs.h:31
const std::vector< std::string > marvinConventionTypes
Definition MarvinDefs.h:34
IsSgroupInAtomSetResult
Definition MarvinDefs.h:48
@ SgroupInAtomSet
Definition MarvinDefs.h:49
@ SgroupNotInAtomSet
Definition MarvinDefs.h:50
@ SgroupBothInAndNotInAtomSet
Definition MarvinDefs.h:51
void eraseUniquePtr(std::vector< std ::unique_ptr< T > > &vector, T *itemToErase)
Definition MarvinDefs.h:227
const std::map< int, std::string > radicalElectronsToMarvinRadical
Definition MarvinDefs.h:45
bool getCleanNumber(std::string strToParse, T &outInt)
const std::vector< std::string > marvinRadicalVals
Definition MarvinDefs.h:38
const std::vector< std::string > marvinStereoDictRefTypes
Definition MarvinDefs.h:35
const std::vector< std::string > marvinQueryBondsTypes
Definition MarvinDefs.h:33
std::vector< std::unique_ptr< T > >::iterator findUniquePtr(std::vector< std ::unique_ptr< T > > &vector, T *itemToFind)
Definition MarvinDefs.h:212
const std::map< std::string, int > marvinRadicalToRadicalElectrons
Definition MarvinDefs.h:41