vermouth.processors.stash_attributes module
Provides a processor that stores attributes
-
class vermouth.processors.stash_attributes.StashAttributes(attributes=(), stash_name='stash')[source]
Bases: Processor
Processor for storing current attributes of a node in a new “stash” attribute
- attributes: tuple[str]
Attributes to be stashed for later use.
- stash_name: str
Name of top level node dictionary in which to store existing attributes
-
run_molecule(molecule)[source]
-
run_system(system)[source]
-
vermouth.processors.stash_attributes.stash_attributes(molecule, attributes, stash_name='stash')[source]
For each node in molecule, add the attributes to a stash dictionary
- Parameters:
molecule (Molecule) – The molecule to transform.
attributes (tuple[str]) – Attributes to store in the nodes that may otherwise be modified
stash_name (str) – Name of top level node dictionary to store attributes to