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 |
from openeye import oechem
monomer_data = oechem.OEMonomerData("[H:1]N[C@@H](C)C(=O)[OH:2]")
monomer_data.SetName("L-Alanine")
monomer_data.AddCode("Standard", "A")
result = oechem.OEMonomerValidationResult()
if not oechem.OEIsValidMonomerData(monomer_data, result):
oechem.OEThrow.Error(
"Invalid monomer definition for '{0}' [warning={1}]".format(
monomer_data.GetName(), result.GetWarning()
)
)
See also
OEIsValidMonomerDatafunction
Constructors
OEMonomerData() -> OEMonomerData
Default constructor that creates an OEMonomerData object.
OEMonomerData(smiles: str, polymerType: int, monomerType: int) -> OEMonomerData
Constructor that initializes an OEMonomerData object.
See also
OEPolymerTypenamespaceOEMonomerTypenamespace
OEMonomerData(arg2: OEMonomerData) -> OEMonomerData
Copy constructor.
AddCode
AddCode(codeSet: str, code: str) -> None
Adds a code to a monomer for a given code-set.
GetCode
GetCode(codeSet: str) -> str
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
GetCodes() -> OEStringStringMap
Returns the map that contains all the code-set and code pairs defined for the monomer.
GetMonomerType
GetMonomerType() -> int
Returns the monomer type of the monomer.
See also
OEMonomerTypenamespace
GetName
GetName() -> str
Returns the full name of the monomer. It is optional to define and only used to reference name.
GetPolymerType
GetPolymerType() -> int
Returns the polymer type of the monomer.
See also
OEPolymerTypenamespace
GetSmiles
GetSmiles() -> str
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
GetCanonicalSmiles() -> str
Returns the canonical smiles representation of the monomer (without atom mapping)
Such as C[C@@H](C(=O)O)N] for alanine.
HasCode
HasCode(codeSet: str) -> bool
Returns whether the monomer has a code defined for the given code set.
IsValid
IsValid() -> bool
Returns whether the OEMonomerData object is fully defined
and correct.
See also
OEIsValidMonomerDatafunction
NumCodes
NumCodes() -> int
Returns the number of codes defined for the monomer in various code-sets.
SetCodes
SetCodes(codes: OEStringStringMap) -> None
Sets a code of the monomer for a specific code-set.
SetMonomerType
SetMonomerType(arg2: int) -> None
Sets the monomer type of the monomer.
See also
OEMonomerTypenamespace
SetName
SetName(arg2: str) -> None
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
SetPolymerType(arg2: int) -> None
Sets the polymer type of the monomer.
See also
OEPolymerTypenamespace
SetSmiles
SetSmiles(arg2: str) -> None
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
Validate() -> bool
Calls the OEIsValidMonomerData function
to validate the monomer data object.