[PYTHON] Calculate volume from the two-dimensional structure of a compound

It seemed that it was unexpectedly impossible to calculate the volume from the two-dimensional structure of the compound with built-in of openbabel and rdkit (I'm sad if I misunderstood this), so I implemented it with reference to the paper [1]. .. The unit is cubic angstrom.

https://github.com/keisuke-yanagisawa/python-tools/blob/master/calc_mol_volume.py

It has an implementation that depends on openbabel.

If you use this, for example, if you enter benzene,

from calc_mol_volume import *
import pybel

mol = pybel.readfile("sdf", "benzene.sdf").next()
print estimate_volume(mol)
# -> 81.1800000...

Will be. Also, annotate_sdf_volume is prepared in calc_mol_volume.py.

from calc_mol_volume import *

annotate_sdf_volume("benzene.sdf", "benzene_annotated.sdf")

You can also output a new sdf file by doing.

[1] Zhao YH, et al., "Fast calculation of van der Waals volume as a sum of atomic and bond contributions and its application to drug compounds", The Journal of Organic Chemistry, 68(19), 7368-7373, 2003.

Recommended Posts

Calculate volume from the two-dimensional structure of a compound
How to calculate the volatility of a brand
Calculate the probability of outliers on a boxplot
The story of launching a Minecraft server from Discord
Python points from the perspective of a C programmer
Steps to calculate the likelihood of a normal distribution
Calculate the product of matrices with a character expression?
Calculate the number of changes
Different from the import type of python. from A import B meaning
The story of a Django model field disappearing from a class
How to calculate the amount of calculation learned from ABC134-D
Create a correlation diagram from the conversation history of twitter
Share the physical volume of a dual boot PC between OSs.
A formula that simply calculates the age from the date of birth
Existence from the viewpoint of Python
[Python] Get the update date of a news article from HTML
The story of writing a program
Best 3 from the impressions of reading a new shell programming textbook
Calculate the shortest route of a graph with Dijkstra's algorithm and Python
Calculate the probability of being a squid coin with Bayes' theorem [python]
Get the average salary of a job with specified conditions from indeed.com
From a book that makes the programmer's way of thinking interesting (Python)
I made a function to see the movement of a two-dimensional array (Python)
I checked the contents of docker volume
Learning notes from the beginning of Python 1
I summarized the folder structure of Flask
Measure the relevance strength of a crosstab
GoF design pattern from the problem 2. Structure
Omit BOM from the beginning of the string
A quick overview of the Linux kernel
[python] [meta] Is the type of python a type?
A memo explaining the axis specification of axis
Get the filename of a directory (glob)
The story of blackjack A processing (python)
Notice the completion of a time-consuming command
Learning notes from the beginning of Python 2
SSH login to the target server from Windows with a click of a shortcut
[Numpy, scipy] How to calculate the square root of a semi-fixed definite matrix
Get the contents of git diff from python
Get the caller of a function in Python
Visualize the inner layer of a neural network
A memorandum of calling Python from Common Lisp
Calculate the memory sharing rate of Linux processes
DJango Memo: From the beginning (creating a view)
Calculate the total number of combinations with python
Make a copy of the list in Python
Find the number of days in a month
Change the decimal point of logging from, to.
A note about the python version of python virtualenv
The story of making a lie news generator
Finding the beginning of Abenomics from NT magnification 2
[Python] A rough understanding of the logging module
Output in the form of a python array
Extract only complete from the result of Trinity
A story of creating 16 * 16 dots from a Digimon photo
The story of making a mel icon generator
Finding the beginning of Abenomics from NT magnification 1
A discussion of the strengths and weaknesses of Python
From the introduction of pyethapp to the execution of contract
The transition of baseball as seen from the data
The story of moving from Pipenv to Poetry