diff --git a/README.md b/README.md index 4da71bf2ef54c6129134af1d0474ba794ba7be3d..d30244e44e42a736fc6927f754fc05308cce5fc9 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ and navigate to `build/viewer` **GraphQL schemas** - ./node_modules/.bin/graphql-codegen -c ./data/rcsb-graphql/codegen.yml + ./node_modules/.bin/graphql-codegen -c ./src/extensions/rcsb/graphql/codegen.yml ### Other scripts **Create chem comp bond table** @@ -115,7 +115,7 @@ and navigate to `build/viewer` **Convert any CIF to BinaryCIF** node lib/servers/model/preprocess -i file.cif -ob file.bcif - + To see all available commands, use ``node lib/servers/model/preprocess -h``. Or diff --git a/src/apps/viewer/index.ts b/src/apps/viewer/index.ts index 64afb24014811f308969011375cd9bb5862aaac9..f27157cd116e504614398f6db2231285ad86b417 100644 --- a/src/apps/viewer/index.ts +++ b/src/apps/viewer/index.ts @@ -15,6 +15,8 @@ import { PluginSpec } from '../../mol-plugin/spec'; import { DownloadStructure } from '../../mol-plugin-state/actions/structure'; import { PluginConfig } from '../../mol-plugin/config'; import { CellPack } from '../../extensions/cellpack'; +import { RCSBAssemblySymmetry, RCSBValidationReport } from '../../extensions/rcsb'; +import { PDBeStructureQualityReport } from '../../extensions/pdbe'; require('mol-plugin-ui/skin/light.scss'); function getParam(name: string, regex: string): string { @@ -29,7 +31,10 @@ function init() { actions: [...DefaultPluginSpec.actions], behaviors: [ ...DefaultPluginSpec.behaviors, - PluginSpec.Behavior(CellPack) + PluginSpec.Behavior(CellPack), + PluginSpec.Behavior(PDBeStructureQualityReport), + PluginSpec.Behavior(RCSBAssemblySymmetry), + PluginSpec.Behavior(RCSBValidationReport), ], animations: [...DefaultPluginSpec.animations || []], customParamEditors: DefaultPluginSpec.customParamEditors, diff --git a/src/examples/basic-wrapper/index.ts b/src/examples/basic-wrapper/index.ts index 9abaae674faf0a0acc23ec4afc1c7f285f891d10..4e776090a4a7eea977facb1789d4dbcfe237ab43 100644 --- a/src/examples/basic-wrapper/index.ts +++ b/src/examples/basic-wrapper/index.ts @@ -10,7 +10,6 @@ import { createPlugin, DefaultPluginSpec } from '../../mol-plugin'; import { AnimateModelIndex } from '../../mol-plugin-state/animation/built-in'; import { BuiltInTrajectoryFormat } from '../../mol-plugin-state/formats/trajectory'; import { PluginStateObject } from '../../mol-plugin-state/objects'; -import { PDBeStructureQualityReport } from '../../mol-plugin/behavior/dynamic/custom-props'; import { PluginCommands } from '../../mol-plugin/commands'; import { PluginContext } from '../../mol-plugin/context'; import { Script } from '../../mol-script/script'; @@ -19,6 +18,7 @@ import { StripedResidues } from './coloring'; import { CustomToastMessage } from './controls'; import './index.html'; import { buildStaticSuperposition, dynamicSuperpositionTest, StaticSuperpositionTestData } from './superposition'; +import { PDBeStructureQualityReport } from '../../extensions/pdbe'; require('mol-plugin-ui/skin/light.scss'); type LoadParams = { url: string, format?: BuiltInTrajectoryFormat, isBinary?: boolean, assemblyId?: string } diff --git a/src/extensions/pdbe/index.ts b/src/extensions/pdbe/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..4cef04277fd7d8698e6188e3dc66c54ccff32ed6 --- /dev/null +++ b/src/extensions/pdbe/index.ts @@ -0,0 +1,9 @@ +/** + * Copyright (c) 2020 mol* contributors, licensed under MIT, See LICENSE file for more info. + * + * @author Alexander Rose <alexander.rose@weirdbyte.de> + */ + +export { PDBeStructureQualityReport } from './structure-quality-report/behavior'; +export { PDBePreferredAssembly } from './preferred-assembly'; +export { PDBeStructRefDomain } from './struct-ref-domain'; \ No newline at end of file diff --git a/src/mol-model-props/pdbe/preferred-assembly.ts b/src/extensions/pdbe/preferred-assembly.ts similarity index 100% rename from src/mol-model-props/pdbe/preferred-assembly.ts rename to src/extensions/pdbe/preferred-assembly.ts diff --git a/src/mol-model-props/pdbe/struct-ref-domain.ts b/src/extensions/pdbe/struct-ref-domain.ts similarity index 98% rename from src/mol-model-props/pdbe/struct-ref-domain.ts rename to src/extensions/pdbe/struct-ref-domain.ts index d82e24d84561296ef5fa5b0abda56e891ea864b2..4b025f55230860d427b7c6be975b672e134d3881 100644 --- a/src/mol-model-props/pdbe/struct-ref-domain.ts +++ b/src/extensions/pdbe/struct-ref-domain.ts @@ -8,7 +8,7 @@ import { Column, Table } from '../../mol-data/db'; import { toTable } from '../../mol-io/reader/cif/schema'; import { CifWriter } from '../../mol-io/writer/cif'; import { Model, CustomPropertyDescriptor } from '../../mol-model/structure'; -import { PropertyWrapper } from '../common/wrapper'; +import { PropertyWrapper } from '../../mol-model-props/common/wrapper'; import { MmcifFormat } from '../../mol-model-formats/structure/mmcif'; export namespace PDBeStructRefDomain { diff --git a/src/mol-plugin/behavior/dynamic/custom-props/pdbe/structure-quality-report.ts b/src/extensions/pdbe/structure-quality-report/behavior.ts similarity index 84% rename from src/mol-plugin/behavior/dynamic/custom-props/pdbe/structure-quality-report.ts rename to src/extensions/pdbe/structure-quality-report/behavior.ts index d20ceccbcda08a57995a8f41dbdf0a36ea25e618..b12f8f09ad58f7512267b7c3e11a04a8b1ba1e47 100644 --- a/src/mol-plugin/behavior/dynamic/custom-props/pdbe/structure-quality-report.ts +++ b/src/extensions/pdbe/structure-quality-report/behavior.ts @@ -4,13 +4,13 @@ * @author David Sehnal <david.sehnal@gmail.com> */ -import { OrderedSet } from '../../../../../mol-data/int'; -import { StructureQualityReport, StructureQualityReportProvider } from '../../../../../mol-model-props/pdbe/structure-quality-report'; -import { StructureQualityReportColorThemeProvider } from '../../../../../mol-model-props/pdbe/themes/structure-quality-report'; -import { Loci } from '../../../../../mol-model/loci'; -import { StructureElement } from '../../../../../mol-model/structure'; -import { ParamDefinition as PD } from '../../../../../mol-util/param-definition'; -import { PluginBehavior } from '../../../behavior'; +import { OrderedSet } from '../../../mol-data/int'; +import { StructureQualityReport, StructureQualityReportProvider } from './prop'; +import { StructureQualityReportColorThemeProvider } from './color'; +import { Loci } from '../../../mol-model/loci'; +import { StructureElement } from '../../../mol-model/structure'; +import { ParamDefinition as PD } from '../../../mol-util/param-definition'; +import { PluginBehavior } from '../../../mol-plugin/behavior/behavior'; export const PDBeStructureQualityReport = PluginBehavior.create<{ autoAttach: boolean, showTooltip: boolean }>({ name: 'pdbe-structure-quality-report-prop', diff --git a/src/mol-model-props/pdbe/themes/structure-quality-report.ts b/src/extensions/pdbe/structure-quality-report/color.ts similarity index 97% rename from src/mol-model-props/pdbe/themes/structure-quality-report.ts rename to src/extensions/pdbe/structure-quality-report/color.ts index c021d6810ae6145858c99673e3f56bb375a02b09..83a5a35448f56443d724f0248bae88fb2c9e0954 100644 --- a/src/mol-model-props/pdbe/themes/structure-quality-report.ts +++ b/src/extensions/pdbe/structure-quality-report/color.ts @@ -4,7 +4,7 @@ * @author David Sehnal <david.sehnal@gmail.com> */ -import { StructureQualityReport, StructureQualityReportProvider } from '../../../mol-model-props/pdbe/structure-quality-report'; +import { StructureQualityReport, StructureQualityReportProvider } from './prop'; import { Location } from '../../../mol-model/location'; import { StructureElement } from '../../../mol-model/structure'; import { ColorTheme, LocationColor } from '../../../mol-theme/color'; @@ -12,7 +12,7 @@ import { ThemeDataContext } from '../../../mol-theme/theme'; import { Color } from '../../../mol-util/color'; import { TableLegend } from '../../../mol-util/legend'; import { ParamDefinition as PD } from '../../../mol-util/param-definition'; -import { CustomProperty } from '../../common/custom-property'; +import { CustomProperty } from '../../../mol-model-props/common/custom-property'; const ValidationColors = [ Color.fromRgb(170, 170, 170), // not applicable diff --git a/src/mol-model-props/pdbe/structure-quality-report.ts b/src/extensions/pdbe/structure-quality-report/prop.ts similarity index 91% rename from src/mol-model-props/pdbe/structure-quality-report.ts rename to src/extensions/pdbe/structure-quality-report/prop.ts index f779bf157e67c3e3a3bf097159b200e184738d21..8121efa07ec6435fef019ca8284e9e4f5ae12b6b 100644 --- a/src/mol-model-props/pdbe/structure-quality-report.ts +++ b/src/extensions/pdbe/structure-quality-report/prop.ts @@ -5,22 +5,22 @@ * @author Alexander Rose <alexander.rose@weirdbyte.de> */ -import { Column, Table } from '../../mol-data/db'; -import { toTable } from '../../mol-io/reader/cif/schema'; -import { mmCIF_residueId_schema } from '../../mol-io/reader/cif/schema/mmcif-extras'; -import { CifWriter } from '../../mol-io/writer/cif'; -import { Model, CustomPropertyDescriptor, ResidueIndex, Unit, IndexedCustomProperty } from '../../mol-model/structure'; -import { residueIdFields } from '../../mol-model/structure/export/categories/atom_site'; -import { StructureElement, CifExportContext, Structure } from '../../mol-model/structure/structure'; -import { CustomPropSymbol } from '../../mol-script/language/symbol'; -import Type from '../../mol-script/language/type'; -import { QuerySymbolRuntime } from '../../mol-script/runtime/query/compiler'; -import { PropertyWrapper } from '../common/wrapper'; -import { CustomModelProperty } from '../common/custom-model-property'; -import { ParamDefinition as PD } from '../../mol-util/param-definition'; -import { CustomProperty } from '../common/custom-property'; -import { arraySetAdd } from '../../mol-util/array'; -import { MmcifFormat } from '../../mol-model-formats/structure/mmcif'; +import { Column, Table } from '../../../mol-data/db'; +import { toTable } from '../../../mol-io/reader/cif/schema'; +import { mmCIF_residueId_schema } from '../../../mol-io/reader/cif/schema/mmcif-extras'; +import { CifWriter } from '../../../mol-io/writer/cif'; +import { Model, CustomPropertyDescriptor, ResidueIndex, Unit, IndexedCustomProperty } from '../../../mol-model/structure'; +import { residueIdFields } from '../../../mol-model/structure/export/categories/atom_site'; +import { StructureElement, CifExportContext, Structure } from '../../../mol-model/structure/structure'; +import { CustomPropSymbol } from '../../../mol-script/language/symbol'; +import Type from '../../../mol-script/language/type'; +import { QuerySymbolRuntime } from '../../../mol-script/runtime/query/compiler'; +import { ParamDefinition as PD } from '../../../mol-util/param-definition'; +import { arraySetAdd } from '../../../mol-util/array'; +import { MmcifFormat } from '../../../mol-model-formats/structure/mmcif'; +import { PropertyWrapper } from '../../../mol-model-props/common/wrapper'; +import { CustomProperty } from '../../../mol-model-props/common/custom-property'; +import { CustomModelProperty } from '../../../mol-model-props/common/custom-model-property'; export { StructureQualityReport }; diff --git a/src/extensions/rcsb/README.md b/src/extensions/rcsb/README.md new file mode 100644 index 0000000000000000000000000000000000000000..129aa33c69e28c6214c80afbd6568b2e35244182 --- /dev/null +++ b/src/extensions/rcsb/README.md @@ -0,0 +1,4 @@ +### Code generation +**GraphQL schemas** + + ./node_modules/.bin/graphql-codegen -c ./src/extensions/rcsb/graphql/codegen.yml \ No newline at end of file diff --git a/src/mol-plugin/behavior/dynamic/custom-props/rcsb/assembly-symmetry.ts b/src/extensions/rcsb/assembly-symmetry/behavior.ts similarity index 91% rename from src/mol-plugin/behavior/dynamic/custom-props/rcsb/assembly-symmetry.ts rename to src/extensions/rcsb/assembly-symmetry/behavior.ts index a091f4c3f9e861b181f31888ce34fb1efae9ed14..01c9f16c689037549d12f67456b452c54c83d82f 100644 --- a/src/mol-plugin/behavior/dynamic/custom-props/rcsb/assembly-symmetry.ts +++ b/src/extensions/rcsb/assembly-symmetry/behavior.ts @@ -4,18 +4,18 @@ * @author Alexander Rose <alexander.rose@weirdbyte.de> */ -import { ParamDefinition as PD } from '../../../../../mol-util/param-definition'; -import { AssemblySymmetryProvider, AssemblySymmetry, AssemblySymmetryDataProvider } from '../../../../../mol-model-props/rcsb/assembly-symmetry'; -import { PluginBehavior } from '../../../behavior'; -import { AssemblySymmetryParams, AssemblySymmetryRepresentation } from '../../../../../mol-model-props/rcsb/representations/assembly-symmetry'; -import { AssemblySymmetryClusterColorThemeProvider } from '../../../../../mol-model-props/rcsb/themes/assembly-symmetry-cluster'; -import { PluginStateTransform, PluginStateObject } from '../../../../../mol-plugin-state/objects'; -import { Task } from '../../../../../mol-task'; -import { PluginContext } from '../../../../context'; -import { StateTransformer, StateAction, StateObject, StateTransform, StateObjectRef } from '../../../../../mol-state'; -import { GenericRepresentationRef } from '../../../../../mol-plugin-state/manager/structure/hierarchy-state'; -import { AssemblySymmetryControls } from './ui/assembly-symmetry'; -import { StructureRepresentationPresetProvider, PresetStructureRepresentations } from '../../../../../mol-plugin-state/builder/structure/representation-preset'; +import { ParamDefinition as PD } from '../../../mol-util/param-definition'; +import { AssemblySymmetryProvider, AssemblySymmetry, AssemblySymmetryDataProvider } from './prop'; +import { PluginBehavior } from '../../../mol-plugin/behavior/behavior'; +import { AssemblySymmetryParams, AssemblySymmetryRepresentation } from './representation'; +import { AssemblySymmetryClusterColorThemeProvider } from './color'; +import { PluginStateTransform, PluginStateObject } from '../../../mol-plugin-state/objects'; +import { Task } from '../../../mol-task'; +import { PluginContext } from '../../../mol-plugin/context'; +import { StateTransformer, StateAction, StateObject, StateTransform, StateObjectRef } from '../../../mol-state'; +import { GenericRepresentationRef } from '../../../mol-plugin-state/manager/structure/hierarchy-state'; +import { AssemblySymmetryControls } from './ui'; +import { StructureRepresentationPresetProvider, PresetStructureRepresentations } from '../../../mol-plugin-state/builder/structure/representation-preset'; const Tag = AssemblySymmetry.Tag; diff --git a/src/mol-model-props/rcsb/themes/assembly-symmetry-cluster.ts b/src/extensions/rcsb/assembly-symmetry/color.ts similarity index 96% rename from src/mol-model-props/rcsb/themes/assembly-symmetry-cluster.ts rename to src/extensions/rcsb/assembly-symmetry/color.ts index 99fb472c5888d28c0908bf43c8e64fae7d0363b4..6eb67ba430cd965c4557570135bba146bc68ef8e 100644 --- a/src/mol-model-props/rcsb/themes/assembly-symmetry-cluster.ts +++ b/src/extensions/rcsb/assembly-symmetry/color.ts @@ -7,13 +7,13 @@ import { ThemeDataContext } from '../../../mol-theme/theme'; import { ColorTheme, LocationColor } from '../../../mol-theme/color'; import { ParamDefinition as PD } from '../../../mol-util/param-definition'; -import { AssemblySymmetryProvider, AssemblySymmetry } from '../assembly-symmetry'; +import { AssemblySymmetryProvider, AssemblySymmetry } from './prop'; import { Color } from '../../../mol-util/color'; import { Unit, StructureElement, StructureProperties } from '../../../mol-model/structure'; import { Location } from '../../../mol-model/location'; import { ScaleLegend, TableLegend } from '../../../mol-util/legend'; import { getPalette, getPaletteParams } from '../../../mol-util/color/palette'; -import { CustomProperty } from '../../common/custom-property'; +import { CustomProperty } from '../../../mol-model-props/common/custom-property'; const DefaultColor = Color(0xCCCCCC); diff --git a/src/mol-model-props/rcsb/assembly-symmetry.ts b/src/extensions/rcsb/assembly-symmetry/prop.ts similarity index 89% rename from src/mol-model-props/rcsb/assembly-symmetry.ts rename to src/extensions/rcsb/assembly-symmetry/prop.ts index d6f985984e45a364e16ed7fde5997b5cbb78532d..e4128ab3d6dad49a526bf07f020b8cf04c3a0366 100644 --- a/src/mol-model-props/rcsb/assembly-symmetry.ts +++ b/src/extensions/rcsb/assembly-symmetry/prop.ts @@ -4,21 +4,21 @@ * @author Alexander Rose <alexander.rose@weirdbyte.de> */ -import { AssemblySymmetryQuery, AssemblySymmetryQueryVariables } from './graphql/types'; -import query from './graphql/symmetry.gql'; - -import { ParamDefinition as PD } from '../../mol-util/param-definition'; -import { CustomPropertyDescriptor, Structure, Model, StructureSelection, QueryContext } from '../../mol-model/structure'; -import { Database as _Database, Column } from '../../mol-data/db'; -import { GraphQLClient } from '../../mol-util/graphql-client'; -import { CustomProperty } from '../common/custom-property'; -import { NonNullableArray } from '../../mol-util/type-helpers'; -import { CustomStructureProperty } from '../common/custom-structure-property'; -import { MmcifFormat } from '../../mol-model-formats/structure/mmcif'; -import { ReadonlyVec3 } from '../../mol-math/linear-algebra/3d/vec3'; -import { SetUtils } from '../../mol-util/set'; -import { MolScriptBuilder as MS } from '../../mol-script/language/builder'; -import { compile } from '../../mol-script/runtime/query/compiler'; +import { AssemblySymmetryQuery, AssemblySymmetryQueryVariables } from '../graphql/types'; +import query from '../graphql/symmetry.gql'; + +import { ParamDefinition as PD } from '../../../mol-util/param-definition'; +import { CustomPropertyDescriptor, Structure, Model, StructureSelection, QueryContext } from '../../../mol-model/structure'; +import { Database as _Database, Column } from '../../../mol-data/db'; +import { GraphQLClient } from '../../../mol-util/graphql-client'; +import { CustomProperty } from '../../../mol-model-props/common/custom-property'; +import { NonNullableArray } from '../../../mol-util/type-helpers'; +import { CustomStructureProperty } from '../../../mol-model-props/common/custom-structure-property'; +import { MmcifFormat } from '../../../mol-model-formats/structure/mmcif'; +import { ReadonlyVec3 } from '../../../mol-math/linear-algebra/3d/vec3'; +import { SetUtils } from '../../../mol-util/set'; +import { MolScriptBuilder as MS } from '../../../mol-script/language/builder'; +import { compile } from '../../../mol-script/runtime/query/compiler'; const BiologicalAssemblyNames = new Set([ 'author_and_software_defined_assembly', diff --git a/src/mol-model-props/rcsb/representations/assembly-symmetry.ts b/src/extensions/rcsb/assembly-symmetry/representation.ts similarity index 99% rename from src/mol-model-props/rcsb/representations/assembly-symmetry.ts rename to src/extensions/rcsb/assembly-symmetry/representation.ts index 7c8f2632dbe301f644a43dfad350fc79398e150d..57011a613000f1b81400758eba8caab88400d6c3 100644 --- a/src/mol-model-props/rcsb/representations/assembly-symmetry.ts +++ b/src/extensions/rcsb/assembly-symmetry/representation.ts @@ -5,7 +5,7 @@ */ import { ParamDefinition as PD } from '../../../mol-util/param-definition'; -import { AssemblySymmetryValue, AssemblySymmetryProvider, AssemblySymmetry } from '../assembly-symmetry'; +import { AssemblySymmetryValue, AssemblySymmetryProvider, AssemblySymmetry } from './prop'; import { MeshBuilder } from '../../../mol-geo/geometry/mesh/mesh-builder'; import { Vec3, Mat4, Mat3 } from '../../../mol-math/linear-algebra'; import { addCylinder } from '../../../mol-geo/geometry/mesh/builder/cylinder'; diff --git a/src/mol-plugin/behavior/dynamic/custom-props/rcsb/ui/assembly-symmetry.tsx b/src/extensions/rcsb/assembly-symmetry/ui.tsx similarity index 87% rename from src/mol-plugin/behavior/dynamic/custom-props/rcsb/ui/assembly-symmetry.tsx rename to src/extensions/rcsb/assembly-symmetry/ui.tsx index 6fc0fc8cf99e5efe7b62d8dada7476242394bf79..aa6180124205085d1d165bda9aa3876aed339be5 100644 --- a/src/mol-plugin/behavior/dynamic/custom-props/rcsb/ui/assembly-symmetry.tsx +++ b/src/extensions/rcsb/assembly-symmetry/ui.tsx @@ -5,17 +5,17 @@ */ import * as React from 'react'; -import { CollapsableState, CollapsableControls } from '../../../../../../mol-plugin-ui/base'; -import { ApplyActionControl } from '../../../../../../mol-plugin-ui/state/apply-action'; -import { InitAssemblySymmetry3D, AssemblySymmetry3D, AssemblySymmetryPreset, tryCreateAssemblySymmetry } from '../assembly-symmetry'; -import { AssemblySymmetryProvider, AssemblySymmetryProps, AssemblySymmetryDataProvider, AssemblySymmetry } from '../../../../../../mol-model-props/rcsb/assembly-symmetry'; -import { ParameterControls } from '../../../../../../mol-plugin-ui/controls/parameters'; -import { ParamDefinition as PD } from '../../../../../../mol-util/param-definition'; -import { StructureHierarchyManager } from '../../../../../../mol-plugin-state/manager/structure/hierarchy'; -import { StateAction, StateSelection } from '../../../../../../mol-state'; -import { PluginStateObject } from '../../../../../../mol-plugin-state/objects'; -import { PluginContext } from '../../../../../context'; -import { Task } from '../../../../../../mol-task'; +import { CollapsableState, CollapsableControls } from '../../../mol-plugin-ui/base'; +import { ApplyActionControl } from '../../../mol-plugin-ui/state/apply-action'; +import { InitAssemblySymmetry3D, AssemblySymmetry3D, AssemblySymmetryPreset, tryCreateAssemblySymmetry } from './behavior'; +import { AssemblySymmetryProvider, AssemblySymmetryProps, AssemblySymmetryDataProvider, AssemblySymmetry } from './prop'; +import { ParameterControls } from '../../../mol-plugin-ui/controls/parameters'; +import { ParamDefinition as PD } from '../../../mol-util/param-definition'; +import { StructureHierarchyManager } from '../../../mol-plugin-state/manager/structure/hierarchy'; +import { StateAction, StateSelection } from '../../../mol-state'; +import { PluginStateObject } from '../../../mol-plugin-state/objects'; +import { PluginContext } from '../../../mol-plugin/context'; +import { Task } from '../../../mol-task'; import { Check } from '@material-ui/icons'; interface AssemblySymmetryControlState extends CollapsableState { diff --git a/data/rcsb-graphql/codegen.yml b/src/extensions/rcsb/graphql/codegen.yml similarity index 66% rename from data/rcsb-graphql/codegen.yml rename to src/extensions/rcsb/graphql/codegen.yml index d42a711fef623fe14bc2189a9f92466b65b219a9..a6d7ebd1720ee984e7f136f927ce03c6c69d403b 100644 --- a/data/rcsb-graphql/codegen.yml +++ b/src/extensions/rcsb/graphql/codegen.yml @@ -1,7 +1,7 @@ schema: https://data.rcsb.org/graphql -documents: './src/mol-model-props/rcsb/graphql/symmetry.gql.ts' +documents: './src/extensions/rcsb/graphql/symmetry.gql.ts' generates: - './src/mol-model-props/rcsb/graphql/types.ts': + './src/extensions/rcsb/graphql/types.ts': plugins: - add: '/* eslint-disable */' - time diff --git a/src/mol-model-props/rcsb/graphql/symmetry.gql.ts b/src/extensions/rcsb/graphql/symmetry.gql.ts similarity index 100% rename from src/mol-model-props/rcsb/graphql/symmetry.gql.ts rename to src/extensions/rcsb/graphql/symmetry.gql.ts diff --git a/src/mol-model-props/rcsb/graphql/types.ts b/src/extensions/rcsb/graphql/types.ts similarity index 99% rename from src/mol-model-props/rcsb/graphql/types.ts rename to src/extensions/rcsb/graphql/types.ts index d62903be282531a1bdf3561de7fc22f1e8ec9612..0a27dabcf5aed1907c791663091f97f718281b9c 100644 --- a/src/mol-model-props/rcsb/graphql/types.ts +++ b/src/extensions/rcsb/graphql/types.ts @@ -1,7 +1,7 @@ /* eslint-disable */ export type Maybe<T> = T | null; -// Generated in 2020-04-08T16:22:40-07:00 +// Generated in 2020-04-14T16:35:00-07:00 /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { diff --git a/src/extensions/rcsb/index.ts b/src/extensions/rcsb/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..4ec9ee80537ffad9d3c285c294811b0fca8241b3 --- /dev/null +++ b/src/extensions/rcsb/index.ts @@ -0,0 +1,8 @@ +/** + * Copyright (c) 2020 mol* contributors, licensed under MIT, See LICENSE file for more info. + * + * @author Alexander Rose <alexander.rose@weirdbyte.de> + */ + +export { RCSBAssemblySymmetry } from './assembly-symmetry/behavior'; +export { RCSBValidationReport } from './validation-report/behavior'; \ No newline at end of file diff --git a/src/mol-plugin/behavior/dynamic/custom-props/rcsb/validation-report.ts b/src/extensions/rcsb/validation-report/behavior.ts similarity index 92% rename from src/mol-plugin/behavior/dynamic/custom-props/rcsb/validation-report.ts rename to src/extensions/rcsb/validation-report/behavior.ts index 0ff1e55dea53661630e2b087934b901c7e101b23..fed94bf7b50c0ef8a71daa47c65450650913f58c 100644 --- a/src/mol-plugin/behavior/dynamic/custom-props/rcsb/validation-report.ts +++ b/src/extensions/rcsb/validation-report/behavior.ts @@ -4,23 +4,23 @@ * @author Alexander Rose <alexander.rose@weirdbyte.de> */ -import { ParamDefinition as PD } from '../../../../../mol-util/param-definition'; -import { PluginBehavior } from '../../../behavior'; -import { ValidationReport, ValidationReportProvider } from '../../../../../mol-model-props/rcsb/validation-report'; -import { RandomCoilIndexColorThemeProvider } from '../../../../../mol-model-props/rcsb/themes/random-coil-index'; -import { GeometryQualityColorThemeProvider } from '../../../../../mol-model-props/rcsb/themes/geometry-quality'; -import { Loci } from '../../../../../mol-model/loci'; -import { OrderedSet } from '../../../../../mol-data/int'; -import { ClashesRepresentationProvider } from '../../../../../mol-model-props/rcsb/representations/validation-report-clashes'; -import { DensityFitColorThemeProvider } from '../../../../../mol-model-props/rcsb/themes/density-fit'; -import { cantorPairing } from '../../../../../mol-data/util'; -import { DefaultQueryRuntimeTable } from '../../../../../mol-script/runtime/query/compiler'; -import { StructureSelectionQuery, StructureSelectionCategory } from '../../../../../mol-plugin-state/helpers/structure-selection-query'; -import { MolScriptBuilder as MS } from '../../../../../mol-script/language/builder'; -import { Task } from '../../../../../mol-task'; -import { StructureRepresentationPresetProvider, PresetStructureRepresentations } from '../../../../../mol-plugin-state/builder/structure/representation-preset'; -import { StateObjectRef } from '../../../../../mol-state'; -import { Model } from '../../../../../mol-model/structure'; +import { ParamDefinition as PD } from '../../../mol-util/param-definition'; +import { PluginBehavior } from '../../../mol-plugin/behavior/behavior'; +import { ValidationReport, ValidationReportProvider } from './prop'; +import { RandomCoilIndexColorThemeProvider } from './color/random-coil-index'; +import { GeometryQualityColorThemeProvider } from './color/geometry-quality'; +import { Loci } from '../../../mol-model/loci'; +import { OrderedSet } from '../../../mol-data/int'; +import { ClashesRepresentationProvider } from './representation'; +import { DensityFitColorThemeProvider } from './color/density-fit'; +import { cantorPairing } from '../../../mol-data/util'; +import { DefaultQueryRuntimeTable } from '../../../mol-script/runtime/query/compiler'; +import { StructureSelectionQuery, StructureSelectionCategory } from '../../../mol-plugin-state/helpers/structure-selection-query'; +import { MolScriptBuilder as MS } from '../../../mol-script/language/builder'; +import { Task } from '../../../mol-task'; +import { StructureRepresentationPresetProvider, PresetStructureRepresentations } from '../../../mol-plugin-state/builder/structure/representation-preset'; +import { StateObjectRef } from '../../../mol-state'; +import { Model } from '../../../mol-model/structure'; export const RCSBValidationReport = PluginBehavior.create<{ autoAttach: boolean, showTooltip: boolean }>({ name: 'rcsb-validation-report-prop', diff --git a/src/mol-model-props/rcsb/themes/density-fit.ts b/src/extensions/rcsb/validation-report/color/density-fit.ts similarity index 83% rename from src/mol-model-props/rcsb/themes/density-fit.ts rename to src/extensions/rcsb/validation-report/color/density-fit.ts index eca9c533ea5cfb7248d8cc89660e2d1a6dd5d563..e9c6fdbb2f6db80a4285a76a22bbbf4490fb6a69 100644 --- a/src/mol-model-props/rcsb/themes/density-fit.ts +++ b/src/extensions/rcsb/validation-report/color/density-fit.ts @@ -4,14 +4,14 @@ * @author Alexander Rose <alexander.rose@weirdbyte.de> */ -import { ThemeDataContext } from '../../../mol-theme/theme'; -import { ColorTheme, LocationColor } from '../../../mol-theme/color'; -import { ParamDefinition as PD } from '../../../mol-util/param-definition'; -import { Color, ColorScale } from '../../../mol-util/color'; -import { StructureElement, Model } from '../../../mol-model/structure'; -import { Location } from '../../../mol-model/location'; -import { CustomProperty } from '../../common/custom-property'; -import { ValidationReportProvider, ValidationReport } from '../validation-report'; +import { ThemeDataContext } from '../../../../mol-theme/theme'; +import { ColorTheme, LocationColor } from '../../../../mol-theme/color'; +import { ParamDefinition as PD } from '../../../../mol-util/param-definition'; +import { Color, ColorScale } from '../../../../mol-util/color'; +import { StructureElement, Model } from '../../../../mol-model/structure'; +import { Location } from '../../../../mol-model/location'; +import { CustomProperty } from '../../../../mol-model-props/common/custom-property'; +import { ValidationReportProvider, ValidationReport } from '../prop'; const DefaultColor = Color(0xCCCCCC); diff --git a/src/mol-model-props/rcsb/themes/geometry-quality.ts b/src/extensions/rcsb/validation-report/color/geometry-quality.ts similarity index 85% rename from src/mol-model-props/rcsb/themes/geometry-quality.ts rename to src/extensions/rcsb/validation-report/color/geometry-quality.ts index 685291259a0679c0875203c3492dd089ce10e247..a6dc480d10a6e76ac7e680527fc2d311c645d3e6 100644 --- a/src/mol-model-props/rcsb/themes/geometry-quality.ts +++ b/src/extensions/rcsb/validation-report/color/geometry-quality.ts @@ -4,17 +4,17 @@ * @author Alexander Rose <alexander.rose@weirdbyte.de> */ -import { ThemeDataContext } from '../../../mol-theme/theme'; -import { ColorTheme, LocationColor } from '../../../mol-theme/color'; -import { ParamDefinition as PD } from '../../../mol-util/param-definition'; -import { Color } from '../../../mol-util/color'; -import { StructureElement } from '../../../mol-model/structure'; -import { Location } from '../../../mol-model/location'; -import { CustomProperty } from '../../common/custom-property'; -import { ValidationReportProvider, ValidationReport } from '../validation-report'; -import { TableLegend } from '../../../mol-util/legend'; -import { PolymerType } from '../../../mol-model/structure/model/types'; -import { SetUtils } from '../../../mol-util/set'; +import { ThemeDataContext } from '../../../../mol-theme/theme'; +import { ColorTheme, LocationColor } from '../../../../mol-theme/color'; +import { ParamDefinition as PD } from '../../../../mol-util/param-definition'; +import { Color } from '../../../../mol-util/color'; +import { StructureElement } from '../../../../mol-model/structure'; +import { Location } from '../../../../mol-model/location'; +import { CustomProperty } from '../../../../mol-model-props/common/custom-property'; +import { ValidationReportProvider, ValidationReport } from '../prop'; +import { TableLegend } from '../../../../mol-util/legend'; +import { PolymerType } from '../../../../mol-model/structure/model/types'; +import { SetUtils } from '../../../../mol-util/set'; const DefaultColor = Color(0x909090); diff --git a/src/mol-model-props/rcsb/themes/random-coil-index.ts b/src/extensions/rcsb/validation-report/color/random-coil-index.ts similarity index 80% rename from src/mol-model-props/rcsb/themes/random-coil-index.ts rename to src/extensions/rcsb/validation-report/color/random-coil-index.ts index 1a1e42fae50ab3daae264c3ffe07afb46f2853e2..f92cbc9f97e3a8e0986a7ab29a097250912356f4 100644 --- a/src/mol-model-props/rcsb/themes/random-coil-index.ts +++ b/src/extensions/rcsb/validation-report/color/random-coil-index.ts @@ -4,14 +4,14 @@ * @author Alexander Rose <alexander.rose@weirdbyte.de> */ -import { ThemeDataContext } from '../../../mol-theme/theme'; -import { ColorTheme, LocationColor } from '../../../mol-theme/color'; -import { ParamDefinition as PD } from '../../../mol-util/param-definition'; -import { Color, ColorScale } from '../../../mol-util/color'; -import { StructureElement, Model } from '../../../mol-model/structure'; -import { Location } from '../../../mol-model/location'; -import { CustomProperty } from '../../common/custom-property'; -import { ValidationReportProvider, ValidationReport } from '../validation-report'; +import { ThemeDataContext } from '../../../../mol-theme/theme'; +import { ColorTheme, LocationColor } from '../../../../mol-theme/color'; +import { ParamDefinition as PD } from '../../../../mol-util/param-definition'; +import { Color, ColorScale } from '../../../../mol-util/color'; +import { StructureElement, Model } from '../../../../mol-model/structure'; +import { Location } from '../../../../mol-model/location'; +import { CustomProperty } from '../../../../mol-model-props/common/custom-property'; +import { ValidationReportProvider, ValidationReport } from '../prop'; const DefaultColor = Color(0xCCCCCC); diff --git a/src/mol-model-props/rcsb/validation-report.ts b/src/extensions/rcsb/validation-report/prop.ts similarity index 94% rename from src/mol-model-props/rcsb/validation-report.ts rename to src/extensions/rcsb/validation-report/prop.ts index f5a28d38286de67cab3ca8be5ca8ad7f31926a19..c57125afccd05a105b91b71a69a4240017679ca0 100644 --- a/src/mol-model-props/rcsb/validation-report.ts +++ b/src/extensions/rcsb/validation-report/prop.ts @@ -4,24 +4,24 @@ * @author Alexander Rose <alexander.rose@weirdbyte.de> */ -import { ParamDefinition as PD } from '../../mol-util/param-definition'; -import { CustomPropertyDescriptor, Structure, Unit } from '../../mol-model/structure'; -import { CustomProperty } from '../common/custom-property'; -import { CustomModelProperty } from '../common/custom-model-property'; -import { Model, ElementIndex, ResidueIndex } from '../../mol-model/structure/model'; -import { IntAdjacencyGraph } from '../../mol-math/graph'; -import { readFromFile } from '../../mol-util/data-source'; -import { CustomStructureProperty } from '../common/custom-structure-property'; -import { InterUnitGraph } from '../../mol-math/graph/inter-unit-graph'; -import { UnitIndex } from '../../mol-model/structure/structure/element/element'; -import { IntMap, SortedArray } from '../../mol-data/int'; -import { arrayMax } from '../../mol-util/array'; -import { equalEps } from '../../mol-math/linear-algebra/3d/common'; -import { Vec3 } from '../../mol-math/linear-algebra'; -import { MmcifFormat } from '../../mol-model-formats/structure/mmcif'; -import { QuerySymbolRuntime } from '../../mol-script/runtime/query/compiler'; -import { CustomPropSymbol } from '../../mol-script/language/symbol'; -import Type from '../../mol-script/language/type'; +import { ParamDefinition as PD } from '../../../mol-util/param-definition'; +import { CustomPropertyDescriptor, Structure, Unit } from '../../../mol-model/structure'; +import { CustomProperty } from '../../../mol-model-props/common/custom-property'; +import { CustomModelProperty } from '../../../mol-model-props/common/custom-model-property'; +import { Model, ElementIndex, ResidueIndex } from '../../../mol-model/structure/model'; +import { IntAdjacencyGraph } from '../../../mol-math/graph'; +import { readFromFile } from '../../../mol-util/data-source'; +import { CustomStructureProperty } from '../../../mol-model-props/common/custom-structure-property'; +import { InterUnitGraph } from '../../../mol-math/graph/inter-unit-graph'; +import { UnitIndex } from '../../../mol-model/structure/structure/element/element'; +import { IntMap, SortedArray } from '../../../mol-data/int'; +import { arrayMax } from '../../../mol-util/array'; +import { equalEps } from '../../../mol-math/linear-algebra/3d/common'; +import { Vec3 } from '../../../mol-math/linear-algebra'; +import { MmcifFormat } from '../../../mol-model-formats/structure/mmcif'; +import { QuerySymbolRuntime } from '../../../mol-script/runtime/query/compiler'; +import { CustomPropSymbol } from '../../../mol-script/language/symbol'; +import Type from '../../../mol-script/language/type'; export { ValidationReport }; diff --git a/src/mol-model-props/rcsb/representations/validation-report-clashes.ts b/src/extensions/rcsb/validation-report/representation.ts similarity index 99% rename from src/mol-model-props/rcsb/representations/validation-report-clashes.ts rename to src/extensions/rcsb/validation-report/representation.ts index 9f93c3ab73c7cadd5314319448ef7d0ebcc3b803..65357cc3be7d314ed94f620765fcd80b04f414d1 100644 --- a/src/mol-model-props/rcsb/representations/validation-report-clashes.ts +++ b/src/extensions/rcsb/validation-report/representation.ts @@ -19,8 +19,8 @@ import { createLinkCylinderMesh, LinkCylinderParams, LinkCylinderStyle } from '. import { UnitsMeshParams, UnitsVisual, UnitsMeshVisual, StructureGroup } from '../../../mol-repr/structure/units-visual'; import { VisualUpdateState } from '../../../mol-repr/util'; import { LocationIterator } from '../../../mol-geo/util/location-iterator'; -import { ClashesProvider, IntraUnitClashes, InterUnitClashes, ValidationReport } from '../validation-report'; -import { CustomProperty } from '../../common/custom-property'; +import { ClashesProvider, IntraUnitClashes, InterUnitClashes, ValidationReport } from './prop'; +import { CustomProperty } from '../../../mol-model-props/common/custom-property'; import { ComplexMeshParams, ComplexVisual, ComplexMeshVisual } from '../../../mol-repr/structure/complex-visual'; import { Color } from '../../../mol-util/color'; import { MarkerActions } from '../../../mol-util/marker-action'; diff --git a/src/mol-model-formats/structure/cif-core.ts b/src/mol-model-formats/structure/cif-core.ts index 9bb9953682fd47b573b01dc6b002bce150e9a12f..77ba918853148ea62bb36fb64851715bd35c8adb 100644 --- a/src/mol-model-formats/structure/cif-core.ts +++ b/src/mol-model-formats/structure/cif-core.ts @@ -124,6 +124,7 @@ async function getModels(db: CifCore_Database, format: CifCoreFormat, ctx: Runti pdbx_formal_charge: formalCharge, pdbx_PDB_model_num: Column.ofConst(1, atomCount, Column.Schema.int), + B_iso_or_equiv: db.atom_site.U_iso_or_equiv, }, atomCount); const name = ( diff --git a/src/mol-model-props/index.ts b/src/mol-model-props/index.ts deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/src/mol-plugin/behavior/dynamic/custom-props.ts b/src/mol-plugin/behavior/dynamic/custom-props.ts index 027908349af19969461dfb202e255b8ca28e3aeb..9b4e00b7ef6b87a859778960164b7810f2c28b09 100644 --- a/src/mol-plugin/behavior/dynamic/custom-props.ts +++ b/src/mol-plugin/behavior/dynamic/custom-props.ts @@ -10,8 +10,4 @@ export { Interactions } from './custom-props/computed/interactions'; export { SecondaryStructure } from './custom-props/computed/secondary-structure'; export { ValenceModel } from './custom-props/computed/valence-model'; -export { CrossLinkRestraint } from './custom-props/integrative/cross-link-restraint'; - -export { PDBeStructureQualityReport } from './custom-props/pdbe/structure-quality-report'; -export { RCSBAssemblySymmetry } from './custom-props/rcsb/assembly-symmetry'; -export { RCSBValidationReport } from './custom-props/rcsb/validation-report'; \ No newline at end of file +export { CrossLinkRestraint } from './custom-props/integrative/cross-link-restraint'; \ No newline at end of file diff --git a/src/mol-plugin/index.ts b/src/mol-plugin/index.ts index 2d5389954bb06b3d71db90d2de6057d6fa97f600..45c5bbd11a423dde588bfafe566aaaa556532c63 100644 --- a/src/mol-plugin/index.ts +++ b/src/mol-plugin/index.ts @@ -74,10 +74,6 @@ export const DefaultPluginSpec: PluginSpec = { PluginSpec.Behavior(PluginBehaviors.CustomProps.SecondaryStructure), PluginSpec.Behavior(PluginBehaviors.CustomProps.ValenceModel), PluginSpec.Behavior(PluginBehaviors.CustomProps.CrossLinkRestraint), - - PluginSpec.Behavior(PluginBehaviors.CustomProps.PDBeStructureQualityReport), - PluginSpec.Behavior(PluginBehaviors.CustomProps.RCSBAssemblySymmetry), - PluginSpec.Behavior(PluginBehaviors.CustomProps.RCSBValidationReport), ], customParamEditors: [ [CreateVolumeStreamingBehavior, VolumeStreamingCustomControls] diff --git a/src/perf-tests/mol-script.ts b/src/perf-tests/mol-script.ts index a840b606c6e61c9cf4ecbb9a0b929d75f38c57b5..eb40e8848ed8c442534e3e89802f263ebb888325 100644 --- a/src/perf-tests/mol-script.ts +++ b/src/perf-tests/mol-script.ts @@ -8,7 +8,7 @@ import { parseMolScript } from '../mol-script/language/parser'; import * as util from 'util'; import { transpileMolScript } from '../mol-script/script/mol-script/symbols'; import { formatMolScript } from '../mol-script/language/expression-formatter'; -import { StructureQualityReport, StructureQualityReportProvider } from '../mol-model-props/pdbe/structure-quality-report'; +import { StructureQualityReport, StructureQualityReportProvider } from '../extensions/pdbe/structure-quality-report/prop'; import fetch from 'node-fetch'; // import Examples from 'mol-script/script/mol-script/examples' diff --git a/src/servers/model/properties/providers/pdbe.ts b/src/servers/model/properties/providers/pdbe.ts index 87a20fce8ac6d1c476ae745d257e85af3c66f264..09f818bf3c3c352959955bf1ec95fa281b42d1ed 100644 --- a/src/servers/model/properties/providers/pdbe.ts +++ b/src/servers/model/properties/providers/pdbe.ts @@ -7,11 +7,11 @@ import * as fs from 'fs'; import * as path from 'path'; import { Model } from '../../../../mol-model/structure'; -import { StructureQualityReportProvider, StructureQualityReport } from '../../../../mol-model-props/pdbe/structure-quality-report'; +import { StructureQualityReportProvider, StructureQualityReport } from '../../../../extensions/pdbe/structure-quality-report/prop'; import { fetchRetry } from '../../utils/fetch-retry'; import { UUID } from '../../../../mol-util'; -import { PDBePreferredAssembly } from '../../../../mol-model-props/pdbe/preferred-assembly'; -import { PDBeStructRefDomain } from '../../../../mol-model-props/pdbe/struct-ref-domain'; +import { PDBePreferredAssembly } from '../../../../extensions/pdbe/preferred-assembly'; +import { PDBeStructRefDomain } from '../../../../extensions/pdbe/struct-ref-domain'; import { AttachModelProperty } from '../../property-provider'; import { ConsoleLogger } from '../../../../mol-util/console-logger'; import { getParam } from '../../../common/util';