Skip to content

Instantly share code, notes, and snippets.

@sishida21
sishida21 / RDKit_Snippets
Last active May 24, 2023 01:56
RDKit snippets
‎‎​
@sishida21
sishida21 / eman2_for_defmap.ipynb
Last active May 19, 2023 10:55
EMAN2_for_DEFMap.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sishida21
sishida21 / colabdefmap-ipynb.ipynb
Last active December 4, 2024 10:28
ColabDEFMap.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sishida21
sishida21 / elements_in_periodic_table.smi
Created June 10, 2020 14:49
All elements in periodic table
H
He
Li
Be
B
C
N
O
F
Ne
from logging import getLogger, StreamHandler, FileHandler, Formatter, INFO, DEBUG
def get_logger(level):
# logger
logger = getLogger(__name__)
logger.setLevel(level)
logger.propagate = False
# formatter
formatter = Formatter("%(asctime)s : %(levelname)s : %(message)s ")
import twitter
import json
def main():
api = twitter.Api(
consumer_key="",
consumer_secret="",
access_token_key="",
access_token_secret="",
@sishida21
sishida21 / role_assignment.gs
Last active January 27, 2020 12:31
Google Apps Script for Slack bot to randomly assign roles for members in Google Sheets.
function doPost(e) {
// Setting
const spreadSheetId = '';
const sheetName = ''
const pickNum = 2; // The number of members you wanna pick up
const slackWebhookUrl = '';
const isTest = true // set 'false' to deploy
// Get Spread Sheet (Slack ID, User name, Mask label)
const masterSheet = SpreadsheetApp.openById(spreadSheetId).getSheetByName(sheetName);
@sishida21
sishida21 / draw_molecule.py
Created January 7, 2020 07:44
Draw a molecule in a black color using RDkit.
from IPython.display import SVG
from rdkit import Chem
from rdkit.Chem import rdDepictor
from rdkit.Chem.Draw import rdMolDraw2D
from rdkit.Chem.Draw.MolDrawing import DrawingOptions
mol = Chem.MolFromSmiles("CC1(C(N2C(S1)C(C2=O)NC(=O)CC3=CC=CC=C3)C(=O)O)C") # Penicillin
rdDepictor.Compute2DCoords(mol) # for generating conformer ID
# create a drawer container
drawer = rdMolDraw2D.MolDraw2DSVG(300, 300)
@sishida21
sishida21 / template.md
Created June 30, 2019 13:10
README template.

Repository Name

Dependency

  • language: version
  • library: version

Setup

Usage

@sishida21
sishida21 / get_summary.py
Created March 5, 2019 03:23
Script for getting the summary of the chemical data set.
"""
File name: get_summary.py
Author: Shoichi Ishida
Description: Script for getting the summary of the chemical data set.
Date: 5 March 2019
"""
import argparse
import pandas as pd