65 OBQueryAtom(
int atomicNum = 6,
bool isInRing =
false,
bool isAromatic =
false) :
66 m_atomicNum(atomicNum), m_isInRing(isInRing), m_isAromatic(isAromatic) {}
82 const std::vector<OBQueryBond*>&
GetBonds()
const 90 const std::vector<OBQueryAtom*>&
GetNbrs()
const 144 m_begin(begin), m_end(end), m_order(order), m_aromatic(aromatic)
146 m_begin->m_bonds.push_back(
this);
147 m_end->m_bonds.push_back(
this);
148 m_begin->m_nbrs.push_back(m_end);
149 m_end->m_nbrs.push_back(m_begin);
206 return m_atoms.size();
213 return m_bonds.size();
235 for (
unsigned int i = 0; i < begin->
GetBonds().size(); ++i)
236 if (begin->
GetNbrs()[i] == end)
245 atom->
m_index = m_atoms.size();
246 m_atoms.push_back(atom);
253 bond->
m_index = m_bonds.size();
254 m_bonds.push_back(bond);
virtual ~OBQueryAtom()
Definition: query.h:68
OBQueryAtom * GetEndAtom() const
Definition: query.h:168
A substructure query.
Definition: query.h:197
OBQueryBond * GetBond(OBQueryAtom *begin, OBQueryAtom *end) const
Definition: query.h:233
unsigned int m_atomicNum
Definition: query.h:114
Atom in an OBQuery.
Definition: query.h:54
const std::vector< OBQueryAtom * > & GetAtoms() const
Definition: query.h:218
bool IsAromatic() const
Definition: atom.cpp:773
bool IsAromatic() const
Definition: bond.cpp:458
OBQueryAtom(int atomicNum=6, bool isInRing=false, bool isAromatic=false)
Definition: query.h:65
Bond class.
Definition: bond.h:58
Molecule Class.
Definition: mol.h:118
unsigned int m_index
Definition: query.h:113
std::vector< OBQueryBond * > m_bonds
Definition: query.h:116
void AddAtom(OBQueryAtom *atom)
Definition: query.h:243
A speed-optimized vector of bits.
Definition: bitvec.h:57
const std::vector< OBQueryBond * > & GetBonds() const
Definition: query.h:82
virtual ~OBQueryBond()
Definition: query.h:152
OBQueryBond(OBQueryAtom *begin, OBQueryAtom *end, int order=1, bool aromatic=false)
Definition: query.h:143
std::vector< OBQueryAtom * > m_atoms
Definition: query.h:257
unsigned int NumAtoms() const
Definition: query.h:204
bool IsInRing() const
Definition: atom.cpp:785
const std::vector< OBQueryBond * > & GetBonds() const
Definition: query.h:225
virtual bool Matches(const OBBond *bond) const
Definition: query.h:177
OBQuery * CompileMoleculeQuery(OBMol *mol, const OBBitVec &mask=OBBitVec())
Definition: query.cpp:43
unsigned int GetAtomicNum() const
Definition: atom.h:176
std::vector< OBQueryAtom * > m_nbrs
Definition: query.h:117
void AddBond(OBQueryBond *bond)
Definition: query.h:251
OBQueryAtom * m_end
Definition: query.h:185
bool m_isInRing
Definition: query.h:115
std::vector< OBQueryBond * > m_bonds
Definition: query.h:258
const std::vector< OBQueryAtom * > & GetNbrs() const
Definition: query.h:90
unsigned int GetBondOrder() const
Definition: bond.h:157
bool m_aromatic
Definition: query.h:187
unsigned int GetIndex() const
Definition: query.h:74
Bond in an OBQuery.
Definition: query.h:136
unsigned int NumBonds() const
Definition: query.h:211
unsigned int GetIndex() const
Definition: query.h:157
unsigned int m_order
Definition: query.h:186
Fast and efficient bitstring class.
virtual bool Matches(const OBAtom *atom) const
Definition: query.h:101
unsigned int m_index
Definition: query.h:184
OBQueryAtom * GetBeginAtom() const
Definition: query.h:164
OBQuery * CompileSmilesQuery(const std::string &smiles, const OBBitVec &mask=OBBitVec())
Definition: query.cpp:75
Tokenize strings, open data files.
Global namespace for all Open Babel code.
Definition: alias.h:22
Atom class.
Definition: atom.h:71