model.ts 930 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /**
  2. * Copyright (c) 2017 molio contributors, licensed under MIT, See LICENSE file for more info.
  3. *
  4. * @author David Sehnal <david.sehnal@gmail.com>
  5. */
  6. import * as Formats from './model/formats'
  7. import MacromoleculeData from './model/data/macromolecule'
  8. import ConformationData from './model/data/conformation'
  9. import Segmentation from '../mol-base/collections/integer/segmentation'
  10. /**
  11. * Interface to the "source data" of the molecule.
  12. *
  13. * "Atoms" are integers in the range [0, atomCount).
  14. */
  15. interface Model extends Readonly<{
  16. id: string,
  17. model_num: number,
  18. sourceData: Formats.RawData,
  19. macromolecule: MacromoleculeData,
  20. conformation: ConformationData,
  21. // used for diffing.
  22. version: {
  23. data: number,
  24. conformation: number
  25. },
  26. atomCount: number,
  27. segments: Readonly<{
  28. chains: Segmentation,
  29. residues: Segmentation
  30. }>
  31. }> { }
  32. export default Model