class OEArea

This class represents OEArea. OEArea is a simple object that calculates surface area using the same grid-based Gaussians that Zap uses. This class is mostly used for calculating the area term in solvation calculations or the buried area term in bind calculations.


OEArea(const OEArea &)

Default and copy constructors.


OEArea &operator=(const OEArea &)

Assignment operator.


float GetArea(const OEChem::OEMolBase &mol)
bool GetArea(const OEChem::OEMolBase &mol, float *atomArea)

Calculate the surface area of the passed-in molecule. The first version calculates the surface area of the entire molecule. The second version takes an array sized by OEMolBase::GetMaxAtomIdx to return the contribution of each atom to the total surface area.

Note that whether or not hydrogens are included in these calculations is controlled by OEArea.SetUseHydrogens which is set to false by default.

The following demonstrates how to calculate the area of a molecule:

Example of calculating the surface area of a molecule

OEArea area = new OEArea();
float a = area.GetArea(mol);
System.out.println("Molecule area = " + a );

The following demonstrates how to retrieve the individual atom contributions to the surface area:

Example of calculating the surface area contribution of individual atoms

OEFloatArray atomArea = new OEFloatArray(mol.GetMaxAtomIdx()); 
OEArea area = new OEArea();
area.GetArea(mol, atomArea);
for (OEAtomBase atom: mol.GetAtoms()) {
    int index = atom.GetIdx();
    System.out.println(index + " " + atomArea.getItem(index));


unsigned int GetMethod() const

Returns an int indicating the method that is used to model the area of the molecule. The two possible return values are OEAreaMethod.Gaussian and OEAreaMethod.Discrete.


bool GetUseHydrogens() const

Returns a bool where true means explicit hydrogens are turned on and false means they are turned off for the area calculation.


bool SetMethod(const unsigned int method)

Takes an int with the value of OEAreaMethod.Gaussian of OEAreaMethod.Discrete


bool SetUseHydrogens(bool state)

This method takes a bool where true turns on explicit hydrogens for calculating area and false turn them off.