Skip to content

Commit

Permalink
Documentation updated to the new installation
Browse files Browse the repository at this point in the history
  • Loading branch information
carlesperez94 committed Nov 15, 2019
1 parent 8ac4e94 commit ec3b922
Show file tree
Hide file tree
Showing 91 changed files with 19,365 additions and 20 deletions.
4 changes: 4 additions & 0 deletions docs/_build/_build/.buildinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: ba5cf1cc2784bbc03cfadf1d3efadcce
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file not shown.
Binary file added docs/_build/_build/.doctrees/environment.pickle
Binary file not shown.
Binary file added docs/_build/_build/.doctrees/first_steps.doctree
Binary file not shown.
Binary file added docs/_build/_build/.doctrees/index.doctree
Binary file not shown.
Binary file not shown.
Empty file added docs/_build/_build/.nojekyll
Empty file.
Binary file added docs/_build/_build/_images/schema.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 72 additions & 0 deletions docs/_build/_build/_sources/documentation.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
==============
Documentation
==============

.. toctree::
:maxdepth: 2


Convert2PDB
-----------

General usage::

convert_sdfs2pdb.py [-h] [-o OUT_FOLDER] [-ch CHAIN] [-res RESNAME] [-rn RESNUM] [-pn NAMING_PROPERTY] sdf_input

Required parameters:
++++++++++++++++++++
Take in mind that these parameters are positionals, so the order matters:

- **sdf_input**: Path to a library of fragments or ligands in SDF file. The ligands/fragments must be previously protonated and optimized .

Optional arguments:
+++++++++++++++++++
- **-o**, **---out_folder**: Path of the output folder. PDB output files will be stored in this path. Default: "out". Type: str.
- **-ch**, **---chain**: Label for the chain of the ligand in new PDBs. Default: "L". Type: str.
- **-res**, **---resname**: Label for the residue name of the ligand in new PDBs. Default: "LIG". Type: str.
- **-rn**, **---resnum**: Label for the residue number of the ligand in new PDBs. Default: 1. Type: int.
- **-pn**, **---naming_property**: Property of the SDF file that will we used to name the output PDB files. By default: "Molecule Name". If the property is not found in the SDF file the molecules are renamed automatically as "MOL{:09d}", where the content in brackets will be replaced by a 9 digits counter.

Example:
++++++++

Normally you do not need to change any optional parameter to run Convert2PDB, so for common use try the following command::

convert_sdfs2pdb.py library.sdf

If, for some reason, you want that to name the chain of the ligands as "Z", the residue name as "WAT", and the residue number as 100::

convert_sdfs2pdb.py library.sdf --chain Z --resname WAT --resnum 100

Prepare To Frag
---------------

General usage::

prepare_to_frag.py [-h] [-m {first-occurrence}] [-o OUT] library_path pdb_complex heavy_atom_pdb_complex

Required parameters:
++++++++++++++++++++
Take in mind that these parameters are positionals, so the order matters:

- **library_path**: Path to the folder that contains the library of fragments or ligands in PDF file. This ideally would be the output folder of Convert2PDB, but if you have another library of PDB files already prepared it can be used anyway. REMINDER: the program will check if all files inside the folder are PDBs, otherwise an exception will rise!

- **pdb_complex**: Path to a ligand-protein complex. The ligand should be the core or scaffold to grow fragments onto it with FragPELE.

- **heavy_atom_pdb_complex**: Atom name of the heavy atom of the previous core/scaffold to grow fragments onto it. All links between core and fragment will be generated through this atom.

Optional arguments:
+++++++++++++++++++

- **-o**, **---out**: Path of the output file. By default the output file will be stored into the library_path and named "serie_file_{}.conf", filling the brackets with the pdb_complex name. Type: str.
- **-m**, **---mode**: Choose between different scanning modes.
- first-occurrence: the first heavy atom found with at least one hydrogen atom bonded will be selected.

Currently, only one single mode is available but in the future we will implement more.

Example:
++++++++

Easy example of usage::

