Skip to content

Commit

Permalink
provide the option to switch between side by side view and normal view
Browse files Browse the repository at this point in the history
  • Loading branch information
IvoLeist committed Aug 9, 2020
1 parent a1bdd83 commit a774b05
Show file tree
Hide file tree
Showing 14 changed files with 36,394 additions and 474 deletions.
2 changes: 1 addition & 1 deletion .Rbuildignore
Expand Up @@ -20,7 +20,7 @@ demo/.*\.js
demo/.*\.html
demo/.*\.css

# ignore python files/folders
# ignore Python files/folders
setup.py
usage.py
setup.py
Expand Down
268 changes: 7 additions & 261 deletions .gitignore
@@ -1,275 +1,21 @@
# Created by .ignore support plugin (hsz.mobi)
### VisualStudioCode template
.vscode/*
.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
*.todo

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests
### Node template
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# VisualStudioCode
.vscode

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# parcel-bundler cache (https://parceljs.org/)
.cache

# next.js build output
.next

# nuxt.js build output
.nuxt

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless
### Python template
# Byte-compiled / optimized / DLL files
# Python
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
nosetests.xml
coverage.xml
*.cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.venv
env/
.env
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
### SublimeText template
# Cache files for Sublime Text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache

# Workspace files are user-specific
*.sublime-workspace

# Project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using Sublime Text
# *.sublime-project

# SFTP configuration file
sftp-config.json

# Package control specific files
Package Control.last-run
Package Control.ca-list
Package Control.ca-bundle
Package Control.system-ca-bundle
Package Control.cache/
Package Control.ca-certs/
Package Control.merged-ca-bundle
Package Control.user-ca-bundle
oscrypto-ca-bundle.crt
bh_unicode_properties.cache

# Sublime-github package stores a github token in this file
# https://packagecontrol.io/packages/sublime-github
GitHub.sublime-settings
# tasks
*.todo
4 changes: 0 additions & 4 deletions .vscode/settings.json

This file was deleted.

10 changes: 6 additions & 4 deletions dash_ngl/DashNgl.py
Expand Up @@ -62,8 +62,8 @@ class DashNgl(Component):
aaRange: 'ALL',
color: 'red',
chosen: {
'chosenAtoms':'',
'chosenResidues':''
'atoms':'',
'residues':''
},
config: {
type: 'text/plain',
Expand Down Expand Up @@ -105,19 +105,21 @@ class DashNgl(Component):
chosenAtomsColor:'#808080',
chosenAtomsRadius: 1,
molSpacingXaxis: 100,
sideByside: false,
}): The data (in JSON format) that will be used to style the displayed molecule
representations: one or multiple selected molecule representation
- Possible molecule styles:
'backbone,'ball+stick','cartoon', 'hyperball','licorice','line',
'ribbon',''rope','spacefill','surface','trace','tube'
- Possible additional representations:
'axes','axes+box','helixorient','unitcell'
chosenAtomsColor: color of the 'ball+stick' representation of the chosen atoms. molStyles has the following type: dict containing keys 'representations', 'chosenAtomsColor', 'chosenAtomsRadius', 'molSpacingXaxis'.
chosenAtomsColor: color of the 'ball+stick' representation of the chosen atoms. molStyles has the following type: dict containing keys 'representations', 'chosenAtomsColor', 'chosenAtomsRadius', 'molSpacingXaxis', 'sideByside'.
Those keys have the following types:
- representations (list of strings; optional)
- chosenAtomsColor (string; required)
- chosenAtomsRadius (number; required)
- molSpacingXaxis (number; required)"""
- molSpacingXaxis (number; required)
- sideByside (boolean; required)"""
@_explicitize_args
def __init__(self, id=Component.UNDEFINED, viewportStyle=Component.UNDEFINED, stageParameters=Component.UNDEFINED, imageParameters=Component.UNDEFINED, downloadImage=Component.UNDEFINED, pdbString=Component.UNDEFINED, data=Component.UNDEFINED, molStyles=Component.UNDEFINED, **kwargs):
self._prop_names = ['id', 'viewportStyle', 'stageParameters', 'imageParameters', 'downloadImage', 'pdbString', 'data', 'molStyles']
Expand Down
2 changes: 1 addition & 1 deletion dash_ngl/dash_ngl.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dash_ngl/dash_ngl.min.js.map

Large diffs are not rendered by default.

16 changes: 14 additions & 2 deletions dash_ngl/metadata.json
Expand Up @@ -90,6 +90,10 @@
{
"name": "xOffset",
"type": null
},
{
"name": "sideByside",
"type": null
}
],
"returns": null
Expand Down Expand Up @@ -122,6 +126,10 @@
{
"name": "xOffset",
"type": null
},
{
"name": "sideByside",
"type": null
}
],
"returns": null
Expand Down Expand Up @@ -300,7 +308,7 @@
"required": false,
"description": "The data (in JSON format) that will be used to display the molecule\nfilename: name of the used pdb/cif file\next: file extensions (pdb or cif)\nselectedValue: pdbString\nmolStyles: selected molecule representation (cartoon, stick, sphere)\nchain: selected chain\ncolor: chain color\naaRange: selected residues range\nconfig.input: content of the pdb file\nconfig.type: format of config.input\nresetView: bool if the view should be resettet\nuploaded: bool if the file was uploaded",
"defaultValue": {
"value": "[{\n filename: 'placeholder',\n ext: '',\n selectedValue: 'placeholder',\n chain: 'ALL',\n aaRange: 'ALL',\n color: 'red',\n chosen: {\n 'chosenAtoms':'',\n 'chosenResidues':''\n },\n config: {\n type: 'text/plain',\n input: ''\n },\n uploaded: true,\n resetView: false,\n}]",
"value": "[{\n filename: 'placeholder',\n ext: '',\n selectedValue: 'placeholder',\n chain: 'ALL',\n aaRange: 'ALL',\n color: 'red',\n chosen: {\n 'atoms':'',\n 'residues':''\n },\n config: {\n type: 'text/plain',\n input: ''\n },\n uploaded: true,\n resetView: false,\n}]",
"computed": false
}
},
Expand All @@ -326,13 +334,17 @@
"molSpacingXaxis": {
"name": "number",
"required": true
},
"sideByside": {
"name": "bool",
"required": true
}
}
},
"required": false,
"description": "The data (in JSON format) that will be used to style the displayed molecule\nrepresentations: one or multiple selected molecule representation\n - Possible molecule styles:\n 'backbone,'ball+stick','cartoon', 'hyperball','licorice','line',\n 'ribbon',''rope','spacefill','surface','trace','tube'\n - Possible additional representations:\n 'axes','axes+box','helixorient','unitcell'\nchosenAtomsColor: color of the 'ball+stick' representation of the chosen atoms",
"defaultValue": {
"value": "{\n representations:['cartoon','axes+box'],\n chosenAtomsColor:'#808080',\n chosenAtomsRadius: 1,\n molSpacingXaxis: 100,\n}",
"value": "{\n representations:['cartoon','axes+box'],\n chosenAtomsColor:'#808080',\n chosenAtomsRadius: 1,\n molSpacingXaxis: 100,\n sideByside: false,\n}",
"computed": false
}
}
Expand Down

0 comments on commit a774b05

Please sign in to comment.