Skip to content

div_distance_adv

esta.general.div_distance_adv

distances_list(dlist, ndiv=6, lslow=False, slow_idx=None, initial_pt_skip=True)

given list of distances between atoms-pairs such as
l =[ [3.4, 1.5], [1.1, 2.0], [3.9, 1.2] ]
i.e. [[initial-dist, final-distance], [initial,final], [initial-dist, final-dist]] for atm1-atm2 pair, atm3-atm4-pair, atm5-atm6-pair ... so on!

generate a list containing intermediate distances among the set of atoms

therefore: output:

if initial pt in removed in each list: NEEDED this one** [ [3.083, 2.767, 2.45, 2.133, 1.817, 1.5], [1.25, 1.4, 1.55, 1.7, 1.85, 2.0], [3.45, 3.0, 2.55, 2.1, 1.65, 1.2] ]

if initial pt is not removed in each list:
[ [3.4, 3.083, 2.767, 2.45, 2.133, 1.817, 1.5], [1.1, 1.25, 1.4, 1.55, 1.7, 1.85, 2.0], [3.9, 3.45, 3.0, 2.55, 2.1, 1.65, 1.2] ]

generate_parabolic_fit(x, y, curvature=0.04)

General function to create a parabolic variation for any n points. Preserves x[0], y[0] and x[-1], y[-1] exactly.