Skip to content

Instantly share code, notes, and snippets.

@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;
#include <openbabel/mol.h>
#include <openbabel/obconversion.h>
#include <iostream>
#include <fstream>
#include <iterator>
#include <string>
#include <map>
#include <vector>
#include <iostream>
#include <string>
#include <sstream>
#include <openbabel/mol.h>
#include <openbabel/obconversion.h>
#include <openbabel/builder.h>
using namespace std;
using namespace OpenBabel;
@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.

@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 / 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 / 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:
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
%chk=/home/yoshikawa/naphthalene_excited.chk
#p HF/3-21G Opt CIS
Naphthalene excited structure calculation
0 1
C 2.44670 -0.67152 0.02374
C 2.42779 0.72015 0.01820
C 1.20948 1.40137 0.00470
C -0.00617 0.69817 -0.00343
0CO_3CS6_A
OpenBabel06211905503D
76 79 0 0 1 0 0 0 0 0999 V2000
3.9824 3.9435 -1.1687 C 0 0 0 0 0 0 0 0 0 0 0 0
3.3558 3.9999 0.0052 C 0 0 0 0 0 0 0 0 0 0 0 0
1.9598 4.3426 -0.2972 C 0 0 0 0 0 0 0 0 0 0 0 0
1.3168 3.2716 -0.4635 C 0 0 0 0 0 0 0 0 0 0 0 0
0.0541 3.2334 -0.2169 C 0 0 1 0 0 0 0 0 0 0 0 0
-0.4429 1.8599 -0.1287 C 0 0 2 0 0 0 0 0 0 0 0 0