OEGetXLogPResult

Returns an OEXLogPResult object. The object contains the XLogP for the given molecule as described in the LogP section and a boolean flag indicating whether or not the computation is valid. The main reason the computation may fail is if one or more atoms are not parameterized. The returned value will be equal to the sum on the individual atom contributions plus the linear regression constant -0.127.

Hint

XLogP should be calculated on the neutral form of the molecule. Therefore, calling the OERemoveFormalCharge function of Quacpac TK is highly recommended prior to the XLogP calculation.

The atomxlogps parameter can be used to retrieve the contribution of each atom to the total XLogP as shown in Listing 2. See example in Figure: Example of depicting the atom contributions of the XLogP.

This function exists to make the calling by wrapped languages more convenient. This function should be preferred over the original OEGetXLogP function for wrapped languages.

Listing 2: Example of retrieving individual atom contributions to XLogP

float[] atomXLogP = new float[mol.GetMaxAtomIdx()];
OEXLogPResult result = new OEXLogPResult(OEMolProp.OEGetXLogPResult(mol, atomXLogP));

if (result.IsValid())
{
    Console.WriteLine("XLogP = " + result.GetValue());
    foreach (OEAtomBase atom in mol.GetAtoms())
    {
        uint idx = atom.GetIdx();
        Console.WriteLine("{0:d} {1:0.00}", idx, atomXLogP[idx]);
    }
}
else
    Console.WriteLine("XLogP failed for molecule");
../../_images/OEGetXLogP.png

Example of depicting the atom contributions of the XLogP

See also

OEXLogPResult class LogP section

Code Example