Skip to content
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
af61b51
add wip shcoeffs tool
simonbray Apr 8, 2025
625da2c
add shed file
simonbray Apr 8, 2025
aa72e75
working version of lirasearch
simonbray Jun 13, 2025
f6d3689
Merge branch 'master' into shcoeffs
simonbray Jun 13, 2025
5769275
Merge remote-tracking branch 'upstream/master' into shcoeffs
simonbray Jun 16, 2025
adeedc6
fix lirasearch linting
simonbray Jun 13, 2025
2320b89
update test data
simonbray Jun 13, 2025
b7c2a54
bgruening comments
simonbray Jun 13, 2025
927c777
change container name and version
simonbray Jun 18, 2025
95f8848
tmp add loc file
simonbray Jun 18, 2025
e767b5d
add tool_data_table_conf files
simonbray Jun 18, 2025
3a87a14
[ci skip] update tool name in shed yaml
simonbray Jun 19, 2025
68dd4d5
try setting server state to ACTIVE_READ_ONLY?
simonbray Jun 20, 2025
55d37d4
change order of commands
simonbray Jun 20, 2025
8743f5d
add database files before starting ignite server
simonbray Jun 23, 2025
faa841d
startup, then symlink, then make readonly
simonbray Jun 23, 2025
2c8bb80
symlink with -f
simonbray Jun 23, 2025
2bfdb32
Merge branch 'master' into shcoeffs
simonbray Jun 23, 2025
e4f7793
add data, then start server, the set to read only
simonbray Jun 23, 2025
0587daf
remove ignite completely! use rocksdb instead
simonbray Jun 25, 2025
7ad3f6a
update test data
simonbray Jun 25, 2025
f0dd48c
remove is_test param
simonbray Jun 25, 2025
48faee4
tidy up wrapper
simonbray Jun 25, 2025
475e18d
fix coeffs location
simonbray Jun 26, 2025
6903c6a
add version column to loc file
simonbray Jun 26, 2025
666e744
Merge branch 'master' into shcoeffs
simonbray Jun 26, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions chemicaltoolbox/lirasearch/.shed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
categories:
- Computational chemistry
description: Generate 3D descriptors for a ligand conformer
long_description: |
Generate 3D descriptors for a ligand conformer, based on predicting
the electrostatic potential (ESP) using a deep neural network, and
computing spherical harmonic coefficients.

