Réimplémentation du programme DSSP en Python

atom.py 594B

1234567891011121314151617181920
  1. class Atom:
  2. def __init__(self, atom_id, atom_name, res_name, chain_id,
  3. res_seq_nb, coordinates):
  4. self.atom_id = atom_id
  5. self.atom_name = atom_name
  6. self.res_name = res_name
  7. self.chain_id = chain_id
  8. self.res_seq_nb = res_seq_nb
  9. self.coord_x = coordinates[0]
  10. self.coord_y = coordinates[1]
  11. self.coord_z = coordinates[2]
  12. class Residue:
  13. def __init__(self, atoms_list):
  14. self.atoms = {}
  15. for atom in atoms_list:
  16. self.atoms[atom.atom_name] = atom