-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,18 @@ | ||
Processor | ||
========= | ||
:class:`Processors <vermouth.processors.processor.Processor>` are relatively | ||
simple. They form the fundamental steps of the martinize2 pipeline. Processors | ||
are called via their :meth:`~vermouth.processors.processor.Processor.run_system` | ||
method. The default implementation of this method iterates over the molecules | ||
in the system, and runs the :meth:`~vermouth.processors.processor.Processor.run_molecule` | ||
method on them. This means that implementations of Processors must implement | ||
either a ``run_system`` method, or a ``run_molecule`` method. If the processor | ||
can be run on independent molecules the ``run_molecule`` method is preferred; | ||
``run_system`` should be used only for cases where the problem at hand cannot | ||
be separated in tasks-per-molecule. | ||
|
||
In their ``run_molecule`` method Processor implementations are free to either | ||
modify :class:`molecules <vermouth.molecule.Molecule>` or create new ones. | ||
Either way, they must return a :class:`~vermouth.molecule.Molecule`. The | ||
``run_system`` will be called with a :class:`~vermouth.system.System`, which | ||
will be modified in place. |