Arthor Documentation for Future Developer: Difference between revisions
No edit summary |
No edit summary |
||
Line 87: | Line 87: | ||
Set '''AutomaticIndex''' to false if you don't want new smiles files added to the data directory to be indexed automatically | Set '''AutomaticIndex''' to false if you don't want new smiles files added to the data directory to be indexed automatically | ||
==Setting up Round Table== | |||
Note this requires Arthor version 3 or later. This section in progress |
Revision as of 20:22, 7 January 2020
Written by Jennifer Young on December 16, 2019. Last edited January 6, 2020
Install and Set Up on TomCat
Arthor currently runs on n-1-136, which runs CentOS Linux release 7.7.1908 (Core). You can check the version of CentOS with the following command
cat /etc/centos-release
Check your current version of Java with the following command:
java -version
On n-1-136 we are running openjdk version "1.8.0_222", OpenJDK Runtime Environment (build 1.8.0_222-b10), and OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode) If Java is not installed, install it using yum
I followed this link to install TomCat on CentOS 7 https://linuxize.com/post/how-to-install-tomcat-9-on-centos-7/
Open port for Arthor
In order for Arthor to be usable in the browser, the port you wish to run it on must be opened. https://www.thegeekdiary.com/how-to-open-a-ports-in-centos-rhel-7/
Step 1: Check Port Status
Check that the port is not open and that Apache is not showing that port.
netstat -na | grep <port number you are checking>
lsof -i -P |grep http
Step 2: Check Port Status in IP Tables
iptables-save | grep <port number you are checking>
I skipped Step 3 from the guide, because there was a lot of information in the /etc/services file and I didn't want to edit it and break something.
Step 4: Open Firewall Ports
I did not include the zone=public section because the stand-alone servers are usually used for private instances of Arthor and SmallWorld. Run as root.
firewall-cmd --add-port=<port number you are adding>/tcp --permanent
You need to reload the firewall after a change is made.
firewall-cmd --reload
How to run standalone Arthor instance
Step 1: Use or start a bash shell
You can check your default shell using
echo $SHELL
If your default shell is csh, use
bash
to start a new bash shell in the current terminal window. Note that echo $SHELL will show you your default shell regardless of the current shell.
Step 2: Set your environment variables
export ARTHOR_DIR=/opt/nextmove/arthor/arthor-3.0-rt-beta-linux export PATH=$ARTHOR_DIR/bin/:$PATH
Make sure the ARTHOR_DIR variable is set to the directory for the latest version of Arthor or whichever version you would like to test. The PATH environment variable is needed if you wish to use the Arthor tools from the command line
Step 3: Run the arthor-server.jar
java -jar /opt/nextmove/arthor/arthor-3.0-rt-beta-linux/java/arthor-server.jar --httpPort <your httpPort>
Setting environment variables for TomCat Server
Set the environment variables in the setenv.sh file. Note: Be sure to edit the file in the directory corresponding to the latest version of TomCat. As of December 2019, we are running 9.0.27 on n-1-136.
vim /opt/tomcat/apache-tomcat-9.0.27/bin/setenv.sh
Add the line below to the setenv.sh file above, or substitute the path to wherever you currently store the arthor.cfg file
export ARTHOR_CONFIG=/usr/local/tomcat/arthor.cfg
Here is an example of the arthor.cfg file:
# Arthor generated config file BINDIR=/opt/nextmove/arthor/arthor-2.1.2-centos7/bin DATADIR=/usr/local/tomcat/arthor_data STAGEDIR=/usr/local/arthor_data/stage NTHREADS=64 . NODEAFFINITY=true SearchAsYouDraw=true AutomaticIndex=true DEPICTION=./depict/bot/svg?w=%w&h=%h&svgunits=px&smi=%s&zoom=0.8&sma=%m&smalim=1 RESOLVER=
Important parts of the arthor.cfg file
BINDIR is the location of the Arthor command line binaries. These are used to generate the Arthor index files and to perform searches directly on n-1-136. An example of this would be using atdbgrep for substructure search.
DATADIR This is the directory where the Arthor data files live. Location where the index files will be created and loaded from.
STAGEDIR Location where the index files will be built before being moved into the DATADIR.
NTHREADS The number of threads to use for both ATDB and ATFP searches
Set AutomaticIndex to false if you don't want new smiles files added to the data directory to be indexed automatically
Setting up Round Table
Note this requires Arthor version 3 or later. This section in progress