An open API service indexing awesome lists of open source software.

https://github.com/sinagilassi/molvizr3d

A Python package for loading, rendering, and interactively visualizing molecular structures in 3D from various formats like SDF.
https://github.com/sinagilassi/molvizr3d

chemistry molecule-viewer molecule-visualization

Last synced: 7 months ago
JSON representation

A Python package for loading, rendering, and interactively visualizing molecular structures in 3D from various formats like SDF.

Awesome Lists containing this project

README

          

# MolVizr3D: Molecular Visualizer in 3D

![Downloads](https://img.shields.io/pypi/dm/MolVizr3D) ![PyPI](https://img.shields.io/pypi/v/MolVizr3D) ![Python Version](https://img.shields.io/pypi/pyversions/MolVizr3D.svg) ![License](https://img.shields.io/pypi/l/MolVizr3D)

MolVizr3D is a Python package designed to provide an intuitive and powerful solution for visualizing molecular structures in three dimensions. This package supports various molecule formats such as SDF, MOL, and more, allowing users to easily load and render complex molecular structures with high-quality 3D graphics.

**Key Features:**

* `Wide Format Support:` Load and visualize molecular structures from various file formats including SDF, MOL, and others.
* `High-Quality 3D Rendering:` Generate detailed and accurate 3D visualizations of molecular structures.
* `Interactive Visualization:` Rotate, zoom, and explore molecules interactively to better understand their geometry and properties.
* `Customization:` Customize visual aspects such as colors, styles, and labels to suit your specific needs.
* `Integration:` Seamlessly integrates with other computational chemistry tools and workflows.

The current version parses only `sdf` files!

## Google Colab

You can use the following code to run MolVizr3D in Google Colab:

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1Bh8kyyfo6V_GJEI5dzOGAr2B7SgaoffF?usp=sharing)

![Alt text](https://drive.google.com/uc?export=view&id=1LNPyMneyKpTl2cD_7ktcJzIVcRL5L7RJ).

## Installation

Install MolVizr3D with pip

```python
pip install MolVizr3D
```

## Examples

In `google colab`, need to install these packages as:

```python
# step 1:
!pip install ipympl

# step 2:
from google.colab import output
output.enable_custom_widget_manager()

# step 3:
%matplotlib ipympl
import matplotlib.pyplot as plt
```

Import the package as:

```python
import molvizr3d as mv3d
```

To check mv3d version:

```python
# check mv3d version
print(mv3d.__version__)
```

To visualize the structure of compound using its `sdf` file:

```python
# sdf file
sdf_file_name_1 = 'test\Conformer3D_COMPOUND_CID_7979.sdf'
sdf_file = os.path.join(os.getcwd(), sdf_file_name_1)
# visualize compound by sdf file
mv3d.td(sdf_file)
```

To visualize the structure of compound using its InChI

```python
# InChI
inchi = 'InChI=1S/C3H8/c1-3-2/h3-4H,1H2,2H3'
# visualize compound by inchi
mv3d.td_by_inchi()
```

## FAQ

For any question, contact me on [LinkedIn](https://www.linkedin.com/in/sina-gilassi/)

## Authors

- [@sinagilassi](https://www.github.com/sinagilassi)