FragmentTools/prepare_to_frag.py /out/pdbs /path/to/complex.pdb C1
47 changes: 47 additions & 0 deletions docs/_build/_build/_sources/first_steps.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
===============
Getting Started
===============

.. toctree::
:maxdepth: 2


The general workflow of the preparation of a fragment's library follows the next schema:

.. image:: img/schema.png
:scale: 80 %
:align: center

Input Files
-----------

Therefore, the required input file is:

* SDF file: Must contain fragments or ligands in 3D, optimized, and protonated. We recommend to use previously LigPrep onto the library to do the preparation.


Pipeline
--------
The whole pipeline consist of two main steps: prepare and scan. The first one would be performed by the script convert2pdb.py,
and the second by FragmentTools/prepare2frag.py

**Convert2PDB**
+++++++++++++++

Program to transform 3D SDF files with large amount of molecular compounds to several PDBs, renaming also chains,
resnames, and resnums to the desired ones.

i.e::

python convert_sdfs2pdb.py library.sdf --out_folder library_in_pdb --chain L --resname LIG --resnum 1


**Prepare to Frag**
+++++++++++++++++++

Program to prepare FragPELE instruction's from PDB libraries.

i.e::

python FragmentTools/prepare_to_frag.py /path/to/library /path/to/complex.pdb C1 -m first-occurrence -o /out/path/instructions.conf

51 changes: 51 additions & 0 deletions docs/_build/_build/_sources/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
.. LibPrep documentation master file, created by
sphinx-quickstart on Tue Nov 12 16:22:00 2019.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
LibPrep: Library Preparer
==========================

LibPrep is a Python Package with several modules to process PDB files (complexes) and SDF files (drug libraries).

Fragment's libraries usually are huge files that contains thousands of chemical compounds, with variable chemical
properties. LibPrep aims to facilitate the processing and pre-analysis of all these molecules and filter them to
further uses, such as running more computationally expensive programs (`PELE <https://pele.bsc.es/pele.wt>`_).

It has been designed to automatically prepare the input files to run `FragPELE <https://github.com/carlesperez94/frag_pele/tree/master>`_
towards a fragment library in SDF format. However, it can be used with other proposes.

The general workflow of the preparation of a fragment's library follows the next schema:

.. image:: img/schema.png
:scale: 80 %
:align: center

LibPrep is focused in the "Prepare" and "Scan" parts of the process. In previous steps, you will require LigPrep or
another similar program to protonate and optimize the molecules to the correct pH and 3D geometry.

Requirements:

- Python 3.6 or higher
- Pandas 0.18.0 or higher
- Rdkit 2019.03.4 or higher

Installation & Starting
=======================
.. toctree::
installation
first_steps

Documentation
=============
.. toctree::
documentation



Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
56 changes: 56 additions & 0 deletions docs/_build/_build/_sources/installation.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
.. LibPrep documentation master file, created by
sphinx-quickstart on Tue Nov 12 16:22:00 2019.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Installation
==========================

.. toctree::
:maxdepth: 2

Conda (Recommended)
-------------------
If you want, you can create a conda environment to work with lib_prep::

conda create -n lib_prep_env python=3.7
conda activate lib_prep_env

Otherwise, you can just continue here by installing the package into your current conda environment::

conda install -c carlesperez94 -c rdkit -c nostrumbiodiscovery lib_prep


Now, it should work. We strongly recommend you to run the tests, but is not mandatory.

Just remember that if you want to logout of this conda environment run the following when you finish::

conda deactivate


Source
------
It is not recommended to install lib_prep from source, because you will need to install rdkit on your own. But if you feel brave, just ensure
that you have rdkit installed in your sistem and run the setup.py in the root lib_prep directory::

git clone https://github.com/carlesperez94/lib_prep.git
cd lib_prep
python setup.py install

If you have permissions problems try with::

sudo python setup.py install

Test
----
First of all you need to install pytest into your conda envirnoment::

conda install pytest

If you have pytest already installed, go to the testing directory and run test_all.py::

cd lib_prep/tests
pytest test_all.py



Binary file added docs/_build/_build/_static/ajax-loader.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit ec3b922

Please sign in to comment.