Free energy perturbation (FEP) is useful method for Computer aid drug design. The method calculates energy difference between several similar molecules. And the system is closed system. To perform the calculation for several molecules. The efficient method of making molecules system is required. I found an interesting article today. The url is below.
The authors developed the library for making the cycle named LOMAP. It is python library ;) so user can install lomap from conda or pypi.
LOMAP makes closed molecular system for FEP according to the following five rules.
– Compounds being compared should be as similar as possible, minimizing atomic deletions and insertions.
– Rings should be preserved as much as possible
– Ligands being compared must share the same net charge.
– Portions of multi-ring systems can only be deleted if rings are planar, and this should be avoided when possible
– Every molecule must be part of at least one closed therby relatmodynamic cycle
– The set of planned calculations should be spanned by relatively few calculations.
The library seems useful for not only FEP but also general drug discovery project. I would like to use it ASAP.
I tried to use it. However to install the package PyQt4.11.4 and networkx 1.11 and several old packages are required. I had many troubles to make the env. (of course Docker is good solution to solve it I know…)
So I decided to fork the repo and modify the code for PyQt5 and networkx 2.x.
There are some difficulties to do it because major version up from networkx1 to network2 changes some methods. So lomap didn’t work well at first. I struggled lots of time to modify the code and now the code worked.
I tested basic mols. Most of the following code is same as the code in README. User need to calculate similarity matrix by calling build_matrices function then call build_graph for graph building.
import lomap import networkx as nx db_mol = lomap.DBMolecules('test/basic/', output=True) # or db_mol = lomap.DBMolecules('test/radial/', output=True) strict, loose = db_mol.build_matrices() nx_graph = db_mol.build_graph()
Now ready. Make GraphGen object for graph saving.
Then draw graph and call writeGraph.
from lomap import graphgen ggen=graphgen.GraphGen(db_mol) ggen.draw() ggen.writeGraph()
writeGraph generates several file format graph images such as .eps, .png, .pdf.
Blue edge shows allowed transformations which is non braking rings/bonds. My modified code assigned 2-Naphthol as a singleton. Is it correct behaviour?
And following view seems good I think.
Next example seems work well.
I have to understand more details of the original code and compare result between my modified version and original version.
My modified version can get from git repo. URL is below.
And original repo URL is below.
Any comments and suggestions will be highly appreciated. ;)