helpers.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 { StructureControlsHelper } from './ui/structure';
  7. import { StructureViewer } from '.';
  8. export type SupportedFormats = 'cif' | 'bcif' | 'pdb'
  9. export interface LoadParams {
  10. /** URL pointing to a structure file */
  11. url: string,
  12. /** A supported file format extension string */
  13. format?: SupportedFormats,
  14. /**
  15. * The assemblyId to show initially
  16. * - 'deposited' for the structure as it is given in the file
  17. * - a number as string, e.g. '1', '2', ... must be defined in the file
  18. * - 'unitcell' for the unitcell of an X-ray structure
  19. * - 'supercell' for the supercell of an X-ray structure
  20. */
  21. assemblyId?: string,
  22. }
  23. export enum StateElements {
  24. Trajectory = 'trajectory',
  25. Model = 'model',
  26. ModelProps = 'model-props',
  27. Assembly = 'assembly',
  28. VolumeStreaming = 'volume-streaming',
  29. }
  30. export interface StructureViewerState {
  31. structureControlsHelper: StructureControlsHelper
  32. experimentalData: StructureViewer['experimentalData']
  33. }