diff --git a/README.md b/README.md index 1ad2a6da936ee7e9b4462aeb98877a90ef8044ea..d35442edd4eaefce2553a3486341583f9c5b44ad 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 5c97d1e985c442c203a0065f505166dbd40c71d1..f02e38b687426456cbaf3738956c41d75058e835 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 e4b32f57647c8b9d18abaa836cc4426b500e29c4..bca2e2cd1da0b3570afb58a0b9f620c2e7530ca4 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