Files
rdkit/Code/GraphMol/catch_molbundle.cpp
tadhurst-cdd d5d4d194ec atropisomer handling added (#6903)
* atropisomer handling added

* fixed non-used variables,  linking directives

* BOOST LIB start/stop fixes, linking fix

* Fixes for RDKIT CI errors

* minimalLib fix

* changed vector<enum> for java builds

* check for extra chars in CIP labeling

* removed wrong deprecated message

* fix ostrstream output error?

* restored _ChiralAtomRank to lowercase first letter

* changes for merged master

* Fixed catch label for new Catch package

* update expected psql results

* get swig wrappers building

* restore MolFileStereochem to FileParsers

* fix java wrapper for reapplyMolBlockWedging

* some suggestions

* move a couple functions out of Bond

* Merge branch 'master' into pr/atropisomers2

* merged master

* Renamed setStereoanyFromSquiggleBond

* atropisomers in cdxml, rationalize atrop wedging, stereoGroups in drawMol

* fix for CI build

* attempt to fix java build in CI

* attempt to fix java build in CI #2

* New routine to remove non-explicit  3D-geneated chirality

* changed to use pair for atrop atoms and related bonds

* Changes as per PR reviews

* PR review respnses

* PR review reponse - more

* Fix merge from master

* fixing java ci after merge

* Updated the help doc for atripisomers

* update the atropisomer docs

* improve the images

* add the source CXSMILES

---------

Co-authored-by: greg landrum <greg.landrum@gmail.com>
2023-12-22 04:58:18 +01:00

47 lines
1.3 KiB
C++

//
// Copyright (C) 2023 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/MolBundle.h>
#include <GraphMol/SmilesParse/SmilesParse.h>
#include <GraphMol/SmilesParse/SmilesWrite.h>
#include <GraphMol/Chirality.h>
#include <algorithm>
using namespace RDKit;
#ifdef RDK_USE_BOOST_SERIALIZATION
TEST_CASE("MolBundle serialization") {
SECTION("basics") {
MolBundle bundle;
bundle.addMol(ROMOL_SPTR(SmilesToMol("CCC")));
bundle.addMol(ROMOL_SPTR(SmilesToMol("CCN")));
CHECK(!bundle.empty());
auto pkl = bundle.serialize();
MolBundle nbundle(pkl);
REQUIRE(bundle.size() == nbundle.size());
for (auto i = 0u; i < bundle.size(); ++i) {
CHECK(MolToSmiles(*bundle[i]) == MolToSmiles(*nbundle[i]));
}
}
SECTION("empty") {
MolBundle bundle;
CHECK(bundle.empty());
auto pkl = bundle.serialize();
MolBundle nbundle(pkl);
REQUIRE(bundle.size() == nbundle.size());
}
}
#else
TEST_CASE("MolBundle serialization") {}
#endif