molfoundry.ruleGMLString#

molfoundry.ruleGMLString(gml, name=None, invert=False, add=True)#

Build a Rule from a GML string.

Parameters:
  • gml (str) – The GML string to parse.

  • name (str | None) – Human-readable name for the resulting rule, or None to leave it unnamed.

  • invert (bool) – When True, invert the rule after loading.

  • add (bool) – When True (the default), also register the rule in the global inputRules collection.

Returns:

The parsed rule.

Return type:

Rule