Small molecule structures are typically expressed in the well known SMILES format. Below are the SMILES strings of a few drug molecules:
Drug
SMILES
In the most common case, each input sample corresponds to a single molecule. However, some models expect a list of molecules as input, and some even expect more complex inputs such as pairs of lists of molecules. Multiple molecules (lists) can be serialized to strings in the SMILES notation with the dot (.) character.
Valid input file formats are comma-separated (.csv), tab-separated (.tsv) and JSON (.json). Ersilia automatically recognizes these formats. Inputs can also be passed as Python instances through the Ersilia Python API.
It is possible to run Ersilia models for one input as well as multiple inputs. Ersilia automatically detects the if one or multiple inputs are passed.
Single molecules
One input
This is the simplest case where one single molecule is passed as input.
compound_single.csv
smilesCC1C2C(CC3(C=CC(=O)C(=C3C2OC1=O)C)C)O
compound_single.json
"CC1C2C(CC3(C=CC(=O)C(=C3C2OC1=O)C)C)O"
smiles ="CC1C2C(CC3(C=CC(=O)C(=C3C2OC1=O)C)C)O"
Multiple inputs
This is a common case too, where multiple single molecules are passed as input. The model will run predictions/calculations for each molecule independently.
The majority of Ersilia chemistry models take single molecules as input.
List of molecules
One input
Here the molecule expects a list of molecules as input, therefore, the one prediction/calculation will be done based on the list as a whole. Some generative models, for example, require multiple molecules as a starting point for one generation round.
Note that, in this case, the compound_list.csv file is the same as the compound_singles.csv file, corresponding to the multiple single molecules. However, the model will treat these files differently. In the current case, the full list corresponds to one input, whereas in the previous case each single molecule was an independent input. In the Ersilia Model Hub, the Input Shape field is labelled as Single or List, correspondingly.
Multiple inputs
Here, multiple lists are passed as input, and each list is treated independently by the model.
To specify a list in a single column in a .csv file, molecules can be separated with a dot (.). The type of delimiter is specific to the input type. The SMILES notation naturally accepts the dot as a separator for multiple molecules.
Pair of lists of molecules
One input
This corresponds to a less common case where, one input is expressed as a pair of lists. An example would be a model comparing two sets of molecules and returning an overall similarity values (one float number) between the two sets.
Please note that the compound_pair_of_lists.csv file contains two columns, one for each set. The first set has three molecules, and the second set has four molecules. Therefore, the first column contains one empty row.
Multiple inputs
Multiple pairs of lists can be passed to obtain multiple predictions/calculations, one for each pair. Like in the case of multiple lists, molecules can be separated with a dot character in a tabular file.
You can generate inputs of arbitrary size for your model of interest with the following command. In this case, we generate 1,000 inputs for the chemprop-antibiotic model and store them as a .csv file.
This command simply samples drug molecules from the attached table.
Ersilia will automatically detect the SMILES column and the format in an input file, so it is acceptable to pass the drug_molecules.tsv file as is, or a chunk of it.
Small molecule databases
Many small molecule databases exist in the public domain. If you want to look for a molecule of interest, consider the following resources:
PubChem as a go-to search tool to obtain generalistic chemical information.
ChEMBL as a search tool for bioactivity data of medicinal chemistry compounds.
DrugBank to obtain comprehensive information about drug molecules.
ZINC to search for commercially-available libraries of compounds.