Преглед изворни кода

moved pdbe code to extensions folder

Alexander Rose пре 5 година
родитељ
комит
9d1d7bbf72

+ 2 - 0
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),
         ],

+ 1 - 1
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 }

+ 9 - 0
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';

+ 0 - 0
src/mol-model-props/pdbe/preferred-assembly.ts → src/extensions/pdbe/preferred-assembly.ts


+ 1 - 1
src/mol-model-props/pdbe/struct-ref-domain.ts → 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 {

+ 7 - 7
src/mol-plugin/behavior/dynamic/custom-props/pdbe/structure-quality-report.ts → 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',

+ 2 - 2
src/mol-model-props/pdbe/themes/structure-quality-report.ts → 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

+ 16 - 16
src/mol-model-props/pdbe/structure-quality-report.ts → 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 };
 

+ 1 - 3
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';
+export { CrossLinkRestraint } from './custom-props/integrative/cross-link-restraint';

+ 0 - 2
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]

+ 1 - 1
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'

+ 3 - 3
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';