Skip to main content
Version: 1.1.1

Configuration

Info

This page is still being edited and reviewed.

User name_abbreviation

Name abbreviation, like e-mails, are unique in the DB and can be used for sign in. The length of it can be defined in the user_props.yml configuration file:

# from the application dir (/var/www/chemotion_ELN/current) copy the config file 
cp config/user_props.yml.example config/user_props.yml

# edit it
vim config/user_props.yml

# restart the application (assuming Passenger is being used)
touch tmp/restart.txt

# keep the configuration for future Chemotion ELN updates (assuming Capistrano is used)
mv config/user_props.yml /var/www/chemotion_ELN/shared/config/user_props.yml
ln -s /var/www/chemotion_ELN/shared/config/user_props.yml /var/www/chemotion_ELN/current/config/user_props.yml

SciFindern

Chemotion ELN provides users with an easy way to search in CAS SciFindern. To enable this feature, the necessary information needs to be configured in the scfinder_n.yml file.

The scfinder_n.yml configuration file is in the config folder. To create the file for the first time,

# from the application dir (/var/www/chemotion_ELN/current) copy the config file 
cp config/scfinder_n.yml.example config/scfinder_n.yml

# edit it
vim config/scfinder_n.yml

# restart the application (assuming Passenger is being used)
touch tmp/restart.txt

# keep the configuration for future Chemotion ELN updates (assuming Capistrano is used)
mv config/scfinder_n.yml /var/www/chemotion_ELN/shared/config/scfinder_n.yml
ln -s /var/www/chemotion_ELN/shared/config/scfinder_n.yml /var/www/chemotion_ELN/current/config/scfinder_n.yml

scfinder_n.yml:

### example of scfinder_n.yml
production:
:provider:
:metadata: 'api/oauth2/metadata' # DON'T CHANGE
:host: 'https://scifinder-n.cas.org' # DON'T CHANGE
:client_id: '' # your client id, issued by CAS SciFinder
:redirect: 'sfn_cb' # DON'T CHANGE
:redirect_host: 'localhost' # your server
NOTE

After editing the scfinder_n.yml the service needs to be restarted.

Secret key

used for cookie encryption. stored in .env file

Structure editor

Chemotion ELN uses Ketcher as the default structure editor. To use other editors, configure the required files and the licence (if needed) in the structure_editors.yml file.

The structure_editors.yml configuration file is in the config folder. To create the file for the first time,

# from the application dir (/var/www/chemotion_ELN/current) copy the config file 
cp config/structure_editors.yml.example config/structure_editors.yml

# edit it
vim config/structure_editors.yml

# restart the application (assuming Passenger is being used)
touch tmp/restart.txt

# keep the configuration for future Chemotion ELN updates (assuming Capistrano is used)
mv config/structure_editors.yml /var/www/chemotion_ELN/shared/config/structure_editors.yml
ln -s /var/www/chemotion_ELN/shared/config/structure_editors.yml /var/www/chemotion_ELN/current/config/structure_editors.yml

Currently supported editors

NameVersion
ChemDraw JS17, 20
Ketcher 22.4
Marvin JS21.8

structure_editors.yml:

### example of structure_editors.yml
production:
:editors:
:chemdraw:
:label: 'ChemDrawJS'
:license: '/chemdraw/ChemDraw-JS-License.xml' # license file of ChemDraw
:extJs: ['/chemdraw/chemdrawweb/chemdrawweb.js'] # js of ChemDraw
:ketcher2:
:label: 'Ketcher 2'
:extSrc: '/editors/ketcher/index.html'
:marvinjs:
:label: 'MarvinJS'
:license: 'license file' # license file of MarvinJS
:extJs: ['external javascript files to be included'] # js of MarvinJS
:extSrc: 'external file' # file of MarvinJS

💡 Tip: To install ChemDraw JS or Ketcher 2 library, unzip the (library).zip, and then copy the sub-folders and files to the folder which the system loads scripts.

NOTE

After editing the structure_editors.yml the service needs to be restarted.

Set hostname for file download

In order for file downloads (e. g., in exporting collections) to work correctly, you have to configure your hostname for Chemtion ELN. You can do that in the .env file:

HOST='my.hostname.com'
NOTE

If HOST is not set, Chemotion ELN may also use the value of SMTP_DOMAIN.

e-mail-service (optional)

For sending users account e-mail confirmation request, reset password instructions, or other notifications.

e-mail configuration parameters are set as environment variables in the .env file. below a list of available parameters:

# default url of your Chemotion ELN for http links in e-mails:
SMTP_HOST='sld.tld'
# senders e-mail:
DEVISE_SENDER='no-reply@sld.tld'

## SMTP config
# Remote mail server
SMTP_ADDRESS='smtp.sld.tld'
SMTP_PORT=587
# login user name & password:
SMTP_USERNAME='no-reply@sld.tld'
SMTP_PASSWORD='s3cr3tPW'
# optional, HELO domain
SMTP_DOMAIN='sld.tld'
# detect STARTTLS
SMTP_TLS=true
# authentication type ('plain' 'login' (Base64 encoded) or 'cram_md5')
SMTP_AUTH='plain'
# how OpenSSL checks the certificate ('none' or 'peer')
SMTP_SSL_MODE='none'

See rails docs for an explanation of the parameters.

File collector

This is an optional service to collect data files and distribute them to the Chemotion ELN inbox of the respective users.

(see the devices overview or doi: 10.1016/j.acax.2019.100007 )

Two options are available:

  • collecting attachment files from e-mails
  • collecting file or folder from local drives or over scp

e-mail-attachment collection

The Chemotion ELN-app should be given access to an e-mail account in which it will regularly check for incoming e-mails and collect the attachments. The attachments are then distributed to Chemotion ELN user by matching the additional addressee present in the To: or CC: field of the e-mail. The sender's e-mail address should also be one of an Chemotion ELN-registered device.

danger

All new incoming e-mails are processed and discarded. If the sender and other addresssees are unknown to the Chemotion ELN (e-mails registered to Chemotion ELN accounts), then the e-mail will be directly deleted.

File collection

Files can be collected from remote storages and distributed to specific user based on the file-name matching the user's name abbreviation.

danger

The directories watched by the collector service will be emptied at each collection i. e. all files within the watched directories will be removed.

Data-collector settings

Configure the frequency for collecting the files, as well as the e-mail access in the config/datacollectors.yml file. The background worker will collect the files at the frequencies set. If login credentials are needed, those are set in the configuration file as well.

### example of configdatacollector.yml 
production:
:services:
- :name: 'mailcollector'
:cron: '5,20,35,50 * * * *' # every 15 minutes starting a xx:05
- :name: 'folderwatchersftp'
:every: 5 # minutes
:watcher_sleep: 30 # seconds
- :name: 'folderwatcherlocal'
:every: 5 # minutes
:watcher_sleep: 30 # seconds
- :name: 'filewatchersftp'
:every: 2 # minutes
- :name: 'filewatcherlocal'
:every: 2 # minutes

## Chemotion ELN e-mail account
:mailcollector:
:server: 'imap.server.de'
:mail_address: "service@mail"
:password: "password"
# :port: 993 default
# :ssl: true default
:aliases:
- 'alias_one@kit.edu'
- 'alias_two@kit.edu'

## File collection over ssh with password
:sftpusers:
- :user: 'user1'
:password: 'pass'
- :user: 'user2'
:password: 'pass'

# Dir of ssh keys for data collection over sftp
:keydir: 'config/data_collector_keys'

# Allowlist of dir paths for local data collection
:localcollectors:
- :path: '<%= Rails.root.join(*%w[tmp datacollector]).to_s %>'
NB

After editing the datacollectors.yml the worker service (DelayedJob) needs to be restarted.

For each registered Device, a collection job can be set up through the administrator interface:

adminui-datacollector

External services

Chem-Spectra-App

Installation

Use this installation guide: https://github.com/ComPlat/chem-spectra-app/blob/master/INSTALL.md

Configuration in Chemotion-ELN

To configure Chemotion-ELN to connect to Chem-Spectra, create a configuration file:

# from the application dir (/var/www/chemotion_ELN/current) copy the config file 
cd /var/www/chemotion_ELN/current
cp config/spectra.yml.example config/spectra.yml

If you followed the above installation guide you may edit spectra.yml as follows:

production:
:url: '127.0.0.1'
:port: '3007'

Restart the application (assuming Passenger is being used):

touch tmp/restart.txt

To keep the configuration for future Chemotion ELN updates (assuming Capistrano is used):

mv config/spectra.yml /var/www/chemotion_ELN/shared/config/spectra.yml
ln -s /var/www/chemotion_ELN/shared/config/spectra.yml /var/www/chemotion_ELN/current/config/spectra.yml

Automatic startup in crontab

To make sure Chem-Spectra is started on reboot you can use this BASH script in your root crontab (if required, adapt Chemotion-ELN username and home directory):

#!/bin/bash

sudo -H -u production bash -c "cd /home/production/chem-spectra-app && \
source /home/production/anaconda3/bin/activate chem-spectra && \
gunicorn -w 4 -b 0.0.0.0:3007 server:app --daemon"

docker run --detach --name msconvert_docker \
--rm -it \
-e WINEDEBUG=-all \
-v /home/production/chem-spectra-app/chem_spectra/tmp:/data \ ## Modify path according to your installation
chambm/pwiz-skyline-i-agree-to-the-vendor-licenses bash

VNC

Access remote Desktops with VNC using websockify

adminui-vnc

installation: https://github.com/novnc/websockify

A VNC server needs to be installed on each remote machine.

setting: through the Administrator-interface

Onlyoffice

Install OnlyOffice instance on a server:

# from the application dir (/var/www/chemotion_ELN/current) copy the config file 
cp config/editors.yml.example config/editors.yml

# edit it
vim config/editors.yml

# restart the application (assuming Passenger is being used)
touch tmp/restart.txt

# keep the configuration for future Chemotion ELN updates (assuming Capistrano is used)
mv config/editors.yml /var/www/chemotion_ELN/shared/config/editors.yml
ln -s /var/www/chemotion_ELN/shared/config/editors.yml /var/www/chemotion_ELN/current/config/editors.yml

Computed properties

source: installation:

hint: Turbomols license needed settings the computed-properties can be done directly from the Admin-UI, and are saved in the DB

Application will need to be restarted

Dynamic Welcome e-mail and Message (optional)

caution

This feature is still in Beta version.

This configuration enables sending a welcome message as an e-mail to the new users upon registration. It also displays the same content as a welcome message at the home page. The content is dynamic and can be modified and updated anytime.

adminui-welcomemessage

The message is rendered via .md file, you can find the sample file here. In order to configure this, you just need to create a similar file as above in the same public directory named as welcome-message.md. You can copy the content from the sample file and modify the message as you wish.

note

Restarting of server might be required if you are adding the file to an already running instance.