vermouth.processors.attach_mass module¶
Provides a processor that assigns a mass attribute to every node in a molecule based on it’s element.
- vermouth.processors.attach_mass.attach_mass(molecule, attribute='mass')[source]¶
For every atom in molecule look up it’s element in
ATOM_MASSES
, and assign that value to attribute.- Parameters:
molecule (networkx.Graph) – The molecule to process. Is modified in-place.
attribute (collections.abc.Hashable) – The attribute the mass is assigned to.