# rmgpy.data.base.LogicNode¶

class rmgpy.data.base.LogicNode(items, invert)

A base class for AND and OR logic nodes.

class rmgpy.data.base.LogicAnd(items, invert)

A logical AND node. Structure must match all components.

matchToStructure(database, structure, atoms, strict=False)

Does this node in the given database match the given structure with the labeled atoms?

Setting strict to True makes enforces matching of atomLabels in the structure to every atomLabel in the node.

class rmgpy.data.base.LogicOr(items, invert)

A logical OR node. Structure can match any component.

Initialize with a list of component items and a boolean instruction to invert the answer.

getPossibleStructures(entries)

Return a list of the possible structures below this node.

matchLogicOr(other)

Is other the same LogicOr group as self?

matchToStructure(database, structure, atoms, strict=False)

Does this node in the given database match the given structure with the labeled atoms?

Setting strict to True makes enforces matching of atomLabels in the structure to every atomLabel in the node.

rmgpy.data.base.makeLogicNode(string)

Creates and returns a node in the tree which is a logic node.

String should be of the form:

• OR{}
• AND{}
• NOT OR{}
• NOT AND{}

And the returned object will be of class LogicOr or LogicAnd