PRELIMINARY-IMAGE This is a preliminary API until 2020.Apr 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.

See also

The OEMolBuilder class defines the following public methods:


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

Default and copy constructors.


OEMolBuilder &operator=(const OEMolBuilder&)

Assignment operator.


bool AddFragLib()
bool AddFragLib(const std::string &)
bool AddFragLib(OEPlatform::oeistream &)

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. Returns True is fragment library is added successfully.

See also


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

Generates 3D structure for a molecule. Returns OEOmegaReturnCode.Success if the process succeeds, otherwise returns an error code from the OEOmegaReturnCode namespace. The second argument provided with appropriate options can be used to fix part of a molecule structure to predefined coordinates.

See also


void ClearFragLibs()

Clears all fragment libraries from the builder.

See also


const OEMolPotential::OEForceField& GetForceField() const

See SetForceField method.


const OEMolBuilderOptions& GetOptions() const

See SetOptions method.


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.

See also


void SetOptions(const OEMolBuilderOptions&)

Sets options for building the molecule 3D-structures.

See also