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

OEMMFFType::UNK

true

MMFF atom type can not be identified

not OEMMFFType::UNK

true

an alternative MMFF atom type is identified

not OEMMFFType::UNK

false

MMFF atom type is identified successfully

OEGraphMol mol;
OESmilesToMol(mol, "c1ccccc1C[Se]");

bool failed;
for (OEIter<const OEAtomBase> atom = mol.GetAtoms(); atom; ++atom)
{
    const unsigned int mmfftype = OEMMFFAtomType(atom, failed);
    std::cout << atom->GetIdx() << " " << failed << " "
              << OEMMFFTypeName(mmfftype) << std::endl;
}

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;
OESmilesToMol(mol, "c1ccccc1C[Se]");

for (OEIter<const OEAtomBase> atom = mol.GetAtoms(); atom; ++atom)
{
    const OEMMFFTypeResult mmffres = OEMMFFAtomType(atom);
    std::cout << atom->GetIdx() << " " << mmffres.GetFailed() << " "
              << OEMMFFTypeName(mmffres.GetMMFFType()) << std::endl;
}

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.