Skip to content

Instantly share code, notes, and snippets.

@n-yoshikawa
n-yoshikawa / convert.py
Last active November 6, 2019 12:36
Evaluating ETKDG with the Platinum dataset
# Generate 3D structure
from rdkit import Chem
from rdkit.Chem import AllChem
# https://github.com/n-yoshikawa/ob-fragment-generation/blob/master/rdkit/platinum-rdkit-etkdg.sdf
w = Chem.SDWriter('platinum-rdkit-etkdg.sdf')
# https://github.com/n-yoshikawa/ob-fragment-generation/blob/master/data/platinum.smi
with open("platinum.smi", "r") as f:
@n-yoshikawa
n-yoshikawa / molA.sdf
Created February 21, 2019 12:48
SDF files for Open Babel issue.
0Q1_4GPJ_A
OpenBabel02211917303D
Protoss
42 45 0 0 0 0 0 0 0 0999 V2000
32.9220 14.8880 -1.0770 C 0 0 0 0 0 0 0 0 0 0 0 0
32.5830 16.1240 -0.2780 C 0 0 0 0 0 0 0 0 0 0 0 0
33.5890 16.9660 0.0910 O 0 0 0 0 0 0 0 0 0 0 0 0
32.9790 18.0380 0.7860 N 0 0 0 0 0 0 0 0 0 0 0 0
31.6660 17.8070 0.8060 C 0 0 0 0 0 0 0 0 0 0 0 0
30.7590 18.8380 1.5090 C 0 0 0 0 0 0 0 0 0 0 0 0
@n-yoshikawa
n-yoshikawa / Dockerfile-COD
Last active October 19, 2018 07:21
Evaluation of fragment-based coordinate generation
FROM ubuntu:16.04
# COD version
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
git \
libcairo2-dev \
libeigen2-dev \
zlib1g-dev
RUN git clone https://github.com/n-yoshikawa/openbabel.git && \
@n-yoshikawa
n-yoshikawa / gsoc2018.md
Created August 4, 2018 06:40
Summary of my work at Google Summer of Code 2018

In Google Summer of Code 2018, I worked on Fast, Efficient Fragment-Based Coordinate Generation. My contribution was as follows:

Fragment-based coordinate generation

I implemented a faster coordinate generation method in this task. In this method, molecules are separated into fragments by rotable bonds. If a fragment is in our database, the coordinates of atoms in the fragment are set according to the information from the database.

#include <iostream>
#include <string>
#include <sstream>
#include <openbabel/mol.h>
#include <openbabel/obconversion.h>
#include <openbabel/builder.h>
using namespace std;
using namespace OpenBabel;
#include <openbabel/mol.h>
#include <openbabel/obconversion.h>
#include <iostream>
#include <fstream>
#include <iterator>
#include <string>
#include <map>
#include <vector>
@n-yoshikawa
n-yoshikawa / calc_rmsd.cpp
Last active July 13, 2018 12:52
Builder test codes
#include <iostream>
#include <sstream>
#include <openbabel/mol.h>
#include <openbabel/obconversion.h>
#include <openbabel/builder.h>
#include <openbabel/math/align.h>
using namespace std;
using namespace OpenBabel;