# OEMolBuilder¶

Attention

This is a preliminary API until 2019.Oct and may be improved based on user feedback. It is currently available in C++ and Python.

class OEMolBuilder


This class defines an interface for generating an initial 3D structure of a molecule, by connecting pre-generated fragment coordinates that constitutes the molecule. Building 3D structure of a molecule with this builder is fast when all the fragments constituting a molecule are available in the fraglib associated with the builder. This builder makes no effort to obtain a low energy conformer of the molecule.

The OEMolBuilder class defines the following public methods:

## Constructors¶

OEMolBuilder()
OEMolBuilder(const OEMolBuilderOptions&)
OEMolBuilder(const OEMolBuilder&)


Default and copy constructors.

## operator=¶

OEMolBuilder &operator=(const OEMolBuilder&)


Assignment operator.

void AddFragLib()


Adds a fragments library to be used for pre-generated fragment coordinates during molecule building. When the OEMolBuilder.AddFragLib is called without a parameter, the built-in fragments library is loaded immediately. By default, the built-in fragments library does not load until OEMolBuilder.Build is called for the first time.

The string and oeistream versions of OEMolBuilder.AddFragLib can be used to add external fragments libraries. These external libraries are used in addition to the built-in one.

## Build¶

bool Build(OEChem::OEMCMolBase&)
bool Build(OEChem::OEMCMolBase&, const OEConfFixOptions&)


Generates 3D structure for a molecule. Returns true if the process succeeds. The second argument provided with appropriate options can be used to fix part of a molecule structure to predefined coordinates.

## ClearFragLibs¶

void ClearFragLibs()


Clears all fragment libraries from the builder.

## GetForceField¶

const OEMolPotential::OEForceField& GetForceField() const


See SetForceField method.

## GetOptions¶

const OEMolBuilderOptions& GetOptions() const


See SetOptions method.

## SetForceField¶

void SetForceField(OEMolPotential::OEForceField&)


Sets the forcefield for building the fragment coordinates, when not available in the fragments library. Default: OEMMFFSheffield with OEMMFFSheffieldFFType.MMFF94Smod_NOESTAT mode.

void SetOptions(const OEMolBuilderOptions&)