RDKit
Open-source cheminformatics and machine learning.
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 
15 namespace RDKit {
16 class 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, bool lowerD);
29 //! \overload
30 RDKIT_FILEPARSERS_EXPORT RWMol *SequenceToMol(const std::string &seq, bool sanitize, bool lowerD);
31 
32 // \brief construct a protein, RNA or DNA molecule from a sequence string
33 /*!
34  * \param seq - the string to be processed
35  * \param sanitize - toggles sanitization and stereochemistry perception of
36  *the molecule
37  * \param flavor -
38  * 0 Protein, L amino acids (default)
39  * 1 Protein, D amino acids
40  * 2 RNA, no cap
41  * 3 RNA, 5' cap
42  * 4 RNA, 3' cap
43  * 5 RNA, both caps
44  * 6 DNA, no cap
45  * 7 DNA, 5' cap
46  * 8 DNA, 3' cap
47  * 9 DNA, both caps
48  *
49  */
50 RDKIT_FILEPARSERS_EXPORT RWMol *SequenceToMol(const char *seq, bool sanitize = true, int flavor = 0);
51 //! \overload
52 RDKIT_FILEPARSERS_EXPORT RWMol *SequenceToMol(const std::string &seq, bool sanitize = true,
53  int flavor = 0);
54 
55 // \brief construct a molecule from a FASTA string (currently only supports
56 // peptides)
57 /*!
58  * \param seq - the string to be processed
59  * \param sanitize - toggles sanitization and stereochemistry perception of
60  *the molecule
61  * \param lowerD - if set, lower case letters will be parsed as the d form
62  *of the corresponding amino acid
63  *
64  */
65 RDKIT_FILEPARSERS_EXPORT RWMol *FASTAToMol(const char *seq, bool sanitize, bool lowerD);
66 //! \overload
67 RDKIT_FILEPARSERS_EXPORT RWMol *FASTAToMol(const std::string &seq, bool sanitize, bool lowerD);
68 
69 // \brief construct a protein, DNA or RNA molecule from a FASTA string
70 /*!
71  * \param seq - the string to be processed
72  * \param sanitize - toggles sanitization and stereochemistry perception of
73  *the molecule
74  * \param flavor -
75  * 0 Protein, L amino acids (default)
76  * 1 Protein, D amino acids
77  * 2 RNA, no cap
78  * 3 RNA, 5' cap
79  * 4 RNA, 3' cap
80  * 5 RNA, both caps
81  * 6 DNA, no cap
82  * 7 DNA, 5' cap
83  * 8 DNA, 3' cap
84  * 9 DNA, both caps
85  *
86  */
87 RDKIT_FILEPARSERS_EXPORT RWMol *FASTAToMol(const char *seq, bool sanitize = true, int flavor = 0);
88 //! \overload
89 RDKIT_FILEPARSERS_EXPORT RWMol *FASTAToMol(const std::string &seq, bool sanitize = true, int flavor = 0);
90 
91 // \brief construct a molecule from a HELM string (currently only supports
92 // peptides)
93 /*!
94  * \param seq - the string to be processed
95  * \param sanitize - toggles sanitization and stereochemistry perception of
96  *the molecule
97  *
98  */
99 RDKIT_FILEPARSERS_EXPORT RWMol *HELMToMol(const char *helm, bool sanitize = true);
100 //! \overload
101 RDKIT_FILEPARSERS_EXPORT RWMol *HELMToMol(const std::string &helm, bool sanitize = true);
102 }
103 
104 #endif
#define RDKIT_FILEPARSERS_EXPORT
Definition: export.h:203
RDKIT_FILEPARSERS_EXPORT RWMol * SequenceToMol(const char *seq, bool sanitize, bool lowerD)
Std stuff.
Definition: Atom.h:30
RDKIT_FILEPARSERS_EXPORT RWMol * FASTAToMol(const char *seq, bool sanitize, bool lowerD)
RDKIT_FILEPARSERS_EXPORT RWMol * HELMToMol(const char *helm, bool sanitize=true)