Skip to content

Constructor Arguments

Jordan Matelsky edited this page Jan 20, 2021 · 3 revisions

The simplest way to create a motif is to pass a motif-syntax string to the dotmotif.Motif constructor:

from dotmotif import Motif

m = Motif("""

A -> B
B -> C
C -> A
""")

You can also pass additional keyword arguments to this constructor to achieve different results:

Argument Type, Default Behavior
enforce_inequality bool: False Enforce inequality; in other words, whether two nodes should be permitted to be aliases for the same node.
exclude_automorphisms bool: False Automatically ignore automorphisms when returning results. To learn more, read here.
ignore_direction bool: False Disregard direction when generating the database query
limit int: None A limit (if any) to impose on the quantity of query results.
parser dotmotif.parser.Parser If specified, which Motif parser to use. Defaults to the latest version.
pretty_print bool: True Deprecated. If outputs from this motif query should be printed in a human-readable format.
validators List of dotmotif.Validator A list of validators to use to verify the motif at compilation and optimization time.
Clone this wiki locally