RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
CDXMLParser.h
Go to the documentation of this file.
1//
2// Copyright (c) 2022 Brian P Kelley
3// All rights reserved.
4//
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#include <RDGeneral/export.h>
11#ifndef RD_CDXML_FILEPARSERS_H
12#define RD_CDXML_FILEPARSERS_H
13
14#include <RDGeneral/types.h>
15#include <string>
16#include <iostream>
17#include <vector>
18
19namespace RDKit {
20class RWMol;
21
22//! \brief construct molecules from a CDXML file
23//! Note that the CDXML format is large and complex, the RDKit doesn't support
24//! full functionality, just the base ones required for molecule and
25//! reaction parsing.
26/*!
27 * \param inStream - string containing the mol block
28 * \param sanitize - toggles sanitization and stereochemistry
29 * perception of the molecule
30 * \param removeHs - toggles removal of Hs from the molecule. H removal
31 * is only done if the molecule is sanitized
32 * correctness of the contents.
33 */
34RDKIT_FILEPARSERS_EXPORT std::vector<std::unique_ptr<RWMol>>
35CDXMLDataStreamToMols(std::istream &inStream, bool sanitize = true,
36 bool removeHs = true);
37//! \brief construct molecules from a CDXML file
38//! Note that the CDXML format is large and complex, the RDKit doesn't support
39//! full functionality, just the base ones required for molecule and
40//! reaction parsing.
41/*!
42 * \param fileName - cdxml fileName
43 * \param sanitize - toggles sanitization and stereochemistry
44 * perception of the molecule
45 * \param removeHs - toggles removal of Hs from the molecule. H removal
46 * is only done if the molecule is sanitized
47 * correctness of the contents.
48 */
49RDKIT_FILEPARSERS_EXPORT std::vector<std::unique_ptr<RWMol>> CDXMLFileToMols(
50 const std::string &filename, bool sanitize = true, bool removeHs = true);
51
52//! \brief construct molecules from a CDXML file
53//! Note that the CDXML format is large and complex, the RDKit doesn't support
54//! full functionality, just the base ones required for molecule and
55//! reaction parsing.
56/*!
57 * \param cdxml - string containing the mol block
58 * \param sanitize - toggles sanitization and stereochemistry
59 * perception of the molecule
60 * \param removeHs - toggles removal of Hs from the molecule. H removal
61 * is only done if the molecule is sanitized
62 * correctness of the contents.
63 */
64RDKIT_FILEPARSERS_EXPORT std::vector<std::unique_ptr<RWMol>> CDXMLToMols(
65 const std::string &cdxml, bool sanitize = true, bool removeHs = true);
66
67} // namespace RDKit
68#endif //␓ _RD_CDXML_FILEPARSERS_H
#define RDKIT_FILEPARSERS_EXPORT
Definition export.h:161
Std stuff.
bool rdvalue_is(const RDValue_cast_t)
RDKIT_FILEPARSERS_EXPORT std::vector< std::unique_ptr< RWMol > > CDXMLFileToMols(const std::string &filename, bool sanitize=true, bool removeHs=true)
construct molecules from a CDXML file Note that the CDXML format is large and complex,...
RDKIT_FILEPARSERS_EXPORT std::vector< std::unique_ptr< RWMol > > CDXMLDataStreamToMols(std::istream &inStream, bool sanitize=true, bool removeHs=true)
construct molecules from a CDXML file Note that the CDXML format is large and complex,...
RDKIT_FILEPARSERS_EXPORT std::vector< std::unique_ptr< RWMol > > CDXMLToMols(const std::string &cdxml, bool sanitize=true, bool removeHs=true)
construct molecules from a CDXML file Note that the CDXML format is large and complex,...