Skip to content

Instantly share code, notes, and snippets.

@itsuwari
itsuwari / atomli-live-md-colab.ipynb
Last active November 14, 2026 19:04
Atomli: native geodesic interpolation, Diels–Alder NEB, vibrations, and saved MD
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@itsuwari
itsuwari / li-graphite-voltage.ipynb
Last active November 9, 2026 08:25
First-Principles Li-Ion Battery Voltage & Multi-Li+ Electrolyte Clustering (GPU r2SCAN-3c + MLIP + g-xTB + CCSD(T))
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@itsuwari
itsuwari / drift-kinetic-initial.ipynb
Last active November 8, 2026 06:56
TreeTensor Python demos · open in Colab
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@itsuwari
itsuwari / drift-kinetic-initial.ipynb
Last active November 8, 2026 04:48
TreeTensor Python demos · open in Colab
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@itsuwari
itsuwari / mape-macos.sh
Last active December 4, 2024 02:34
mape-macos.sh
#!/bin/sh
# Define variables
BR='スクショのoption peeraddrのアドレスをそのまま書く' # Remote IPv6 address
CE='スクショのCEを書く' # Local IPv6 address
IP4='スクショのIPv4アドレスを書く' # Local IPv4 address
PSID='スクショのPSIDを書く' # PSID
WANDEV='上記のifconfigで特定したインターフェース' # WAN interface
TUNDEV='gif0' # Tunnel interface name
@itsuwari
itsuwari / mape.py
Last active October 3, 2024 05:35
Calculate V6PLUS ipv4 address and ports
#!/usr/bin/env python3
import sys
def calc_ipv4_and_ports(prefix):
ruleprefix31 = {
0x240b0010: [106, 72],
0x240b0012: [14, 8],
0x240b0250: [14, 10],
0x240b0252: [14, 12],
0x24047a80: [133, 200],
from ase.build import molecule
from ase.optimize import FIRE
from ase.vibrations import Vibrations
import time
def run_vibrational_analysis(atoms, calculator, calc_name, box_size=20.0, fmax=0.01, steps=500):
"""
Function to perform optimization, vibrational analysis, and print the summary.
@itsuwari
itsuwari / orbmodels2onnx.py
Created September 4, 2024 13:45
ORB-MODELS to ONNX
import torch
from orb_models.forcefield import pretrained
from orb_models.forcefield.base import AtomGraphs
# 1. Load the Pretrained Model (choose one):
model = pretrained.orb_d3_v1() # Or another version like orb_d3_v1, etc.
# 2. Access the Core Model:
core_model = model.model # This is the MoleculeGNS instance
@itsuwari
itsuwari / china-dnsmasq.conf
Created March 11, 2023 03:12
China dnsmasq.conf
This file has been truncated, but you can view the full file.
server=/0-100.com/114.114.114.114
server=/0-6.com/114.114.114.114
server=/00.net/114.114.114.114
server=/000.link/114.114.114.114
server=/00000.host/114.114.114.114
server=/00042.com/114.114.114.114
server=/00058.com/114.114.114.114
server=/0006266.com/114.114.114.114
server=/0007.net/114.114.114.114
server=/000714.xyz/114.114.114.114
@itsuwari
itsuwari / topsis.py
Created March 15, 2020 18:46
Topsis in Python
import numpy as np
import warnings
class topsis:
a=None #Matrix
w=None #Weight matrix
r=None #Normalisation matrix
m=None #Number of rows
n=None #Number of columns
aw=[] #worst alternative
ab=[] #best alternative