diff --git a/docs/usage/tools.md b/docs/usage/tools.md index 07df55b..f36baf2 100644 --- a/docs/usage/tools.md +++ b/docs/usage/tools.md @@ -6,9 +6,7 @@ ECNet databases are comma-separated value (CSV) formatted files that provide inf Our [databases](https://github.com/ECRL/ECNet/tree/master/databases) directory on GitHub contains databases for cetane number, cloud point, kinetic viscosity, pour point and yield sooting index, as well as a database template. -You can create an ECNet-formatted database with molecule names or SMILES and (optionally) target values. The following programs must be installed for you to do so: -- [Open Babel](http://openbabel.org/wiki/Main_Page) software -- [Java JRE](https://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html) version 6 and above +You can create an ECNet-formatted database with molecule names or SMILES and (optionally) target values. [Java JRE](https://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html) version 6 and above is required to create a database. Supplied names or SMILES must exist in a text file, one entry per line: ``` @@ -70,6 +68,8 @@ smiles = get_smiles('Molecule Name') ### SMILES string to MDL Molfile +Creating an MDL file requires [Open Babel](http://openbabel.org/wiki/Main_Page) to be installed. + A text file containing SMILES strings, one per line, is required: ``` @@ -100,6 +100,19 @@ from ecnet.tools.conversions import mdl_to_descriptors mdl_to_descriptors('molfile.md', 'descriptors.csv') ``` +### SMILES string to QSPR descriptors + +A text file containing SMILES strings, one per line, is required, as well as an installation of [Java JRE](https://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html). + +*Note: the file extension for the text file containing SMILES strings must be ".smi" + +```python +from ecnet.tools.conversions import smiles_to_descriptors + +# A CSV file with descriptors is generated +smiles_to_descriptors('molecules.smi', 'descriptors.csv') +``` + ## ECNet .prj file usage Once an ECNet project has been created, the resulting .prj file can be used to predict properties for new molecules. A text file containing names or SMILES strings of new molecules, one per line, is required in addition to the .prj file.