mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-04 21:54:27 +08:00
Atoms bonded to metal atoms should always have their H counts explicit in SMILES (#8318)
* refactor the code to determine whether or not an atom is in brackets * move the definition of isMetal to QueryOps * atoms bound to metals in SMILES should always be in square brackets Implementation and some test updates needs confirmation that all of tests run * basic tests pass * java tests pass * update js tests * doc updates * Update Code/GraphMol/catch_graphmol.cpp Co-authored-by: Ricardo Rodriguez <ricrogz@users.noreply.github.com> * Update Code/GraphMol/SmilesParse/test.cpp Co-authored-by: Ricardo Rodriguez <ricrogz@users.noreply.github.com> * finish fixing tests * bump yaehmop version to allow compilation to work --------- Co-authored-by: Ricardo Rodriguez <ricrogz@users.noreply.github.com>
This commit is contained in:
@@ -1171,5 +1171,10 @@ void finalizeQueryFromDescription(
|
||||
}
|
||||
}
|
||||
|
||||
bool isMetal(const Atom &atom) {
|
||||
static const std::unique_ptr<ATOM_OR_QUERY> q(makeMAtomQuery());
|
||||
return q->Match(&atom);
|
||||
}
|
||||
|
||||
} // namespace QueryOps
|
||||
}; // namespace RDKit
|
||||
|
||||
Reference in New Issue
Block a user