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, |
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
#define STR2(x) #x | |
#define STR(x) STR2(x) | |
#ifdef __APPLE__ | |
#define USTR(x) "_" STR(x) | |
#else | |
#define USTR(x) STR(x) | |
#endif | |
#ifdef _WIN32 |
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
# Let VER_STR be the version string | |
VER_STR="v1.14.514-rc-v1.919.810-tnok.." | |
# Use `sed` to extract the MAJOR, MINOR, PATCH number | |
echo $VER_STR | sed -nE 's/^v([0-9]+).([0-9]+).([0-9]+)(.*)$/\1 \2 \3/p' | |
# prints "1 14 514" | |
# Convert "1 14 514" to an array of ["1", "14", "514"] | |
VER=($(echo $VER_STR | sed -nE 's/^v([0-9]+).([0-9]+).([0-9]+)(.*)$/\1 \2 \3/p')) | |
echo ${VER[0]} # prints 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 julia | |
using Printf: @printf; | |
function bc(x, L) | |
mod(x-1, L) + 1; | |
end | |
function totalEnergy(grid ::Matrix{Int64}) ::Float64 | |
(x, y) = size(grid); |
NewerOlder