Skip to content
Snippets Groups Projects
Select Git revision
  • be1737a8d72965da39a171b0650fe1f183e499a6
  • master default protected
  • base-pairs-ladder
  • rednatco-v2
  • rednatco
  • test
  • ntc-tube-uniform-color
  • ntc-tube-missing-atoms
  • restore-vertex-array-per-program
  • watlas2
  • dnatco_new
  • cleanup-old-nodejs
  • webmmb
  • fix_auth_seq_id
  • update_deps
  • ext_dev
  • ntc_balls
  • nci-2
  • plugin
  • bugfix-0.4.5
  • nci
  • v0.5.0-dev.1
  • v0.4.5
  • v0.4.4
  • v0.4.3
  • v0.4.2
  • v0.4.1
  • v0.4.0
  • v0.3.12
  • v0.3.11
  • v0.3.10
  • v0.3.9
  • v0.3.8
  • v0.3.7
  • v0.3.6
  • v0.3.5
  • v0.3.4
  • v0.3.3
  • v0.3.2
  • v0.3.1
  • v0.3.0
41 results

index.ts

Blame
  • model.ts 913 B
    /**
     * Copyright (c) 2017 molio contributors, licensed under MIT, See LICENSE file for more info.
     *
     * @author David Sehnal <david.sehnal@gmail.com>
     */
    
    import DataFormat from './data-format'
    import HierarchyProperties from './properties/hierarchy'
    import ConformationProperties from './properties/conformation'
    import UUID from 'mol-base/utils/uuid'
    
    import buildMmCIF from './builders/mmcif'
    
    /**
     * Interface to the "source data" of the molecule.
     *
     * "Atoms" are integers in the range [0, atomCount).
     */
    interface Model extends Readonly<{
        id: UUID,
    
        modelNum: number,
    
        sourceData: DataFormat,
    
        hierarchy: HierarchyProperties,
        conformation: ConformationProperties,
    
        atomCount: number
    }> { }
    
    namespace Model {
        export function create(format: DataFormat) {
            switch (format.kind) {
                case 'mmCIF': return buildMmCIF(format);
            }
        }
    }
    
    export default Model