SkillAgentSearch skills...

AromTool

Aromatic stacking

Install / Use

/learn @hewg2008/AromTool
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

1. Introduction

AromTool is a Python-based tool for analyzing aromatic interactions between ligands (mostly drugs, or other material monomers) and receptors (mostly proteins, or other material monomers). With the help of the popular open source computational physio-chemistry libraries, such as ASE, OpenBabel, RDKit, Kekule, etc., and the internally integrated aromatic contact energy calculator based on neural network model as the back-end calculation tool, it can:

1 recognize, filter, transform, extract, construct and manipulate aromatic rings in ligand (mol2 format) and receptor (PDB format) files.

2 determine whether the aromatic ring between ligand and receptor has contact, construct and operate the aromatic contact, and output the contact conformation file in XYZ format.

3 output aromatic contact type, geometry (including contact distance and angle) and energy report (Excel format).

AromTool is mainly designed for pharmaceutical scientists to implement aromatic stacking analysis, build aromatic contact data sets and generate aromatic stacking analysis reports.

AromTool has the following design objectives:

1 Simple and easy to use. It can be used through command line tools and python scripts. For novice programmers (especially researchers in the field of materialization), python scripts are easy to understand (unlike C + +, Java and other languages with high learning costs), and it is very simple to use various functions of aromtool. All the tasks of aromtool are done through python.

2 Automatic integration of batch processing function. Unlike other physical chemistry programs such as MOE, Schrodinger and RDKit, users need to write batch code again.

3 Open source code is convenient for customization and extension. The code is based on the object-oriented Python style, and the core class is based on the numpy array (ndarray). It is convenient to integrate into all the Python code, and can easily expand the class or module. For example, calculators can customize other energy calculators.

2. Installation

AromTool can be installed locally by downloading the entire package. Currently only supports Windows system.

Dependencies

python 3.7.6
tensorflow 1.13.1
scikit-learn 0.23.2
scipy 1.5.4
numpy 1.18.1
pandas 1.1.5
xlwt 1.3.0
ase 3.20.0
openbabel 2.4.1
rdkit 2019.09.3
pyexecjs 1.5.1
sqlite 3.30.1

3. Usage

Description Below displays how to use AromTool. All related scripts and data files are in director of 'example'.

Build Ring

The basic object of AromTool is the Ring object. Combined with Atoms object from ASE, the Ring object not only remains the attributes and methods of Atoms object like collection of each atoms, but it also includes the attributes of centroid, normal vector, PDB codes and contact type, as well as methods about conversion of data's structure and so on.

Build Ring from Data

