Commit 80f9a1c5 authored by cmaffeo2's avatar cmaffeo2
Browse files

Fixed issue affecting systems with long polymers where update_splines...

Fixed issue affecting systems with long polymers where update_splines previously used float16 to obtain unique beads; now rounding to nearest 1/10th nt
parent 9620a049
......@@ -1811,12 +1811,10 @@ class SegmentModel(ArbdModel):
beads_contours = get_beads_and_contour_positions(s)
contours = [c for b,c in beads_contours]
contours = np.array(contours, dtype=np.float16) # deliberately use low precision
contours,ids1 = np.unique(contours, return_index=True)
contour_idx = np.array( np.array(contours)*s.num_nt * 10, dtype=np.int )
contour_idx,ids1 = np.unique(contour_idx, return_index=True)
beads_contours = [beads_contours[i] for i in ids1]
assert( np.any( (contours[:-1] - contours[1:])**2 >= 1e-8 ) )
## TODO: keep closest beads beyond +-1.5 if there are fewer than 2 beads
tmp = []
dist = 1
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment