SmallWorld Documentation for Future Developer
Introduction
Here is the link to Smallworld's manual
- Username: ucsf@nextmovesoftware.com
- Password: <Ask jjiteam@googlegroups.com>
All smallworld databases live in abacus' db3.
Smallworld frontend files are consolidated and located at /export/db3/smallworld_extract/.extract.
Execute command start_smallworld to see options on which smallworld instance to start/restart.
How to Download Smallworld
- Ssh to abacus and become root. Prepare directory
mkdir /opt/nextmove/smallworld-<version> && cd /opt/nextmove/smallworld-<version>
- Download Software with this link
- Username: ucsf@nextmovesoftware.com
- Password: <Ask jjiteam@googlegroups.com>
- Go to releases. Look for smallworld-java-<version>.tar.gz and copy the link address.
- Download using wget
wget --user ucsf@nextmovesoftware.com --password <Ask jjiteam@googlegroups.com> <link address>
- Decompress the file
tar -xvf <file_name>
How to Launch Smallworld For The First Time
Prepare Files and Directories
- Ssh to abacus and become root
- Open a port in the firewall
firewall-cmd --permanent --add-port=<port_number>/tcp firewall-cmd --reload
- Go to smallworld databases directory
cd /export/db3/
- Create a Smallworld directory and go to it
mkdir <smallworld_dir> && cd <smallworld_dir>
- Inside that directory, create these
- a symbolic link to the smallworld anon map
ln -s /export/db2/smallworld_anon_21Q4 anon
- a sub-directory called maps to store databases
mkdir maps
- a smallworld config file
vim smallworld.cfg
- Add this block of code inside the config file
[WebApp] DepictionUrl=./depict/svg?w=%w&h=%h&smi=%s&qry=%q&cols=%c&cmap=%m ResolverUrl=./util/smi2mol?smi=%s SearchTimeOut=5000 SearchAsYouDraw=true [Score] Name=Atom Alignment Description=Aligns and scores each hit relative to the query atom types, differences are categorised as MAJ, MIN, HYB, SUB Class=com.nmsoftware.smallworld.score.SimpleAtomAlignment EnabledByDefault=false MappingMode=EditMap [Score] Name=SMARTS Alignment Description=Treat input as SMARTS and align and score each hit relative to the query atom expressions in the input Class=com.nmsoftware.smallworld.score.SmartsAtomAlignment EnabledByDefault=false [Score] Name=ECFP4 Description=Extended Connectivity Circular Fingerprint Class=com.nmsoftware.smallworld.score.EcfpTanimoto Radius=2 EnabledByDefault=true [Score] Name=Daylight Description=Path based fingerprint Class=com.nmsoftware.smallworld.score.DaylightTanimoto EnabledByDefault=true
- SearchTimeOut should be the only option you'll change in the future. It caps search time to lessen strain on machine.
- Place any *.anon.maps you've already compiled for testing into the maps sub-directory.
Start Smallworld Instance
- Go to smallworld extract directory
cd /export/db3/smallworld_extract
- Create a screen
screen -S <screen_name>
- Export the smallworld directory you've made
export SWDIR=/export/db3/<smallworld_dir>
- Launch java
java -jar /opt/nextmove/smallworld-<version>/sw-ws-<version>.jar --httpPort=<port_number>
How to Build Smallworld Maps/Databases
Consolidate smiles into /export/db3/temp_mapping.
Use the script located in that directory called smallworld_map_script.
Here is the content of the script:
#!/bin/csh -f
setenv SWDIR /export/db3/public_smallworld_4th_gen/
alias sw 'time java -jar /opt/nextmove/smallworld-5.1/sw.jar'
set target = '*.smi'
foreach i ($target)
echo '(sw map' $i '-T tmp/ -o '${i}'.anon.map -u '${i}'.anon.unmapped) |& tee '${i}'_log'
(sw map $i -T tmp/ -o ${i}.anon.map -u ${i}.anon.unmapped) |& tee ${i}_log
echo 'sw blm -p 0.01 '${i}'.anon.map'
sw blm -p 0.01 ${i}.anon.map
end
Command Details
setenv sets the environment where the anon master map is java -jar /opt/nextmove/smallworld-5.1/sw.jar shortened to sw via alias. map will map the smiles based on the current anon master map.
- -T stores temp files so /tmp does not get overloaded
- -o output with custom name you like
- -u will collect the unmapped molecules to send to Nextmove or to use swextend
tee will log the progress of the process
Splitting Databases
[Follow this page if John has asked you to split the database into smaller slices.]
Running SmallWorld from the Command Line
We have been running SmallWorld on n-9-22 as www which uses csh as the default shell. There is a file in /mnt/nfs/soft/www/home/smallworld called run_sw which contains the following commands to set up the SmallWorld Command Line Interface (CLI)
Set the SWDIR environment variable so SmallWorld scripts can access the 12 TB index
setenv SWDIR /srv/db4
Set the path to the SmallWorld C++ Executables
set path = ($path /opt/nextmove/bin)
Alias the keyword "sw" to access the Java CLI
alias sw 'java -jar /opt/nextmove/sw.jar'
Tips for Running SmallWorld on the Command Line
Use sw help to get information about available commands
sw help