Two parameters are needed in order to build ring from data - symbols(atoms' elements) and positions(coordinate of atoms).

from aromtool.ring import Ring
symbols = ['C', 'C', 'H', 'C', 'C', 'H', 'C', 'H', 'C']
positions = [[106.876,17.424,97.544 ],
             [106.793,18.503,98.487 ],
             [106.7001,19.5244,98.1359],
             [106.833,18.229,99.892 ],
             [106.932,16.93,100.366 ],
             [106.9508,16.7397,101.433 ],
             [107.008,15.86,99.456 ],
             [107.0763,14.8482,99.8391],
             [106.998,16.065, 98.05  ]]
ring = Ring(symbols, positions)

Build Ring from File

Build ring from file and read ring information.

From mol2 File

from aromtool.builder import Builder

mol2path = r'7std_ligand.mol2'

# Generate the list of ring objects
rings=Builder.get_mol2_rings(mol2path, only_ch=False)
print('the list of ring objects:')
print(rings)

# Print the number of rings
ring_numbers=len(rings)
print('the number of rings:')
print(ring_numbers)

# the first ring
ring=rings[0]
print('the first ring:')
print(ring)

# the element of the first ring
elements=ring.elements
print('element: ')
print(elements)

# coordinate:
positions=ring.positions
print('coordinate: ')
print(positions)

Results:

the list of ring objects:
[<aromtool.ring.Ring object at 0x0000000010F3AAC8>]
the number of rings:
1
the first ring:
<aromtool.ring.Ring object at 0x0000000010F3AAC8>
element: 
['C', 'C', 'H', 'C', 'H', 'C', 'C', 'H', 'C', 'H']
coordinate: 
[[30.937   8.868  35.491 ]
 [30.985   9.313  34.198 ]
 [31.463   8.7096 33.4348]
 [30.43   10.519  33.868 ]
 [30.4725 10.862  32.8406]
 [29.828  11.292  34.804 ]
 [29.769  10.823  36.093 ]
 [29.27   11.4144 36.8521]
 [30.329   9.622  36.437 ]
 [30.2858  9.2759 37.4634]]

Build Ring from PDB File

from aromtool.builder import Builder

pdbpath = r'7std_protein.pdb'

rings=Builder.get_pdb_rings(pdbpath,filters=['PHE', 'TYR', 'TRP'])

print('the list of ring objects:')
print(rings)

# the number of rings:
ring_numbers=len(rings)
print('the number of rings:')
print(ring_numbers)

# the first ring
ring=rings[0]
print('the first ring:')
print(ring)

# the element of the first ring
elements=ring.elements
print('elements: ')
print(elements)

# coordinate:
positions=ring.positions
print('coordinate: ')
print(positions)

#centroid:
centroid=ring.centroid
print('centroid: ')
print(centroid)

Results:

the list of ring objects:
[<aromtool.ring.Ring object at 0x00000000120A13C8>, <aromtool.ring.Ring object at 0x00000000120A3C48>, <aromtool.ring.Ring object at 0x00000000120A3E08>, <aromtool.ring.Ring object at 0x00000000120A3FC8>, <aromtool.ring.Ring object at 0x00000000120A61C8>, <aromtool.ring.Ring object at 0x00000000120A63C8>, <aromtool.ring.Ring object at 0x00000000120A6588>, <aromtool.ring.Ring object at 0x00000000120A6748>, <aromtool.ring.Ring object at 0x00000000120A6908>, <aromtool.ring.Ring object at 0x00000000120A6388>, <aromtool.ring.Ring object at 0x00000000120A6C48>, <aromtool.ring.Ring object at 0x00000000120A6E08>, <aromtool.ring.Ring object at 0x00000000120A6FC8>, <aromtool.ring.Ring object at 0x00000000120AB1C8>, <aromtool.ring.Ring object at 0x00000000120AB388>, <aromtool.ring.Ring object at 0x00000000120AB548>, <aromtool.ring.Ring object at 0x00000000120AB708>, <aromtool.ring.Ring object at 0x00000000120AB8C8>, <aromtool.ring.Ring object at 0x00000000120ABA88>, <aromtool.ring.Ring object at 0x00000000120ABC48>, <aromtool.ring.Ring object at 0x00000000120ABE08>, <aromtool.ring.Ring object at 0x00000000120ABFC8>, <aromtool.ring.Ring object at 0x00000000120B11C8>, <aromtool.ring.Ring object at 0x00000000120B1388>, <aromtool.ring.Ring object at 0x00000000120B1548>, <aromtool.ring.Ring object at 0x00000000120B1708>, <aromtool.ring.Ring object at 0x00000000120B18C8>, <aromtool.ring.Ring object at 0x00000000120B1A88>, <aromtool.ring.Ring object at 0x00000000120B1C48>, <aromtool.ring.Ring object at 0x00000000120B1E08>, <aromtool.ring.Ring object at 0x00000000120B1FC8>, <aromtool.ring.Ring object at 0x00000000120B61C8>, <aromtool.ring.Ring object at 0x00000000120B6388>, <aromtool.ring.Ring object at 0x00000000120B6548>, <aromtool.ring.Ring object at 0x00000000120B6708>, <aromtool.ring.Ring object at 0x00000000120B68C8>, <aromtool.ring.Ring object at 0x00000000120B6A88>, <aromtool.ring.Ring object at 0x00000000120B6C48>, <aromtool.ring.Ring object at 0x00000000120B6E08>, <aromtool.ring.Ring object at 0x00000000120B6FC8>, <aromtool.ring.Ring object at 0x00000000120BC1C8>, <aromtool.ring.Ring object at 0x00000000120BC388>, <aromtool.ring.Ring object at 0x00000000120BC548>, <aromtool.ring.Ring object at 0x00000000120BC708>, <aromtool.ring.Ring object at 0x00000000120BC8C8>, <aromtool.ring.Ring object at 0x00000000120BCA88>, <aromtool.ring.Ring object at 0x00000000120BCC48>, <aromtool.ring.Ring object at 0x00000000120BCE08>, <aromtool.ring.Ring object at 0x00000000120BCFC8>, <aromtool.ring.Ring object at 0x00000000120C21C8>, <aromtool.ring.Ring object at 0x00000000120C2388>, <aromtool.ring.Ring object at 0x00000000120C2548>, <aromtool.ring.Ring object at 0x00000000120C2708>, <aromtool.ring.Ring object at 0x00000000120C28C8>, <aromtool.ring.Ring object at 0x00000000120C2A88>, <aromtool.ring.Ring object at 0x00000000120C2C48>, <aromtool.ring.Ring object at 0x00000000120C2E08>, <aromtool.ring.Ring object at 0x00000000120C2FC8>, <aromtool.ring.Ring object at 0x00000000120C81C8>, <aromtool.ring.Ring object at 0x00000000120C8388>, <aromtool.ring.Ring object at 0x00000000120C8548>, <aromtool.ring.Ring object at 0x00000000120C8708>, <aromtool.ring.Ring object at 0x00000000120C88C8>, <aromtool.ring.Ring object at 0x00000000120C8A88>, <aromtool.ring.Ring object at 0x00000000120C8C48>, <aromtool.ring.Ring object at 0x00000000120C8E08>, <aromtool.ring.Ring object at 0x00000000120C8FC8>, <aromtool.ring.Ring object at 0x00000000120CD1C8>, <aromtool.ring.Ring object at 0x00000000120CD388>]
the number of rings:
69
the first ring:
<aromtool.ring.Ring object at 0x00000000120A13C8>
elements: 
['C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'H', 'H', 'H', 'H', 'H', 'H', 'N']
coordinate: 
[[25.3   19.741 37.075]
 [24.444 19.885 35.014]
 [24.758 18.534 35.275]
 [23.884 20.231 33.774]
 [24.81  20.638 36.186]
 [23.99  17.886 33.129]
 [24.538 17.525 34.342]
 [23.662 19.231 32.839]
 [25.664 19.987 38.073]
 [25.592 17.607 37.017]
 [23.628 21.267 33.55 ]
 [23.806 17.118 32.378]
 [24.79  16.487 34.562]
 [23.23  19.484 31.871]
 [25.272 18.473 36.537]]
centroid: 
24.517555555555557,19.127111111111113,34.90788888888889
normal vector: 
-2.7468270000000055,-0.4237380000000033,1.1112400000000038

Build Contact


Contact object is the main object of AromTool. It contains entries to the geometry informatio

View on GitHub
GitHub Stars4
CategoryDevelopment
Updated1y ago
Forks2

Languages

Python

Security Score

50/100

Audited on Dec 6, 2024

No findings