# Expanding Entry Graphs ## Exploring Entry Graphs When entry graphs are created, they contain only the initial entries given when they were created. To expand the graph, the database needs to be explored. This is done by using the `explore` function. ```{eval-rst} .. autofunction:: chemrecon.explore ``` For many use cases, calling `explore` once is enough, but specialized workflows may require calling multiple times, performing one step of exploration at a time until some condition is met, or applying different exploration protocols in sequence. ## Exploration Protocols An {class}`.ExplorationProtocol` defines a method for expanding the entry graph by traversing the database. It defines the relations and entries which can be traversed and possibly applies filters to limit the scope of exploration. ## Pre-defined Exploration Protocols ```{eval-rst} .. automodule:: chemrecon.query.default_protocols ``` ## Defining Custom Exploration Protocols Arbitary protocols are defined by specifying the relation types which can be traversed, and optionally applying filters to entries and relations: ```{eval-rst} .. autoclass:: chemrecon.ExplorationProtocol :special-members: __init__ ``` The `Direction` enum specifies the allowed directions: ```{eval-rst} .. autoclass:: chemrecon.Direction ```