diff --git a/src/apps/viewer/index.ts b/src/apps/viewer/index.ts index 69a78551cd2efa5dff3cc5650815a105b251df7c..f27157cd116e504614398f6db2231285ad86b417 100644 --- a/src/apps/viewer/index.ts +++ b/src/apps/viewer/index.ts @@ -16,6 +16,7 @@ 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 { @@ -31,6 +32,7 @@ function init() { behaviors: [ ...DefaultPluginSpec.behaviors, PluginSpec.Behavior(CellPack), + PluginSpec.Behavior(PDBeStructureQualityReport), PluginSpec.Behavior(RCSBAssemblySymmetry), PluginSpec.Behavior(RCSBValidationReport), ], 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/mol-plugin/behavior/dynamic/custom-props.ts b/src/mol-plugin/behavior/dynamic/custom-props.ts index 8248530a23dddff796b480fc97178411c832f992..9b4e00b7ef6b87a859778960164b7810f2c28b09 100644 --- a/src/mol-plugin/behavior/dynamic/custom-props.ts +++ b/src/mol-plugin/behavior/dynamic/custom-props.ts @@ -10,6 +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'; \ 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 81d13c7215cca34ee33f4a5277ff3cf75fa047b5..45c5bbd11a423dde588bfafe566aaaa556532c63 100644 --- a/src/mol-plugin/index.ts +++ b/src/mol-plugin/index.ts @@ -74,8 +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), ], 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';