Files
rdkit/Code/GraphMol/catch_molops.cpp
Greg Landrum a26ea07d21 Fixes #7556 (#7646)
* backup, does not work

* fix a copy-pasta typo

remove debugging messages

all tests pass here

* last bit of modernization
2024-07-22 16:34:08 +02:00

30 lines
911 B
C++

//
// Copyright (C) 2024 Greg Landrum and other RDKit contributors
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#include <catch2/catch_all.hpp>
#include <GraphMol/RDKitBase.h>
#include <GraphMol/MolOps.h>
#include <GraphMol/test_fixtures.h>
#include <GraphMol/SmilesParse/SmilesParse.h>
#include <GraphMol/SmilesParse/SmilesWrite.h>
using namespace RDKit;
TEST_CASE("github #7556: chiral sulfur in conjugated rings") {
SECTION("as reported") {
auto m = "CC1=CC(Cl)=CC2=C1N=[S@](C)N=C2N"_smiles;
REQUIRE(m);
CHECK(!m->getBondBetweenAtoms(8, 9)->getIsConjugated());
CHECK(!m->getBondBetweenAtoms(9, 11)->getIsConjugated());
REQUIRE(m->getAtomWithIdx(9)->getChiralTag() != Atom::CHI_UNSPECIFIED);
}
}