Commit 803f652a authored by cmaffeo2's avatar cmaffeo2
Browse files

Distance between beads is now calculated more accurately

parent f45ec3be
......@@ -2285,8 +2285,10 @@ class SegmentModel(ArbdModel):
parent = self._getParent(b1,b2)
## TODO: could be sligtly smarter about sep
sep = 0.5*(b1.num_nt+b2.num_nt)
seg = b2.parent
c0 = b2.contour_position
sep = np.abs(b1.get_nt_position(seg,c0)-b2.get_nt_position(seg))
is_dsdna = b1.type_.name[0] == "D" and b2.type_.name[0] == "D"
if is_dsdna:
......@@ -2348,9 +2350,11 @@ class SegmentModel(ArbdModel):
if self.DEBUG: print("Adding intrahelical angle potentials")
for b1,b2,b3 in self._get_intrahelical_angle_beads():
## TODO: could be slightly smarter about sep
sep = 0.5*(0.5*b1.num_nt+b2.num_nt+0.5*b3.num_nt)
parent = self._getParent(b1,b2,b3)
seg = b2.parent
c0 = b2.contour_position
sep = np.abs(b1.get_nt_position(seg,c0)-b2.get_nt_position(seg)) + np.abs(b3.get_nt_position(seg,c0)-b2.get_nt_position(seg))
if b1.type_.name[0] == "D" and b2.type_.name[0] == "D" and b3.type_.name[0] == "D":
......
Markdown is supported
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