data.ts 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /**
  2. * Copyright (c) 2019 mol* contributors, licensed under MIT, See LICENSE file for more info.
  3. *
  4. * @author Alexander Rose <alexander.rose@weirdbyte.de>
  5. */
  6. import { Vec3, Quat } from '../../mol-math/linear-algebra';
  7. export interface CellPack {
  8. cell: Cell
  9. packings: CellPacking[]
  10. }
  11. export interface CellPacking {
  12. name: string,
  13. location: 'surface' | 'interior' | 'cytoplasme'
  14. ingredients: Packing['ingredients']
  15. compartment?: CellCompartment
  16. }
  17. export interface CellCompartment {
  18. filename?: string
  19. geom_type?: 'raw' | 'file' | 'sphere' | 'mb' | 'None'
  20. compartment_primitives?: CompartmentPrimitives
  21. }
  22. export interface Cell {
  23. recipe: Recipe
  24. options?: RecipeOptions
  25. cytoplasme?: Packing
  26. compartments?: { [key: string]: Compartment }
  27. mapping_ids?: { [key: number]: [number, string] }
  28. }
  29. export interface RecipeOptions {
  30. resultfile?: string
  31. }
  32. export interface Recipe {
  33. setupfile: string
  34. paths: [string, string][] // [name: string, path: string][]
  35. version: string
  36. name: string
  37. }
  38. export interface Compartment {
  39. surface?: Packing
  40. interior?: Packing
  41. geom?: unknown
  42. geom_type?: 'raw' | 'file' | 'sphere' | 'mb' | 'None'
  43. mb?: CompartmentPrimitives
  44. }
  45. // Primitives discribing a compartment
  46. export enum CompartmentPrimitiveType {
  47. MetaBall = 0,
  48. Sphere = 1,
  49. Cube = 2,
  50. Cylinder = 3,
  51. Cone = 4,
  52. Plane = 5,
  53. None = 6
  54. }
  55. export interface CompartmentPrimitives{
  56. positions?: number[];
  57. radii?: number[];
  58. types?: CompartmentPrimitiveType[];
  59. }
  60. export interface Packing {
  61. ingredients: { [key: string]: Ingredient }
  62. }
  63. export interface Positions {
  64. coords?: Vec3[];
  65. }
  66. export interface Radii {
  67. radii?: number[];
  68. }
  69. export interface Ingredient {
  70. source: IngredientSource;
  71. results: [Vec3, Quat][];
  72. name: string;
  73. /** Vec3[]];CoarseGraind Beads coordinates LOD */
  74. positions?: [Positions];
  75. /** number[]];CoarseGraind Beads radii LOD */
  76. radii?: [Radii];
  77. /** Number of `curveX` properties in the object where `X` is a 0-indexed number */
  78. nbCurve?: number;
  79. uLength?: number;
  80. /** Curve properties are Vec3[] but that is not expressable in TypeScript */
  81. [curveX: string]: unknown;
  82. /** the orientation in the membrane */
  83. principalAxis?: Vec3;
  84. principalVector?: Vec3;
  85. /** offset along membrane */
  86. offset?: Vec3;
  87. ingtype?: string;
  88. color?: Vec3;
  89. confidence?: number;
  90. Type?: string;
  91. }
  92. export interface IngredientSource {
  93. pdb: string;
  94. bu?: string; /** biological unit e.g AU,BU1,etc.. */
  95. selection?: string; /** NGL selection or :A or :B etc.. */
  96. model?: string; /** model number e.g 0,1,2... */
  97. transform: {
  98. center: boolean;
  99. translate?: Vec3;
  100. };
  101. biomt?: boolean;
  102. }