Skip to content

Instantly share code, notes, and snippets.

View lan496's full-sized avatar

Kohei Shinohara lan496

View GitHub Profile
@lan496
lan496 / benchmark_structure_creation.ipynb
Last active November 26, 2021 02:29
Benchmark for creating structure objects
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lan496
lan496 / staticcrsgraph.cpp
Created March 2, 2021 13:53
Usage of Kokkos::StaticCrsGraph
#include <vector>
#include <cassert>
#include <iostream>
#include "Kokkos_Core.hpp"
#include "Kokkos_StaticCrsGraph.hpp"
// StaticGraphType<DataType, Space, Layout, MemoryTrait, SizeType>
using Space = Kokkos::DefaultExecutionSpace;
using StaticCrsGraphType = Kokkos::StaticCrsGraph<int, Space, void, void, int>;
@lan496
lan496 / LICENSE
Created February 9, 2021 01:26
This license applies to all my public gists: https://gist.github.com/lan496
This license applies to all public Gists in my accout, unless otherwise noted in the Gist:
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
@lan496
lan496 / rref.py
Created December 22, 2020 08:30
Reduced row echelon form
import numpy as np
def reduced_row_echelon_form(matrix: np.ndarray, atol=1e-8):
"""
return reduced row echelon form of a given matrix
Parameters
----------
matrix: (nr, nl)
@lan496
lan496 / nglview_pymatgen.ipynb
Last active December 8, 2020 16:32
Visualize pymatgen's structure with NGLView
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lan496
lan496 / numba_special.ipynb
Last active January 14, 2025 06:19
scipy.special function with numba
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lan496
lan496 / hopping_integral.ipynb
Created September 8, 2020 05:03
Table of interatomic matrix elements
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lan496
lan496 / plot_DOS.ipynb
Created September 1, 2020 06:37
plot DOS, pDOS, and COHP with pymatgen
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lan496
lan496 / ionic_radii.ipynb
Created August 29, 2020 08:01
plot Shannon effective ionic radius
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.