From 4cd628fa50fd073a253aeaec85f485e2c5e0c5dd Mon Sep 17 00:00:00 2001 From: Thomas Forest Date: Sun, 15 Sep 2019 14:47:21 +0200 Subject: [PATCH] Corrected get_bridges func --- src/structure.py | 93 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 70 insertions(+), 23 deletions(-) diff --git a/src/structure.py b/src/structure.py index 7cf5a7c..45f11ef 100644 --- a/src/structure.py +++ b/src/structure.py @@ -1,13 +1,14 @@ class Turn: - def __init__(self, turn_type): + def __init__(self, turn_type, res_num): self.turn_type = turn_type class Bridge: - def __init__(self, bridge_type): + def __init__(self, bridge_type, res_num): self.bridge_type = bridge_type + self.res_num = res_num class Helix: @@ -20,11 +21,13 @@ def get_turns(residues): for j in range(3,6): if(i+j0): + return(bridges) + else: + return(False) -def get_helix(turns): - pass +def get_helix(residues, turns): + for i in range(residues): + for j in range(i+1,i+5): + if