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 OEMakeFragLib

This class defines interface for generating a fragments library. The builder allows to build either a partial or a complete fragments library by controlling the content of the fraglib currently loaded in the builder.

Code Examples

The OEMakeFragLib class defines the following public methods:


OEMakeFragLib(const OEFragBuilderOptions&)
OEMakeFragLib(const OEMakeFragLib&)

Default and copy constructors. The default constructor instantiates the class with OEFragBuilderOptions with the OEFragBuilderMode_Strict mode.


OEMakeFragLib &operator=(const OEMakeFragLib&)

Assignment operator.


void AddFrag(const OEChem::OEMCMolBase&)

Adds the specified fragment to the currently loaded fragment library.

See also


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

Adds a fragment 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 fragment library does not load until either OEMakeFragLib.GetMissingFrags or OEMakeFragLib.GenerateMissingFrags 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


void ClearFragLibs()

Clears all fragment libraries from the builder.

See also


void GenerateMissingFrags(OEChem::oemolistream& , OEChem::oemolostream&) const
void GenerateMissingFrags(const OEChem::OEMolBase&, OEChem::oemolostream&) const

Finds the missing fragments corresponding to the given input file stream or molecule, generates 3D structures of the fragments and adds those to the output file stream.


const OEMolPotential::OEForceField& GetForceField() const

See SetForceField method.


OESystem::OEIterBase<OEChem::OEMCMolBase>* GetMissingFrags(OEChem::oemolistream&) const
OESystem::OEIterBase<OEChem::OEMCMolBase>* GetMissingFrags(const OEChem::OEMolBase&) const

Finds the missing fragments corresponding to the given input file stream or molecule, and returns a collection of the fragments. This method does not generate 3D structures of the fragments.


void SetForceField(OEMolPotential::OEForceField&)

Sets the forcefield for building the fragment coordinates, when the fragment is not available in the fragments library.

Default: OEMMFFSheffield with OEMMFFSheffieldFFType_MMFF94Smod_NOESTAT mode.

See also