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

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#.

mol = oechem.OEGraphMol()
oechem.OESmilesToMol(mol, "c1ccccc1C[Se]")
for atom in mol.GetAtoms():
    mmffres = oechem.OEMMFFAtomType(atom)
    print(atom, 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.