xnn.ffnn.models.ffield.dedup_torsion_types#

xnn.ffnn.models.ffield.dedup_torsion_types(torp)[source]#

Drop torsion types that are reversed spellings of an earlier entry.

A torsion i-j-k-l is the same type as l-k-j-i (the full reversal). Swapping only the two central atoms (i-k-j-l) is not an equivalence – it changes the central bond – and published fields list such pairs (C-O-C-H and H-O-C-C) with different parameters, so both are kept.

Parameters:

torp (list[str]) – Torsion type names, possibly containing duplicates.

Returns:

The deduplicated list (order preserved).

Return type:

list[str]