Skip to content
Snippets Groups Projects
Commit 1cee84d9 authored by Alexander Rose's avatar Alexander Rose
Browse files

fix formating

parent bea5fe54
Branches
No related tags found
No related merge requests found
Showing
with 81 additions and 101 deletions
......@@ -15,7 +15,7 @@ namespace Expression {
export type Arguments = Expression[] | { [name: string]: Expression }
export interface Apply { readonly head: Expression, readonly args?: Arguments }
export function Symbol(name: string): Symbol { return { name }; }
export function Symbol(name: string): Expression.Symbol { return { name }; }
export function Apply(head: Expression, args?: Arguments): Apply { return args ? { head, args } : { head }; }
export function isArgumentsArray(e?: Arguments): e is Expression[] { return !!e && Array.isArray(e); }
......
......@@ -169,7 +169,6 @@ const symbols = [
return (tested & test) === test;
}),
////////////////////////////////////
// Structure
// ============= TYPES ================
......@@ -340,8 +339,6 @@ const symbols = [
D(MolScript.structureQuery.bondProperty.atomB, (ctx, xs) => ctx.atomicBond.b),
D(MolScript.structureQuery.bondProperty.length, (ctx, xs) => ctx.atomicBond.length),
////////////////////////////////////
// Internal
D(MolScript.internal.generator.bundleElement, function internal_generator_bundleElement(ctx, xs) { return bundleElementImpl(xs.groupedUnits(ctx), xs.ranges(ctx), xs.set(ctx)) }),
D(MolScript.internal.generator.bundle, function internal_generator_bundle(ctx, xs) { return bundleGenerator(xs.elements(ctx))(ctx) }),
......
......@@ -10,7 +10,7 @@
* MIT license.
*/
declare var WorkerGlobalScope: any;
declare const WorkerGlobalScope: any;
function createImmediateActions() {
const global: any = (function () {
const _window = typeof window !== 'undefined' && window;
......
......@@ -183,7 +183,6 @@ function _atomicElementLabel(location: StructureElement.Location<Unit.Atomic>, g
const compId = granularity === 'residue' && microHetCompIds.length > 1 ?
`(${microHetCompIds.join('|')})` : comp_id
const label: string[] = []
switch (granularity) {
......
......@@ -30,8 +30,7 @@ let exampleWorkload: LocalInput = [{
output: 'c:/test/quick/localapi/1cbs_ligint.bcif',
query: 'residueInteraction',
params: { atom_site: { label_comp_id: 'REA' } } // parameters are just a JSON version of the query string
}
];
}];
if (process.argv.length !== 3) {
......
......@@ -31,12 +31,12 @@ function setupShutdown() {
console.log();
setTimeout(() => {
/*if (WebApi.ApiState.pendingQueries > 0) {
WebApi.ApiState.shutdownOnZeroPending = true;
} else*/ {
// if (WebApi.ApiState.pendingQueries > 0) {
// WebApi.ApiState.shutdownOnZeroPending = true;
// } else {
ConsoleLogger.log('Server', `Shut down due to timeout.`);
process.exit(0);
}
// }
}, tMs);
}
}
......
......@@ -12,18 +12,17 @@ import { SimpleBuffer } from '../../../mol-io/common/simple-buffer';
export type Bool = { kind: 'bool' }
export type Int = { kind: 'int' }
export type Float = { kind: 'float' }
export type String = { kind: 'string' }
export type Str = { kind: 'string' }
export type Array = { kind: 'array', element: Element }
export type Prop = { element: Element, prop: string }
export type Obj = { kind: 'object', props: Prop[] }
// tslint:disable-next-line:array-type
export type Element = Bool | Int | Float | String | Array | Obj
export type Element = Bool | Int | Float | Str | Array | Obj
export const bool: Bool = { kind: 'bool' };
export const int: Int = { kind: 'int' };
export const float: Float = { kind: 'float' };
export const str: String = { kind: 'string' };
// tslint:disable-next-line:array-type
export const str: Str = { kind: 'string' };
export function array(element: Element): Array { return { kind: 'array', element }; }
export function obj<T>(schema: ((keyof T) | Element)[][]): Obj {
return {
......
......@@ -11,9 +11,7 @@ export interface Cartesian extends Box<Coords.Cartesian> { }
export interface Fractional extends Box<Coords.Fractional> { }
export interface Grid<K> extends Box<Coords.Grid<K>> { }
///////////////////////////////////////////
// CONVERSIONS
///////////////////////////////////////////
export function cartesianToFractional(box: Cartesian, spacegroup: SpacegroupCell): Fractional {
const { a: l, b: r } = box;
......@@ -54,9 +52,7 @@ export function expandGridBox<K>(box: Grid<K>, by: number) {
}
}
///////////////////////////////////////////
// MISC
///////////////////////////////////////////
export function shift<C extends Coords.Coord<S>, S extends Coords.Space>(box: Box<C>, offset: C): Box<C> {
return { a: Coords.add(box.a, offset), b: Coords.add(box.b, offset) } as Box<C>;
......
......@@ -31,9 +31,7 @@ export interface Cartesian extends Coord<Space.Cartesian> { }
export interface Fractional extends Coord<Space.Fractional> { }
export interface Grid<K> extends Coord<Space.Grid> { domain: GridDomain<K> }
///////////////////////////////////////////
// CONSTRUCTORS
///////////////////////////////////////////
export function domain<K>(kind: K, info: GridInfo): GridDomain<K> {
const sc = info.sampleCount;
......@@ -71,9 +69,7 @@ export function clone<C extends (Coord<Space> | Grid<any>)>(a: C): C {
return withCoord(a, a[0], a[1], a[2]);
}
///////////////////////////////////////////
// CONVERSIONS
///////////////////////////////////////////
export function cartesianToFractional(a: Cartesian, spacegroup: SpacegroupCell): Fractional {
const coord = Helpers.transform(a, spacegroup.toFractional);
......@@ -98,9 +94,7 @@ export function gridToFractional<K>(a: Grid<K>): Fractional {
return coord;
}
///////////////////////////////////////////
// MISC
///////////////////////////////////////////
export function clampGridToSamples<K>(a: Grid<K>): Grid<K> {
const { sampleCount } = a.domain;
......
......@@ -14,9 +14,7 @@ import { SpacegroupCell } from '../../../../mol-math/geometry';
import { FileHandle } from '../../../../mol-io/common/file-handle';
import { TypedArrayValueArray } from '../../../../mol-io/common/typed-array';
//////////////////////////////////////
// DATA
//////////////////////////////////////
export interface Sampling {
index: number,
......@@ -39,9 +37,7 @@ export interface BlockData {
values: TypedArrayValueArray
}
//////////////////////////////////////
// QUERY
//////////////////////////////////////
export type QueryOutputStream = Writer & { end: () => void }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment