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

OEGraphMol mol = new OEGraphMol();
oechem.OESmilesToMol(mol, "c1ccccc1C[Se]");

for (OEAtomBase atom : mol.GetAtoms()) {
    OEMMFFTypeResult mmffres = new OEMMFFTypeResult(oechem.OEMMFFAtomType(atom));
    System.out.println(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.