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 #ifndef _RD_SEQUENCEPARSE_H_
11 #define _RD_SEQUENCEPARSE_H_
12 #include <string>
13 
14 namespace RDKit {
15 class RWMol;
16 
17 // \brief construct a molecule from a sequence string (currently only supports
18 // peptides)
19 /*!
20  * \param seq - the string to be processed
21  * \param sanitize - toggles sanitization and stereochemistry perception of
22  *the molecule
23  * \param lowerD - if set, lower case letters will be parsed as the d form
24  *of the corresponding amino acid
25  *
26  */
27 RWMol *SequenceToMol(const char *seq, bool sanitize, bool lowerD);
28 //! \overload
29 RWMol *SequenceToMol(const std::string &seq, bool sanitize, bool lowerD);
30 
31 // \brief construct a protein, RNA or DNA molecule from a sequence string
32 /*!
33  * \param seq - the string to be processed
34  * \param sanitize - toggles sanitization and stereochemistry perception of
35  *the molecule
36  * \param flavor - 0 & 1 Protein, 2, 3, 4 & 5 RNA, 6, 7, 8 & 9 DNA
37  */
38 RWMol *SequenceToMol(const char *seq, bool sanitize = true, int flavor = 0);
39 //! \overload
40 RWMol *SequenceToMol(const std::string &seq, bool sanitize = true,
41  int flavor = 0);
42 
43 // \brief construct a molecule from a FASTA string (currently only supports
44 // peptides)
45 /*!
46  * \param seq - the string to be processed
47  * \param sanitize - toggles sanitization and stereochemistry perception of
48  *the molecule
49  * \param lowerD - if set, lower case letters will be parsed as the d form
50  *of the corresponding amino acid
51  *
52  */
53 RWMol *FASTAToMol(const char *seq, bool sanitize, bool lowerD);
54 //! \overload
55 RWMol *FASTAToMol(const std::string &seq, bool sanitize, bool lowerD);
56 
57 // \brief construct a protein, DNA or RNA molecule from a FASTA string
58 /*!
59  * \param seq - the string to be processed
60  * \param sanitize - toggles sanitization and stereochemistry perception of
61  *the molecule
62  * \param flavor - 0 & 1 protein, 2, 3, 4, & 5 RNA, 6, 7, 8 & 9 DNA
63  *
64  */
65 RWMol *FASTAToMol(const char *seq, bool sanitize = true, int flavor = 0);
66 //! \overload
67 RWMol *FASTAToMol(const std::string &seq, bool sanitize = true,
68  int flavor = 0);
69 
70 // \brief construct a molecule from a HELM string (currently only supports
71 // peptides)
72 /*!
73  * \param seq - the string to be processed
74  * \param sanitize - toggles sanitization and stereochemistry perception of
75  *the molecule
76  *
77  */
78 RWMol *HELMToMol(const char *helm, bool sanitize = true);
79 //! \overload
80 RWMol *HELMToMol(const std::string &helm, bool sanitize = true);
81 }
82 
83 #endif
Includes a bunch of functionality for handling Atom and Bond queries.
Definition: Atom.h:29
RWMol * SequenceToMol(const char *seq, bool sanitize, bool lowerD)
RWMol * FASTAToMol(const char *seq, bool sanitize, bool lowerD)
RWMol * HELMToMol(const char *helm, bool sanitize=true)