Skip to content

Instantly share code, notes, and snippets.

View GitHubEmploy's full-sized avatar
👾
Coding Like A Pro

Mohit Varikuti GitHubEmploy

👾
Coding Like A Pro
View GitHub Profile
@GitHubEmploy
GitHubEmploy / README.md
Last active November 16, 2020 20:07
Covid cure AI

#DOCUMENTAION

Deep Learning Coronavirus Cure

The goal is to create a novel small molecule which can bind with the coronavirus, using deep learning techniques for molecule generation and PyRx to evaluate binding affinities.

Binding scores of leading existing drugs (HIV inhibitors) are around -10 to -11 (the more negative the score the better), and around -13 for the drug Remdesivir which recently entered clinical testing.

By combining a generative RNN model with techniques and principles from transfer learning and genetic algorithms, Was able to create several small molecule candidates which achieved binding scores approaching -18.

Acknowledgements

class Net(nn.Module):
def __init__(self):
super(Net, self).__init__()
self.conv1 = nn.Conv2d(1, 64, kernel_size=(3, 3), padding=1)
self.conv2 = nn.Conv2d(64, 64, kernel_size=(3, 3), padding=1)
self.max_pool = nn.MaxPool2d(2, 2)
self.global_pool = nn.AvgPool2d(7)
self.fc1 = nn.Linear(64, 64)
self.fc2 = nn.Linear(64, 10)
import torch
import torchvision
import torchvision.transforms as transforms
num_epochs = 10
batch_size = 32
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
# MNIST dataset
train_dataset = torchvision.datasets.MNIST(root='data',
train=True,
transform=transforms.ToTensor(),
download=True)
test_dataset = torchvision.datasets.MNIST(root='data',
train=False,
transform=transforms.ToTensor())
optimizer = torch.optim.Adam(model.parameters(), lr=0.001)
loss_function = nn.CrossEntropyLoss()
model.to(device)
# Train the model
total_step = len(train_loader)
for epoch in range(num_epochs):
for i, (images, labels) in enumerate(train_loader):
# Move tensors to the configured device
images = images.to(device)
labels = labels.to(device)
# Forward pass
outputs = model(images)
with torch.no_grad():
correct = 0
total = 0
for images, labels in test_loader:
images = images.to(device)
labels = labels.to(device)
outputs = model(images)
_, predicted = torch.max(outputs.data, 1)
total += labels.size(0)
correct += (predicted == labels).sum().item()
torch.save(model.state_dict(), 'model.ckpt')
// ==UserScript==
// @name Geoguessr Cheat
// @namespace https://www.leonbrandt.com
// @version 2.0.0
// @description Press SHIFT + ALT + G and the location of your current geoguessr game will open in a new tab
// @author Leon Brandt
// @homepage https://www.leonbrandt.com
// @updateURL https://gist.githubusercontent.com/leonbrandt/16b3a70ef70939359357c908e6b0f06d/raw/geoguessr-cheat.user.js
// @match http*://*/*
// @grant none