OEMMFFAtomType¶
unsigned int OEMMFFAtomType(const OEAtomBase *atom, bool &fail)
Returns the MMFF94 atom type from the OEMMFFType
namespace.
The following table describes how the returned MMFF type and the ‘fail’ flag should be interpreted:
MMFF type |
‘fail’ flag |
interpretation |
---|---|---|
true |
MMFF atom type can not be identified |
|
not |
true |
an alternative MMFF atom type is identified |
not |
false |
MMFF atom type is identified successfully |
See also
OEMMFFType
namespace
OEMMFFTypeResult OEMMFFAtomType(const OEAtomBase *atom)
Returns whether an MMFF94 integer atom type can be assigned to an atom and the type itself stored in an OEMMFFTypeResult object.
Warning
Only the function that returns OEMMFFTypeResult is supported in the wrapped languages: Python, Java and C#.
OEGraphMol mol = new OEGraphMol();
OEChem.OESmilesToMol(mol, "c1ccccc1C[Se]");
foreach (OEAtomBase atom in mol.GetAtoms())
{
OEMMFFTypeResult mmffres = new OEMMFFTypeResult(OEChem.OEMMFFAtomType(atom));
Console.WriteLine(atom.GetIdx() + " " + mmffres.GetFailed() + " " +
OEChem.OEMMFFTypeName(mmffres.GetMMFFType()));
}
The correct atom typing requires the following conditions:
The molecule has to have explicit hydrogens.
The molecule has to have (
MMFF
) aromaticity model.
Hint
We highly recommend assigning MMFF partial charges to a molecule by calling the
OEAssignCharges
function with the
OEMMFF94Charges class of the Quacpac TK.