RDKit: SequenceParsers.h Source File

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
SequenceParsers.h
Go to the documentation of this file.
1//
2// Copyright (C) 2015,2016 Greg Landrum and NextMove Software
3//
4// @@ All Rights Reserved @@
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_SEQUENCEPARSE_H_
12#define _RD_SEQUENCEPARSE_H_
13#include <string>
14
15namespace RDKit {
16class RWMol;
17
18// \brief construct a molecule from a sequence string (currently only supports
19// peptides)
20/*!
21 * \param seq - the string to be processed
22 * \param sanitize - toggles sanitization and stereochemistry perception of
23 *the molecule
24 * \param lowerD - if set, lower case letters will be parsed as the d form
25 *of the corresponding amino acid
26 *
27 */
28 RDKIT_FILEPARSERS_EXPORT RWMol *SequenceToMol(const char *seq, bool sanitize,
29 bool lowerD);
30//! \overload
31 RDKIT_FILEPARSERS_EXPORT RWMol *SequenceToMol(const std::string &seq,
32 bool sanitize, bool lowerD);
33
34// \brief construct a protein, RNA or DNA molecule from a sequence string
35/*!
36 * \param seq - the string to be processed
37 * \param sanitize - toggles sanitization and stereochemistry perception of
38 *the molecule
39 * \param flavor -
40 * 0 Protein, L amino acids (default)
41 * 1 Protein, D amino acids
42 * 2 RNA, no cap
43 * 3 RNA, 5' cap
44 * 4 RNA, 3' cap
45 * 5 RNA, both caps
46 * 6 DNA, no cap
47 * 7 DNA, 5' cap
48 * 8 DNA, 3' cap
49 * 9 DNA, both caps
50 *
51 */
52 RDKIT_FILEPARSERS_EXPORT RWMol *SequenceToMol(const char *seq,
53 bool sanitize = true,
54 int flavor = 0);
55//! \overload
56 RDKIT_FILEPARSERS_EXPORT RWMol *SequenceToMol(const std::string &seq,
57 bool sanitize = true,
58 int flavor = 0);
59
60// \brief construct a molecule from a FASTA string (currently only supports
61// peptides)
62/*!
63 * \param seq - the string to be processed
64 * \param sanitize - toggles sanitization and stereochemistry perception of
65 *the molecule
66 * \param lowerD - if set, lower case letters will be parsed as the d form
67 *of the corresponding amino acid
68 *
69 */
70 RDKIT_FILEPARSERS_EXPORT RWMol *FASTAToMol(const char *seq, bool sanitize,
71 bool lowerD);
72//! \overload
73 RDKIT_FILEPARSERS_EXPORT RWMol *FASTAToMol(const std::string &seq,
74 bool sanitize, bool lowerD);
75
76// \brief construct a protein, DNA or RNA molecule from a FASTA string
77/*!
78 * \param seq - the string to be processed
79 * \param sanitize - toggles sanitization and stereochemistry perception of
80 *the molecule
81 * \param flavor -
82 * 0 Protein, L amino acids (default)
83 * 1 Protein, D amino acids
84 * 2 RNA, no cap
85 * 3 RNA, 5' cap
86 * 4 RNA, 3' cap
87 * 5 RNA, both caps
88 * 6 DNA, no cap
89 * 7 DNA, 5' cap
90 * 8 DNA, 3' cap
91 * 9 DNA, both caps
92 *
93 */
94 RDKIT_FILEPARSERS_EXPORT RWMol *FASTAToMol(const char *seq,
95 bool sanitize = true,
96 int flavor = 0);
97//! \overload
98 RDKIT_FILEPARSERS_EXPORT RWMol *FASTAToMol(const std::string &seq,
99 bool sanitize = true,
100 int flavor = 0);
101
102// \brief construct a molecule from a HELM string (currently only supports
103// peptides)
104/*!
105 * \param seq - the string to be processed
106 * \param sanitize - toggles sanitization and stereochemistry perception of
107 *the molecule
108 *
109 */
110 RDKIT_FILEPARSERS_EXPORT RWMol *HELMToMol(const char *helm,
111 bool sanitize = true);
112//! \overload
113 RDKIT_FILEPARSERS_EXPORT RWMol *HELMToMol(const std::string &helm,
114 bool sanitize = true);
115} // namespace RDKit
116
117#endif
RDKit::RWMol
RWMol is a molecule class that is intended to be edited.
Definition RWMol.h:32
export.h
RDKIT_FILEPARSERS_EXPORT
#define RDKIT_FILEPARSERS_EXPORT
Definition export.h:177
RDKit
Std stuff.
Definition Abbreviations.h:19
RDKit::HELMToMol
RDKIT_FILEPARSERS_EXPORT RWMol * HELMToMol(const char *helm, bool sanitize=true)
RDKit::SequenceToMol
RDKIT_FILEPARSERS_EXPORT RWMol * SequenceToMol(const char *seq, bool sanitize, bool lowerD)
RDKit::FASTAToMol
RDKIT_FILEPARSERS_EXPORT RWMol * FASTAToMol(const char *seq, bool sanitize, bool lowerD)