.. # split from OEDockingFunctions.rst:1247


.. oe:namespace:: OEDocking

.. meta::
   :keywords: OESetEnergyScoreComponent

.. oe:function:: OESetEnergyScoreComponent

   .. oe:language:: c++ java csharp

      .. oe:api::

         bool OESetEnergyScoreComponent(OEChem::OEMolBase& pose, OEDock& dock,
                                        std::string component)

   .. oe:language:: python

      .. oe:api:: python

         OESetEnergyScoreComponent(ligand: Union[OEGraphMol,OEMol,OEQMol],
                                   scoreFxn: OEDock, component: str) -> bool

   Sets the energy of *pose* (:oe:meth:`OEChem::OEMolBase::GetEnergy`) to the 
   *component* of the score calculated with *dock's* 
   :oe:meth:`OEDocking::OEDock::ScoreLigandComponent` method. 

   .. oe:language:: c++ java csharp

      .. oe:api::

         bool OESetEnergyScoreComponent(OEChem::OEMolBase& pose,
                                        OEScore& score, std::string component)

   .. oe:language:: python

      .. oe:api:: python

         OESetEnergyScoreComponent(ligand: Union[OEGraphMol,OEMol,OEQMol],
                                   scoreFxn: OEScore, component: str) -> bool

   Sets the energy of *pose* (:oe:meth:`OEChem::OEMolBase::GetEnergy`) to the 
   *component* of the score calculated with *score's* 
   :oe:meth:`OEDocking::OEScore::ScoreLigandComponent` method. 

   .. oe:language:: c++ java csharp

      .. oe:api::

         bool OESetEnergyScoreComponent(OEChem::OEMCMolBase& pose,
                                        OEDock& dock, std::string component,
                                        bool sortPoses = false)

   .. oe:language:: python

      .. oe:api:: python

         OESetEnergyScoreComponent(ligand: OEMol, scoreFxn: OEDock,
                                   component: str, sortPoses: bool = False) -> bool

   Sets the energy of each pose of *poses* (:oe:meth:`OEChem::OEMolBase::GetEnergy`)
   to the *component* of the score calculate with *dock's* 
   :oe:meth:`OEDocking::OEDock::ScoreLigandComponent` method. 

   If *sortPoses* is true the poses will also be sorted by score.

   .. oe:language:: c++ java csharp

      .. oe:api::

         bool OESetEnergyScoreComponent(OEChem::OEMCMolBase& pose,
                                        OEScore& score, std::string component,
                                        bool sortPoses = false)

   .. oe:language:: python

      .. oe:api:: python

         OESetEnergyScoreComponent(ligand: OEMol, scoreFxn: OEScore,
                                   component: str, sortPoses: bool = False) -> bool

   Sets the energy of each pose of *poses* (:oe:meth:`OEChem::OEMolBase::GetEnergy`)
   to the *component* of the score calculated with *score's* 
   :oe:meth:`OEDocking::OEScore::ScoreLigandComponent` method. 

   If *sortPoses* is true the poses will also be sorted by score.

