OEAddCustomFASTAResidue¶
bool OEAddCustomFASTAResidue(const char *code, const char *smiles)
Add a custom residue to the OEChem TK FASTA parser. The code
is
the string surrounded in square brackets. The smiles
is the
structure of the un-natural nucleic acid to add to the internal
dictionary. Note, the hydroxyl from the background will be
automatically stripped and removed by this function.
In order for these residues to be used, the
OEIFlavor::FASTA::CustomResidues
flavor must be
specified. The following code snippet demonstrates how to register
a custom D-isoleucine with the FASTA reader named with [dI]
. It
also demonstrates using the
OEIFlavor::FASTA::EmbeddedSMILES
flavor to
define a tether that can cyclize the peptide.
#include <openeye.h>
#include <iostream>
#include <oechem.h>
using namespace std;
using namespace OESystem;
using namespace OEChem;
int main()
{
oemolistream ifs;
unsigned int flavor = OEIFlavor::Generic::Default |
OEIFlavor::FASTA::CustomResidues |
OEIFlavor::FASTA::EmbeddedSMILES;
ifs.SetFlavor(OEFormat::FASTA, flavor);
ifs.SetFormat(OEFormat::FASTA);
OEAddCustomFASTAResidue("dI", "CC[C@@H](C)[C@@H](C(=O)O)N");
const char custom_fasta[] =
">Custom FASTA\n"
"FVVVSTDPWVNGLY[dI]D[NC(=O)CNC(=O)[C@@H](N[R16])CSCC(=O)[R1]]";
ifs.openstring(custom_fasta);
OEGraphMol mol;
OEReadMolecule(ifs, mol);
return 0;
}
Warning
This is an experimental API that may change in the future.