mooonpy.molspace.topology module
- ..note:: the keys usef for all of these classes use the ordering rules below,
- so only 1 permutation is saved or searched for, and the original order is saved in the ‘ordered’ attribute,
Bonds: key = (id1, id2) # id1 < id2
Angles: key = (id1, id2, id3) # id1 < id3
Dihedrals: key = (id1, id2, id3, id4) # id1 < id4
Impropers: key = (id1, id2, id3, id4) # id1 < id3 < id4 # center atom is always id2, sort others
..TODO:: methods for safe lookup and __set__ with autocorrected order - 7-Jul-25
- class mooonpy.molspace.topology.Angles(**kwargs)[source]
Bases:
dict- copy(deepcopy=False)[source]
Return a fully independent copy of this topology container (independence verified in
tests/test_molspace_copy.py).The factory class and defaults are frozen, so the copy references the SAME factory instance by design; value objects are rebuilt fresh.
- Parameters:
deepcopy – if True, use the
copy.deepcopyfallback (same result, ~7-8x slower; for cross-checking only).
- class mooonpy.molspace.topology.Bonds(**kwargs)[source]
Bases:
dict- copy(deepcopy=False)[source]
Return a fully independent copy of this topology container (independence verified in
tests/test_molspace_copy.py).The factory class and defaults are frozen, so the copy references the SAME factory instance by design; value objects are rebuilt fresh.
- Parameters:
deepcopy – if True, use the
copy.deepcopyfallback (same result, ~7-8x slower; for cross-checking only).
- class mooonpy.molspace.topology.Dihedrals(**kwargs)[source]
Bases:
dict- copy(deepcopy=False)[source]
Return a fully independent copy of this topology container (independence verified in
tests/test_molspace_copy.py).The factory class and defaults are frozen, so the copy references the SAME factory instance by design; value objects are rebuilt fresh.
- Parameters:
deepcopy – if True, use the
copy.deepcopyfallback (same result, ~7-8x slower; for cross-checking only).
- class mooonpy.molspace.topology.Impropers(**kwargs)[source]
Bases:
dict- copy(deepcopy=False)[source]
Return a fully independent copy of this topology container (independence verified in
tests/test_molspace_copy.py).The factory class and defaults are frozen, so the copy references the SAME factory instance by design; value objects are rebuilt fresh.
- Parameters:
deepcopy – if True, use the
copy.deepcopyfallback (same result, ~7-8x slower; for cross-checking only).