This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from functools import lru_cache | |
import numpy as np | |
from numpy.typing import NDArray | |
from vaspwfc import vaspwfc | |
class UnfoldSystem: | |
def __init__(self, wavecar: str, M, *, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from enum import Enum, unique | |
import numpy as np | |
import matplotlib as mpl | |
import matplotlib.pyplot as plt | |
from matplotlib.patches import Ellipse | |
mpl.rcParams["font.sans-serif"] = "monospace" | |
mpl.rcParams["text.usetex"] = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib as mpl | |
from scipy.spatial import Voronoi | |
def get_reduced_voronoi(cell): | |
assert cell.shape == (2,2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SYSTEM = xxxxx | |
Startparameter for this Run: | |
NWRITE = 2 default is 2 | |
ISTART = 0 0-new 1-cont 2-same basic set | |
ICHARG = 1 charge: 1-file 2-atom 10-const | |
LCHARG = .TRUE. Write down charge densities or not | |
LWAVE = .TRUE. Write down wavefunctions or not | |
# LVTOT = .TRUE. Write LOCPOT, total local potential | |
# LVHAR = .TRUE. Write LOCPOT, Hartree potential only | |
# LELF = .TRUE. Write electronic localiz. function (ELF) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos:centos7.9.2009 | |
RUN yum update -y && yum group install -y 'Development Tools' | |
# install rust | |
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y --target x86_64-unknown-linux-gnu | |
ENV PATH="${HOME}/.cargo/bin:${PATH}" | |
# install blas | |
RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env julia | |
using LinearAlgebra; | |
using Printf; | |
import Random; | |
Random.seed!(1234); | |
N = 1_000_000; | |
δt = 0.1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import copy | |
from pathlib import Path | |
import shutil | |
from sys import argv | |
import numpy as np | |
from ase.io import read as poscar_reader | |
from ase import Atoms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import gzip | |
from xml.etree import ElementTree as ET | |
from glob import glob | |
import numpy as np | |
import numpy.typing as npt | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Credits to (Telegram): | |
// - @QC_Grove (zh) | blog.quarticcat.com (en/zh) | |
// - @bdbai_chat | |
trait Foo<T, U> { | |
type Output; | |
fn foo(a: T, b: U) -> Self::Output; | |
} | |
impl Foo<i32, f64> for () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::fmt; | |
use std::fmt::{Debug, Display, Formatter}; | |
use nom::{ | |
branch::alt, | |
bytes::complete::tag, | |
character::complete::multispace0 as multispace, | |
number::complete::double, | |
combinator::map, | |
multi::many0, |
NewerOlder