.. include:: ../../toolkit-substitutions

.. oe:namespace:: OEConfGen

.. meta::
   :keywords: OEFragBuilderOptions, FragBuilderOptions


.. _OEConfGen_OEFragBuilderOptions:

.. oe:class:: OEFragBuilderOptions

   .. oe:api::

      class OEFragBuilderOptions : public OESystem::OEOptions

   This class provides an interface to set up options required for generating
   fragment coordinates for different types of fragments.
   A fragment is a building block that is used for initial
   3D structure generation of molecules.

   .. seealso::

      * :ref:`OEMolBuilderOptions <OEConfGen_OEMolBuilderOptions>` class
      * :ref:`OEFragOptions <OEConfGen_OEFragOptions>` class
      * :ref:`OERingFragOptions <OEConfGen_OERingFragOptions>` class

   .. admonition:: Code Examples

      * :ref:`section_examples_make_fraglib` example

   The :ref:`OEFragBuilderOptions <OEConfGen_OEFragBuilderOptions>` class defines the following public methods:
    * :oe:meth:`GetForceField<OEConfGen::OETorDriveOptions::GetForceField>` and
      :oe:meth:`SetForceField<OEConfGen::OETorDriveOptions::SetForceField>`
    * :oe:meth:`GetMacroCycOptions<OEConfGen::OEFragBuilderOptions::GetMacroCycOptions>` and
      :oe:meth:`SetMacroCycOptions<OEConfGen::OEFragBuilderOptions::SetMacroCycOptions>`
    * :oe:meth:`GetNonRingOptions<OEConfGen::OEFragBuilderOptions::GetNonRingOptions>` and
      :oe:meth:`SetNonRingOptions<OEConfGen::OEFragBuilderOptions::SetNonRingOptions>`
    * :oe:meth:`GetRingOptions<OEConfGen::OEFragBuilderOptions::GetRingOptions>` and
      :oe:meth:`SetRingOptions<OEConfGen::OEFragBuilderOptions::SetRingOptions>`

   .. oe:method:: Constructors

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

         .. oe:api::

            OEFragBuilderOptions(const unsigned int mode = OEFragBuilderMode::Default)

      .. oe:language:: python

         .. oe:api:: python

            OEFragBuilderOptions(argMode: int) -> OEFragBuilderOptions

      The `mode` parameter defines the fragment build modes from the
      :oe:constns:`OEConfGen::OEFragBuilderMode` namespace.
      Default: :oe:const:`OEConfGen::OEFragBuilderMode::Default`

      .. seealso::

         * :oe:constns:`OEConfGen::OEFragBuilderMode` namespace

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

         .. oe:api::

            OEFragBuilderOptions(const OEFragBuilderOptions &)

      .. oe:language:: python

         .. oe:api:: python

            OEFragBuilderOptions(arg2: OEFragBuilderOptions) -> OEFragBuilderOptions

      Copy constructor.

   .. oe:method:: operator=
      :language: c++

      .. oe:api::

         OEFragBuilderOptions &operator=(const OEFragBuilderOptions &)

      Assignment operator.

   .. _OEConfGen_OEFragBuilderOptions_GetForceField:

   .. oe:method:: GetForceField

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

         .. oe:api::

            unsigned GetForceFieldType() const

      .. oe:language:: python

         .. oe:api:: python

            GetForceField() -> OEForceField

      See the :oe:meth:`SetForceField<OEConfGen::OETorDriveOptions::SetForceField>` method.

   .. _OEConfGen_OEFragBuilderOptions_GetMacroCycOptions:

   .. oe:method:: GetMacroCycOptions

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

         .. oe:api::

            OEFragOptions& GetMacroCycOptions()
            const OEFragOptions& GetMacroCycOptions() const

      .. oe:language:: python

         .. oe:api:: python

            GetMacroCycOptions() -> OEFragOptions

      See the :oe:meth:`SetMacroCycOptions<OEConfGen::OEFragBuilderOptions::SetMacroCycOptions>` method.


   .. _OEConfGen_OEFragBuilderOptions_GetNonRingOptions:


   .. oe:method:: GetNonRingOptions

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

         .. oe:api::

            OEFragOptions& GetNonRingOptions()
            const OEFragOptions& GetNonRingOptions() const

      .. oe:language:: python

         .. oe:api:: python

            GetNonRingOptions() -> OEFragOptions

      See the :oe:meth:`SetNonRingOptions<OEConfGen::OEFragBuilderOptions::SetNonRingOptions>` method.


   .. _OEConfGen_OEFragBuilderOptions_GetRingOptions:


   .. oe:method:: GetRingOptions

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

         .. oe:api::

            OERingFragOptions& GetRingOptions()
            const OERingFragOptions& GetRingOptions() const

      .. oe:language:: python

         .. oe:api:: python

            GetRingOptions() -> OERingFragOptions

      See the :oe:meth:`SetRingOptions<OEConfGen::OEFragBuilderOptions::SetRingOptions>` method.


   .. _OEConfGen_OEFragBuilderOptions_SetForceField:

   .. oe:method:: SetForceField

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

         .. oe:api::

            bool SetForceField(const unsigned)
            bool SetForceField(const std::string&)

      .. oe:language:: python

         .. oe:api:: python

            SetForceField(value: int) -> bool
            SetForceField(value: str) -> bool
            SetForceField(value: oeistream) -> bool
            SetForceField(value: OEForceField) -> bool

      Sets the **force field** used for torsion driving. The first overload takes an *unsigned*
      from the :oe:constns:`OEFF::OEMMFFSheffieldFFType` namespace, and the second overload
      takes corresponding string values. Method returns *false* when the invalid selection
      is chosen, *true* otherwise.
      Default: :oe:const:`OEFF::OEMMFFSheffieldFFType::MMFF_NOESTAT`

   .. _OEConfGen_OEFragBuilderOptions_SetMacroCycOptions:

   .. oe:method:: SetMacroCycOptions

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

         .. oe:api::

            void SetMacroCycOptions(const OEFragOptions&)

      .. oe:language:: python

         .. oe:api:: python

            SetMacroCycOptions(opts: OEFragOptions) -> None

      Sets :oe:cls:`options <OEConfGen::OEFragOptions>` related to building macrocycle fragments.

      .. seealso::

         * :ref:`OEFragOptions <OEConfGen_OEFragOptions>` class

   .. _OEConfGen_OEFragBuilderOptions_SetNonRingOptions:

   .. oe:method:: SetNonRingOptions

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

         .. oe:api::

            void SetNonRingOptions(const OEFragOptions&)

      .. oe:language:: python

         .. oe:api:: python

            SetNonRingOptions(opts: OEFragOptions) -> None

      Sets :oe:cls:`options <OEConfGen::OEFragOptions>` related to building general fragments
      that are not rings.

      .. seealso::

         * :ref:`OEFragOptions <OEConfGen_OEFragOptions>` class

   .. oe:method:: SetRingOptions

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

         .. oe:api::

            void SetRingOptions(const OERingFragOptions&)

      .. oe:language:: python

         .. oe:api:: python

            SetRingOptions(opts: OERingFragOptions) -> None

      Sets :oe:cls:`options <OEConfGen::OERingFragOptions>` related to building ring fragments.

      .. seealso::

         * :ref:`OERingFragOptions <OEConfGen_OERingFragOptions>` class
