OESubsetDesignUnitΒΆ

Attention

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.

bool OESubsetDesignUnit(OEDesignUnit &du, const OEDesignUnit &refDu,
                        const unsigned componentMask)

This function generates a fully-functional OEDesignUnit object (du) as subset of another OEDesignUnit (refDu) object. An additional bit mask (componentMask) is required to specify which components should be extracted as the subset. The bit mask should be specified from constants in the OEDesignUnitComponents namespace.

See also

Examples

The example below demonstrate how to use OESubsetDesignUnit to subset an existing OEDesignUnit object.

ligProtDU = oechem.OEDesignUnit()
components = oechem.OEDesignUnitComponents_Protein | oechem.OEDesignUnitComponents_Ligand
if not oechem.OESubsetDesignUnit(ligProtDU, du, components):
    oechem.OEThrow.Fatal("Error: Could create a subset of the reference OEDesignUnit.")