den-run-ai / ParticleGrid

Grid Generation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ParticleGrid

build Actions Status

Description

ParticleGrid is a SIMD accelerated 3D grid generation library. 3D grids are generated from conformed molecular points and can be used with conventional 3D deep learning tools.

Publications

2021 ELLIS Machine Learning for Molecule Discovery Workshop, our contribution.

Visualizations

Molecule 1 Molecule 2

Installation

Pip

Install via pip with:

pip install git+https://github.com/ParticleGrid/ParticleGrid.git

Source

Clone and build repo with:

git clone https://github.com/ParticleGrid/ParticleGrid.git
cd ParticleGrid
pip install .

How to Use

Generating a grid from 3D coordinates:

import numpy as np
from ParticleGrid import coord_to_grid

# points are in the format (channel, x, y, z)
test_points = np.array([0, 0.5, 0.5, 0.5],
                       [1, 0.0, 0.1, 0.2])

grid = coord_to_grid(test_points,
                     width=1,
                     height=1,
                     depth=1,
                     num_channels=2,
                     grid_size=32,
                     variance=0.05)

print(grid.shape)  # Generates a (2,32,32,32) grid

More example uses of ParticleGrid can be found in the examples directory.

Upcoming Features

  • Discretization
  • Per-atom weights and variance
  • 2D grids
  • Periodic crystal grids
  • Multi-threading support
  • GPU support
  • PyTorch integration

License

ParticleGrid has a BSD-style license, as found in the LICENSE file.

About

Grid Generation

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:C++ 53.9%Language:C 41.1%Language:Python 4.4%Language:Makefile 0.7%