seconday-structure.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /**
  2. * Copyright (c) 2017 mol* contributors, licensed under MIT, See LICENSE file for more info.
  3. *
  4. * @author David Sehnal <david.sehnal@gmail.com>
  5. */
  6. import { SecondaryStructureType } from '../types';
  7. /** Secondary structure "indexed" by residues. */
  8. interface SecondaryStructure {
  9. readonly type: ArrayLike<SecondaryStructureType>,
  10. /** index into the elements array */
  11. readonly key: ArrayLike<number>,
  12. /** indexed by key */
  13. readonly elements: ReadonlyArray<SecondaryStructure.Element>,
  14. /** string representation of DSSP annotation */
  15. readonly dsspString: String
  16. }
  17. namespace SecondaryStructure {
  18. export type Element = None | Turn | Helix | Sheet
  19. export interface None {
  20. kind: 'none'
  21. }
  22. export interface Turn {
  23. kind: 'turn',
  24. flags: SecondaryStructureType
  25. }
  26. export interface Helix {
  27. kind: 'helix',
  28. flags: SecondaryStructureType,
  29. type_id: string, // TODO: use aliased type?
  30. helix_class: string,
  31. details?: string
  32. }
  33. export interface Sheet {
  34. kind: 'sheet',
  35. flags: SecondaryStructureType,
  36. sheet_id: string,
  37. symmetry?: string
  38. }
  39. }
  40. export { SecondaryStructure }