Skip to main content

A Nanome plugin that creates a web interface to upload files and make them available in Nanome

Project description

Nanome - Vault

A Nanome plugin that creates a web interface to upload files and make them available in Nanome

Nanome Vault will start a web server. Other people can upload molecules or other files to it, and they will appear in Nanome. This works for both Nanome & Nanome Curie (Quest edition).

Supports Nanome v1.16 and up. For previous versions, please check out Vault v1.2.1

Files Supported

Vault natively supports:

  • Molecules: .cif .mol2 .pdb .sdf .smiles .xyz
  • 3rd party files: .ccp4 .dsn6 .dx .mae .moe .pqr .pse .psf
  • Documents: .pdf
  • Trajectories: .dcd .gro .trr .xtc
  • Images: .png .jpg
  • Workspaces: .nanome
  • Macros: .lua

Using Gotenberg, the following are converted to PDF:

  • Documents: .doc .docx .txt .rtf .odt
  • Presentations: .ppt .pptx .odp

Installation

It is highly recommended to run Vault in Docker; please see the Docker Usage section.

$ pip3 install nanome-vault --upgrade

Usage

To start the plugin:

$ nanome-vault -a <plugin_server_address> [optional args]

On Linux, you might have to start using sudo nanome-vault to listen on port 80.

To utilize file conversion (to support files like .ppt and .doc), launch Gotenberg:

$ docker run --rm -p 3000:3000 thecodingmachine/gotenberg:6

and add -c http://localhost:3000 as an argument when you start the plugin.

Optional arguments:

  • -c url or --converter-url url

    The url of the Gotenberg service to use for conversion. Defaults to http://vault-converter:3000 for use inside Docker. Example: -c http://localhost:3000

  • --enable-auth

    Enables enforced authentication, preventing users from accessing files in the Web UI unless they are logged in.

  • --keep-files-days days

    Automatically delete files that haven't been accessed in a given number of days. Example: to delete untouched files after 2 weeks: --keep-files-days 14

  • -s certfile or --ssl-cert certfile

    SSL certificate to be used for HTTPS. If port is not set, port will default to 443. Example: -s ./cert.pem

    To generate a self signed certificate to use for local HTTPS:
    openssl req -new -x509 -keyout cert.pem -out cert.pem -days 365 -nodes -subj '/CN=localhost'

  • -u url or --url url

    The url to display in the plugin for accessing the Web UI. Example: -u vault.example.com

  • -w port or --web-port port

    The port to use for the Web UI. Example: -w 8080

    Some OSes prevent the default port 80 from being used without elevated permissions, so this option may be used to change to an allowed port.

In Nanome:

  • Activate Plugin
  • Click Run
  • Open your web browser, go to "127.0.0.1" (or your computer's IP address from another computer), and add supported files. Your files will appear in Nanome.

Docker Usage

To run with Docker including Gotenberg:

$ cd docker
$ ./build.sh
$ ./deploy.sh -a <plugin_server_address> [optional args]

Development

Ensure you have the latest nanome lib installed with:

$ pip3 install nanome --upgrade

Run the plugin and web server:

$ python run.py -a <plugin_server_address> [optional args]

Web UI Development

Run the Vue.js dev server in another terminal while plugin is running:

$ cd nanome_vault/WebUI
$ yarn install
$ yarn run serve

Note: this will only work if the plugin's web server is started on the default port (without using the -w option). To work with a non-default port, change the proxy settings in vue.config.js.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for nanome-vault, version 2.2.2
Filename, size File type Python version Upload date Hashes
Filename, size nanome_vault-2.2.2-py2.py3-none-any.whl (148.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size nanome-vault-2.2.2.tar.gz (148.7 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page