@@ -2314,7 +2314,8 @@ def get_seq_start_idx(self) -> int:
23142314
23152315@dataclass
23162316class Extension (_JSONSerializable , Generic [DomainLabel ]):
2317- """Represents a single-stranded extension on either the 3' or 5'
2317+ # using raw string literal for docstring to avoid warning about backslash
2318+ r"""Represents a single-stranded extension on either the 3' or 5'
23182319 end of :any:`Strand`.
23192320
23202321 One could think of an :any:`Extension` as a type of :any:`Domain`, but none of the fields of
@@ -5235,9 +5236,12 @@ def _num_helix_groups(json_map: Dict) -> int:
52355236 return num_groups_used
52365237
52375238 @staticmethod
5238- def _helices_from_json (json_map : Dict ) -> Tuple [List [Helix ],
5239- Dict [str , Tuple [float , float , int ]],
5240- Dict [Tuple [float , float ], List [Helix ]]]:
5239+ def _helices_from_json (json_map : Dict ) \
5240+ -> Tuple [
5241+ List [Helix ],
5242+ Dict [str , Tuple [float , float , int ]],
5243+ Dict [Tuple [float , float ], List [Helix ]],
5244+ ]:
52415245 """Returns list of helices as well as two maps, group_to_pitch_yaw, and pitch_yaw_to_helices
52425246
52435247 group_to_pitch_yaw is filled if multiple helix groups are used
@@ -5395,9 +5399,12 @@ def _groups_and_grid_from_json(json_map: dict, helices: List[Helix],
53955399 return groups , grid
53965400
53975401 @staticmethod
5398- def _helices_and_groups_and_grid_from_json (json_map : Dict ) -> Tuple [List [Helix ],
5399- Dict [str , HelixGroup ],
5400- Grid ]:
5402+ def _helices_and_groups_and_grid_from_json (json_map : Dict ) \
5403+ -> Tuple [
5404+ List [Helix ],
5405+ Dict [str , HelixGroup ],
5406+ Grid ,
5407+ ]:
54015408 helices , group_to_pitch_yaw , pitch_yaw_to_helices = Design ._helices_from_json (json_map )
54025409 groups , grid = Design ._groups_and_grid_from_json (json_map , helices , group_to_pitch_yaw ,
54035410 pitch_yaw_to_helices )
@@ -8649,10 +8656,10 @@ def _convert_design_to_oxdna_system(design: Design) -> _OxdnaSystem:
86498656 # we have to check insertions first because they affect the index
86508657 if offset in insertions :
86518658 num = insertions [offset ]
8652- for i in range (num ):
8659+ for j in range (num ):
86538660 cen = origin_ + forward * (
8654- offset + mod - num + i ) * geometry .rise_per_base_pair * NM_TO_OX_UNITS
8655- norm = normal .rotate (step_rot * (offset + mod - num + i ), forward )
8661+ offset + mod - num + j ) * geometry .rise_per_base_pair * NM_TO_OX_UNITS
8662+ norm = normal .rotate (step_rot * (offset + mod - num + j ), forward )
86568663 # note oxDNA n vector points 3' to 5' opposite of scadnano forward vector
86578664 forw = - forward if domain .forward else forward
86588665 nuc = _OxdnaNucleotide (cen , norm , forw , seq [index ])
@@ -8678,7 +8685,7 @@ def _convert_design_to_oxdna_system(design: Design) -> _OxdnaSystem:
86788685 elif isinstance (domain , Loopout ):
86798686 # we place the loopout nucleotides at temporary nonsense positions and orientations
86808687 # these will be updated later, for now we just need the base
8681- for i in range (domain .length ):
8688+ for _ in range (domain .length ):
86828689 base = seq [i ]
86838690 center = _OxdnaVector ()
86848691 normal = _OxdnaVector (0 , - 1 , 0 )
0 commit comments