Skip to content

Instantly share code, notes, and snippets.

View biochem-fan's full-sized avatar
🍀

biochem_fan biochem-fan

🍀
  • Osaka
View GitHub Profile
@biochem-fan
biochem-fan / FormatHDF5SaclaMPCCD.py
Last active May 13, 2022 03:53
FormatHDF5SaclaMPCCDCheetah.py to support MPCCD in DIALS
# This has been merged into the official dxtbx depository.
# Please get the latest version from https://github.com/dials/dxtbx/blob/main/src/dxtbx/format/FormatHDF5SaclaMPCCD.py.

Tested Environment

  • Ubuntu 20.04 LTS
  • CUDA 11.6
  • GCC 9.4.0
  • Mono 6.12.0

Be careful with your driver and runtime version! For example, when I tried to run a binary compiled with CUDA 9.2 on a machine with CUDA runtime 9.0, it said 'DeviceCount = 0'.

@biochem-fan
biochem-fan / atom2svg.py
Last active March 30, 2023 23:31
atom2svg
# atom2svg.py by @biochem_fan
# VERSION: 210224
# License: GPLv2 or later (ask me if this is inconvenient for you)
#
# LIMITATIONS:
# - This supports only a single chain. If you have more chains, shift residue IDs and merge chains.
#
# TODO:
# - Residue numbers (how to pack??)
#
@biochem-fan
biochem-fan / BoxNet2DRunner.cs
Last active September 16, 2023 23:37
WarpConsole
/* BoxNet2D runner
* Based on Warp 1.0.7 by Dimitry Tegunov https://github.com/cramerlab/warp/
* Command line interface and Linux port by @biochem_fan
* Licensed under GPLv3
*/
using System;
using System.IO;
using System.Linq; // for toList()
using System.Diagnostics; // for Stopwatch
# Group particles by time by @biochem_fan
# GPLv3; contact me if you want other license
import sys
import numpy as np
from collections import OrderedDict
def load_star(filename):
from collections import OrderedDict
# This is not a very serious parser; should be token-based.
@biochem-fan
biochem-fan / NOTES.md
Last active March 13, 2024 07:29
AlphaFold2 without Docker

Warning: this is my personal messy ad-hoc note. Not intended for production installation. Instruction by @kalinialab is probably better.

My environment

  • Cent OS 7.0
  • CUDA 11.2
  • Without root accoumt

Directories

@biochem-fan
biochem-fan / NOTES.md
Last active May 26, 2024 05:36
Warp-RELION4-M Protocol
@biochem-fan
biochem-fan / FormatTIFFTVIPS.py
Last active June 27, 2023 02:15
a dxtbx class for multi-frame TIFF images from TVIPS cameras
# This dxtbx class has been renamed to FormatTIFFMultipage.py and the latest version is now hosted in
# https://github.com/GKLabIPR/MicroED/blob/main/scripts/FormatTIFFMultipage.py.
@biochem-fan
biochem-fan / CMakeLists.txt
Last active October 1, 2022 08:29
Homebrew libomp GCC incompatibility
# A simple project to show including /opt/homebrew/include
# in the GCC search path breaks OpenMP because GCC picks up
# libomp headers for LLVM.
# https://github.com/3dem/relion/issues/913#issuecomment-1263499265
# On Mac OS X:
# CC=gcc-12 cmake ..; make; ./omp_test # hangs
# CC=gcc-12 cmake .. -DAVOID_JPEG=ON; make; ./omp_test # OK
# gcc-12 -o omp_test ../main.c -fopenmp; ./omp_test # OK
@biochem-fan
biochem-fan / FormatROD.py
Last active August 28, 2023 08:49
dxtbx class for Rigaku Hypix detector
# This has been merged to the dxtbx (with many updates).
# See https://github.com/cctbx/dxtbx/blob/main/src/dxtbx/format/FormatROD.py.