From 62fda3e3e660302c3f70f61cf141594aced1d9cd Mon Sep 17 00:00:00 2001 From: Alexander Rose <alex.rose@rcsb.org> Date: Mon, 11 Feb 2019 10:30:28 -0800 Subject: [PATCH] transformer docs tweaks --- README.md | 2 +- docs/state/transforms.md | 54 ++++++++++++++++++++++++++++++++++------ src/mol-plugin/layout.ts | 11 +++++--- 3 files changed, 55 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 1ad2a6da9..d35442edd 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ Run the image **State Transformer Docs** - node build/state-docs + export NODE_PATH="build/src"; node build/state-docs ## Contributing Just open an issue or make a pull request. All contributions are welcome. diff --git a/docs/state/transforms.md b/docs/state/transforms.md index 5c97d1e98..f02e38b68 100644 --- a/docs/state/transforms.md +++ b/docs/state/transforms.md @@ -5,6 +5,7 @@ * [ms-plugin.read-file](#ms-plugin-read-file) * [ms-plugin.parse-cif](#ms-plugin-parse-cif) * [ms-plugin.parse-ccp4](#ms-plugin-parse-ccp4) +* [ms-plugin.parse-dsn6](#ms-plugin-parse-dsn6) * [ms-plugin.trajectory-from-mmcif](#ms-plugin-trajectory-from-mmcif) * [ms-plugin.model-from-trajectory](#ms-plugin-model-from-trajectory) * [ms-plugin.structure-from-model](#ms-plugin-structure-from-model) @@ -13,6 +14,7 @@ * [ms-plugin.structure-complex-element](#ms-plugin-structure-complex-element) * [ms-plugin.custom-model-properties](#ms-plugin-custom-model-properties) * [ms-plugin.volume-from-ccp4](#ms-plugin-volume-from-ccp4) +* [ms-plugin.volume-from-dsn6](#ms-plugin-volume-from-dsn6) * [ms-plugin.representation-highlight-loci](#ms-plugin-representation-highlight-loci) * [ms-plugin.representation-select-loci](#ms-plugin-representation-select-loci) * [ms-plugin.default-loci-label-provider](#ms-plugin-default-loci-label-provider) @@ -63,7 +65,11 @@ ---------------------------- ## <a name="ms-plugin-parse-ccp4"></a>ms-plugin.parse-ccp4 :: Binary -> Ccp4 -*Parse CCP4 from Binary data* +*Parse CCP4/MRC from Binary data* + +---------------------------- +## <a name="ms-plugin-parse-dsn6"></a>ms-plugin.parse-dsn6 :: Binary -> Dsn6 +*Parse CCP4/BRIX from Binary data* ---------------------------- ## <a name="ms-plugin-trajectory-from-mmcif"></a>ms-plugin.trajectory-from-mmcif :: Cif -> Trajectory @@ -98,13 +104,11 @@ *Create a molecular structure assembly.* ### Parameters -- **id**: String *(Assembly Id. If none specified (undefined or empty string), the asymmetric unit is used.)* +- **id**?: String *(Assembly Id. If none specified (undefined or empty string), the asymmetric unit is used.)* ### Default Parameters ```js -{ - "id": "" -} +{} ``` ---------------------------- ## <a name="ms-plugin-structure-selection"></a>ms-plugin.structure-selection :: Structure -> Structure @@ -150,6 +154,23 @@ ### Parameters - **voxelSize**: 3D vector [x, y, z] +### Default Parameters +```js +{ + "voxelSize": [ + 1, + 1, + 1 + ] +} +``` +---------------------------- +## <a name="ms-plugin-volume-from-dsn6"></a>ms-plugin.volume-from-dsn6 :: Dsn6 -> Data +*Create Volume from DSN6/BRIX data* + +### Parameters +- **voxelSize**: 3D vector [x, y, z] + ### Default Parameters ```js { @@ -445,7 +466,12 @@ Object with: - **doubleSided**: true/false - **flipSided**: true/false - **flatShaded**: true/false - - **isoValue**: Numeric value + - **isoValue**: - **absolute**: Numeric value + - **relative**: Numeric value + + - **sizeFactor**: Numeric value + - **lineSizeAttenuation**: true/false + - **visuals**: Array of 'solid', 'wireframe' - **direct-volume**: Object with: @@ -540,7 +566,21 @@ Object with: "doubleSided": false, "flipSided": false, "flatShaded": false, - "isoValue": 0.22 + "isoValue": { + "kind": "relative", + "stats": { + "min": 0, + "max": 0, + "mean": 0, + "sigma": 0 + }, + "relativeValue": 2 + }, + "sizeFactor": 1, + "lineSizeAttenuation": false, + "visuals": [ + "solid" + ] } }, "colorTheme": { diff --git a/src/mol-plugin/layout.ts b/src/mol-plugin/layout.ts index e4b32f576..bca2e2cd1 100644 --- a/src/mol-plugin/layout.ts +++ b/src/mol-plugin/layout.ts @@ -172,9 +172,12 @@ export class PluginLayout extends PluginComponent<PluginLayoutStateProps> { PluginCommands.Layout.Update.subscribe(context, e => this.updateProps(e.state)); - // <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' /> - this.expandedViewport = document.createElement('meta') as any; - this.expandedViewport.name = 'viewport'; - this.expandedViewport.content = 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0'; + // TODO how best make sure it runs on node.js as well as in the browser? + if (typeof document !== 'undefined') { + // <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' /> + this.expandedViewport = document.createElement('meta') as any; + this.expandedViewport.name = 'viewport'; + this.expandedViewport.content = 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0'; + } } } \ No newline at end of file -- GitLab