diff --git a/src/apps/basic-wrapper/helpers.ts b/src/apps/basic-wrapper/helpers.ts index fea278e4fedd2603508bd4ce955a54bb1d57ab64..b0b364e73b432527d018844dc5befd194a64e252 100644 --- a/src/apps/basic-wrapper/helpers.ts +++ b/src/apps/basic-wrapper/helpers.ts @@ -63,7 +63,7 @@ export namespace StateHelper { } export function transform(b: StateBuilder.To<PSO.Molecule.Structure>, matrix: Mat4) { - return b.apply(StateTransforms.Model.TransformStructureConformation, { + return b.apply(StateTransforms.Model.TransformStructureConformation, { transform: { name: 'matrix', params: matrix } }, { tags: 'transform' }); } diff --git a/src/apps/chem-comp-bond/create-table.ts b/src/apps/chem-comp-bond/create-table.ts index 1e26c4935c4e44adf886ccfaee13c736e08ff9f4..6fbb74820ae5364bdb8eef651de9193c70d6a849 100644 --- a/src/apps/chem-comp-bond/create-table.ts +++ b/src/apps/chem-comp-bond/create-table.ts @@ -144,7 +144,7 @@ async function createBonds() { const comp_id: string[] = [] const atom_id_1: string[] = [] const atom_id_2: string[] = [] - const value_order: typeof mmCIF_chemCompBond_schema['value_order']['T'][] = [] + const value_order: typeof mmCIF_chemCompBond_schema['value_order']['T'][] = [] const pdbx_aromatic_flag: typeof mmCIF_chemCompBond_schema['pdbx_aromatic_flag']['T'][] = [] const pdbx_stereo_config: typeof mmCIF_chemCompBond_schema['pdbx_stereo_config']['T'][] = [] const molstar_protonation_variant: string[] = [] diff --git a/src/mol-model/structure/structure/unit/bonds.ts b/src/mol-model/structure/structure/unit/bonds.ts index 2cc0c7b298e04d449f22f65a800c6441a6dcd520..ebda56117bb93d604118b5de9ab464ee86b64904 100644 --- a/src/mol-model/structure/structure/unit/bonds.ts +++ b/src/mol-model/structure/structure/unit/bonds.ts @@ -19,7 +19,7 @@ export * from './bonds/inter-compute' namespace Bond { export interface Location<U extends Unit = Unit> { readonly kind: 'bond-location', - + aStructure: Structure, aUnit: U, /** Index into aUnit.elements */ diff --git a/src/mol-model/structure/structure/unit/rings.ts b/src/mol-model/structure/structure/unit/rings.ts index 84eb3ac0c6c29698733e2222837acd5324fd17f0..c7776ba611efcff5088f397ab28296a406fa643c 100644 --- a/src/mol-model/structure/structure/unit/rings.ts +++ b/src/mol-model/structure/structure/unit/rings.ts @@ -157,11 +157,11 @@ namespace UnitRings { /** Creates a mapping ResidueIndex -> list or rings that are on that residue and have one of the specified fingerprints. */ export function byFingerprintAndResidue(rings: UnitRings, fingerprints: ReadonlyArray<UnitRing.Fingerprint>) { const map = new Map<ResidueIndex, Index[]>(); - + for (let fI = 0, _fI = fingerprints.length; fI < _fI; fI++) { const fp = fingerprints[fI]; addSingleResidueRings(rings, fp, map); - } + } return map; } } diff --git a/src/mol-model/structure/structure/unit/rings/compute.ts b/src/mol-model/structure/structure/unit/rings/compute.ts index 4f93aec8b0f771d719ce2bcd353901062b727fc7..3c84b1d73ced506b404b13225c73a58f1c7e77f2 100644 --- a/src/mol-model/structure/structure/unit/rings/compute.ts +++ b/src/mol-model/structure/structure/unit/rings/compute.ts @@ -116,7 +116,7 @@ function processResidue(state: State, start: number, end: number) { arraySetAdd(altLocs, altLoc); } arraySetRemove(altLocs, ''); - + if (altLocs.length === 0) { resetState(state); for (let i = 0; i < state.count; i++) { diff --git a/src/mol-model/structure/structure/util/unit-transforms.ts b/src/mol-model/structure/structure/util/unit-transforms.ts index f2de9309b2d0d65654b581b2d3e772dcc1d4c609..0fb9d319df145525766cb29df4675cc2a2725112 100644 --- a/src/mol-model/structure/structure/util/unit-transforms.ts +++ b/src/mol-model/structure/structure/util/unit-transforms.ts @@ -18,9 +18,9 @@ export class StructureUnitTransforms { private unitOffsetMap = IntMap.Mutable<number>(); private groupIndexMap = IntMap.Mutable<number>(); private size: number; - + private _isIdentity: boolean | undefined = undefined; - + version = 0; constructor(readonly structure: Structure) { diff --git a/src/mol-plugin-state/actions/data-format.ts b/src/mol-plugin-state/actions/data-format.ts index feaf4da09fa5ca6bf2f4a903a1747afc3c14418a..eb1a3ce223d4c2063c6722896955064dfb0c5676 100644 --- a/src/mol-plugin-state/actions/data-format.ts +++ b/src/mol-plugin-state/actions/data-format.ts @@ -137,12 +137,12 @@ export const OpenFiles = StateAction.build({ const info = getFileInfo(file) const isBinary = plugin.dataFormat.registry.binaryExtensions.has(info.ext) const { data } = await plugin.builders.data.readFile({ file, isBinary }); - //const data = state.build().toRoot().apply(StateTransforms.Data.ReadFile, { file, isBinary }); + // const data = state.build().toRoot().apply(StateTransforms.Data.ReadFile, { file, isBinary }); // const dataStateObject = await state.updateTree(data).runInContext(taskCtx); const provider = params.format === 'auto' ? plugin.dataFormat.registry.auto(info, data.cell?.obj!) : plugin.dataFormat.registry.get(params.format) - + // need to await so that the enclosing Task finishes after the update is done. await provider.getDefaultBuilder(plugin, data, { visuals: params.visuals }, state).runInContext(taskCtx) } catch (e) { diff --git a/src/mol-plugin-state/helpers/structure-overpaint.ts b/src/mol-plugin-state/helpers/structure-overpaint.ts index 9eda24d32178f54f37bed0dcea770a9921bbe238..cc977e3972750639d86c9099c2cfdeebaaa7e355 100644 --- a/src/mol-plugin-state/helpers/structure-overpaint.ts +++ b/src/mol-plugin-state/helpers/structure-overpaint.ts @@ -56,7 +56,7 @@ export async function clearStructureOverpaint(plugin: PluginContext, components: } async function eachRepr(plugin: PluginContext, components: StructureComponentRef[], callback: OverpaintEachReprCallback) { - const state = plugin.state.data; + const state = plugin.state.data; const update = state.build(); for (const c of components) { for (const r of c.representations) { diff --git a/src/mol-repr/structure/registry.ts b/src/mol-repr/structure/registry.ts index 13db289edad5e072a104e993de5c5168db31a9f4..e64bc74ae07c781f48ba33a6f6a8659a0cf250d1 100644 --- a/src/mol-repr/structure/registry.ts +++ b/src/mol-repr/structure/registry.ts @@ -45,7 +45,7 @@ export namespace StructureRepresentationRegistry { 'putty': PuttyRepresentationProvider, 'spacefill': SpacefillRepresentationProvider, } - + type _BuiltIn = typeof BuiltIn export type BuiltIn = keyof _BuiltIn export type BuiltInParams<T extends BuiltIn> = Partial<RepresentationProvider.ParamValues<_BuiltIn[T]>> diff --git a/src/mol-repr/volume/registry.ts b/src/mol-repr/volume/registry.ts index 05ed2a8790d034b0a86544a741d83ddc863b0fbe..758371e1eaedf23318d7d2921a601abcd67bda43 100644 --- a/src/mol-repr/volume/registry.ts +++ b/src/mol-repr/volume/registry.ts @@ -11,7 +11,7 @@ import { objectForEach } from '../../mol-util/object'; export class VolumeRepresentationRegistry extends RepresentationRegistry<VolumeData, Representation.State> { constructor() { - super() + super() objectForEach(VolumeRepresentationRegistry.BuiltIn, (p, k) => { if (p.name !== k) throw new Error(`Fix BuiltInVolumeRepresentations to have matching names. ${p.name} ${k}`); this.add(p as any) diff --git a/src/mol-state/action/manager.ts b/src/mol-state/action/manager.ts index 365975f7c94198905bbfd37f4764a8ff3b89c78f..a285a1a7ef6963acb23f59681396f9f8913f4550 100644 --- a/src/mol-state/action/manager.ts +++ b/src/mol-state/action/manager.ts @@ -35,11 +35,11 @@ class StateActionManager { } remove(actionOrTransformer: StateAction | StateTransformer | UUID) { - const id = StateTransformer.is(actionOrTransformer) - ? actionOrTransformer.toAction().id + const id = StateTransformer.is(actionOrTransformer) + ? actionOrTransformer.toAction().id : UUID.is(actionOrTransformer) - ? actionOrTransformer - : actionOrTransformer.id; + ? actionOrTransformer + : actionOrTransformer.id; const action = this.actions.get(id); if (!action) return this; diff --git a/src/mol-theme/size/shape-group.ts b/src/mol-theme/size/shape-group.ts index 811b1cb9598d39e8c7889142cb8123ca89319405..9537c7bc5e95ea1010e5b9c256dff8bfed3fb53d 100644 --- a/src/mol-theme/size/shape-group.ts +++ b/src/mol-theme/size/shape-group.ts @@ -37,7 +37,7 @@ export function ShapeGroupSizeTheme(ctx: ThemeDataContext, props: PD.Values<Shap export const ShapeGroupSizeThemeProvider: SizeTheme.Provider<ShapeGroupSizeThemeParams, 'shape-group'> = { name: 'shape-group', label: 'Shape Group', - category: '', + category: '', factory: ShapeGroupSizeTheme, getParams: getShapeGroupSizeThemeParams, defaultValues: PD.getDefaultValues(ShapeGroupSizeThemeParams), diff --git a/src/servers/plugin-state/config.ts b/src/servers/plugin-state/config.ts index a7336f784a87a3b300e186c4d837f4b40f538136..8cd474926259ddb5462d03e68cb04bd840c29b78 100644 --- a/src/servers/plugin-state/config.ts +++ b/src/servers/plugin-state/config.ts @@ -21,8 +21,8 @@ export function getConfig() { cmdParser.addArgument(['--port'], { help: 'Server port. Altenatively use ENV variable PORT.', type: 'int', required: false }); cmdParser.addArgument(['--api-prefix'], { help: 'Server API prefix.', defaultValue: '', required: false }); cmdParser.addArgument(['--max-states'], { help: 'Maxinum number of states that could be saved.', defaultValue: 40, type: 'int', required: false }); - - const config = cmdParser.parseArgs() as Config; + + const config = cmdParser.parseArgs() as Config; if (!config.port) config.port = process.env.port || 1339; return config; } diff --git a/src/servers/plugin-state/index.ts b/src/servers/plugin-state/index.ts index ba0e2d251e42a0a803b3878320e98146cb27349d..f8cd83631679504d0e2b8a55626665d53099858d 100644 --- a/src/servers/plugin-state/index.ts +++ b/src/servers/plugin-state/index.ts @@ -47,8 +47,8 @@ function readIndex() { function validateIndex(index: Index) { if (index.length > Config.max_states) { const deletes: Index = [], newIndex: Index = []; - const toDelete = index.length - Config.max_states; - + const toDelete = index.length - Config.max_states; + for (const e of index) { if (!e.isSticky && deletes.length < toDelete) { deletes.push(e); @@ -71,7 +71,7 @@ function remove(id: string) { let index = readIndex(); let i = 0; for (const e of index) { - if (e.id !== id) { + if (e.id !== id) { i++; continue; } diff --git a/src/servers/volume/config.ts b/src/servers/volume/config.ts index 4647394333be0bc905ac5a1fbfab83a1194b213f..28648370157b5f8f5e0bf12aeebca03f0e8c7f4e 100644 --- a/src/servers/volume/config.ts +++ b/src/servers/volume/config.ts @@ -84,12 +84,12 @@ function addServerArgs(parser: argparse.ArgumentParser) { } function addJsonConfigArgs(parser: argparse.ArgumentParser) { - parser.addArgument(['--cfg'], { + parser.addArgument(['--cfg'], { help: [ 'JSON config file path', 'If a property is not specified, cmd line param/OS variable/default value are used.' ].join('\n'), - required: false + required: false }); parser.addArgument(['--printCfg'], { help: 'Print current config for validation and exit.', required: false, nargs: 0 }); parser.addArgument(['--cfgTemplate'], { help: 'Prints default JSON config template to be modified and exits.', required: false, nargs: 0 }); @@ -169,25 +169,25 @@ export function configureServer() { console.log(JSON.stringify(ServerConfigTemplate, null, 2)); process.exit(0); } - + try { setConfig(config) // sets the config for global use - + if (config.cfg) { const cfg = JSON.parse(fs.readFileSync(config.cfg, 'utf8')) as FullServerConfig; setConfig(cfg); } - + if (config.printCfg !== null) { console.log(JSON.stringify({ ...ServerConfig, ...LimitsConfig }, null, 2)); process.exit(0); } - + validateServerConfig(); } catch (e) { console.error('' + e); process.exit(1); - } + } } export function configureLocal() { @@ -207,23 +207,23 @@ export function configureLocal() { console.log(JSON.stringify(DefaultLimitsConfig, null, 2)); process.exit(0); } - + try { setLimitsConfig(config) // sets the config for global use - + if (config.cfg) { const cfg = JSON.parse(fs.readFileSync(config.cfg, 'utf8')) as FullServerConfig; setLimitsConfig(cfg); } - + if (config.printCfg !== null) { console.log(JSON.stringify(LimitsConfig, null, 2)); process.exit(0); } - + return config as LimitsConfig & { jobs: string, jobsTemplate: any }; } catch (e) { console.error('' + e); process.exit(1); - } + } } \ No newline at end of file