homepage_url: https://github.com/rwmontalvao/SHCoeffsDev
name: lirasearch
owner: bgruening
remote_repository_url: https://github.com/bgruening/galaxytools/tree/master/chemicaltoolbox/lirasearch/
type: unrestricted
maintainers:
- simonbray
68 changes: 68 additions & 0 deletions chemicaltoolbox/lirasearch/lirasearch.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<tool id="lirasearch" name="Identify similar conformers" version="@TOOL_VERSION@" profile="20.01">
<description>using LiraSearch spherical harmonic descriptors</description>
<macros>
<token name="@TOOL_VERSION@">0.1.0</token>
</macros>
<requirements>
<container type="docker">sb17/lirasearch:@TOOL_VERSION@</container>
</requirements>
<command detect_errors="exit_code">
<![CDATA[
export HOME=`pwd` &&
#if $ligand.ext == 'pdb':
ln -s $ligand ligand.pdb &&
#else
python /opt/scripts/convert_sdf_to_pdb.py $ligand ligand.pdb &&
#end if
python -m esp_dnn.predict -m ligand -i . -o . &&
esp-surface-generator ligand.pdb.pqr ligand.pdb.tmesh &&
sh-coeff-calculator . &&
micromamba run -n lirasearch python /opt/scripts/lira_search_sdf.py --in_file rid_coeffs.csv --out_file output --out_keys keys.txt --database ${database_select.fields.path}/rid_coeffs.csv --num_results $num_results &&
mkdir search_results && rocksdb_to_sdf ${database_select.fields.path} keys.txt search_results &&
micromamba run -n lirasearch python /opt/scripts/lira_super.py --target ligand.pdb --folder search_results &&
cat search_results/*rotated.sdf >> '$output_sdf'
]]>
</command>
<inputs>
<param name="ligand" type="data" format="pdb,sdf" label="Ligand file" help="Query for searching database" />
<param name="database_select" type="select" label="Select database to search">
<options from_data_table="lirasearch">
<filter type="sort_by" column="2" />
<validator type="no_options" message="No databases are available!" />
</options>
</param>
<param name="num_results" type="integer" value="50" label="Number of results to return" />
</inputs>
<outputs>
<data name="output_sdf" format="sdf" label="SDF with LiraSearch query results" />
</outputs>
<tests>
<test>
<param name="ligand" value="ligand.pdb" ftype="pdb" />
<param name="database_select" value="test"/>
<param name="num_results" value="2" />
<output name="output_sdf" value="lirasearch_output.sdf"/>
</test>
<test>
<param name="ligand" value="ligand.sdf"/>
<param name="database_select" value="test"/>
<param name="num_results" value="2" />
<output name="output_sdf" value="lirasearch_output.sdf"/>
</test>
</tests>
<help>
<![CDATA[

.. class:: infomark

**What this tool does**

Identify similar conformers to an input ligand, based on predicting the electrostatic potential (ESP) using a deep neural network and computing spherical harmonic coefficients.
]]>
</help>
<citations>
<citation type="doi">10.1101/2022.01.19.476747</citation>
<citation type="doi">10.1021/acs.jmedchem.9b01129</citation>
</citations>
</tool>

100 changes: 100 additions & 0 deletions chemicaltoolbox/lirasearch/test-data/ligand.pdb
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
ATOM 1 C1 MOL 1 -15.571 -21.538 0.079 0.00 0.00 C
ATOM 2 C2 MOL 1 -15.927 -20.222 -0.610 0.00 0.00 C
ATOM 3 C3 MOL 1 -15.772 -20.326 -2.133 0.00 0.00 C
ATOM 4 N4 MOL 1 -16.073 -19.033 -2.753 0.00 0.00 N
ATOM 5 C5 MOL 1 -16.274 -19.054 -4.180 0.00 0.00 C
ATOM 6 C6 MOL 1 -15.033 -19.345 -5.053 0.00 0.00 C
ATOM 7 O7 MOL 1 -13.944 -19.630 -4.569 0.00 0.00 O
ATOM 8 N8 MOL 1 -15.234 -19.261 -6.418 0.00 0.00 N
ATOM 9 C9 MOL 1 -16.512 -18.864 -7.057 0.00 0.00 C
ATOM 10 C10 MOL 1 -16.309 -19.152 -8.563 0.00 0.00 C
ATOM 11 C11 MOL 1 -14.812 -19.311 -8.685 0.00 0.00 C
ATOM 12 C12 MOL 1 -14.016 -19.403 -9.818 0.00 0.00 C
ATOM 13 C13 MOL 1 -12.638 -19.599 -9.683 0.00 0.00 C
ATOM 14 C14 MOL 1 -12.095 -19.706 -8.403 0.00 0.00 C
ATOM 15 C15 MOL 1 -12.865 -19.618 -7.241 0.00 0.00 C
ATOM 16 C16 MOL 1 -14.236 -19.411 -7.410 0.00 0.00 C
ATOM 17 C17 MOL 1 -15.209 -17.961 -2.252 0.00 0.00 C
ATOM 18 C18 MOL 1 -15.366 -17.863 -0.735 0.00 0.00 C
ATOM 19 N19 MOL 1 -15.037 -19.157 -0.136 0.00 0.00 N
ATOM 20 CL20 MOL 1 -10.358 -19.959 -8.240 0.00 0.00 CL
ATOM 21 Hh MOL 1 -16.224 -22.349 -0.263 0.00 0.00 H
ATOM 22 Hh MOL 1 -15.686 -21.455 1.167 0.00 0.00 H
ATOM 23 Hh MOL 1 -14.531 -21.813 -0.131 0.00 0.00 H
ATOM 24 Hh MOL 1 -16.989 -19.981 -0.406 0.00 0.00 H
ATOM 25 Hh MOL 1 -16.488 -21.065 -2.518 0.00 0.00 H
ATOM 26 Hh MOL 1 -14.757 -20.677 -2.369 0.00 0.00 H
ATOM 27 Hh MOL 1 -16.696 -18.086 -4.489 0.00 0.00 H
ATOM 28 Hh MOL 1 -17.043 -19.807 -4.412 0.00 0.00 H
ATOM 29 Hh MOL 1 -16.698 -17.796 -6.882 0.00 0.00 H
ATOM 30 Hh MOL 1 -17.348 -19.425 -6.634 0.00 0.00 H
ATOM 31 Hh MOL 1 -16.711 -18.345 -9.184 0.00 0.00 H
ATOM 32 Hh MOL 1 -16.825 -20.075 -8.859 0.00 0.00 H
ATOM 33 Hh MOL 1 -14.456 -19.325 -10.809 0.00 0.00 H
ATOM 34 Hh MOL 1 -11.997 -19.670 -10.554 0.00 0.00 H
ATOM 35 Hh MOL 1 -12.428 -19.703 -6.258 0.00 0.00 H
ATOM 36 Hh MOL 1 -15.526 -17.017 -2.714 0.00 0.00 H
ATOM 37 Hh MOL 1 -14.151 -18.128 -2.502 0.00 0.00 H
ATOM 38 Hh MOL 1 -16.399 -17.535 -0.509 0.00 0.00 H
ATOM 39 Hh MOL 1 -14.676 -17.106 -0.344 0.00 0.00 H
ATOM 40 Hh MOL 1 -15.096 -19.092 0.879 0.00 0.00 H
CONECT 1 2
CONECT 2 1 3 19
CONECT 3 2 4
CONECT 4 3 5 17
CONECT 5 4 6
CONECT 6 5 7 7 8
CONECT 7 6 6
CONECT 8 6 9 16
CONECT 9 8 10
CONECT 10 9 11
CONECT 11 10 12 12 16
CONECT 12 11 11 13
CONECT 13 12 14 14
CONECT 14 13 13 15 20
CONECT 15 14 16 16
CONECT 16 8 11 15 15
CONECT 17 4 18
CONECT 18 17 19
CONECT 19 2 18
CONECT 20 14
CONECT 1 21
CONECT 21 1
CONECT 1 22
CONECT 22 1
CONECT 1 23
CONECT 23 1
CONECT 2 24
CONECT 24 2
CONECT 3 25
CONECT 25 3
CONECT 3 26
CONECT 26 3
CONECT 5 27
CONECT 27 5
CONECT 5 28
CONECT 28 5
CONECT 9 29
CONECT 29 9
CONECT 9 30
CONECT 30 9
CONECT 10 31
CONECT 31 10
CONECT 10 32
CONECT 32 10
CONECT 12 33
CONECT 33 12
CONECT 13 34
CONECT 34 13
CONECT 15 35
CONECT 35 15
CONECT 17 36
CONECT 36 17
CONECT 17 37
CONECT 37 17
CONECT 18 38
CONECT 38 18
CONECT 18 39
CONECT 39 18
CONECT 19 40
CONECT 40 19
88 changes: 88 additions & 0 deletions chemicaltoolbox/lirasearch/test-data/ligand.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
ligand.pdb
OpenBabel06132509543D

40 42 0 0 1 0 0 0 0 0999 V2000
-15.5710 -21.5380 0.0790 C 0 0 0 0 0 0 0 0 0 0 0 0
-15.9270 -20.2220 -0.6100 C 0 0 2 0 0 0 0 0 0 0 0 0
-15.7720 -20.3260 -2.1330 C 0 0 0 0 0 0 0 0 0 0 0 0
-16.0730 -19.0330 -2.7530 N 0 0 0 0 0 0 0 0 0 0 0 0
-16.2740 -19.0540 -4.1800 C 0 0 0 0 0 0 0 0 0 0 0 0
-15.0330 -19.3450 -5.0530 C 0 0 0 0 0 0 0 0 0 0 0 0
-13.9440 -19.6300 -4.5690 O 0 0 0 0 0 0 0 0 0 0 0 0
-15.2340 -19.2610 -6.4180 N 0 0 0 0 0 0 0 0 0 0 0 0
-16.5120 -18.8640 -7.0570 C 0 0 0 0 0 0 0 0 0 0 0 0
-16.3090 -19.1520 -8.5630 C 0 0 0 0 0 0 0 0 0 0 0 0
-14.8120 -19.3110 -8.6850 C 0 0 0 0 0 0 0 0 0 0 0 0
-14.0160 -19.4030 -9.8180 C 0 0 0 0 0 0 0 0 0 0 0 0
-12.6380 -19.5990 -9.6830 C 0 0 0 0 0 0 0 0 0 0 0 0
-12.0950 -19.7060 -8.4030 C 0 0 0 0 0 0 0 0 0 0 0 0
-12.8650 -19.6180 -7.2410 C 0 0 0 0 0 0 0 0 0 0 0 0
-14.2360 -19.4110 -7.4100 C 0 0 0 0 0 0 0 0 0 0 0 0
-15.2090 -17.9610 -2.2520 C 0 0 0 0 0 0 0 0 0 0 0 0
-15.3660 -17.8630 -0.7350 C 0 0 0 0 0 0 0 0 0 0 0 0
-15.0370 -19.1570 -0.1360 N 0 0 0 0 0 0 0 0 0 0 0 0
-10.3580 -19.9590 -8.2400 Cl 0 0 0 0 0 0 0 0 0 0 0 0
-16.2240 -22.3490 -0.2630 H 0 0 0 0 0 0 0 0 0 0 0 0
-15.6860 -21.4550 1.1670 H 0 0 0 0 0 0 0 0 0 0 0 0
-14.5310 -21.8130 -0.1310 H 0 0 0 0 0 0 0 0 0 0 0 0
-16.9890 -19.9810 -0.4060 H 0 0 0 0 0 0 0 0 0 0 0 0
-16.4880 -21.0650 -2.5180 H 0 0 0 0 0 0 0 0 0 0 0 0
-14.7570 -20.6770 -2.3690 H 0 0 0 0 0 0 0 0 0 0 0 0
-16.6960 -18.0860 -4.4890 H 0 0 0 0 0 0 0 0 0 0 0 0
-17.0430 -19.8070 -4.4120 H 0 0 0 0 0 0 0 0 0 0 0 0
-16.6980 -17.7960 -6.8820 H 0 0 0 0 0 0 0 0 0 0 0 0
-17.3480 -19.4250 -6.6340 H 0 0 0 0 0 0 0 0 0 0 0 0
-16.7110 -18.3450 -9.1840 H 0 0 0 0 0 0 0 0 0 0 0 0
-16.8250 -20.0750 -8.8590 H 0 0 0 0 0 0 0 0 0 0 0 0
-14.4560 -19.3250 -10.8090 H 0 0 0 0 0 0 0 0 0 0 0 0
-11.9970 -19.6700 -10.5540 H 0 0 0 0 0 0 0 0 0 0 0 0
-12.4280 -19.7030 -6.2580 H 0 0 0 0 0 0 0 0 0 0 0 0
-15.5260 -17.0170 -2.7140 H 0 0 0 0 0 0 0 0 0 0 0 0
-14.1510 -18.1280 -2.5020 H 0 0 0 0 0 0 0 0 0 0 0 0
-16.3990 -17.5350 -0.5090 H 0 0 0 0 0 0 0 0 0 0 0 0
-14.6760 -17.1060 -0.3440 H 0 0 0 0 0 0 0 0 0 0 0 0
-15.0960 -19.0920 0.8790 H 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0 0 0 0
1 21 1 0 0 0 0
1 22 1 0 0 0 0
1 23 1 0 0 0 0
2 3 1 0 0 0 0
2 19 1 0 0 0 0
2 24 1 1 0 0 0
3 4 1 0 0 0 0
3 25 1 0 0 0 0
3 26 1 0 0 0 0
4 5 1 0 0 0 0
4 17 1 0 0 0 0
5 6 1 0 0 0 0
5 27 1 0 0 0 0
5 28 1 0 0 0 0
6 7 2 0 0 0 0
6 8 1 0 0 0 0
8 9 1 0 0 0 0
8 16 1 0 0 0 0
9 10 1 0 0 0 0
9 29 1 0 0 0 0
9 30 1 0 0 0 0
10 11 1 0 0 0 0
10 31 1 0 0 0 0
10 32 1 0 0 0 0
11 12 2 0 0 0 0
11 16 1 0 0 0 0
12 13 1 0 0 0 0
12 33 1 0 0 0 0
13 14 2 0 0 0 0
13 34 1 0 0 0 0
14 15 1 0 0 0 0
14 20 1 0 0 0 0
15 16 2 0 0 0 0
15 35 1 0 0 0 0
17 18 1 0 0 0 0
17 36 1 0 0 0 0
17 37 1 0 0 0 0
18 19 1 0 0 0 0
18 38 1 0 0 0 0
18 39 1 0 0 0 0
19 40 1 0 0 0 0
M END
$$$$
12 changes: 12 additions & 0 deletions chemicaltoolbox/lirasearch/test-data/lirasearch.loc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file lists databases that can be searched with LiraSearch.
# The file has the format (white space characters are
# TAB characters):
#
# <unique_id> <name> <path>
#
# So, lirasearch.loc could look something like this:
#value name path
#zinc20 ZINC20 /home/galaxy/zinc20
#zinc22 ZINC22 /home/galaxy/zinc22
#dude DUD-E /home/galaxy/dude
test test ${__HERE__}/storage
104 changes: 104 additions & 0 deletions chemicaltoolbox/lirasearch/test-data/lirasearch_output.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
ZINCae0000002oHX.0
RDKit 3D

28 28 0 0 1 0 0 0 0 0999 V2000
-0.7036 -0.3031 3.6344 C 0 0 2 0 0 0 0 0 0 0 0 0
-0.1394 -0.6688 2.2601 C 0 0 1 0 0 0 0 0 0 0 0 0
-0.8041 0.1978 1.1887 C 0 0 1 0 0 0 0 0 0 0 0 0
-1.8869 0.0922 1.2561 H 0 0 0 0 0 0 0 0 0 0 0 0
-0.4456 1.5660 1.3927 O 0 0 0 0 0 0 0 0 0 0 0 0
-0.3330 -0.2518 -0.1957 C 0 0 2 0 0 0 0 0 0 0 0 0
-0.5280 -1.3174 -0.3169 H 0 0 0 0 0 0 0 0 0 0 0 0
1.1684 0.0096 -0.3328 C 0 0 1 0 0 0 0 0 0 0 0 0
1.6352 -0.4422 -1.7195 C 0 0 2 0 0 0 0 0 0 0 0 0
0.8185 0.2922 -2.7866 C 0 0 2 0 0 0 0 0 0 0 0 0
-0.6700 0.0203 -2.5587 C 0 0 2 0 0 0 0 0 0 0 0 0
-1.0601 0.4984 -1.2269 N 0 0 1 0 0 0 0 0 0 0 0 0
-2.0524 0.3664 -1.1005 H 0 0 0 0 0 0 0 0 0 0 0 0
-0.8402 1.4797 -1.1452 H 0 0 0 0 0 0 0 0 0 0 0 0
-1.7797 -0.4763 3.6432 H 0 0 0 0 0 0 0 0 0 0 0 0
-0.5031 0.7481 3.8415 H 0 0 0 0 0 0 0 0 0 0 0 0
-0.2300 -0.9206 4.3977 H 0 0 0 0 0 0 0 0 0 0 0 0
0.9368 -0.4956 2.2513 H 0 0 0 0 0 0 0 0 0 0 0 0
-0.3398 -1.7200 2.0529 H 0 0 0 0 0 0 0 0 0 0 0 0
0.5055 1.7345 1.3464 H 0 0 0 0 0 0 0 0 0 0 0 0
1.3650 1.0749 -0.2117 H 0 0 0 0 0 0 0 0 0 0 0 0
1.7065 -0.5497 0.4326 H 0 0 0 0 0 0 0 0 0 0 0 0
1.4860 -1.5171 -1.8220 H 0 0 0 0 0 0 0 0 0 0 0 0
2.6922 -0.2065 -1.8430 H 0 0 0 0 0 0 0 0 0 0 0 0
1.1065 -0.0650 -3.7753 H 0 0 0 0 0 0 0 0 0 0 0 0
1.0078 1.3634 -2.7166 H 0 0 0 0 0 0 0 0 0 0 0 0
-0.8581 -1.0509 -2.6292 H 0 0 0 0 0 0 0 0 0 0 0 0
-1.2543 0.5417 -3.3169 H 0 0 0 0 0 0 0 0 0 0 0 0
1 2 1 0
1 15 1 6
1 16 1 0
1 17 1 0
2 3 1 0
2 18 1 1
2 19 1 0
3 4 1 6
3 5 1 0
3 6 1 0
5 20 1 0
6 7 1 6
6 12 1 0
6 8 1 0
8 9 1 0
8 21 1 1
8 22 1 0
9 10 1 0
9 23 1 1
9 24 1 0
10 11 1 0
10 25 1 6
10 26 1 0
11 12 1 0
11 27 1 1
11 28 1 0
12 13 1 1
12 14 1 0
M END
$$$$
ZINCae0000002oRr.0
RDKit 3D

18 18 0 0 0 0 0 0 0 0999 V2000
-0.4030 -0.4652 3.4033 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.7568 -0.6595 2.1571 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.9065 0.5147 1.2245 C 0 0 1 0 0 0 0 0 0 0 0 0
-0.0683 0.3082 0.0409 N 0 0 0 0 0 0 0 0 0 0 0 0
-0.4909 0.3343 -1.2318 C 0 0 0 0 0 0 0 0 0 0 0 0
0.6092 0.0944 -2.0377 C 0 0 0 0 0 0 0 0 0 0 0 0
0.6194 0.0313 -3.5030 C 0 0 0 0 0 0 0 0 0 0 0 0
-0.4090 0.1981 -4.1245 O 0 0 0 0 0 0 0 0 0 0 0 0
1.7220 -0.0784 -1.1801 C 0 0 0 0 0 0 0 0 0 0 0 0
1.3080 0.0568 0.0488 N 0 0 0 0 0 0 0 0 0 0 0 0
-0.2957 -1.3067 4.0718 H 0 0 0 0 0 0 0 0 0 0 0 0
-0.2185 0.5365 3.7624 H 0 0 0 0 0 0 0 0 0 0 0 0
-0.9413 -1.6612 1.7980 H 0 0 0 0 0 0 0 0 0 0 0 0
-1.9491 0.6063 0.9199 H 0 0 0 0 0 0 0 0 0 0 0 0
-0.5958 1.4262 1.7351 H 0 0 0 0 0 0 0 0 0 0 0 0
-1.5028 0.5096 -1.5663 H 0 0 0 0 0 0 0 0 0 0 0 0
1.5424 -0.1637 -4.0286 H 0 0 0 0 0 0 0 0 0 0 0 0
2.7366 -0.2816 -1.4896 H 0 0 0 0 0 0 0 0 0 0 0 0
1 2 2 0
1 11 1 0
1 12 1 0
2 3 1 0
2 13 1 0
3 4 1 0
3 14 1 6
3 15 1 0
4 10 1 0
4 5 1 0
5 6 2 0
5 16 1 0
6 7 1 0
6 9 1 0
7 8 2 0
7 17 1 0
9 10 2 0
9 18 1 0
M END
$$$$
Binary file not shown.
1 change: 1 addition & 0 deletions chemicaltoolbox/lirasearch/test-data/storage/CURRENT
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MANIFEST-000005
1 change: 1 addition & 0 deletions chemicaltoolbox/lirasearch/test-data/storage/IDENTITY
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a04d2a72-b1ab-4ef4-8bd4-bab49ae2ee58
Empty file.
Loading