Skip to main content

SolTranNet

The official implementation of SolTranNet.

SolTranNet is an optimized fork of the Molecule Attention Transformer, whose original paper can be found here.

Requirements

  • Python 3.6+
  • PyTorch 1.7+
  • RDKit 2017.09.1+
  • pathlib 1.0+

Soft Requirements

  • CUDA 10.1, 10.2, or 11.1

We heavily suggest installing CUDA and compiling PyTorch with it enabled to have faster models.

You can see installation instructions for CUDA here.

You can see installation instructions for PyTorch here.

Installation

Tested on Ubuntu 18.04.5, Ubuntu 20.04.2, Debian 10, Fedora 33, CentOS 8.3.2011, Windows 10, and Ubuntu 20.04.2 subsystem for Windows 10

First, install RDKit. Installation instructions are available here

After RDKit has finished installing, you can install SolTranNet via pip:

python3 -m pip install soltrannet

NOTE: This installation method often mismatches installation of PyTorch for enabling CUDA if it needs to install PyTorch as a dependency.

If you wish to do a more careful installation:

python3 -m pip install --install-option test soltrannet

This will run our unit tests to ensure that GPU-enabled torch was setup correctly, and the proper functioning of SolTranNet as a command line tool and within a python environment.

Usage

Command line tool

Upon successful pip installation, a command line tool will be installed.

To generate the predictions for SMILES provided in my_smiles.txt and store them into my_output.txt:

soltrannet my_smiles.txt my_output.txt

You can see all of the options available for the command line tool:

usage: soltrannet [-h] [--batchsize BATCHSIZE] [--cpus CPUS] [--cpu_predict] [input] [output]

Run SolTranNet aqueous solubility predictor

positional arguments:
  input                 PATH to the file containing the SMILES you wish to
                        use. Assumes the content is 1 SMILE per line.

  output                Name of the output file. Defaults to stdout.

optional arguments:
  -h, --help            show this help message and exit
  --batchsize BATCHSIZE
                        Batch size for the data loader. Defaults to 32.

  --cpus CPUS           Number of CPU cores to use for the data loader.
                        Defaults to use all available cores. Pass 0 to only
                        run on 1 CPU.

  --cpu_predict         Flag to force the predictions to be made on only the
                        CPU. Default behavior is to use GPU if available.

In a Python environment

Soltrannet also supports integration in a python3 environment

import soltrannet as stn
my_smiles=["c1ccccc1","c1ccccc1 .ignore","Cn1cnc2n(C)c(=O)n(C)c(=O)c12","[Zn+2]","[Na+].[Cl-]"]
predictions=list(stn.predict(my_smiles))

Help

Please subscribe to our slack team.

Metadata

Release files for soltrannet 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for soltrannet 1.0.0
File Size Uploaded Provenance Actions
soltrannet-1.0.0.tar.gz 41.9 kB Without provenance Details for soltrannet-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for soltrannet 1.0.0
File Interpreter ABI Platform Actions
soltrannet-1.0.0-py3-none-any.whl Python 3 none any Details for soltrannet-1.0.0-py3-none-any.whl

Total release size: 83.7 kB

Release files / soltrannet-1.0.0.tar.gz

Download URL soltrannet-1.0.0.tar.gz
Size 41.9 kB
Tags Source
SHA-256 checksum
How to use checksums
73267af6786a271875c4111b46453ea9e43ce2612f69eaa0a1608873fa30d931
BLAKE2b-256 checksum
How to use checksums
8cd6d592b95282a4a74c5750aa66a3b402d258e00dd6a2ef1a15c46496410119
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.23.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9

Release files / soltrannet-1.0.0-py3-none-any.whl

Download URL soltrannet-1.0.0-py3-none-any.whl
Size 41.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
91d4329e4144883151bf1c57e064812b956253f6895f709fbb099c4587bffcf1
BLAKE2b-256 checksum
How to use checksums
6a0f9ba461b99904879f79a233226f6c621154b9c745ef4c72bf8fbe7fd89581
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.23.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.9

Security for soltrannet 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page