OEMonomerData
Attention
This is a preliminary API and may be improved based on user feedback. It is currently available in C++ and Python.
class OEMonomerData
Stores the basic definition required for a monomer (OEMonomer) to be used as a building block for representing biological macromolecules.
Property |
Value |
Required/Optional/Generated |
|---|---|---|
Smiles |
|
required |
Canonical Smiles |
|
generated |
Name |
|
optional |
Polymer type |
required |
|
Monomer type |
required |
|
Monomer code-set/code pair |
|
required for at least one code-set |
OEMonomerData monomerData("[H:1]N[C@@H](C)C(=O)[OH:2]");
monomerData.SetName("L-Alanine");
monomerData.AddCode("Standard", "A");
OEMonomerValidationResult result;
if (!OEIsValidMonomerData(monomerData, result))
{
OEThrow.Error("Invalid monomer definition for '%s' [warning=%s]", monomerData.GetName().c_str(),
result.GetWarning().c_str());
}
See also
OEIsValidMonomerDatafunction
Constructors
OEMonomerData()
Default constructor that creates an OEMonomerData object.
OEMonomerData(const std::string& smiles,
unsigned polymerType = OEPolymerType::Peptide,
unsigned monomerType = OEMonomerType::Backbone)
Constructor that initializes an OEMonomerData object.
See also
OEPolymerTypenamespaceOEMonomerTypenamespace
OEMonomerData(const OEMonomerData &)
Copy constructor.
operator=
OEMonomerData &operator=(const OEMonomerData &)
Assignment operator.
AddCode
void AddCode(const std::string& codeSet, const std::string& code)
Adds a code to a monomer for a given code-set.
GetCode
std::string GetCode(const std::string& codeSet) const
Returns the code of the monomer for the given code-set. Returns an empty string if there is no code defined for the code-set.
GetCodes
const std::map<std::string, std::string>& GetCodes() const
Returns the map that contains all the code-set and code pairs defined for the monomer.
GetMonomerType
unsigned int GetMonomerType() const
Returns the monomer type of the monomer.
See also
OEMonomerTypenamespace
GetName
std::string GetName() const
Returns the full name of the monomer. It is optional to define and only used to reference name.
GetPolymerType
unsigned int GetPolymerType() const
Returns the polymer type of the monomer.
See also
OEPolymerTypenamespace
GetSmiles
std::string GetSmiles() const
Returns the smiles representation of the monomer that contains the atom
map indices representing connection points.
Such as [H:1]N[C@@H](C)C(=O)[OH:2] defining alanine.
GetCanonicalSmiles
std::string GetCanonicalSmiles() const
Returns the canonical smiles representation of the monomer (without atom mapping)
Such as C[C@@H](C(=O)O)N] for alanine.
HasCode
bool HasCode(const std::string& codeSet) const
Returns whether the monomer has a code defined for the given code set.
IsValid
bool IsValid() const
Returns whether the OEMonomerData object is fully defined
and correct.
See also
OEIsValidMonomerDatafunction
NumCodes
unsigned int NumCodes() const
Returns the number of codes defined for the monomer in various code-sets.
SetCodes
void SetCodes(const std::map<std::string, std::string>& codes)
Sets a code of the monomer for a specific code-set.
SetMonomerType
void SetMonomerType(unsigned int)
Sets the monomer type of the monomer.
See also
OEMonomerTypenamespace
SetName
void SetName(const std::string &)
Sets the name of the monomer. The name can be arbitrary, but it is recommended use the IUPAC name
or any other name that well the monomer.
For example, the name of the C[C@@H](C(=O)O)N] monomer of can be Alanine , L-alanine or
L-alpha-Alanine or (2S)-2-aminopropanoic acid.
Setting the name is optional.
SetPolymerType
void SetPolymerType(unsigned int)
Sets the polymer type of the monomer.
See also
OEPolymerTypenamespace
SetSmiles
void SetSmiles(const std::string &)
Sets the smiles of the monomer. The given smiles has to define possible attachment points
of the monomer using map indices.
For example, [H:1]N[C@@H](C)C(=O)[OH:2] defining alanine with two connection points to
from a peptide bonds with adjacent amino acid monomers.
See also
OEPerceivePeptideMonomerConnectionsfunction
Validate
bool Validate() const
Calls the OEIsValidMonomerData function
to validate the monomer data object.