OEUpdateDesignUnitΒΆ

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 OEUpdateDesignUnit(OEDesignUnit &du,
                        const OEChem::OEMolBase &mol,
                        const unsigned componentId)

This function updates an existing OEDesignUnit object (du) by setting the component given by componentId with the input molecule (mol). The component ID should be specified from constants in the OEDesignUnitComponents namespace.

See also

Examples

The example below demonstrate how to use OEUpdateDesignUnit to update an existing OEDesignUnit object.

du = oechem.OEDesignUnit()
if not oechem.OEUpdateDesignUnit(du, protein, oechem.OEDesignUnitComponents_Protein):
    oechem.OEThrow.Fatal("Error: Could not add the protein to the OEDesignUnit.")