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 | |
""" | |
A script to generate phonon trajectory from Phonopy's band.yaml. | |
Requirement: python3, numpy, PyYAML, ase | |
Author: @Ionizing | |
Acknowledgement: @QijingZheng | |
Date: 16:57, Jan 20th, 2025 | |
""" | |
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 h5py | |
import numpy as np | |
with h5py.File("test.h5", "w") as f: | |
# A is in SIMPLE DataSpace | |
f["A"] = np.array([1, 2]) | |
# B is in SCALAR DataSpace |
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 | |
from numpy.typing import NDArray | |
from scipy.spatial import Voronoi | |
import matplotlib.pyplot as plt | |
from matplotlib.axes import Axes | |
class RealCell: |
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 | |
NewerOlder