Réimplémentation du programme DSSP en Python

structure.py 778B

1234567891011121314151617181920212223242526272829303132
  1. import math
  2. import numpy as np
  3. from geom import *
  4. class Structure:
  5. def __init__(self, res):
  6. self.res = res
  7. class Turn(Structure):
  8. def __init__(self, turn_type, res):
  9. self.turn_type = turn_type
  10. Structure.res = res
  11. class Bridge(Structure):
  12. def __init__(self, bridge_type, res_num, res_partner, indices):
  13. self.bridge_type = bridge_type
  14. self.res_num = res_num
  15. self.res_partner = res_partner
  16. Structure.res = res_num
  17. self.i = indices[0]
  18. self.j = indices[1]
  19. class Helix(Structure):
  20. def __init__(self, residues, res_num, helix_type):
  21. self.residues = residues
  22. self.res_num = res_num
  23. Structure.res = res_num
  24. self.helix_type = helix_type