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<OEAtomBase> ai = mol.GetAtoms(); ai; ++ai)
    const unsigned int mmfftype = OEMMFFAtomType(ai, failed);
    std::cout << ai->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.


Only the function that returns OEMMFFTypeResult is supported in the wrapped languages: Python, Java and C#.

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

for (OEIter<OEAtomBase> ai = mol.GetAtoms(); ai; ++ai)
    const OEMMFFTypeResult mmffres = OEMMFFAtomType(ai);
    std::cout << ai->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.


We highly recommend assigning MMFF partial charges to a molecule by calling the OEAssignCharges function with the OEMMFF94Charges class of the Quacpac TK.