stk.MoleculeMutator

class stk.MoleculeMutator(*args, **kwargs)[source]

Bases: Protocol[T]

Performs mutation operations.

Examples

Implementation mutation operations

You only need to implement mutate(). The source code of any of the classes listed in mutator can serve as good examples.

Methods

mutate

Return a mutant of record.

mutate(record)[source]

Return a mutant of record.

Parameters:

record (T) – The molecule to be mutated.

Returns:

A record of the mutation or None if record cannot be mutated.

Return type:

MutationRecord[T] | None