Subsections

   
4.1 OEArea

class OEArea

This class represents OEArea, 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.

   
4.1.1 Constructors

OEArea()
OEArea(const OEArea &)

Default and copy constructors.

   
4.1.2 operator=

OEArea &operator=(const OEArea &)

Assignment operator.

   
4.1.3 GetArea

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.

To calculate the area of a molecule, mol:


\begin{lstlisting}
OEArea area;
float a = area.GetArea(mol);
\end{lstlisting}

To retrieve the atom contributions:


\begin{lstlisting}
// declare an array of the correct size
float * atomArea = ne...
...atomArea[idx]);
}
}
\par
// clean up array
delete [] atomArea;
\end{lstlisting}

   
4.1.4 GetMethod

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.

   
4.1.5 GetUseHydrogens

bool GetUseHydrogens() const

Returns true if hydrogens are used for the calculation of the area. Returns false if they are neglected.

   
4.1.6 SetMethod

bool SetMethod(const unsigned int method)

Sets the method for calculating the surface area of the molecule. The two allowed values are OEAreaMethod::Gaussian and OEAreaMethod::Discrete, for a Gaussian or hard-sphere representation, respectively.

   
4.1.7 SetUseHydrogens

bool SetUseHydrogens(bool state)

An argument of true will turn on the use of hydrogens when calculations surface area. An argument of false will cause hydrogens to be neglected.