From 9c10f9da2a75dbc713144ec3c4d0115bf02fa1b4 Mon Sep 17 00:00:00 2001 From: Marco Biasini <marco.biasini@unibas.ch> Date: Fri, 15 Jun 2012 10:56:46 +0200 Subject: [PATCH] document how to switch to heuristic builder fixes BZDNG-375 --- modules/conop/doc/connectivity.rst | 12 ++++++++++++ modules/conop/pymod/__init__.py | 7 ++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/modules/conop/doc/connectivity.rst b/modules/conop/doc/connectivity.rst index 9b56d6566..98270b1af 100644 --- a/modules/conop/doc/connectivity.rst +++ b/modules/conop/doc/connectivity.rst @@ -258,3 +258,15 @@ The RuleBasedBuilder class :rtype: list of :class:`~ost.mol.AtomHandle` instances +Changing the default builder +--------------------------------------------------------------------------------- + +The default builder can be specified with :func:`SetDefaultBuilder`. Before being +able to set a builder, it needs to be registered with :func:`RegisterBuilder`. +By default, there is always a builder called "HEURISTIC" registered. If, for some +reason your are currently using the :class:`RuleBasedBuilder` and you would like +to switch to that builder, call + +.. code-block:: python + + conop.SetDefaultBuilder("HEURISTIC") diff --git a/modules/conop/pymod/__init__.py b/modules/conop/pymod/__init__.py index a534ea808..a24f5d2ec 100644 --- a/modules/conop/pymod/__init__.py +++ b/modules/conop/pymod/__init__.py @@ -64,7 +64,12 @@ def RegisterBuilder(builder, name): def SetDefaultBuilder(builder_name): ''' - Set the builder with the given name as the default. + Set the builder with the given name as the default. You will have to register + a builder with :func:`RegisterBuilder` before you will be able to set it as + the default. + + :raises: :exc:`RuntimeError` when trying to set a builder as the default that + has not been registered yet. ''' conop_inst=Conopology.Instance() conop_inst.SetDefaultBuilder(builder_name) -- GitLab